From 91d5bd883d9cbe129d88f8911cea973ff8f2eea4 Mon Sep 17 00:00:00 2001 From: MagdalenaKuch <57178283+MagdalenaKuch@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:39:32 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20maptiler?= =?UTF-8?q?/maptiler-maps-in-react@79ef025570b78f5c9c0c70374976f212e11e419?= =?UTF-8?q?2=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/index-BlUwhro2.css | 1 + .../assets/index-BtBazkGp.js | 709 ++++++++++++++++++ MagdalenaKuch-patch-1/index.html | 14 + MagdalenaKuch-patch-1/vite.svg | 1 + 4 files changed, 725 insertions(+) create mode 100644 MagdalenaKuch-patch-1/assets/index-BlUwhro2.css create mode 100644 MagdalenaKuch-patch-1/assets/index-BtBazkGp.js create mode 100644 MagdalenaKuch-patch-1/index.html create mode 100644 MagdalenaKuch-patch-1/vite.svg diff --git a/MagdalenaKuch-patch-1/assets/index-BlUwhro2.css b/MagdalenaKuch-patch-1/assets/index-BlUwhro2.css new file mode 100644 index 0000000..18b1a05 --- /dev/null +++ b/MagdalenaKuch-patch-1/assets/index-BlUwhro2.css @@ -0,0 +1 @@ +body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.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;-webkit-user-select:none;-moz-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 (forced-colors: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 (forced-colors: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 13z'/%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.5'/%3E%3C/svg%3E")}@media (forced-colors: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 13z'/%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.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.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 13z'/%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.5'/%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-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%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-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors: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-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%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-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.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-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%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-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%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 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors: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 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.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 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors: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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%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-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%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.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 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.4q.47.48.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.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.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.8 4.8 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.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 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.528q-.001.515-.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.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 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.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 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.7 4.7 0 0 1-1.782 1.884 4.77 4.77 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.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 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.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 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.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 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-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.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.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.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.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 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.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%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 (forced-colors: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.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 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.4q.47.48.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.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.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.8 4.8 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.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 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.528q-.001.515-.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.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 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.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 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.7 4.7 0 0 1-1.782 1.884 4.77 4.77 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.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 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.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 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.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 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-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.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.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.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.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 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.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){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.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 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.4q.47.48.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.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.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.8 4.8 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.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 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.528q-.001.515-.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.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 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.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 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.7 4.7 0 0 1-1.782 1.884 4.77 4.77 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.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 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.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 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.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 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-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.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.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.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.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 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.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%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;color:#000;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 (forced-colors: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 (forced-colors:active) and (prefers-color-scheme:light){.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;-moz-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;transition:opacity .2s;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:#0006;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}.mapboxgl-ctrl-group:not(:empty),.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 6px 2px #00000014}.mapboxgl-ctrl-group,.maplibregl-ctrl-group{background:#fff;border-radius:3px}.mapboxgl-ctrl-group button:focus:first-child,.maplibregl-ctrl-group button:focus:first-child{border-radius:3px 3px 0 0}.mapboxgl-ctrl-group button:focus:last-child,.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 3px 3px}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:1}.mapboxgl-ctrl .mapboxgl-ctrl-icon:hover,.maplibregl-ctrl .maplibregl-ctrl-icon:hover{filter:invert(39%) sepia(77%) saturate(909%) hue-rotate(182deg) brightness(89%) contrast(85%)}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9.5%2C9.25)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C13.75C6.737%2C13.75%206.509%2C13.653%206.315%2C13.46C6.122%2C13.266%206.025%2C13.038%206.025%2C12.775L6.025%2C8.225L1.475%2C8.225C1.212%2C8.225%200.984%2C8.128%200.79%2C7.935C0.597%2C7.741%200.5%2C7.513%200.5%2C7.25C0.5%2C6.987%200.597%2C6.759%200.79%2C6.565C0.984%2C6.372%201.212%2C6.275%201.475%2C6.275L6.025%2C6.275L6.025%2C1.725C6.025%2C1.462%206.122%2C1.234%206.315%2C1.04C6.509%2C0.847%206.737%2C0.75%207%2C0.75C7.263%2C0.75%207.491%2C0.847%207.685%2C1.04C7.878%2C1.234%207.975%2C1.462%207.975%2C1.725L7.975%2C6.275L12.525%2C6.275C12.788%2C6.275%2013.016%2C6.372%2013.21%2C6.565C13.403%2C6.759%2013.5%2C6.987%2013.5%2C7.25C13.5%2C7.513%2013.403%2C7.741%2013.21%2C7.935C13.016%2C8.128%2012.788%2C8.225%2012.525%2C8.225L7.975%2C8.225L7.975%2C12.775C7.975%2C13.038%207.878%2C13.266%207.685%2C13.46C7.491%2C13.653%207.263%2C13.75%207%2C13.75Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9.5%2C15.25)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.475%2C2.225C1.212%2C2.225%200.984%2C2.128%200.79%2C1.935C0.597%2C1.741%200.5%2C1.513%200.5%2C1.25C0.5%2C0.987%200.597%2C0.759%200.79%2C0.566C0.984%2C0.372%201.212%2C0.275%201.475%2C0.275L12.525%2C0.275C12.788%2C0.275%2013.016%2C0.372%2013.21%2C0.566C13.403%2C0.759%2013.5%2C0.987%2013.5%2C1.25C13.5%2C1.513%2013.403%2C1.741%2013.21%2C1.935C13.016%2C2.128%2012.788%2C2.225%2012.525%2C2.225L1.475%2C2.225Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C-3.24298%2C2.63257)%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix(1.20712%2C0%2C0%2C1.20712%2C14.9145%2C2.51292)%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M2.5%2C9.406L0%2C9.406L4%2C17.875L8%2C9.406L5.5%2C9.406C5.483%2C10.22%204.818%2C10.875%204%2C10.875C3.182%2C10.875%202.517%2C10.22%202.5%2C9.406Z%22%20style%3D%22fill%3Argb(29%2C50%2C98)%3Bfill-opacity%3A0.35%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix(1.20712%2C0%2C0%2C1.20712%2C14.9145%2C2.51292)%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C0.938L0%2C9.406L2.5%2C9.406L2.5%2C9.375C2.5%2C8.547%203.172%2C7.875%204%2C7.875C4.828%2C7.875%205.5%2C8.547%205.5%2C9.375L5.5%2C9.406L8%2C9.406L4%2C0.938Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl-group button,.maplibregl-ctrl-group button{height:33px;width:33px}.mapboxgl-ctrl-group button+button,.maplibregl-ctrl-group button+button{border-top:1px solid #0000001c}@keyframes blinker{50%{opacity:.3}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9.50001%2C9.25)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.673%2C8.577L0.567%2C6.51C0.391%2C6.443%200.253%2C6.335%200.152%2C6.186C0.051%2C6.037%200%2C5.868%200%2C5.68C0%2C5.49%200.051%2C5.325%200.152%2C5.183C0.253%2C5.041%200.391%2C4.936%200.567%2C4.869L12.846%2C0.31C13.021%2C0.242%2013.187%2C0.232%2013.343%2C0.279C13.498%2C0.326%2013.629%2C0.404%2013.738%2C0.513C13.846%2C0.621%2013.924%2C0.752%2013.971%2C0.907C14.018%2C1.063%2014.008%2C1.229%2013.94%2C1.404L9.381%2C13.703C9.3%2C13.892%209.186%2C14.031%209.037%2C14.119C8.888%2C14.206%208.732%2C14.25%208.57%2C14.25C8.408%2C14.25%208.253%2C14.203%208.104%2C14.108C7.956%2C14.013%207.841%2C13.879%207.76%2C13.703L5.673%2C8.577ZM8.53%2C11.11L11.691%2C2.559L3.14%2C5.72L6.991%2C7.259L8.53%2C11.11Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:blinker 1s linear infinite}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9.50001%2C9.25)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.673%2C8.577L0.567%2C6.51C0.391%2C6.443%200.253%2C6.335%200.152%2C6.186C0.051%2C6.037%200%2C5.868%200%2C5.68C0%2C5.49%200.051%2C5.325%200.152%2C5.183C0.253%2C5.041%200.391%2C4.936%200.567%2C4.869L12.846%2C0.31C13.021%2C0.242%2013.187%2C0.232%2013.343%2C0.279C13.498%2C0.326%2013.629%2C0.404%2013.738%2C0.513C13.846%2C0.621%2013.924%2C0.752%2013.971%2C0.907C14.018%2C1.063%2014.008%2C1.229%2013.94%2C1.404L9.381%2C13.703C9.3%2C13.892%209.186%2C14.031%209.037%2C14.119C8.888%2C14.206%208.732%2C14.25%208.57%2C14.25C8.408%2C14.25%208.253%2C14.203%208.104%2C14.108C7.956%2C14.013%207.841%2C13.879%207.76%2C13.703L5.673%2C8.577ZM8.53%2C11.11L11.691%2C2.559L3.14%2C5.72L6.991%2C7.259L8.53%2C11.11Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(0.598546%2C0.598546%2C-0.707107%2C0.707107%2C11.7313%2C1.9674)%22%3E%0A%20%20%20%20%20%20%20%20%3Crect%20x%3D%226.516%22%20y%3D%223.78%22%20width%3D%2219.271%22%20height%3D%220.716%22%20style%3D%22fill%3Argb(229%2C0%2C0)%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9.50001%2C8.89492)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.673%2C8.932L0.567%2C6.865C0.391%2C6.798%200.253%2C6.69%200.152%2C6.541C0.051%2C6.392%200%2C6.223%200%2C6.035C0%2C5.846%200.051%2C5.68%200.152%2C5.538C0.253%2C5.396%200.391%2C5.291%200.567%2C5.224L12.846%2C0.665C13.021%2C0.597%2013.187%2C0.587%2013.343%2C0.634C13.498%2C0.682%2013.629%2C0.759%2013.738%2C0.868C13.846%2C0.976%2013.924%2C1.107%2013.971%2C1.262C14.018%2C1.418%2014.008%2C1.584%2013.94%2C1.759L9.381%2C14.059C9.3%2C14.247%209.186%2C14.386%209.037%2C14.474C8.888%2C14.561%208.732%2C14.605%208.57%2C14.605C8.408%2C14.605%208.253%2C14.558%208.104%2C14.463C7.956%2C14.368%207.841%2C14.233%207.76%2C14.059L5.673%2C8.932Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9.50001%2C8.89492)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.673%2C8.932L0.567%2C6.865C0.391%2C6.798%200.253%2C6.69%200.152%2C6.541C0.051%2C6.392%200%2C6.223%200%2C6.035C0%2C5.846%200.051%2C5.68%200.152%2C5.538C0.253%2C5.396%200.391%2C5.291%200.567%2C5.224L12.846%2C0.665C13.021%2C0.597%2013.187%2C0.587%2013.343%2C0.634C13.498%2C0.682%2013.629%2C0.759%2013.738%2C0.868C13.846%2C0.976%2013.924%2C1.107%2013.971%2C1.262C14.018%2C1.418%2014.008%2C1.584%2013.94%2C1.759L9.381%2C14.059C9.3%2C14.247%209.186%2C14.386%209.037%2C14.474C8.888%2C14.561%208.732%2C14.605%208.57%2C14.605C8.408%2C14.605%208.253%2C14.558%208.104%2C14.463C7.956%2C14.368%207.841%2C14.233%207.76%2C14.059L5.673%2C8.932Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(0.598546%2C0.598546%2C-0.707107%2C0.707107%2C11.7313%2C1.9674)%22%3E%0A%20%20%20%20%20%20%20%20%3Crect%20x%3D%226.516%22%20y%3D%223.78%22%20width%3D%2219.271%22%20height%3D%220.716%22%20style%3D%22fill%3Argb(229%2C0%2C0)%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M10.685%2C14.817L22.511%2C10.669L18.217%2C22.082L15.824%2C17.233L10.685%2C14.817Z%22%20style%3D%22fill%3Argb(29%2C50%2C98)%3Bfill-opacity%3A0.2%3B%22%2F%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9.50001%2C9.25)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.673%2C8.577L0.567%2C6.51C0.391%2C6.443%200.253%2C6.335%200.152%2C6.186C0.051%2C6.037%200%2C5.868%200%2C5.68C0%2C5.49%200.051%2C5.325%200.152%2C5.183C0.253%2C5.041%200.391%2C4.936%200.567%2C4.869L12.846%2C0.31C13.021%2C0.242%2013.187%2C0.232%2013.343%2C0.279C13.498%2C0.326%2013.629%2C0.404%2013.738%2C0.513C13.846%2C0.621%2013.924%2C0.752%2013.971%2C0.907C14.018%2C1.063%2014.008%2C1.229%2013.94%2C1.404L9.381%2C13.703C9.3%2C13.892%209.186%2C14.031%209.037%2C14.119C8.888%2C14.206%208.732%2C14.25%208.57%2C14.25C8.408%2C14.25%208.253%2C14.203%208.104%2C14.108C7.956%2C14.013%207.841%2C13.879%207.76%2C13.703L5.673%2C8.577ZM8.53%2C11.11L11.691%2C2.559L3.14%2C5.72L6.991%2C7.259L8.53%2C11.11Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9.50001%2C8.89492)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.673%2C8.932L0.567%2C6.865C0.391%2C6.798%200.253%2C6.69%200.152%2C6.541C0.051%2C6.392%200%2C6.223%200%2C6.035C0%2C5.846%200.051%2C5.68%200.152%2C5.538C0.253%2C5.396%200.391%2C5.291%200.567%2C5.224L12.846%2C0.665C13.021%2C0.597%2013.187%2C0.587%2013.343%2C0.634C13.498%2C0.682%2013.629%2C0.759%2013.738%2C0.868C13.846%2C0.976%2013.924%2C1.107%2013.971%2C1.262C14.018%2C1.418%2014.008%2C1.584%2013.94%2C1.759L9.381%2C14.059C9.3%2C14.247%209.186%2C14.386%209.037%2C14.474C8.888%2C14.561%208.732%2C14.605%208.57%2C14.605C8.408%2C14.605%208.253%2C14.558%208.104%2C14.463C7.956%2C14.368%207.841%2C14.233%207.76%2C14.059L5.673%2C8.932Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(0.598546%2C0.598546%2C-0.707107%2C0.707107%2C11.7313%2C1.9674)%22%3E%0A%20%20%20%20%20%20%20%20%3Crect%20x%3D%226.516%22%20y%3D%223.78%22%20width%3D%2219.271%22%20height%3D%220.716%22%20style%3D%22fill%3Argb(229%2C0%2C0)%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl button.mapboxgl-ctrl-terrain .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C8.00023%2C11)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.083%2C10.209C0.722%2C10.209%200.458%2C10.049%200.292%2C9.73C0.125%2C9.41%200.153%2C9.105%200.375%2C8.813L3.625%2C4.48C3.805%2C4.244%204.041%2C4.126%204.333%2C4.126C4.625%2C4.126%204.861%2C4.244%205.042%2C4.48L8.021%2C8.459L14.167%2C8.459L10.167%2C3.147L8.188%2C5.751L7.104%2C4.313L9.458%2C1.147C9.638%2C0.91%209.875%2C0.792%2010.167%2C0.792C10.458%2C0.792%2010.694%2C0.91%2010.875%2C1.147L16.625%2C8.813C16.847%2C9.105%2016.874%2C9.41%2016.708%2C9.73C16.541%2C10.049%2016.277%2C10.209%2015.917%2C10.209L1.083%2C10.209ZM2.833%2C8.459L5.833%2C8.459L4.333%2C6.459L2.833%2C8.459ZM2.833%2C8.459L5.833%2C8.459L2.833%2C8.459Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.mapboxgl-ctrl button.mapboxgl-ctrl-terrain-enabled .mapboxgl-ctrl-icon,.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C7.99998%2C11)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.083%2C10.209C0.722%2C10.209%200.459%2C10.049%200.292%2C9.73C0.125%2C9.41%200.153%2C9.105%200.375%2C8.813L3.625%2C4.48C3.806%2C4.244%204.042%2C4.126%204.333%2C4.126C4.625%2C4.126%204.861%2C4.244%205.042%2C4.48L7.5%2C7.751C7.653%2C7.944%207.847%2C8.063%208.083%2C8.105C8.32%2C8.146%208.535%2C8.09%208.729%2C7.938C8.924%2C7.799%209.038%2C7.619%209.073%2C7.396C9.108%2C7.174%209.069%2C6.965%208.958%2C6.771L7.104%2C4.313L9.458%2C1.147C9.639%2C0.91%209.875%2C0.792%2010.167%2C0.792C10.458%2C0.792%2010.694%2C0.91%2010.875%2C1.147L16.625%2C8.813C16.847%2C9.105%2016.875%2C9.41%2016.708%2C9.73C16.541%2C10.049%2016.278%2C10.209%2015.917%2C10.209L1.083%2C10.209Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C9%2C9)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.875%2C5.042C0.639%2C5.042%200.434%2C4.955%200.26%2C4.781C0.087%2C4.608%200%2C4.403%200%2C4.167L0%2C0.875C0%2C0.639%200.087%2C0.434%200.26%2C0.26C0.434%2C0.087%200.639%2C0%200.875%2C0L4.167%2C0C4.403%2C0%204.608%2C0.087%204.781%2C0.26C4.955%2C0.434%205.042%2C0.639%205.042%2C0.875C5.042%2C1.111%204.955%2C1.316%204.781%2C1.49C4.608%2C1.663%204.403%2C1.75%204.167%2C1.75L2.958%2C1.75L4.875%2C3.667C5.042%2C3.834%205.122%2C4.031%205.115%2C4.26C5.108%2C4.489%205.021%2C4.687%204.854%2C4.854C4.687%2C5.021%204.486%2C5.104%204.25%2C5.104C4.014%2C5.104%203.813%2C5.021%203.646%2C4.854L1.75%2C2.958L1.75%2C4.167C1.75%2C4.403%201.663%2C4.608%201.49%2C4.781C1.316%2C4.955%201.111%2C5.042%200.875%2C5.042ZM10.146%2C4.854C9.979%2C4.687%209.896%2C4.486%209.896%2C4.25C9.896%2C4.014%209.979%2C3.813%2010.146%2C3.646L12.042%2C1.75L10.833%2C1.75C10.597%2C1.75%2010.392%2C1.663%2010.219%2C1.49C10.045%2C1.316%209.958%2C1.111%209.958%2C0.875C9.958%2C0.639%2010.045%2C0.434%2010.219%2C0.26C10.392%2C0.087%2010.597%2C0%2010.833%2C0L14.125%2C0C14.361%2C0%2014.566%2C0.087%2014.74%2C0.26C14.913%2C0.434%2015%2C0.639%2015%2C0.875L15%2C4.167C15%2C4.403%2014.913%2C4.608%2014.74%2C4.781C14.566%2C4.955%2014.361%2C5.042%2014.125%2C5.042C13.889%2C5.042%2013.684%2C4.955%2013.51%2C4.781C13.337%2C4.608%2013.25%2C4.403%2013.25%2C4.167L13.25%2C2.958L11.333%2C4.875C11.166%2C5.042%2010.969%2C5.122%2010.74%2C5.115C10.511%2C5.108%2010.313%2C5.021%2010.146%2C4.854ZM10.833%2C15C10.597%2C15%2010.392%2C14.913%2010.219%2C14.74C10.045%2C14.566%209.958%2C14.361%209.958%2C14.125C9.958%2C13.889%2010.045%2C13.684%2010.219%2C13.51C10.392%2C13.337%2010.597%2C13.25%2010.833%2C13.25L12.021%2C13.25L10.125%2C11.354C9.958%2C11.187%209.875%2C10.986%209.875%2C10.75C9.875%2C10.514%209.965%2C10.306%2010.146%2C10.125C10.313%2C9.958%2010.517%2C9.875%2010.76%2C9.875C11.003%2C9.875%2011.208%2C9.958%2011.375%2C10.125L13.25%2C12.021L13.25%2C10.833C13.25%2C10.597%2013.337%2C10.392%2013.51%2C10.219C13.684%2C10.045%2013.889%2C9.958%2014.125%2C9.958C14.361%2C9.958%2014.566%2C10.045%2014.74%2C10.219C14.913%2C10.392%2015%2C10.597%2015%2C10.833L15%2C14.125C15%2C14.361%2014.913%2C14.566%2014.74%2C14.74C14.566%2C14.913%2014.361%2C15%2014.125%2C15L10.833%2C15ZM0.875%2C15C0.639%2C15%200.434%2C14.913%200.26%2C14.74C0.087%2C14.566%200%2C14.361%200%2C14.125L0%2C10.833C0%2C10.597%200.087%2C10.392%200.26%2C10.219C0.434%2C10.045%200.639%2C9.958%200.875%2C9.958C1.111%2C9.958%201.316%2C10.045%201.49%2C10.219C1.663%2C10.392%201.75%2C10.597%201.75%2C10.833L1.75%2C12.021L3.646%2C10.125C3.813%2C9.958%204.014%2C9.872%204.25%2C9.865C4.486%2C9.858%204.694%2C9.944%204.875%2C10.125C5.042%2C10.292%205.125%2C10.497%205.125%2C10.74C5.125%2C10.983%205.042%2C11.187%204.875%2C11.354L2.979%2C13.25L4.167%2C13.25C4.403%2C13.25%204.608%2C13.337%204.781%2C13.51C4.955%2C13.684%205.042%2C13.889%205.042%2C14.125C5.042%2C14.361%204.955%2C14.566%204.781%2C14.74C4.608%2C14.913%204.403%2C15%204.167%2C15L0.875%2C15Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2033%2033%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C8.49996%2C8.5)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.434%2C5.576C1.2%2C5.576%200.997%2C5.49%200.825%2C5.317C0.653%2C5.146%200.567%2C4.943%200.567%2C4.709C0.567%2C4.475%200.653%2C4.272%200.825%2C4.1C0.997%2C3.929%201.2%2C3.843%201.434%2C3.843L2.609%2C3.843L0.732%2C1.965C0.567%2C1.8%200.488%2C1.597%200.495%2C1.356C0.502%2C1.115%200.588%2C0.913%200.753%2C0.748C0.918%2C0.583%201.121%2C0.5%201.361%2C0.5C1.602%2C0.5%201.805%2C0.583%201.97%2C0.748L3.828%2C2.624L3.828%2C1.449C3.828%2C1.215%203.913%2C1.012%204.085%2C0.84C4.257%2C0.668%204.46%2C0.582%204.694%2C0.582C4.928%2C0.582%205.131%2C0.668%205.302%2C0.84C5.475%2C1.012%205.561%2C1.215%205.561%2C1.449L5.561%2C4.709C5.561%2C4.943%205.475%2C5.146%205.302%2C5.317C5.131%2C5.49%204.928%2C5.576%204.694%2C5.576L1.434%2C5.576ZM14.557%2C5.576L11.296%2C5.576C11.063%2C5.576%2010.86%2C5.49%2010.688%2C5.317C10.516%2C5.146%2010.43%2C4.943%2010.43%2C4.709L10.43%2C1.449C10.43%2C1.215%2010.516%2C1.012%2010.688%2C0.84C10.86%2C0.668%2011.063%2C0.582%2011.296%2C0.582C11.531%2C0.582%2011.734%2C0.668%2011.906%2C0.84C12.077%2C1.012%2012.163%2C1.215%2012.163%2C1.449L12.163%2C2.624L14.041%2C0.748C14.206%2C0.583%2014.409%2C0.5%2014.65%2C0.5C14.89%2C0.5%2015.093%2C0.583%2015.258%2C0.748C15.423%2C0.913%2015.506%2C1.115%2015.506%2C1.356C15.506%2C1.597%2015.423%2C1.8%2015.258%2C1.965L13.381%2C3.843L14.557%2C3.843C14.791%2C3.843%2014.994%2C3.929%2015.166%2C4.1C15.338%2C4.272%2015.424%2C4.475%2015.424%2C4.709C15.424%2C4.943%2015.338%2C5.146%2015.166%2C5.317C14.994%2C5.49%2014.791%2C5.576%2014.557%2C5.576ZM0.753%2C15.252C0.588%2C15.087%200.506%2C14.888%200.506%2C14.654C0.506%2C14.42%200.588%2C14.221%200.753%2C14.056L2.63%2C12.178L1.434%2C12.178C1.2%2C12.178%200.997%2C12.092%200.825%2C11.921C0.653%2C11.749%200.567%2C11.546%200.567%2C11.312C0.567%2C11.078%200.653%2C10.875%200.825%2C10.703C0.997%2C10.531%201.2%2C10.445%201.434%2C10.445L4.694%2C10.445C4.928%2C10.445%205.131%2C10.531%205.302%2C10.703C5.475%2C10.875%205.561%2C11.078%205.561%2C11.312L5.561%2C14.572C5.561%2C14.806%205.475%2C15.009%205.302%2C15.181C5.131%2C15.353%204.928%2C15.439%204.694%2C15.439C4.46%2C15.439%204.257%2C15.353%204.085%2C15.181C3.913%2C15.009%203.828%2C14.806%203.828%2C14.572L3.828%2C13.376L1.95%2C15.252C1.785%2C15.418%201.585%2C15.5%201.351%2C15.5C1.118%2C15.5%200.918%2C15.418%200.753%2C15.252ZM11.296%2C15.439C11.063%2C15.439%2010.86%2C15.353%2010.688%2C15.181C10.516%2C15.009%2010.43%2C14.806%2010.43%2C14.572L10.43%2C11.312C10.43%2C11.078%2010.516%2C10.875%2010.688%2C10.703C10.86%2C10.531%2011.063%2C10.445%2011.296%2C10.445L14.557%2C10.445C14.791%2C10.445%2014.994%2C10.531%2015.166%2C10.703C15.338%2C10.875%2015.424%2C11.078%2015.424%2C11.312C15.424%2C11.546%2015.338%2C11.749%2015.166%2C11.921C14.994%2C12.092%2014.791%2C12.178%2014.557%2C12.178L13.36%2C12.178L15.237%2C14.056C15.402%2C14.221%2015.485%2C14.42%2015.485%2C14.654C15.485%2C14.888%2015.402%2C15.087%2015.237%2C15.252C15.072%2C15.418%2014.873%2C15.5%2014.639%2C15.5C14.405%2C15.5%2014.206%2C15.418%2014.041%2C15.252L12.163%2C13.376L12.163%2C14.572C12.163%2C14.806%2012.077%2C15.009%2011.906%2C15.181C11.734%2C15.353%2011.531%2C15.439%2011.296%2C15.439Z%22%20style%3D%22fill%3Argb(68%2C73%2C82)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A")}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:1px solid #444952;border-top:#444952;box-sizing:border-box;color:#444952;font-size:10px;padding:0 5px;text-align:right;line-height:14px}.no-webgl-support-div{position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;width:fit-content;height:fit-content;padding:10px;background:#fff;border-radius:3px;color:#fb8600;text-align:center;font-family:sans-serif;font-weight:300;font-size:16px;max-width:calc(100% - 80px)}.container{position:relative;height:calc(100vh - 64px);width:100%;top:64px}.map{top:0;left:0;position:absolute;height:100%;width:100%} diff --git a/MagdalenaKuch-patch-1/assets/index-BtBazkGp.js b/MagdalenaKuch-patch-1/assets/index-BtBazkGp.js new file mode 100644 index 0000000..5e47a4f --- /dev/null +++ b/MagdalenaKuch-patch-1/assets/index-BtBazkGp.js @@ -0,0 +1,709 @@ +function eI(e,n){for(var a=0;ac[g]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const g of document.querySelectorAll('link[rel="modulepreload"]'))c(g);new MutationObserver(g=>{for(const x of g)if(x.type==="childList")for(const v of x.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&c(v)}).observe(document,{childList:!0,subtree:!0});function a(g){const x={};return g.integrity&&(x.integrity=g.integrity),g.referrerPolicy&&(x.referrerPolicy=g.referrerPolicy),g.crossOrigin==="use-credentials"?x.credentials="include":g.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(g){if(g.ep)return;g.ep=!0;const x=a(g);fetch(g.href,x)}})();var tI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ns(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var a=function c(){return this instanceof c?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(c){var g=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(a,c,g.get?g:{enumerable:!0,get:function(){return e[c]}})}),a}var bw={exports:{}},nm={},ww={exports:{}},Dt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kd=Symbol.for("react.element"),rI=Symbol.for("react.portal"),nI=Symbol.for("react.fragment"),iI=Symbol.for("react.strict_mode"),oI=Symbol.for("react.profiler"),sI=Symbol.for("react.provider"),aI=Symbol.for("react.context"),lI=Symbol.for("react.forward_ref"),cI=Symbol.for("react.suspense"),uI=Symbol.for("react.memo"),hI=Symbol.for("react.lazy"),px=Symbol.iterator;function dI(e){return e===null||typeof e!="object"?null:(e=px&&e[px]||e["@@iterator"],typeof e=="function"?e:null)}var Sw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tw=Object.assign,kw={};function gu(e,n,a){this.props=e,this.context=n,this.refs=kw,this.updater=a||Sw}gu.prototype.isReactComponent={};gu.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};gu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cw(){}Cw.prototype=gu.prototype;function c0(e,n,a){this.props=e,this.context=n,this.refs=kw,this.updater=a||Sw}var u0=c0.prototype=new Cw;u0.constructor=c0;Tw(u0,gu.prototype);u0.isPureReactComponent=!0;var fx=Array.isArray,Iw=Object.prototype.hasOwnProperty,h0={current:null},Ew={key:!0,ref:!0,__self:!0,__source:!0};function Pw(e,n,a){var c,g={},x=null,v=null;if(n!=null)for(c in n.ref!==void 0&&(v=n.ref),n.key!==void 0&&(x=""+n.key),n)Iw.call(n,c)&&!Ew.hasOwnProperty(c)&&(g[c]=n[c]);var d=arguments.length-2;if(d===1)g.children=a;else if(1>>1,jt=Ve[Pt];if(0>>1;Ptg(Ur,gt))Grg(Rr,Ur)?(Ve[Pt]=Rr,Ve[Gr]=gt,Pt=Gr):(Ve[Pt]=Ur,Ve[mr]=gt,Pt=mr);else if(Grg(Rr,gt))Ve[Pt]=Rr,Ve[Gr]=gt,Pt=Gr;else break e}}return mt}function g(Ve,mt){var gt=Ve.sortIndex-mt.sortIndex;return gt!==0?gt:Ve.id-mt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var x=performance;e.unstable_now=function(){return x.now()}}else{var v=Date,d=v.now();e.unstable_now=function(){return v.now()-d}}var L=[],O=[],G=1,q=null,$=3,_e=!1,ge=!1,pe=!1,Ue=typeof setTimeout=="function"?setTimeout:null,ne=typeof clearTimeout=="function"?clearTimeout:null,ee=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ae(Ve){for(var mt=a(O);mt!==null;){if(mt.callback===null)c(O);else if(mt.startTime<=Ve)c(O),mt.sortIndex=mt.expirationTime,n(L,mt);else break;mt=a(O)}}function we(Ve){if(pe=!1,ae(Ve),!ge)if(a(L)!==null)ge=!0,br(ke);else{var mt=a(O);mt!==null&&Lr(we,mt.startTime-Ve)}}function ke(Ve,mt){ge=!1,pe&&(pe=!1,ne(We),We=-1),_e=!0;var gt=$;try{for(ae(mt),q=a(L);q!==null&&(!(q.expirationTime>mt)||Ve&&!ot());){var Pt=q.callback;if(typeof Pt=="function"){q.callback=null,$=q.priorityLevel;var jt=Pt(q.expirationTime<=mt);mt=e.unstable_now(),typeof jt=="function"?q.callback=jt:q===a(L)&&c(L),ae(mt)}else c(L);q=a(L)}if(q!==null)var Hn=!0;else{var mr=a(O);mr!==null&&Lr(we,mr.startTime-mt),Hn=!1}return Hn}finally{q=null,$=gt,_e=!1}}var Pe=!1,Ie=null,We=-1,vt=5,it=-1;function ot(){return!(e.unstable_now()-itVe||125Pt?(Ve.sortIndex=gt,n(O,Ve),a(L)===null&&Ve===a(O)&&(pe?(ne(We),We=-1):pe=!0,Lr(we,gt-Pt))):(Ve.sortIndex=jt,n(L,Ve),ge||_e||(ge=!0,br(ke))),Ve},e.unstable_shouldYield=ot,e.unstable_wrapCallback=function(Ve){var mt=$;return function(){var gt=$;$=mt;try{return Ve.apply(this,arguments)}finally{$=gt}}}})(Rw);Lw.exports=Rw;var SI=Lw.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var TI=Ze,Ki=SI;function ze(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yy=Object.prototype.hasOwnProperty,kI=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,gx={},yx={};function CI(e){return Yy.call(yx,e)?!0:Yy.call(gx,e)?!1:kI.test(e)?yx[e]=!0:(gx[e]=!0,!1)}function II(e,n,a,c){if(a!==null&&a.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function EI(e,n,a,c){if(n===null||typeof n>"u"||II(e,n,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ai(e,n,a,c,g,x,v){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=c,this.attributeNamespace=g,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=x,this.removeEmptyString=v}var Mn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mn[e]=new ai(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Mn[n]=new ai(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mn[e]=new ai(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mn[e]=new ai(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mn[e]=new ai(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mn[e]=new ai(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mn[e]=new ai(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mn[e]=new ai(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mn[e]=new ai(e,5,!1,e.toLowerCase(),null,!1,!1)});var p0=/[\-:]([a-z])/g;function f0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(p0,f0);Mn[n]=new ai(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(p0,f0);Mn[n]=new ai(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(p0,f0);Mn[n]=new ai(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mn[e]=new ai(e,1,!1,e.toLowerCase(),null,!1,!1)});Mn.xlinkHref=new ai("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mn[e]=new ai(e,1,!1,e.toLowerCase(),null,!0,!0)});function m0(e,n,a,c){var g=Mn.hasOwnProperty(n)?Mn[n]:null;(g!==null?g.type!==0:c||!(2d||g[v]!==x[d]){var L=` +`+g[v].replace(" at new "," at ");return e.displayName&&L.includes("")&&(L=L.replace("",e.displayName)),L}while(1<=v&&0<=d);break}}}finally{yy=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?Uh(e):""}function PI(e){switch(e.tag){case 5:return Uh(e.type);case 16:return Uh("Lazy");case 13:return Uh("Suspense");case 19:return Uh("SuspenseList");case 0:case 2:case 15:return e=_y(e.type,!1),e;case 11:return e=_y(e.type.render,!1),e;case 1:return e=_y(e.type,!0),e;default:return""}}function t_(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nc:return"Fragment";case Oc:return"Portal";case Jy:return"Profiler";case g0:return"StrictMode";case Qy:return"Suspense";case e_:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Fw:return(e.displayName||"Context")+".Consumer";case Bw:return(e._context.displayName||"Context")+".Provider";case y0:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _0:return n=e.displayName||null,n!==null?n:t_(e.type)||"Memo";case Sa:n=e._payload,e=e._init;try{return t_(e(n))}catch{}}return null}function AI(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return t_(n);case 8:return n===g0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Oa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nw(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function MI(e){var n=Nw(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var g=a.get,x=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return g.call(this)},set:function(v){c=""+v,x.call(this,v)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(v){c=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Up(e){e._valueTracker||(e._valueTracker=MI(e))}function $w(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),c="";return e&&(c=Nw(e)?e.checked?"true":"false":e.value),e=c,e!==a?(n.setValue(e),!0):!1}function Pf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function r_(e,n){var a=n.checked;return zr({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function vx(e,n){var a=n.defaultValue==null?"":n.defaultValue,c=n.checked!=null?n.checked:n.defaultChecked;a=Oa(n.value!=null?n.value:a),e._wrapperState={initialChecked:c,initialValue:a,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Uw(e,n){n=n.checked,n!=null&&m0(e,"checked",n,!1)}function n_(e,n){Uw(e,n);var a=Oa(n.value),c=n.type;if(a!=null)c==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?i_(e,n.type,a):n.hasOwnProperty("defaultValue")&&i_(e,n.type,Oa(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function xx(e,n,a){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var c=n.type;if(!(c!=="submit"&&c!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,a||n===e.value||(e.value=n),e.defaultValue=n}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function i_(e,n,a){(n!=="number"||Pf(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}var jh=Array.isArray;function Xc(e,n,a,c){if(e=e.options,n){n={};for(var g=0;g"+n.valueOf().toString()+"",n=jp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function id(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var Hh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zI=["Webkit","ms","Moz","O"];Object.keys(Hh).forEach(function(e){zI.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Hh[n]=Hh[e]})});function Zw(e,n,a){return n==null||typeof n=="boolean"||n===""?"":a||typeof n!="number"||n===0||Hh.hasOwnProperty(e)&&Hh[e]?(""+n).trim():n+"px"}function Gw(e,n){e=e.style;for(var a in n)if(n.hasOwnProperty(a)){var c=a.indexOf("--")===0,g=Zw(a,n[a],c);a==="float"&&(a="cssFloat"),c?e.setProperty(a,g):e[a]=g}}var LI=zr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function a_(e,n){if(n){if(LI[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(ze(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(ze(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(ze(61))}if(n.style!=null&&typeof n.style!="object")throw Error(ze(62))}}function l_(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var c_=null;function v0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var u_=null,Yc=null,Jc=null;function Sx(e){if(e=Ed(e)){if(typeof u_!="function")throw Error(ze(280));var n=e.stateNode;n&&(n=lm(n),u_(e.stateNode,e.type,n))}}function Hw(e){Yc?Jc?Jc.push(e):Jc=[e]:Yc=e}function Ww(){if(Yc){var e=Yc,n=Jc;if(Jc=Yc=null,Sx(e),n)for(e=0;e>>=0,e===0?32:31-(qI(e)/ZI|0)|0}var Vp=64,qp=4194304;function Vh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Lf(e,n){var a=e.pendingLanes;if(a===0)return 0;var c=0,g=e.suspendedLanes,x=e.pingedLanes,v=a&268435455;if(v!==0){var d=v&~g;d!==0?c=Vh(d):(x&=v,x!==0&&(c=Vh(x)))}else v=a&~g,v!==0?c=Vh(v):x!==0&&(c=Vh(x));if(c===0)return 0;if(n!==0&&n!==c&&!(n&g)&&(g=c&-c,x=n&-n,g>=x||g===16&&(x&4194240)!==0))return n;if(c&4&&(c|=a&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=c;0a;a++)n.push(e);return n}function Cd(e,n,a){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Oo(n),e[n]=a}function KI(e,n){var a=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var c=e.eventTimes;for(e=e.expirationTimes;0=Kh),zx=" ",Lx=!1;function f2(e,n){switch(e){case"keyup":return SE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $c=!1;function kE(e,n){switch(e){case"compositionend":return m2(n);case"keypress":return n.which!==32?null:(Lx=!0,zx);case"textInput":return e=n.data,e===zx&&Lx?null:e;default:return null}}function CE(e,n){if($c)return e==="compositionend"||!I0&&f2(e,n)?(e=d2(),df=T0=Ea=null,$c=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Fx(a)}}function v2(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?v2(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function x2(){for(var e=window,n=Pf();n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Pf(e.document)}return n}function E0(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function DE(e){var n=x2(),a=e.focusedElem,c=e.selectionRange;if(n!==a&&a&&a.ownerDocument&&v2(a.ownerDocument.documentElement,a)){if(c!==null&&E0(a)){if(n=c.start,e=c.end,e===void 0&&(e=n),"selectionStart"in a)a.selectionStart=n,a.selectionEnd=Math.min(e,a.value.length);else if(e=(n=a.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var g=a.textContent.length,x=Math.min(c.start,g);c=c.end===void 0?x:Math.min(c.end,g),!e.extend&&x>c&&(g=c,c=x,x=g),g=Ox(a,x);var v=Ox(a,c);g&&v&&(e.rangeCount!==1||e.anchorNode!==g.node||e.anchorOffset!==g.offset||e.focusNode!==v.node||e.focusOffset!==v.offset)&&(n=n.createRange(),n.setStart(g.node,g.offset),e.removeAllRanges(),x>c?(e.addRange(n),e.extend(v.node,v.offset)):(n.setEnd(v.node,v.offset),e.addRange(n)))}}for(n=[],e=a;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Uc=null,g_=null,Yh=null,y_=!1;function Nx(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;y_||Uc==null||Uc!==Pf(c)||(c=Uc,"selectionStart"in c&&E0(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Yh&&ud(Yh,c)||(Yh=c,c=Bf(g_,"onSelect"),0qc||(e.current=S_[qc],S_[qc]=null,qc--)}function gr(e,n){qc++,S_[qc]=e.current,e.current=n}var Na={},Gn=Ua(Na),bi=Ua(!1),Pl=Na;function cu(e,n){var a=e.type.contextTypes;if(!a)return Na;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===n)return c.__reactInternalMemoizedMaskedChildContext;var g={},x;for(x in a)g[x]=n[x];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=g),g}function wi(e){return e=e.childContextTypes,e!=null}function Of(){xr(bi),xr(Gn)}function Gx(e,n,a){if(Gn.current!==Na)throw Error(ze(168));gr(Gn,n),gr(bi,a)}function P2(e,n,a){var c=e.stateNode;if(n=n.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var g in c)if(!(g in n))throw Error(ze(108,AI(e)||"Unknown",g));return zr({},a,c)}function Nf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Na,Pl=Gn.current,gr(Gn,e),gr(bi,bi.current),!0}function Hx(e,n,a){var c=e.stateNode;if(!c)throw Error(ze(169));a?(e=P2(e,n,Pl),c.__reactInternalMemoizedMergedChildContext=e,xr(bi),xr(Gn),gr(Gn,e)):xr(bi),gr(bi,a)}var As=null,cm=!1,zy=!1;function A2(e){As===null?As=[e]:As.push(e)}function HE(e){cm=!0,A2(e)}function ja(){if(!zy&&As!==null){zy=!0;var e=0,n=ir;try{var a=As;for(ir=1;e>=v,g-=v,Ms=1<<32-Oo(n)+g|a<We?(vt=Ie,Ie=null):vt=Ie.sibling;var it=$(ne,Ie,ae[We],we);if(it===null){Ie===null&&(Ie=vt);break}e&&Ie&&it.alternate===null&&n(ne,Ie),ee=x(it,ee,We),Pe===null?ke=it:Pe.sibling=it,Pe=it,Ie=vt}if(We===ae.length)return a(ne,Ie),Cr&&_l(ne,We),ke;if(Ie===null){for(;WeWe?(vt=Ie,Ie=null):vt=Ie.sibling;var ot=$(ne,Ie,it.value,we);if(ot===null){Ie===null&&(Ie=vt);break}e&&Ie&&ot.alternate===null&&n(ne,Ie),ee=x(ot,ee,We),Pe===null?ke=ot:Pe.sibling=ot,Pe=ot,Ie=vt}if(it.done)return a(ne,Ie),Cr&&_l(ne,We),ke;if(Ie===null){for(;!it.done;We++,it=ae.next())it=q(ne,it.value,we),it!==null&&(ee=x(it,ee,We),Pe===null?ke=it:Pe.sibling=it,Pe=it);return Cr&&_l(ne,We),ke}for(Ie=c(ne,Ie);!it.done;We++,it=ae.next())it=_e(Ie,ne,We,it.value,we),it!==null&&(e&&it.alternate!==null&&Ie.delete(it.key===null?We:it.key),ee=x(it,ee,We),Pe===null?ke=it:Pe.sibling=it,Pe=it);return e&&Ie.forEach(function(Nt){return n(ne,Nt)}),Cr&&_l(ne,We),ke}function Ue(ne,ee,ae,we){if(typeof ae=="object"&&ae!==null&&ae.type===Nc&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case $p:e:{for(var ke=ae.key,Pe=ee;Pe!==null;){if(Pe.key===ke){if(ke=ae.type,ke===Nc){if(Pe.tag===7){a(ne,Pe.sibling),ee=g(Pe,ae.props.children),ee.return=ne,ne=ee;break e}}else if(Pe.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===Sa&&Xx(ke)===Pe.type){a(ne,Pe.sibling),ee=g(Pe,ae.props),ee.ref=Bh(ne,Pe,ae),ee.return=ne,ne=ee;break e}a(ne,Pe);break}else n(ne,Pe);Pe=Pe.sibling}ae.type===Nc?(ee=El(ae.props.children,ne.mode,we,ae.key),ee.return=ne,ne=ee):(we=xf(ae.type,ae.key,ae.props,null,ne.mode,we),we.ref=Bh(ne,ee,ae),we.return=ne,ne=we)}return v(ne);case Oc:e:{for(Pe=ae.key;ee!==null;){if(ee.key===Pe)if(ee.tag===4&&ee.stateNode.containerInfo===ae.containerInfo&&ee.stateNode.implementation===ae.implementation){a(ne,ee.sibling),ee=g(ee,ae.children||[]),ee.return=ne,ne=ee;break e}else{a(ne,ee);break}else n(ne,ee);ee=ee.sibling}ee=$y(ae,ne.mode,we),ee.return=ne,ne=ee}return v(ne);case Sa:return Pe=ae._init,Ue(ne,ee,Pe(ae._payload),we)}if(jh(ae))return ge(ne,ee,ae,we);if(Mh(ae))return pe(ne,ee,ae,we);Yp(ne,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"?(ae=""+ae,ee!==null&&ee.tag===6?(a(ne,ee.sibling),ee=g(ee,ae),ee.return=ne,ne=ee):(a(ne,ee),ee=Ny(ae,ne.mode,we),ee.return=ne,ne=ee),v(ne)):a(ne,ee)}return Ue}var hu=R2(!0),D2=R2(!1),jf=Ua(null),Vf=null,Hc=null,z0=null;function L0(){z0=Hc=Vf=null}function R0(e){var n=jf.current;xr(jf),e._currentValue=n}function C_(e,n,a){for(;e!==null;){var c=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,c!==null&&(c.childLanes|=n)):c!==null&&(c.childLanes&n)!==n&&(c.childLanes|=n),e===a)break;e=e.return}}function eu(e,n){Vf=e,z0=Hc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(xi=!0),e.firstContext=null)}function xo(e){var n=e._currentValue;if(z0!==e)if(e={context:e,memoizedValue:n,next:null},Hc===null){if(Vf===null)throw Error(ze(308));Hc=e,Vf.dependencies={lanes:0,firstContext:e}}else Hc=Hc.next=e;return n}var Tl=null;function D0(e){Tl===null?Tl=[e]:Tl.push(e)}function B2(e,n,a,c){var g=n.interleaved;return g===null?(a.next=a,D0(n)):(a.next=g.next,g.next=a),n.interleaved=a,Bs(e,c)}function Bs(e,n){e.lanes|=n;var a=e.alternate;for(a!==null&&(a.lanes|=n),a=e,e=e.return;e!==null;)e.childLanes|=n,a=e.alternate,a!==null&&(a.childLanes|=n),a=e,e=e.return;return a.tag===3?a.stateNode:null}var Ta=!1;function B0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function F2(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ls(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Ra(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,Zt&2){var g=c.pending;return g===null?n.next=n:(n.next=g.next,g.next=n),c.pending=n,Bs(e,a)}return g=c.interleaved,g===null?(n.next=n,D0(c)):(n.next=g.next,g.next=n),c.interleaved=n,Bs(e,a)}function ff(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194240)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,b0(e,a)}}function Yx(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var g=null,x=null;if(a=a.firstBaseUpdate,a!==null){do{var v={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};x===null?g=x=v:x=x.next=v,a=a.next}while(a!==null);x===null?g=x=n:x=x.next=n}else g=x=n;a={baseState:c.baseState,firstBaseUpdate:g,lastBaseUpdate:x,shared:c.shared,effects:c.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}function qf(e,n,a,c){var g=e.updateQueue;Ta=!1;var x=g.firstBaseUpdate,v=g.lastBaseUpdate,d=g.shared.pending;if(d!==null){g.shared.pending=null;var L=d,O=L.next;L.next=null,v===null?x=O:v.next=O,v=L;var G=e.alternate;G!==null&&(G=G.updateQueue,d=G.lastBaseUpdate,d!==v&&(d===null?G.firstBaseUpdate=O:d.next=O,G.lastBaseUpdate=L))}if(x!==null){var q=g.baseState;v=0,G=O=L=null,d=x;do{var $=d.lane,_e=d.eventTime;if((c&$)===$){G!==null&&(G=G.next={eventTime:_e,lane:0,tag:d.tag,payload:d.payload,callback:d.callback,next:null});e:{var ge=e,pe=d;switch($=n,_e=a,pe.tag){case 1:if(ge=pe.payload,typeof ge=="function"){q=ge.call(_e,q,$);break e}q=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=pe.payload,$=typeof ge=="function"?ge.call(_e,q,$):ge,$==null)break e;q=zr({},q,$);break e;case 2:Ta=!0}}d.callback!==null&&d.lane!==0&&(e.flags|=64,$=g.effects,$===null?g.effects=[d]:$.push(d))}else _e={eventTime:_e,lane:$,tag:d.tag,payload:d.payload,callback:d.callback,next:null},G===null?(O=G=_e,L=q):G=G.next=_e,v|=$;if(d=d.next,d===null){if(d=g.shared.pending,d===null)break;$=d,d=$.next,$.next=null,g.lastBaseUpdate=$,g.shared.pending=null}}while(!0);if(G===null&&(L=q),g.baseState=L,g.firstBaseUpdate=O,g.lastBaseUpdate=G,n=g.shared.interleaved,n!==null){g=n;do v|=g.lane,g=g.next;while(g!==n)}else x===null&&(g.shared.lanes=0);zl|=v,e.lanes=v,e.memoizedState=q}}function Jx(e,n,a){if(e=n.effects,n.effects=null,e!==null)for(n=0;na?a:4,e(!0);var c=Ry.transition;Ry.transition={};try{e(!1),n()}finally{ir=a,Ry.transition=c}}function eS(){return bo().memoizedState}function YE(e,n,a){var c=Ba(e);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},tS(e))rS(n,a);else if(a=B2(e,n,a,c),a!==null){var g=oi();No(a,e,c,g),nS(a,n,c)}}function JE(e,n,a){var c=Ba(e),g={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(tS(e))rS(n,g);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=n.lastRenderedReducer,x!==null))try{var v=n.lastRenderedState,d=x(v,a);if(g.hasEagerState=!0,g.eagerState=d,$o(d,v)){var L=n.interleaved;L===null?(g.next=g,D0(n)):(g.next=L.next,L.next=g),n.interleaved=g;return}}catch{}finally{}a=B2(e,n,g,c),a!==null&&(g=oi(),No(a,e,c,g),nS(a,n,c))}}function tS(e){var n=e.alternate;return e===Mr||n!==null&&n===Mr}function rS(e,n){Jh=Gf=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function nS(e,n,a){if(a&4194240){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,b0(e,a)}}var Hf={readContext:xo,useCallback:jn,useContext:jn,useEffect:jn,useImperativeHandle:jn,useInsertionEffect:jn,useLayoutEffect:jn,useMemo:jn,useReducer:jn,useRef:jn,useState:jn,useDebugValue:jn,useDeferredValue:jn,useTransition:jn,useMutableSource:jn,useSyncExternalStore:jn,useId:jn,unstable_isNewReconciler:!1},QE={readContext:xo,useCallback:function(e,n){return Qo().memoizedState=[e,n===void 0?null:n],e},useContext:xo,useEffect:eb,useImperativeHandle:function(e,n,a){return a=a!=null?a.concat([e]):null,gf(4194308,4,K2.bind(null,n,e),a)},useLayoutEffect:function(e,n){return gf(4194308,4,e,n)},useInsertionEffect:function(e,n){return gf(4,2,e,n)},useMemo:function(e,n){var a=Qo();return n=n===void 0?null:n,e=e(),a.memoizedState=[e,n],e},useReducer:function(e,n,a){var c=Qo();return n=a!==void 0?a(n):n,c.memoizedState=c.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},c.queue=e,e=e.dispatch=YE.bind(null,Mr,e),[c.memoizedState,e]},useRef:function(e){var n=Qo();return e={current:e},n.memoizedState=e},useState:Qx,useDebugValue:q0,useDeferredValue:function(e){return Qo().memoizedState=e},useTransition:function(){var e=Qx(!1),n=e[0];return e=XE.bind(null,e[1]),Qo().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,a){var c=Mr,g=Qo();if(Cr){if(a===void 0)throw Error(ze(407));a=a()}else{if(a=n(),_n===null)throw Error(ze(349));Ml&30||U2(c,n,a)}g.memoizedState=a;var x={value:a,getSnapshot:n};return g.queue=x,eb(V2.bind(null,c,x,e),[e]),c.flags|=2048,_d(9,j2.bind(null,c,x,a,n),void 0,null),a},useId:function(){var e=Qo(),n=_n.identifierPrefix;if(Cr){var a=zs,c=Ms;a=(c&~(1<<32-Oo(c)-1)).toString(32)+a,n=":"+n+"R"+a,a=gd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof c.is=="string"?e=v.createElement(a,{is:c.is}):(e=v.createElement(a),a==="select"&&(v=e,c.multiple?v.multiple=!0:c.size&&(v.size=c.size))):e=v.createElementNS(e,a),e[ns]=n,e[pd]=c,pS(e,n,!1,!1),n.stateNode=e;e:{switch(v=l_(a,c),a){case"dialog":vr("cancel",e),vr("close",e),g=c;break;case"iframe":case"object":case"embed":vr("load",e),g=c;break;case"video":case"audio":for(g=0;gfu&&(n.flags|=128,c=!0,Fh(x,!1),n.lanes=4194304)}else{if(!c)if(e=Zf(v),e!==null){if(n.flags|=128,c=!0,a=e.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),Fh(x,!0),x.tail===null&&x.tailMode==="hidden"&&!v.alternate&&!Cr)return Vn(n),null}else 2*Vr()-x.renderingStartTime>fu&&a!==1073741824&&(n.flags|=128,c=!0,Fh(x,!1),n.lanes=4194304);x.isBackwards?(v.sibling=n.child,n.child=v):(a=x.last,a!==null?a.sibling=v:n.child=v,x.last=v)}return x.tail!==null?(n=x.tail,x.rendering=n,x.tail=n.sibling,x.renderingStartTime=Vr(),n.sibling=null,a=Ar.current,gr(Ar,c?a&1|2:a&1),n):(Vn(n),null);case 22:case 23:return X0(),c=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==c&&(n.flags|=8192),c&&n.mode&1?qi&1073741824&&(Vn(n),n.subtreeFlags&6&&(n.flags|=8192)):Vn(n),null;case 24:return null;case 25:return null}throw Error(ze(156,n.tag))}function aP(e,n){switch(A0(n),n.tag){case 1:return wi(n.type)&&Of(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return du(),xr(bi),xr(Gn),N0(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return O0(n),null;case 13:if(xr(Ar),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(ze(340));uu()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return xr(Ar),null;case 4:return du(),null;case 10:return R0(n.type._context),null;case 22:case 23:return X0(),null;case 24:return null;default:return null}}var Qp=!1,Zn=!1,lP=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Wc(e,n){var a=e.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){$r(e,n,c)}else a.current=null}function D_(e,n,a){try{a()}catch(c){$r(e,n,c)}}var hb=!1;function cP(e,n){if(__=Rf,e=x2(),E0(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var g=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{a.nodeType,x.nodeType}catch{a=null;break e}var v=0,d=-1,L=-1,O=0,G=0,q=e,$=null;t:for(;;){for(var _e;q!==a||g!==0&&q.nodeType!==3||(d=v+g),q!==x||c!==0&&q.nodeType!==3||(L=v+c),q.nodeType===3&&(v+=q.nodeValue.length),(_e=q.firstChild)!==null;)$=q,q=_e;for(;;){if(q===e)break t;if($===a&&++O===g&&(d=v),$===x&&++G===c&&(L=v),(_e=q.nextSibling)!==null)break;q=$,$=q.parentNode}q=_e}a=d===-1||L===-1?null:{start:d,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for(v_={focusedElem:e,selectionRange:a},Rf=!1,nt=n;nt!==null;)if(n=nt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,nt=e;else for(;nt!==null;){n=nt;try{var ge=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ge!==null){var pe=ge.memoizedProps,Ue=ge.memoizedState,ne=n.stateNode,ee=ne.getSnapshotBeforeUpdate(n.elementType===n.type?pe:Do(n.type,pe),Ue);ne.__reactInternalSnapshotBeforeUpdate=ee}break;case 3:var ae=n.stateNode.containerInfo;ae.nodeType===1?ae.textContent="":ae.nodeType===9&&ae.documentElement&&ae.removeChild(ae.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ze(163))}}catch(we){$r(n,n.return,we)}if(e=n.sibling,e!==null){e.return=n.return,nt=e;break}nt=n.return}return ge=hb,hb=!1,ge}function Qh(e,n,a){var c=n.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var g=c=c.next;do{if((g.tag&e)===e){var x=g.destroy;g.destroy=void 0,x!==void 0&&D_(n,a,x)}g=g.next}while(g!==c)}}function dm(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var c=a.create;a.destroy=c()}a=a.next}while(a!==n)}}function B_(e){var n=e.ref;if(n!==null){var a=e.stateNode;switch(e.tag){case 5:e=a;break;default:e=a}typeof n=="function"?n(e):n.current=e}}function gS(e){var n=e.alternate;n!==null&&(e.alternate=null,gS(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[ns],delete n[pd],delete n[w_],delete n[ZE],delete n[GE])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function yS(e){return e.tag===5||e.tag===3||e.tag===4}function db(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function F_(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.nodeType===8?a.parentNode.insertBefore(e,n):a.insertBefore(e,n):(a.nodeType===8?(n=a.parentNode,n.insertBefore(e,a)):(n=a,n.appendChild(e)),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Ff));else if(c!==4&&(e=e.child,e!==null))for(F_(e,n,a),e=e.sibling;e!==null;)F_(e,n,a),e=e.sibling}function O_(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(e=e.child,e!==null))for(O_(e,n,a),e=e.sibling;e!==null;)O_(e,n,a),e=e.sibling}var Cn=null,Bo=!1;function wa(e,n,a){for(a=a.child;a!==null;)_S(e,n,a),a=a.sibling}function _S(e,n,a){if(is&&typeof is.onCommitFiberUnmount=="function")try{is.onCommitFiberUnmount(im,a)}catch{}switch(a.tag){case 5:Zn||Wc(a,n);case 6:var c=Cn,g=Bo;Cn=null,wa(e,n,a),Cn=c,Bo=g,Cn!==null&&(Bo?(e=Cn,a=a.stateNode,e.nodeType===8?e.parentNode.removeChild(a):e.removeChild(a)):Cn.removeChild(a.stateNode));break;case 18:Cn!==null&&(Bo?(e=Cn,a=a.stateNode,e.nodeType===8?My(e.parentNode,a):e.nodeType===1&&My(e,a),ld(e)):My(Cn,a.stateNode));break;case 4:c=Cn,g=Bo,Cn=a.stateNode.containerInfo,Bo=!0,wa(e,n,a),Cn=c,Bo=g;break;case 0:case 11:case 14:case 15:if(!Zn&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){g=c=c.next;do{var x=g,v=x.destroy;x=x.tag,v!==void 0&&(x&2||x&4)&&D_(a,n,v),g=g.next}while(g!==c)}wa(e,n,a);break;case 1:if(!Zn&&(Wc(a,n),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(d){$r(a,n,d)}wa(e,n,a);break;case 21:wa(e,n,a);break;case 22:a.mode&1?(Zn=(c=Zn)||a.memoizedState!==null,wa(e,n,a),Zn=c):wa(e,n,a);break;default:wa(e,n,a)}}function pb(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new lP),n.forEach(function(c){var g=_P.bind(null,e,c);a.has(c)||(a.add(c),c.then(g,g))})}}function Ro(e,n){var a=n.deletions;if(a!==null)for(var c=0;cg&&(g=v),c&=~x}if(c=g,c=Vr()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*hP(c/1960))-c,10e?16:e,Pa===null)var c=!1;else{if(e=Pa,Pa=null,Xf=0,Zt&6)throw Error(ze(331));var g=Zt;for(Zt|=4,nt=e.current;nt!==null;){var x=nt,v=x.child;if(nt.flags&16){var d=x.deletions;if(d!==null){for(var L=0;LVr()-W0?Il(e,0):H0|=a),Si(e,n)}function CS(e,n){n===0&&(e.mode&1?(n=qp,qp<<=1,!(qp&130023424)&&(qp=4194304)):n=1);var a=oi();e=Bs(e,n),e!==null&&(Cd(e,n,a),Si(e,a))}function yP(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),CS(e,a)}function _P(e,n){var a=0;switch(e.tag){case 13:var c=e.stateNode,g=e.memoizedState;g!==null&&(a=g.retryLane);break;case 19:c=e.stateNode;break;default:throw Error(ze(314))}c!==null&&c.delete(n),CS(e,a)}var IS;IS=function(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps||bi.current)xi=!0;else{if(!(e.lanes&a)&&!(n.flags&128))return xi=!1,oP(e,n,a);xi=!!(e.flags&131072)}else xi=!1,Cr&&n.flags&1048576&&M2(n,Uf,n.index);switch(n.lanes=0,n.tag){case 2:var c=n.type;yf(e,n),e=n.pendingProps;var g=cu(n,Gn.current);eu(n,a),g=U0(null,n,c,e,g,a);var x=j0();return n.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,wi(c)?(x=!0,Nf(n)):x=!1,n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,B0(n),g.updater=hm,n.stateNode=g,g._reactInternals=n,E_(n,c,e,a),n=M_(null,n,c,!0,x,a)):(n.tag=0,Cr&&x&&P0(n),ii(null,n,g,a),n=n.child),n;case 16:c=n.elementType;e:{switch(yf(e,n),e=n.pendingProps,g=c._init,c=g(c._payload),n.type=c,g=n.tag=xP(c),e=Do(c,e),g){case 0:n=A_(null,n,c,e,a);break e;case 1:n=lb(null,n,c,e,a);break e;case 11:n=sb(null,n,c,e,a);break e;case 14:n=ab(null,n,c,Do(c.type,e),a);break e}throw Error(ze(306,c,""))}return n;case 0:return c=n.type,g=n.pendingProps,g=n.elementType===c?g:Do(c,g),A_(e,n,c,g,a);case 1:return c=n.type,g=n.pendingProps,g=n.elementType===c?g:Do(c,g),lb(e,n,c,g,a);case 3:e:{if(uS(n),e===null)throw Error(ze(387));c=n.pendingProps,x=n.memoizedState,g=x.element,F2(e,n),qf(n,c,null,a);var v=n.memoizedState;if(c=v.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},n.updateQueue.baseState=x,n.memoizedState=x,n.flags&256){g=pu(Error(ze(423)),n),n=cb(e,n,c,a,g);break e}else if(c!==g){g=pu(Error(ze(424)),n),n=cb(e,n,c,a,g);break e}else for(Gi=La(n.stateNode.containerInfo.firstChild),Hi=n,Cr=!0,Fo=null,a=D2(n,null,c,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(uu(),c===g){n=Fs(e,n,a);break e}ii(e,n,c,a)}n=n.child}return n;case 5:return O2(n),e===null&&k_(n),c=n.type,g=n.pendingProps,x=e!==null?e.memoizedProps:null,v=g.children,x_(c,g)?v=null:x!==null&&x_(c,x)&&(n.flags|=32),cS(e,n),ii(e,n,v,a),n.child;case 6:return e===null&&k_(n),null;case 13:return hS(e,n,a);case 4:return F0(n,n.stateNode.containerInfo),c=n.pendingProps,e===null?n.child=hu(n,null,c,a):ii(e,n,c,a),n.child;case 11:return c=n.type,g=n.pendingProps,g=n.elementType===c?g:Do(c,g),sb(e,n,c,g,a);case 7:return ii(e,n,n.pendingProps,a),n.child;case 8:return ii(e,n,n.pendingProps.children,a),n.child;case 12:return ii(e,n,n.pendingProps.children,a),n.child;case 10:e:{if(c=n.type._context,g=n.pendingProps,x=n.memoizedProps,v=g.value,gr(jf,c._currentValue),c._currentValue=v,x!==null)if($o(x.value,v)){if(x.children===g.children&&!bi.current){n=Fs(e,n,a);break e}}else for(x=n.child,x!==null&&(x.return=n);x!==null;){var d=x.dependencies;if(d!==null){v=x.child;for(var L=d.firstContext;L!==null;){if(L.context===c){if(x.tag===1){L=Ls(-1,a&-a),L.tag=2;var O=x.updateQueue;if(O!==null){O=O.shared;var G=O.pending;G===null?L.next=L:(L.next=G.next,G.next=L),O.pending=L}}x.lanes|=a,L=x.alternate,L!==null&&(L.lanes|=a),C_(x.return,a,n),d.lanes|=a;break}L=L.next}}else if(x.tag===10)v=x.type===n.type?null:x.child;else if(x.tag===18){if(v=x.return,v===null)throw Error(ze(341));v.lanes|=a,d=v.alternate,d!==null&&(d.lanes|=a),C_(v,a,n),v=x.sibling}else v=x.child;if(v!==null)v.return=x;else for(v=x;v!==null;){if(v===n){v=null;break}if(x=v.sibling,x!==null){x.return=v.return,v=x;break}v=v.return}x=v}ii(e,n,g.children,a),n=n.child}return n;case 9:return g=n.type,c=n.pendingProps.children,eu(n,a),g=xo(g),c=c(g),n.flags|=1,ii(e,n,c,a),n.child;case 14:return c=n.type,g=Do(c,n.pendingProps),g=Do(c.type,g),ab(e,n,c,g,a);case 15:return aS(e,n,n.type,n.pendingProps,a);case 17:return c=n.type,g=n.pendingProps,g=n.elementType===c?g:Do(c,g),yf(e,n),n.tag=1,wi(c)?(e=!0,Nf(n)):e=!1,eu(n,a),iS(n,c,g),E_(n,c,g,a),M_(null,n,c,!0,e,a);case 19:return dS(e,n,a);case 22:return lS(e,n,a)}throw Error(ze(156,n.tag))};function ES(e,n){return t2(e,n)}function vP(e,n,a,c){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _o(e,n,a,c){return new vP(e,n,a,c)}function J0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xP(e){if(typeof e=="function")return J0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===y0)return 11;if(e===_0)return 14}return 2}function Fa(e,n){var a=e.alternate;return a===null?(a=_o(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&14680064,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function xf(e,n,a,c,g,x){var v=2;if(c=e,typeof e=="function")J0(e)&&(v=1);else if(typeof e=="string")v=5;else e:switch(e){case Nc:return El(a.children,g,x,n);case g0:v=8,g|=8;break;case Jy:return e=_o(12,a,n,g|2),e.elementType=Jy,e.lanes=x,e;case Qy:return e=_o(13,a,n,g),e.elementType=Qy,e.lanes=x,e;case e_:return e=_o(19,a,n,g),e.elementType=e_,e.lanes=x,e;case Ow:return fm(a,g,x,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bw:v=10;break e;case Fw:v=9;break e;case y0:v=11;break e;case _0:v=14;break e;case Sa:v=16,c=null;break e}throw Error(ze(130,e==null?e:typeof e,""))}return n=_o(v,a,n,g),n.elementType=e,n.type=c,n.lanes=x,n}function El(e,n,a,c){return e=_o(7,e,c,n),e.lanes=a,e}function fm(e,n,a,c){return e=_o(22,e,c,n),e.elementType=Ow,e.lanes=a,e.stateNode={isHidden:!1},e}function Ny(e,n,a){return e=_o(6,e,null,n),e.lanes=a,e}function $y(e,n,a){return n=_o(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function bP(e,n,a,c,g){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xy(0),this.expirationTimes=xy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xy(0),this.identifierPrefix=c,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Q0(e,n,a,c,g,x,v,d,L){return e=new bP(e,n,a,d,L),n===1?(n=1,x===!0&&(n|=8)):n=0,x=_o(3,null,null,n),e.current=x,x.stateNode=e,x.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},B0(x),e}function wP(e,n,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zS)}catch(e){console.error(e)}}zS(),zw.exports=Xi;var IP=zw.exports,bb=IP;Xy.createRoot=bb.createRoot,Xy.hydrateRoot=bb.hydrateRoot;function zn(e,n){if(e==null)return{};var a={};for(var c in e)if({}.hasOwnProperty.call(e,c)){if(n.indexOf(c)>=0)continue;a[c]=e[c]}return a}function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var n=1;n{c[g]=e[g].reduce((x,v)=>{if(v){const d=n(v);d!==""&&x.push(d),a&&a[v]&&x.push(a[v])}return x},[]).join(" ")}),c}function V_(e,n){const a=ut({},n);return Object.keys(e).forEach(c=>{if(c.toString().match(/^(components|slots)$/))a[c]=ut({},e[c],a[c]);else if(c.toString().match(/^(componentsProps|slotProps)$/)){const g=e[c]||{},x=n[c];a[c]={},!x||!Object.keys(x)?a[c]=g:!g||!Object.keys(g)?a[c]=x:(a[c]=ut({},x),Object.keys(g).forEach(v=>{a[c][v]=V_(g[v],x[v])}))}else a[c]===void 0&&(a[c]=e[c])}),a}const EP=Ze.createContext(void 0);function PP(e){const{theme:n,name:a,props:c}=e;if(!n||!n.components||!n.components[a])return c;const g=n.components[a];return g.defaultProps?V_(g.defaultProps,c):!g.styleOverrides&&!g.variants?V_(g,c):c}function AP({props:e,name:n}){const a=Ze.useContext(EP);return PP({props:e,name:n,theme:{components:a}})}function Va(e){return AP(e)}var Ad={},RS={exports:{}};(function(e){function n(a){return a&&a.__esModule?a:{default:a}}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(RS);var nv=RS.exports,Uy={exports:{}},wb;function DS(){return wb||(wb=1,function(e){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(a){for(var c=1;c=0)continue;g[x]=a[x]}return g}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(jy)),jy.exports}function BS(e){var n=Object.create(null);return function(a){return n[a]===void 0&&(n[a]=e(a)),n[a]}}var zP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,LP=BS(function(e){return zP.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),RP=!1;function DP(e){if(e.sheet)return e.sheet;for(var n=0;n0?Pn(vu,--Ti):0,mu--,Qr===10&&(mu=1,xm--),Qr}function Wi(){return Qr=Ti<$S?Pn(vu,Ti++):0,mu++,Qr===10&&(mu=1,xm++),Qr}function ss(){return Pn(vu,Ti)}function bf(){return Ti}function Md(e,n){return xd(vu,e,n)}function bd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function US(e){return xm=mu=1,$S=ts(vu=e),Ti=0,[]}function jS(e){return vu="",e}function wf(e){return NS(Md(Ti-1,Z_(e===91?e+2:e===40?e+1:e)))}function HP(e){for(;(Qr=ss())&&Qr<33;)Wi();return bd(e)>2||bd(Qr)>3?"":" "}function WP(e,n){for(;--n&&Wi()&&!(Qr<48||Qr>102||Qr>57&&Qr<65||Qr>70&&Qr<97););return Md(e,bf()+(n<6&&ss()==32&&Wi()==32))}function Z_(e){for(;Wi();)switch(Qr){case e:return Ti;case 34:case 39:e!==34&&e!==39&&Z_(Qr);break;case 40:e===41&&Z_(e);break;case 92:Wi();break}return Ti}function KP(e,n){for(;Wi()&&e+Qr!==57;)if(e+Qr===84&&ss()===47)break;return"/*"+Md(n,Ti-1)+"*"+vm(e===47?e:Wi())}function XP(e){for(;!bd(ss());)Wi();return Md(e,Ti)}function YP(e){return jS(Sf("",null,null,null,[""],e=US(e),0,[0],e))}function Sf(e,n,a,c,g,x,v,d,L){for(var O=0,G=0,q=v,$=0,_e=0,ge=0,pe=1,Ue=1,ne=1,ee=0,ae="",we=g,ke=x,Pe=c,Ie=ae;Ue;)switch(ge=ee,ee=Wi()){case 40:if(ge!=108&&Pn(Ie,q-1)==58){q_(Ie+=Qt(wf(ee),"&","&\f"),"&\f")!=-1&&(ne=-1);break}case 34:case 39:case 91:Ie+=wf(ee);break;case 9:case 10:case 13:case 32:Ie+=HP(ge);break;case 92:Ie+=WP(bf()-1,7);continue;case 47:switch(ss()){case 42:case 47:rf(JP(KP(Wi(),bf()),n,a),L);break;default:Ie+="/"}break;case 123*pe:d[O++]=ts(Ie)*ne;case 125*pe:case 59:case 0:switch(ee){case 0:case 125:Ue=0;case 59+G:ne==-1&&(Ie=Qt(Ie,/\f/g,"")),_e>0&&ts(Ie)-q&&rf(_e>32?kb(Ie+";",c,a,q-1):kb(Qt(Ie," ","")+";",c,a,q-2),L);break;case 59:Ie+=";";default:if(rf(Pe=Tb(Ie,n,a,O,G,g,d,ae,we=[],ke=[],q),x),ee===123)if(G===0)Sf(Ie,n,Pe,Pe,we,x,q,d,ke);else switch($===99&&Pn(Ie,3)===110?100:$){case 100:case 108:case 109:case 115:Sf(e,Pe,Pe,c&&rf(Tb(e,Pe,Pe,0,0,g,d,ae,g,we=[],q),ke),g,ke,q,d,c?we:ke);break;default:Sf(Ie,Pe,Pe,Pe,[""],ke,0,d,ke)}}O=G=_e=0,pe=ne=1,ae=Ie="",q=v;break;case 58:q=1+ts(Ie),_e=ge;default:if(pe<1){if(ee==123)--pe;else if(ee==125&&pe++==0&&GP()==125)continue}switch(Ie+=vm(ee),ee*pe){case 38:ne=G>0?1:(Ie+="\f",-1);break;case 44:d[O++]=(ts(Ie)-1)*ne,ne=1;break;case 64:ss()===45&&(Ie+=wf(Wi())),$=ss(),G=q=ts(ae=Ie+=XP(bf())),ee++;break;case 45:ge===45&&ts(Ie)==2&&(pe=0)}}return x}function Tb(e,n,a,c,g,x,v,d,L,O,G){for(var q=g-1,$=g===0?x:[""],_e=sv($),ge=0,pe=0,Ue=0;ge0?$[ne]+" "+ee:Qt(ee,/&\f/g,$[ne])))&&(L[Ue++]=ae);return bm(e,n,a,g===0?iv:d,L,O,G)}function JP(e,n,a){return bm(e,n,a,FS,vm(ZP()),xd(e,2,-2),0)}function kb(e,n,a,c){return bm(e,n,a,ov,xd(e,0,c),xd(e,c+1,-1),c)}function ru(e,n){for(var a="",c=sv(e),g=0;g6)switch(Pn(e,n+1)){case 109:if(Pn(e,n+4)!==45)break;case 102:return Qt(e,/(.+:)(.+)-([^]+)/,"$1"+Jt+"$2-$3$1"+Qf+(Pn(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~q_(e,"stretch")?VS(Qt(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(Pn(e,n+1)!==115)break;case 6444:switch(Pn(e,ts(e)-3-(~q_(e,"!important")&&10))){case 107:return Qt(e,":",":"+Jt)+e;case 101:return Qt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Jt+(Pn(e,14)===45?"inline-":"")+"box$3$1"+Jt+"$2$3$1"+qn+"$2box$3")+e}break;case 5936:switch(Pn(e,n+11)){case 114:return Jt+e+qn+Qt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Jt+e+qn+Qt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Jt+e+qn+Qt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Jt+e+qn+e+e}return e}var aA=function(n,a,c,g){if(n.length>-1&&!n.return)switch(n.type){case ov:n.return=VS(n.value,n.length);break;case OS:return ru([Nh(n,{value:Qt(n.value,"@","@"+Jt)})],g);case iv:if(n.length)return qP(n.props,function(x){switch(VP(x,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ru([Nh(n,{props:[Qt(x,/:(read-\w+)/,":"+Qf+"$1")]})],g);case"::placeholder":return ru([Nh(n,{props:[Qt(x,/:(plac\w+)/,":"+Jt+"input-$1")]}),Nh(n,{props:[Qt(x,/:(plac\w+)/,":"+Qf+"$1")]}),Nh(n,{props:[Qt(x,/:(plac\w+)/,qn+"input-$1")]})],g)}return""})}},lA=[aA],qS=function(n){var a=n.key;if(a==="css"){var c=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(c,function(pe){var Ue=pe.getAttribute("data-emotion");Ue.indexOf(" ")!==-1&&(document.head.appendChild(pe),pe.setAttribute("data-s",""))})}var g=n.stylisPlugins||lA,x={},v,d=[];v=n.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+a+' "]'),function(pe){for(var Ue=pe.getAttribute("data-emotion").split(" "),ne=1;ne=4;++c,g-=4)a=e.charCodeAt(c)&255|(e.charCodeAt(++c)&255)<<8|(e.charCodeAt(++c)&255)<<16|(e.charCodeAt(++c)&255)<<24,a=(a&65535)*1540483477+((a>>>16)*59797<<16),a^=a>>>24,n=(a&65535)*1540483477+((a>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(g){case 3:n^=(e.charCodeAt(c+2)&255)<<16;case 2:n^=(e.charCodeAt(c+1)&255)<<8;case 1:n^=e.charCodeAt(c)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}var xA={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},bA=!1,wA=/[A-Z]|^ms/g,SA=/_EMO_([^_]+?)_([^]*?)_EMO_/g,YS=function(n){return n.charCodeAt(1)===45},Ib=function(n){return n!=null&&typeof n!="boolean"},Vy=BS(function(e){return YS(e)?e:e.replace(wA,"-$&").toLowerCase()}),Eb=function(n,a){switch(n){case"animation":case"animationName":if(typeof a=="string")return a.replace(SA,function(c,g,x){return rs={name:g,styles:x,next:rs},g})}return xA[n]!==1&&!YS(n)&&typeof a=="number"&&a!==0?a+"px":a},TA="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function wd(e,n,a){if(a==null)return"";var c=a;if(c.__emotion_styles!==void 0)return c;switch(typeof a){case"boolean":return"";case"object":{var g=a;if(g.anim===1)return rs={name:g.name,styles:g.styles,next:rs},g.name;var x=a;if(x.styles!==void 0){var v=x.next;if(v!==void 0)for(;v!==void 0;)rs={name:v.name,styles:v.styles,next:rs},v=v.next;var d=x.styles+";";return d}return kA(e,n,a)}case"function":{if(e!==void 0){var L=rs,O=a(e);return rs=L,wd(e,n,O)}break}}var G=a;if(n==null)return G;var q=n[G];return q!==void 0?q:G}function kA(e,n,a){var c="";if(Array.isArray(a))for(var g=0;g96?AA:MA},zb=function(n,a,c){var g;if(a){var x=a.shouldForwardProp;g=n.__emotion_forwardProp&&x?function(v){return n.__emotion_forwardProp(v)&&x(v)}:x}return typeof g!="function"&&c&&(g=n.__emotion_forwardProp),g},zA=!1,LA=function(n){var a=n.cache,c=n.serialized,g=n.isStringTag;return KS(a,c,g),IA(function(){return XS(a,c,g)}),null},RA=function e(n,a){var c=n.__emotion_real===n,g=c&&n.__emotion_base||n,x,v;a!==void 0&&(x=a.label,v=a.target);var d=zb(n,a,c),L=d||Mb(g),O=!L("as");return function(){var G=arguments,q=c&&n.__emotion_styles!==void 0?n.__emotion_styles.slice(0):[];if(x!==void 0&&q.push("label:"+x+";"),G[0]==null||G[0].raw===void 0)q.push.apply(q,G);else{q.push(G[0][0]);for(var $=G.length,_e=1;_e<$;_e++)q.push(G[_e],G[0][_e])}var ge=eT(function(pe,Ue,ne){var ee=O&&pe.as||g,ae="",we=[],ke=pe;if(pe.theme==null){ke={};for(var Pe in pe)ke[Pe]=pe[Pe];ke.theme=Ze.useContext(zm)}typeof pe.className=="string"?ae=_A(Ue.registered,we,pe.className):pe.className!=null&&(ae=pe.className+" ");var Ie=uv(q.concat(we),Ue.registered,ke);ae+=Ue.key+"-"+Ie.name,v!==void 0&&(ae+=" "+v);var We=O&&d===void 0?Mb(ee):L,vt={};for(var it in pe)O&&it==="as"||We(it)&&(vt[it]=pe[it]);return vt.className=ae,ne&&(vt.ref=ne),Ze.createElement(Ze.Fragment,null,Ze.createElement(LA,{cache:Ue,serialized:Ie,isStringTag:typeof ee=="string"}),Ze.createElement(ee,vt))});return ge.displayName=x!==void 0?x:"Styled("+(typeof g=="string"?g:g.displayName||g.name||"Component")+")",ge.defaultProps=n.defaultProps,ge.__emotion_real=ge,ge.__emotion_base=g,ge.__emotion_styles=q,ge.__emotion_forwardProp=d,Object.defineProperty(ge,"toString",{value:function(){return v===void 0&&zA?"NO_COMPONENT_SELECTOR":"."+v}}),ge.withComponent=function(pe,Ue){return e(pe,ut({},a,Ue,{shouldForwardProp:zb(ge,Ue,!0)})).apply(void 0,q)},ge}},DA=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],G_=RA.bind();DA.forEach(function(e){G_[e]=G_(e)});let H_;typeof document=="object"&&(H_=qS({key:"css",prepend:!0}));function BA(e){const{injectFirst:n,children:a}=e;return n&&H_?Wt.jsx(EA,{value:H_,children:a}):a}function FA(e){return e==null||Object.keys(e).length===0}function OA(e){const{styles:n,defaultTheme:a={}}=e,c=typeof n=="function"?g=>n(FA(g)?a:g):n;return Wt.jsx(PA,{styles:c})}function rT(e,n){return G_(e,n)}const NA=(e,n)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=n(e.__emotion_styles))},$A=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:OA,StyledEngineProvider:BA,ThemeContext:zm,css:tT,default:rT,internal_processStyles:NA,keyframes:Lm},Symbol.toStringTag,{value:"Module"})),UA=Ns($A);function Ia(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function nT(e){if(!Ia(e))return e;const n={};return Object.keys(e).forEach(a=>{n[a]=nT(e[a])}),n}function as(e,n,a={clone:!0}){const c=a.clone?ut({},e):e;return Ia(e)&&Ia(n)&&Object.keys(n).forEach(g=>{Ia(n[g])&&Object.prototype.hasOwnProperty.call(e,g)&&Ia(e[g])?c[g]=as(e[g],n[g],a):a.clone?c[g]=Ia(n[g])?nT(n[g]):n[g]:c[g]=n[g]}),c}const jA=Object.freeze(Object.defineProperty({__proto__:null,default:as,isPlainObject:Ia},Symbol.toStringTag,{value:"Module"})),VA=Ns(jA);function Sd(e){let n="https://mui.com/production-error/?code="+e;for(let a=1;a{const n=Object.keys(e).map(a=>({key:a,val:e[a]}))||[];return n.sort((a,c)=>a.val-c.val),n.reduce((a,c)=>ut({},a,{[c.key]:c.val}),{})};function lT(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:a="px",step:c=5}=e,g=zn(e,QA),x=eM(n),v=Object.keys(x);function d($){return`@media (min-width:${typeof n[$]=="number"?n[$]:$}${a})`}function L($){return`@media (max-width:${(typeof n[$]=="number"?n[$]:$)-c/100}${a})`}function O($,_e){const ge=v.indexOf(_e);return`@media (min-width:${typeof n[$]=="number"?n[$]:$}${a}) and (max-width:${(ge!==-1&&typeof n[v[ge]]=="number"?n[v[ge]]:_e)-c/100}${a})`}function G($){return v.indexOf($)+1`@media (min-width:${pv[e]}px)`};function Os(e,n,a){const c=e.theme||{};if(Array.isArray(n)){const x=c.breakpoints||Db;return n.reduce((v,d,L)=>(v[x.up(x.keys[L])]=a(n[L]),v),{})}if(typeof n=="object"){const x=c.breakpoints||Db;return Object.keys(n).reduce((v,d)=>{if(Object.keys(x.values||pv).indexOf(d)!==-1){const L=x.up(d);v[L]=a(n[d],d)}else{const L=d;v[L]=n[L]}return v},{})}return a(n)}function rM(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((c,g)=>{const x=e.up(g);return c[x]={},c},{}))||{}}function nM(e,n){return e.reduce((a,c)=>{const g=a[c];return(!g||Object.keys(g).length===0)&&delete a[c],a},n)}function qm(e,n,a=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&a){const c=`vars.${n}`.split(".").reduce((g,x)=>g&&g[x]?g[x]:null,e);if(c!=null)return c}return n.split(".").reduce((c,g)=>c&&c[g]!=null?c[g]:null,e)}function em(e,n,a,c=a){let g;return typeof e=="function"?g=e(a):Array.isArray(e)?g=e[a]||c:g=qm(e,a)||c,n&&(g=n(g,c,e)),g}function qr(e){const{prop:n,cssProperty:a=e.prop,themeKey:c,transform:g}=e,x=v=>{if(v[n]==null)return null;const d=v[n],L=v.theme,O=qm(L,c)||{};return Os(v,d,q=>{let $=em(O,g,q);return q===$&&typeof q=="string"&&($=em(O,g,`${n}${q==="default"?"":tn(q)}`,q)),a===!1?$:{[a]:$}})};return x.propTypes={},x.filterProps=[n],x}function iM(e){const n={};return a=>(n[a]===void 0&&(n[a]=e(a)),n[a])}const oM={m:"margin",p:"padding"},sM={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Bb={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},aM=iM(e=>{if(e.length>2)if(Bb[e])e=Bb[e];else return[e];const[n,a]=e.split(""),c=oM[n],g=sM[a]||"";return Array.isArray(g)?g.map(x=>c+x):[c+g]}),fv=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mv=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...fv,...mv];function zd(e,n,a,c){var g;const x=(g=qm(e,n,!1))!=null?g:a;return typeof x=="number"?v=>typeof v=="string"?v:x*v:Array.isArray(x)?v=>typeof v=="string"?v:x[v]:typeof x=="function"?x:()=>{}}function cT(e){return zd(e,"spacing",8)}function Ld(e,n){if(typeof n=="string"||n==null)return n;const a=Math.abs(n),c=e(a);return n>=0?c:typeof c=="number"?-c:`-${c}`}function lM(e,n){return a=>e.reduce((c,g)=>(c[g]=Ld(n,a),c),{})}function cM(e,n,a,c){if(n.indexOf(a)===-1)return null;const g=aM(a),x=lM(g,c),v=e[a];return Os(e,v,x)}function uT(e,n){const a=cT(e.theme);return Object.keys(e).map(c=>cM(e,n,c,a)).reduce(rd,{})}function Or(e){return uT(e,fv)}Or.propTypes={};Or.filterProps=fv;function Nr(e){return uT(e,mv)}Nr.propTypes={};Nr.filterProps=mv;function uM(e=8){if(e.mui)return e;const n=cT({spacing:e}),a=(...c)=>(c.length===0?[1]:c).map(x=>{const v=n(x);return typeof v=="number"?`${v}px`:v}).join(" ");return a.mui=!0,a}function Zm(...e){const n=e.reduce((c,g)=>(g.filterProps.forEach(x=>{c[x]=g}),c),{}),a=c=>Object.keys(c).reduce((g,x)=>n[x]?rd(g,n[x](c)):g,{});return a.propTypes={},a.filterProps=e.reduce((c,g)=>c.concat(g.filterProps),[]),a}function yo(e){return typeof e!="number"?e:`${e}px solid`}function To(e,n){return qr({prop:e,themeKey:"borders",transform:n})}const hM=To("border",yo),dM=To("borderTop",yo),pM=To("borderRight",yo),fM=To("borderBottom",yo),mM=To("borderLeft",yo),gM=To("borderColor"),yM=To("borderTopColor"),_M=To("borderRightColor"),vM=To("borderBottomColor"),xM=To("borderLeftColor"),bM=To("outline",yo),wM=To("outlineColor"),Gm=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=zd(e.theme,"shape.borderRadius",4),a=c=>({borderRadius:Ld(n,c)});return Os(e,e.borderRadius,a)}return null};Gm.propTypes={};Gm.filterProps=["borderRadius"];Zm(hM,dM,pM,fM,mM,gM,yM,_M,vM,xM,Gm,bM,wM);const Hm=e=>{if(e.gap!==void 0&&e.gap!==null){const n=zd(e.theme,"spacing",8),a=c=>({gap:Ld(n,c)});return Os(e,e.gap,a)}return null};Hm.propTypes={};Hm.filterProps=["gap"];const Wm=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=zd(e.theme,"spacing",8),a=c=>({columnGap:Ld(n,c)});return Os(e,e.columnGap,a)}return null};Wm.propTypes={};Wm.filterProps=["columnGap"];const Km=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=zd(e.theme,"spacing",8),a=c=>({rowGap:Ld(n,c)});return Os(e,e.rowGap,a)}return null};Km.propTypes={};Km.filterProps=["rowGap"];const SM=qr({prop:"gridColumn"}),TM=qr({prop:"gridRow"}),kM=qr({prop:"gridAutoFlow"}),CM=qr({prop:"gridAutoColumns"}),IM=qr({prop:"gridAutoRows"}),EM=qr({prop:"gridTemplateColumns"}),PM=qr({prop:"gridTemplateRows"}),AM=qr({prop:"gridTemplateAreas"}),MM=qr({prop:"gridArea"});Zm(Hm,Wm,Km,SM,TM,kM,CM,IM,EM,PM,AM,MM);function nu(e,n){return n==="grey"?n:e}const zM=qr({prop:"color",themeKey:"palette",transform:nu}),LM=qr({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:nu}),RM=qr({prop:"backgroundColor",themeKey:"palette",transform:nu});Zm(zM,LM,RM);function Zi(e){return e<=1&&e!==0?`${e*100}%`:e}const DM=qr({prop:"width",transform:Zi}),gv=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=a=>{var c,g;const x=((c=e.theme)==null||(c=c.breakpoints)==null||(c=c.values)==null?void 0:c[a])||pv[a];return x?((g=e.theme)==null||(g=g.breakpoints)==null?void 0:g.unit)!=="px"?{maxWidth:`${x}${e.theme.breakpoints.unit}`}:{maxWidth:x}:{maxWidth:Zi(a)}};return Os(e,e.maxWidth,n)}return null};gv.filterProps=["maxWidth"];const BM=qr({prop:"minWidth",transform:Zi}),FM=qr({prop:"height",transform:Zi}),OM=qr({prop:"maxHeight",transform:Zi}),NM=qr({prop:"minHeight",transform:Zi});qr({prop:"size",cssProperty:"width",transform:Zi});qr({prop:"size",cssProperty:"height",transform:Zi});const $M=qr({prop:"boxSizing"});Zm(DM,gv,BM,FM,OM,NM,$M);const Rd={border:{themeKey:"borders",transform:yo},borderTop:{themeKey:"borders",transform:yo},borderRight:{themeKey:"borders",transform:yo},borderBottom:{themeKey:"borders",transform:yo},borderLeft:{themeKey:"borders",transform:yo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:yo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Gm},color:{themeKey:"palette",transform:nu},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:nu},backgroundColor:{themeKey:"palette",transform:nu},p:{style:Nr},pt:{style:Nr},pr:{style:Nr},pb:{style:Nr},pl:{style:Nr},px:{style:Nr},py:{style:Nr},padding:{style:Nr},paddingTop:{style:Nr},paddingRight:{style:Nr},paddingBottom:{style:Nr},paddingLeft:{style:Nr},paddingX:{style:Nr},paddingY:{style:Nr},paddingInline:{style:Nr},paddingInlineStart:{style:Nr},paddingInlineEnd:{style:Nr},paddingBlock:{style:Nr},paddingBlockStart:{style:Nr},paddingBlockEnd:{style:Nr},m:{style:Or},mt:{style:Or},mr:{style:Or},mb:{style:Or},ml:{style:Or},mx:{style:Or},my:{style:Or},margin:{style:Or},marginTop:{style:Or},marginRight:{style:Or},marginBottom:{style:Or},marginLeft:{style:Or},marginX:{style:Or},marginY:{style:Or},marginInline:{style:Or},marginInlineStart:{style:Or},marginInlineEnd:{style:Or},marginBlock:{style:Or},marginBlockStart:{style:Or},marginBlockEnd:{style:Or},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Hm},rowGap:{style:Km},columnGap:{style:Wm},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Zi},maxWidth:{style:gv},minWidth:{transform:Zi},height:{transform:Zi},maxHeight:{transform:Zi},minHeight:{transform:Zi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function UM(...e){const n=e.reduce((c,g)=>c.concat(Object.keys(g)),[]),a=new Set(n);return e.every(c=>a.size===Object.keys(c).length)}function jM(e,n){return typeof e=="function"?e(n):e}function hT(){function e(a,c,g,x){const v={[a]:c,theme:g},d=x[a];if(!d)return{[a]:c};const{cssProperty:L=a,themeKey:O,transform:G,style:q}=d;if(c==null)return null;if(O==="typography"&&c==="inherit")return{[a]:c};const $=qm(g,O)||{};return q?q(v):Os(v,c,ge=>{let pe=em($,G,ge);return ge===pe&&typeof ge=="string"&&(pe=em($,G,`${a}${ge==="default"?"":tn(ge)}`,ge)),L===!1?pe:{[L]:pe}})}function n(a){var c;const{sx:g,theme:x={}}=a||{};if(!g)return null;const v=(c=x.unstable_sxConfig)!=null?c:Rd;function d(L){let O=L;if(typeof L=="function")O=L(x);else if(typeof L!="object")return L;if(!O)return null;const G=rM(x.breakpoints),q=Object.keys(G);let $=G;return Object.keys(O).forEach(_e=>{const ge=jM(O[_e],x);if(ge!=null)if(typeof ge=="object")if(v[_e])$=rd($,e(_e,ge,x,v));else{const pe=Os({theme:x},ge,Ue=>({[_e]:Ue}));UM(pe,ge)?$[_e]=n({sx:ge,theme:x}):$=rd($,pe)}else $=rd($,e(_e,ge,x,v))}),nM(q,$)}return Array.isArray(g)?g.map(d):d(g)}return n}const Dd=hT();Dd.filterProps=["sx"];function dT(e,n){const a=this;return a.vars&&typeof a.getColorSchemeSelector=="function"?{[a.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:n}:a.palette.mode===e?n:{}}const VM=["breakpoints","palette","spacing","shape"];function yv(e={},...n){const{breakpoints:a={},palette:c={},spacing:g,shape:x={}}=e,v=zn(e,VM),d=lT(a),L=uM(g);let O=as({breakpoints:d,direction:"ltr",components:{},palette:ut({mode:"light"},c),spacing:L,shape:ut({},tM,x)},v);return O.applyStyles=dT,O=n.reduce((G,q)=>as(G,q),O),O.unstable_sxConfig=ut({},Rd,v==null?void 0:v.unstable_sxConfig),O.unstable_sx=function(q){return Dd({sx:q,theme:this})},O}const qM=Object.freeze(Object.defineProperty({__proto__:null,default:yv,private_createBreakpoints:lT,unstable_applyStyles:dT},Symbol.toStringTag,{value:"Module"})),ZM=Ns(qM),GM=["sx"],HM=e=>{var n,a;const c={systemProps:{},otherProps:{}},g=(n=e==null||(a=e.theme)==null?void 0:a.unstable_sxConfig)!=null?n:Rd;return Object.keys(e).forEach(x=>{g[x]?c.systemProps[x]=e[x]:c.otherProps[x]=e[x]}),c};function _v(e){const{sx:n}=e,a=zn(e,GM),{systemProps:c,otherProps:g}=HM(a);let x;return Array.isArray(n)?x=[c,...n]:typeof n=="function"?x=(...v)=>{const d=n(...v);return Ia(d)?ut({},c,d):c}:x=ut({},c,n),ut({},g,{sx:x})}const WM=Object.freeze(Object.defineProperty({__proto__:null,default:Dd,extendSxProp:_v,unstable_createStyleFunctionSx:hT,unstable_defaultSxConfig:Rd},Symbol.toStringTag,{value:"Module"})),KM=Ns(WM);var xu=nv;Object.defineProperty(Ad,"__esModule",{value:!0});var XM=Ad.default=c5;Ad.shouldForwardProp=Tf;Ad.systemDefaultTheme=void 0;var po=xu(DS()),W_=xu(MP()),Fb=n5(UA),YM=VA;xu(GA);xu(JA);var JM=xu(ZM),QM=xu(KM);const e5=["ownerState"],t5=["variants"],r5=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function pT(e){if(typeof WeakMap!="function")return null;var n=new WeakMap,a=new WeakMap;return(pT=function(c){return c?a:n})(e)}function n5(e,n){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var a=pT(n);if(a&&a.has(e))return a.get(e);var c={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in e)if(x!=="default"&&Object.prototype.hasOwnProperty.call(e,x)){var v=g?Object.getOwnPropertyDescriptor(e,x):null;v&&(v.get||v.set)?Object.defineProperty(c,x,v):c[x]=e[x]}return c.default=e,a&&a.set(e,c),c}function i5(e){return Object.keys(e).length===0}function o5(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Tf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const s5=Ad.systemDefaultTheme=(0,JM.default)(),a5=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function nf({defaultTheme:e,theme:n,themeId:a}){return i5(n)?e:n[a]||n}function l5(e){return e?(n,a)=>a[e]:null}function kf(e,n){let{ownerState:a}=n,c=(0,W_.default)(n,e5);const g=typeof e=="function"?e((0,po.default)({ownerState:a},c)):e;if(Array.isArray(g))return g.flatMap(x=>kf(x,(0,po.default)({ownerState:a},c)));if(g&&typeof g=="object"&&Array.isArray(g.variants)){const{variants:x=[]}=g;let d=(0,W_.default)(g,t5);return x.forEach(L=>{let O=!0;typeof L.props=="function"?O=L.props((0,po.default)({ownerState:a},c,a)):Object.keys(L.props).forEach(G=>{(a==null?void 0:a[G])!==L.props[G]&&c[G]!==L.props[G]&&(O=!1)}),O&&(Array.isArray(d)||(d=[d]),d.push(typeof L.style=="function"?L.style((0,po.default)({ownerState:a},c,a)):L.style))}),d}return g}function c5(e={}){const{themeId:n,defaultTheme:a=s5,rootShouldForwardProp:c=Tf,slotShouldForwardProp:g=Tf}=e,x=v=>(0,QM.default)((0,po.default)({},v,{theme:nf((0,po.default)({},v,{defaultTheme:a,themeId:n}))}));return x.__mui_systemSx=!0,(v,d={})=>{(0,Fb.internal_processStyles)(v,ke=>ke.filter(Pe=>!(Pe!=null&&Pe.__mui_systemSx)));const{name:L,slot:O,skipVariantsResolver:G,skipSx:q,overridesResolver:$=l5(a5(O))}=d,_e=(0,W_.default)(d,r5),ge=G!==void 0?G:O&&O!=="Root"&&O!=="root"||!1,pe=q||!1;let Ue,ne=Tf;O==="Root"||O==="root"?ne=c:O?ne=g:o5(v)&&(ne=void 0);const ee=(0,Fb.default)(v,(0,po.default)({shouldForwardProp:ne,label:Ue},_e)),ae=ke=>typeof ke=="function"&&ke.__emotion_real!==ke||(0,YM.isPlainObject)(ke)?Pe=>kf(ke,(0,po.default)({},Pe,{theme:nf({theme:Pe.theme,defaultTheme:a,themeId:n})})):ke,we=(ke,...Pe)=>{let Ie=ae(ke);const We=Pe?Pe.map(ae):[];L&&$&&We.push(ot=>{const Nt=nf((0,po.default)({},ot,{defaultTheme:a,themeId:n}));if(!Nt.components||!Nt.components[L]||!Nt.components[L].styleOverrides)return null;const Ct=Nt.components[L].styleOverrides,Bt={};return Object.entries(Ct).forEach(([Ir,br])=>{Bt[Ir]=kf(br,(0,po.default)({},ot,{theme:Nt}))}),$(ot,Bt)}),L&&!ge&&We.push(ot=>{var Nt;const Ct=nf((0,po.default)({},ot,{defaultTheme:a,themeId:n})),Bt=Ct==null||(Nt=Ct.components)==null||(Nt=Nt[L])==null?void 0:Nt.variants;return kf({variants:Bt},(0,po.default)({},ot,{theme:Ct}))}),pe||We.push(x);const vt=We.length-Pe.length;if(Array.isArray(ke)&&vt>0){const ot=new Array(vt).fill("");Ie=[...ke,...ot],Ie.raw=[...ke.raw,...ot]}const it=ee(Ie,...We);return v.muiName&&(it.muiName=v.muiName),it};return ee.withConfig&&(we.withConfig=ee.withConfig),we}}const Ob=e=>e,u5=()=>{let e=Ob;return{configure(n){e=n},generate(n){return e(n)},reset(){e=Ob}}},vv=u5(),h5={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function qa(e,n,a="Mui"){const c=h5[n];return c?`${a}-${c}`:`${vv.generate(e)}-${n}`}function d5(e,n){return ut({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},n)}var Zr={};const p5=Ns(qA);function f5(e,n=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER){return Math.max(n,Math.min(e,a))}const m5=Object.freeze(Object.defineProperty({__proto__:null,default:f5},Symbol.toStringTag,{value:"Module"})),g5=Ns(m5);var fT=nv;Object.defineProperty(Zr,"__esModule",{value:!0});var tm=Zr.alpha=_T;Zr.blend=P5;Zr.colorChannel=void 0;var y5=Zr.darken=bv;Zr.decomposeColor=wo;Zr.emphasize=vT;var _5=Zr.getContrastRatio=T5;Zr.getLuminance=rm;Zr.hexToRgb=mT;Zr.hslToRgb=yT;var v5=Zr.lighten=wv;Zr.private_safeAlpha=k5;Zr.private_safeColorChannel=void 0;Zr.private_safeDarken=C5;Zr.private_safeEmphasize=E5;Zr.private_safeLighten=I5;Zr.recomposeColor=bu;Zr.rgbToHex=S5;var Nb=fT(p5),x5=fT(g5);function xv(e,n=0,a=1){return(0,x5.default)(e,n,a)}function mT(e){e=e.slice(1);const n=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let a=e.match(n);return a&&a[0].length===1&&(a=a.map(c=>c+c)),a?`rgb${a.length===4?"a":""}(${a.map((c,g)=>g<3?parseInt(c,16):Math.round(parseInt(c,16)/255*1e3)/1e3).join(", ")})`:""}function b5(e){const n=e.toString(16);return n.length===1?`0${n}`:n}function wo(e){if(e.type)return e;if(e.charAt(0)==="#")return wo(mT(e));const n=e.indexOf("("),a=e.substring(0,n);if(["rgb","rgba","hsl","hsla","color"].indexOf(a)===-1)throw new Error((0,Nb.default)(9,e));let c=e.substring(n+1,e.length-1),g;if(a==="color"){if(c=c.split(" "),g=c.shift(),c.length===4&&c[3].charAt(0)==="/"&&(c[3]=c[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(g)===-1)throw new Error((0,Nb.default)(10,g))}else c=c.split(",");return c=c.map(x=>parseFloat(x)),{type:a,values:c,colorSpace:g}}const gT=e=>{const n=wo(e);return n.values.slice(0,3).map((a,c)=>n.type.indexOf("hsl")!==-1&&c!==0?`${a}%`:a).join(" ")};Zr.colorChannel=gT;const w5=(e,n)=>{try{return gT(e)}catch{return e}};Zr.private_safeColorChannel=w5;function bu(e){const{type:n,colorSpace:a}=e;let{values:c}=e;return n.indexOf("rgb")!==-1?c=c.map((g,x)=>x<3?parseInt(g,10):g):n.indexOf("hsl")!==-1&&(c[1]=`${c[1]}%`,c[2]=`${c[2]}%`),n.indexOf("color")!==-1?c=`${a} ${c.join(" ")}`:c=`${c.join(", ")}`,`${n}(${c})`}function S5(e){if(e.indexOf("#")===0)return e;const{values:n}=wo(e);return`#${n.map((a,c)=>b5(c===3?Math.round(255*a):a)).join("")}`}function yT(e){e=wo(e);const{values:n}=e,a=n[0],c=n[1]/100,g=n[2]/100,x=c*Math.min(g,1-g),v=(O,G=(O+a/30)%12)=>g-x*Math.max(Math.min(G-3,9-G,1),-1);let d="rgb";const L=[Math.round(v(0)*255),Math.round(v(8)*255),Math.round(v(4)*255)];return e.type==="hsla"&&(d+="a",L.push(n[3])),bu({type:d,values:L})}function rm(e){e=wo(e);let n=e.type==="hsl"||e.type==="hsla"?wo(yT(e)).values:e.values;return n=n.map(a=>(e.type!=="color"&&(a/=255),a<=.03928?a/12.92:((a+.055)/1.055)**2.4)),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function T5(e,n){const a=rm(e),c=rm(n);return(Math.max(a,c)+.05)/(Math.min(a,c)+.05)}function _T(e,n){return e=wo(e),n=xv(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,bu(e)}function k5(e,n,a){try{return _T(e,n)}catch{return e}}function bv(e,n){if(e=wo(e),n=xv(n),e.type.indexOf("hsl")!==-1)e.values[2]*=1-n;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let a=0;a<3;a+=1)e.values[a]*=1-n;return bu(e)}function C5(e,n,a){try{return bv(e,n)}catch{return e}}function wv(e,n){if(e=wo(e),n=xv(n),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*n;else if(e.type.indexOf("rgb")!==-1)for(let a=0;a<3;a+=1)e.values[a]+=(255-e.values[a])*n;else if(e.type.indexOf("color")!==-1)for(let a=0;a<3;a+=1)e.values[a]+=(1-e.values[a])*n;return bu(e)}function I5(e,n,a){try{return wv(e,n)}catch{return e}}function vT(e,n=.15){return rm(e)>.5?bv(e,n):wv(e,n)}function E5(e,n,a){try{return vT(e,n)}catch{return e}}function P5(e,n,a,c=1){const g=(L,O)=>Math.round((L**(1/c)*(1-a)+O**(1/c)*a)**c),x=wo(e),v=wo(n),d=[g(x.values[0],v.values[0]),g(x.values[1],v.values[1]),g(x.values[2],v.values[2])];return bu({type:"rgb",values:d})}const Td={black:"#000",white:"#fff"},A5={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},zc={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Lc={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},$h={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Rc={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Dc={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Bc={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},M5=["mode","contrastThreshold","tonalOffset"],$b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Td.white,default:Td.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},qy={text:{primary:Td.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Td.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Ub(e,n,a,c){const g=c.light||c,x=c.dark||c*1.5;e[n]||(e.hasOwnProperty(a)?e[n]=e[a]:n==="light"?e.light=v5(e.main,g):n==="dark"&&(e.dark=y5(e.main,x)))}function z5(e="light"){return e==="dark"?{main:Rc[200],light:Rc[50],dark:Rc[400]}:{main:Rc[700],light:Rc[400],dark:Rc[800]}}function L5(e="light"){return e==="dark"?{main:zc[200],light:zc[50],dark:zc[400]}:{main:zc[500],light:zc[300],dark:zc[700]}}function R5(e="light"){return e==="dark"?{main:Lc[500],light:Lc[300],dark:Lc[700]}:{main:Lc[700],light:Lc[400],dark:Lc[800]}}function D5(e="light"){return e==="dark"?{main:Dc[400],light:Dc[300],dark:Dc[700]}:{main:Dc[700],light:Dc[500],dark:Dc[900]}}function B5(e="light"){return e==="dark"?{main:Bc[400],light:Bc[300],dark:Bc[700]}:{main:Bc[800],light:Bc[500],dark:Bc[900]}}function F5(e="light"){return e==="dark"?{main:$h[400],light:$h[300],dark:$h[700]}:{main:"#ed6c02",light:$h[500],dark:$h[900]}}function O5(e){const{mode:n="light",contrastThreshold:a=3,tonalOffset:c=.2}=e,g=zn(e,M5),x=e.primary||z5(n),v=e.secondary||L5(n),d=e.error||R5(n),L=e.info||D5(n),O=e.success||B5(n),G=e.warning||F5(n);function q(pe){return _5(pe,qy.text.primary)>=a?qy.text.primary:$b.text.primary}const $=({color:pe,name:Ue,mainShade:ne=500,lightShade:ee=300,darkShade:ae=700})=>{if(pe=ut({},pe),!pe.main&&pe[ne]&&(pe.main=pe[ne]),!pe.hasOwnProperty("main"))throw new Error(Sd(11,Ue?` (${Ue})`:"",ne));if(typeof pe.main!="string")throw new Error(Sd(12,Ue?` (${Ue})`:"",JSON.stringify(pe.main)));return Ub(pe,"light",ee,c),Ub(pe,"dark",ae,c),pe.contrastText||(pe.contrastText=q(pe.main)),pe},_e={dark:qy,light:$b};return as(ut({common:ut({},Td),mode:n,primary:$({color:x,name:"primary"}),secondary:$({color:v,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:$({color:d,name:"error"}),warning:$({color:G,name:"warning"}),info:$({color:L,name:"info"}),success:$({color:O,name:"success"}),grey:A5,contrastThreshold:a,getContrastText:q,augmentColor:$,tonalOffset:c},_e[n]),g)}const N5=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function $5(e){return Math.round(e*1e5)/1e5}const jb={textTransform:"uppercase"},Vb='"Roboto", "Helvetica", "Arial", sans-serif';function U5(e,n){const a=typeof n=="function"?n(e):n,{fontFamily:c=Vb,fontSize:g=14,fontWeightLight:x=300,fontWeightRegular:v=400,fontWeightMedium:d=500,fontWeightBold:L=700,htmlFontSize:O=16,allVariants:G,pxToRem:q}=a,$=zn(a,N5),_e=g/14,ge=q||(ne=>`${ne/O*_e}rem`),pe=(ne,ee,ae,we,ke)=>ut({fontFamily:c,fontWeight:ne,fontSize:ge(ee),lineHeight:ae},c===Vb?{letterSpacing:`${$5(we/ee)}em`}:{},ke,G),Ue={h1:pe(x,96,1.167,-1.5),h2:pe(x,60,1.2,-.5),h3:pe(v,48,1.167,0),h4:pe(v,34,1.235,.25),h5:pe(v,24,1.334,0),h6:pe(d,20,1.6,.15),subtitle1:pe(v,16,1.75,.15),subtitle2:pe(d,14,1.57,.1),body1:pe(v,16,1.5,.15),body2:pe(v,14,1.43,.15),button:pe(d,14,1.75,.4,jb),caption:pe(v,12,1.66,.4),overline:pe(v,12,2.66,1,jb),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return as(ut({htmlFontSize:O,pxToRem:ge,fontFamily:c,fontSize:g,fontWeightLight:x,fontWeightRegular:v,fontWeightMedium:d,fontWeightBold:L},Ue),$,{clone:!1})}const j5=.2,V5=.14,q5=.12;function kr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${j5})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${V5})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${q5})`].join(",")}const Z5=["none",kr(0,2,1,-1,0,1,1,0,0,1,3,0),kr(0,3,1,-2,0,2,2,0,0,1,5,0),kr(0,3,3,-2,0,3,4,0,0,1,8,0),kr(0,2,4,-1,0,4,5,0,0,1,10,0),kr(0,3,5,-1,0,5,8,0,0,1,14,0),kr(0,3,5,-1,0,6,10,0,0,1,18,0),kr(0,4,5,-2,0,7,10,1,0,2,16,1),kr(0,5,5,-3,0,8,10,1,0,3,14,2),kr(0,5,6,-3,0,9,12,1,0,3,16,2),kr(0,6,6,-3,0,10,14,1,0,4,18,3),kr(0,6,7,-4,0,11,15,1,0,4,20,3),kr(0,7,8,-4,0,12,17,2,0,5,22,4),kr(0,7,8,-4,0,13,19,2,0,5,24,4),kr(0,7,9,-4,0,14,21,2,0,5,26,4),kr(0,8,9,-5,0,15,22,2,0,6,28,5),kr(0,8,10,-5,0,16,24,2,0,6,30,5),kr(0,8,11,-5,0,17,26,2,0,6,32,5),kr(0,9,11,-5,0,18,28,2,0,7,34,6),kr(0,9,12,-6,0,19,29,2,0,7,36,6),kr(0,10,13,-6,0,20,31,3,0,8,38,7),kr(0,10,13,-6,0,21,33,3,0,8,40,7),kr(0,10,14,-6,0,22,35,3,0,8,42,7),kr(0,11,14,-7,0,23,36,3,0,9,44,8),kr(0,11,15,-7,0,24,38,3,0,9,46,8)],G5=["duration","easing","delay"],H5={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},W5={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function qb(e){return`${Math.round(e)}ms`}function K5(e){if(!e)return 0;const n=e/36;return Math.round((4+15*n**.25+n/5)*10)}function X5(e){const n=ut({},H5,e.easing),a=ut({},W5,e.duration);return ut({getAutoHeightDuration:K5,create:(g=["all"],x={})=>{const{duration:v=a.standard,easing:d=n.easeInOut,delay:L=0}=x;return zn(x,G5),(Array.isArray(g)?g:[g]).map(O=>`${O} ${typeof v=="string"?v:qb(v)} ${d} ${typeof L=="string"?L:qb(L)}`).join(",")}},e,{easing:n,duration:a})}const Y5={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},J5=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function xT(e={},...n){const{mixins:a={},palette:c={},transitions:g={},typography:x={}}=e,v=zn(e,J5);if(e.vars)throw new Error(Sd(18));const d=O5(c),L=yv(e);let O=as(L,{mixins:d5(L.breakpoints,a),palette:d,shadows:Z5.slice(),typography:U5(d,x),transitions:X5(g),zIndex:ut({},Y5)});return O=as(O,v),O=n.reduce((G,q)=>as(G,q),O),O.unstable_sxConfig=ut({},Rd,v==null?void 0:v.unstable_sxConfig),O.unstable_sx=function(q){return Dd({sx:q,theme:this})},O}const Q5=xT(),bT="$$material";function ez(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const tz=e=>ez(e)&&e!=="classes",ls=XM({themeId:bT,defaultTheme:Q5,rootShouldForwardProp:tz});function Us(e,n,a="Mui"){const c={};return n.forEach(g=>{c[g]=qa(e,g,a)}),c}function rz(e){return qa("MuiToolbar",e)}Us("MuiToolbar",["root","gutters","regular","dense"]);const nz=["className","component","disableGutters","variant"],iz=e=>{const{classes:n,disableGutters:a,variant:c}=e;return Bl({root:["root",!a&&"gutters",c]},rz,n)},oz=ls("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.root,!a.disableGutters&&n.gutters,n[a.variant]]}})(({theme:e,ownerState:n})=>ut({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},n.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:n})=>n.variant==="regular"&&e.mixins.toolbar),sz=Ze.forwardRef(function(n,a){const c=Va({props:n,name:"MuiToolbar"}),{className:g,component:x="div",disableGutters:v=!1,variant:d="regular"}=c,L=zn(c,nz),O=ut({},c,{component:x,disableGutters:v,variant:d}),G=iz(O);return Wt.jsx(oz,ut({as:x,className:En(G.root,g),ref:a,ownerState:O},L))});function az(e){return qa("MuiTypography",e)}Us("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const lz=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],cz=e=>{const{align:n,gutterBottom:a,noWrap:c,paragraph:g,variant:x,classes:v}=e,d={root:["root",x,e.align!=="inherit"&&`align${tn(n)}`,a&&"gutterBottom",c&&"noWrap",g&&"paragraph"]};return Bl(d,az,v)},uz=ls("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.root,a.variant&&n[a.variant],a.align!=="inherit"&&n[`align${tn(a.align)}`],a.noWrap&&n.noWrap,a.gutterBottom&&n.gutterBottom,a.paragraph&&n.paragraph]}})(({theme:e,ownerState:n})=>ut({margin:0},n.variant==="inherit"&&{font:"inherit"},n.variant!=="inherit"&&e.typography[n.variant],n.align!=="inherit"&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})),Zb={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},hz={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},dz=e=>hz[e]||e,pz=Ze.forwardRef(function(n,a){const c=Va({props:n,name:"MuiTypography"}),g=dz(c.color),x=_v(ut({},c,{color:g})),{align:v="inherit",className:d,component:L,gutterBottom:O=!1,noWrap:G=!1,paragraph:q=!1,variant:$="body1",variantMapping:_e=Zb}=x,ge=zn(x,lz),pe=ut({},x,{align:v,color:g,className:d,component:L,gutterBottom:O,noWrap:G,paragraph:q,variant:$,variantMapping:_e}),Ue=L||(q?"p":_e[$]||Zb[$])||"span",ne=cz(pe);return Wt.jsx(uz,ut({as:Ue,ref:a,ownerState:pe,className:En(ne.root,d)},ge))});function wT(e,n){typeof e=="function"?e(n):e&&(e.current=n)}function K_(...e){return Ze.useMemo(()=>e.every(n=>n==null)?null:n=>{e.forEach(a=>{wT(a,n)})},e)}const ST=typeof window<"u"?Ze.useLayoutEffect:Ze.useEffect;function Zh(e){const n=Ze.useRef(e);return ST(()=>{n.current=e}),Ze.useRef((...a)=>(0,n.current)(...a)).current}const Gb={};function fz(e,n){const a=Ze.useRef(Gb);return a.current===Gb&&(a.current=e(n)),a}const mz=[];function gz(e){Ze.useEffect(e,mz)}class Xm{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Xm}start(n,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,a()},n)}}function yz(){const e=fz(Xm.create).current;return gz(e.disposeEffect),e}let Ym=!0,X_=!1;const _z=new Xm,vz={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function xz(e){const{type:n,tagName:a}=e;return!!(a==="INPUT"&&vz[n]&&!e.readOnly||a==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function bz(e){e.metaKey||e.altKey||e.ctrlKey||(Ym=!0)}function Zy(){Ym=!1}function wz(){this.visibilityState==="hidden"&&X_&&(Ym=!0)}function Sz(e){e.addEventListener("keydown",bz,!0),e.addEventListener("mousedown",Zy,!0),e.addEventListener("pointerdown",Zy,!0),e.addEventListener("touchstart",Zy,!0),e.addEventListener("visibilitychange",wz,!0)}function Tz(e){const{target:n}=e;try{return n.matches(":focus-visible")}catch{}return Ym||xz(n)}function TT(){const e=Ze.useCallback(g=>{g!=null&&Sz(g.ownerDocument)},[]),n=Ze.useRef(!1);function a(){return n.current?(X_=!0,_z.start(100,()=>{X_=!1}),n.current=!1,!0):!1}function c(g){return Tz(g)?(n.current=!0,!0):!1}return{isFocusVisibleRef:n,onFocus:c,onBlur:a,ref:e}}function Y_(e,n){return Y_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,c){return a.__proto__=c,a},Y_(e,n)}function kz(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Y_(e,n)}const Hb=wl.createContext(null);function Cz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sv(e,n){var a=function(x){return n&&Ze.isValidElement(x)?n(x):x},c=Object.create(null);return e&&Ze.Children.map(e,function(g){return g}).forEach(function(g){c[g.key]=a(g)}),c}function Iz(e,n){e=e||{},n=n||{};function a(G){return G in n?n[G]:e[G]}var c=Object.create(null),g=[];for(var x in e)x in n?g.length&&(c[x]=g,g=[]):g.push(x);var v,d={};for(var L in n){if(c[L])for(v=0;vd!=="theme"&&d!=="sx"&&d!=="as"})(Dd);return Ze.forwardRef(function(L,O){const G=Dz(a),q=_v(L),{className:$,component:_e="div"}=q,ge=zn(q,Bz);return Wt.jsx(x,ut({as:_e,ref:O,className:En($,g?g(c):c),theme:n&&G[n]||G},ge))})}function Oz(...e){return e.reduce((n,a)=>a==null?n:function(...g){n.apply(this,g),a.apply(this,g)},()=>{})}function Nz(e,n=166){let a;function c(...g){const x=()=>{e.apply(this,g)};clearTimeout(a),a=setTimeout(x,n)}return c.clear=()=>{clearTimeout(a)},c}function $z(e,n){return()=>null}function Uz(e,n){var a,c;return Ze.isValidElement(e)&&n.indexOf((a=e.type.muiName)!=null?a:(c=e.type)==null||(c=c._payload)==null||(c=c.value)==null?void 0:c.muiName)!==-1}function kT(e){return e&&e.ownerDocument||document}function jz(e){return kT(e).defaultView||window}function Vz(e,n){return()=>null}let Wb=0;function qz(e){const[n,a]=Ze.useState(e),c=e||n;return Ze.useEffect(()=>{n==null&&(Wb+=1,a(`mui-${Wb}`))},[n]),c}const Kb=Ky.useId;function Zz(e){if(Kb!==void 0){const n=Kb();return e??n}return qz(e)}function Gz(e,n,a,c,g){return null}function Hz({controlled:e,default:n,name:a,state:c="value"}){const{current:g}=Ze.useRef(e!==void 0),[x,v]=Ze.useState(n),d=g?e:x,L=Ze.useCallback(O=>{g||v(O)},[]);return[d,L]}function Wz(e){const{className:n,classes:a,pulsate:c=!1,rippleX:g,rippleY:x,rippleSize:v,in:d,onExited:L,timeout:O}=e,[G,q]=Ze.useState(!1),$=En(n,a.ripple,a.rippleVisible,c&&a.ripplePulsate),_e={width:v,height:v,top:-(v/2)+x,left:-(v/2)+g},ge=En(a.child,G&&a.childLeaving,c&&a.childPulsate);return!d&&!G&&q(!0),Ze.useEffect(()=>{if(!d&&L!=null){const pe=setTimeout(L,O);return()=>{clearTimeout(pe)}}},[L,d,O]),Wt.jsx("span",{className:$,style:_e,children:Wt.jsx("span",{className:ge})})}const fo=Us("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Kz=["center","classes","className"];let Jm=e=>e,Xb,Yb,Jb,Qb;const J_=550,Xz=80,Yz=Lm(Xb||(Xb=Jm` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),Jz=Lm(Yb||(Yb=Jm` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),Qz=Lm(Jb||(Jb=Jm` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),eL=ls("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),tL=ls(Wz,{name:"MuiTouchRipple",slot:"Ripple"})(Qb||(Qb=Jm` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),fo.rippleVisible,Yz,J_,({theme:e})=>e.transitions.easing.easeInOut,fo.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,fo.child,fo.childLeaving,Jz,J_,({theme:e})=>e.transitions.easing.easeInOut,fo.childPulsate,Qz,({theme:e})=>e.transitions.easing.easeInOut),rL=Ze.forwardRef(function(n,a){const c=Va({props:n,name:"MuiTouchRipple"}),{center:g=!1,classes:x={},className:v}=c,d=zn(c,Kz),[L,O]=Ze.useState([]),G=Ze.useRef(0),q=Ze.useRef(null);Ze.useEffect(()=>{q.current&&(q.current(),q.current=null)},[L]);const $=Ze.useRef(!1),_e=yz(),ge=Ze.useRef(null),pe=Ze.useRef(null),Ue=Ze.useCallback(we=>{const{pulsate:ke,rippleX:Pe,rippleY:Ie,rippleSize:We,cb:vt}=we;O(it=>[...it,Wt.jsx(tL,{classes:{ripple:En(x.ripple,fo.ripple),rippleVisible:En(x.rippleVisible,fo.rippleVisible),ripplePulsate:En(x.ripplePulsate,fo.ripplePulsate),child:En(x.child,fo.child),childLeaving:En(x.childLeaving,fo.childLeaving),childPulsate:En(x.childPulsate,fo.childPulsate)},timeout:J_,pulsate:ke,rippleX:Pe,rippleY:Ie,rippleSize:We},G.current)]),G.current+=1,q.current=vt},[x]),ne=Ze.useCallback((we={},ke={},Pe=()=>{})=>{const{pulsate:Ie=!1,center:We=g||ke.pulsate,fakeElement:vt=!1}=ke;if((we==null?void 0:we.type)==="mousedown"&&$.current){$.current=!1;return}(we==null?void 0:we.type)==="touchstart"&&($.current=!0);const it=vt?null:pe.current,ot=it?it.getBoundingClientRect():{width:0,height:0,left:0,top:0};let Nt,Ct,Bt;if(We||we===void 0||we.clientX===0&&we.clientY===0||!we.clientX&&!we.touches)Nt=Math.round(ot.width/2),Ct=Math.round(ot.height/2);else{const{clientX:Ir,clientY:br}=we.touches&&we.touches.length>0?we.touches[0]:we;Nt=Math.round(Ir-ot.left),Ct=Math.round(br-ot.top)}if(We)Bt=Math.sqrt((2*ot.width**2+ot.height**2)/3),Bt%2===0&&(Bt+=1);else{const Ir=Math.max(Math.abs((it?it.clientWidth:0)-Nt),Nt)*2+2,br=Math.max(Math.abs((it?it.clientHeight:0)-Ct),Ct)*2+2;Bt=Math.sqrt(Ir**2+br**2)}we!=null&&we.touches?ge.current===null&&(ge.current=()=>{Ue({pulsate:Ie,rippleX:Nt,rippleY:Ct,rippleSize:Bt,cb:Pe})},_e.start(Xz,()=>{ge.current&&(ge.current(),ge.current=null)})):Ue({pulsate:Ie,rippleX:Nt,rippleY:Ct,rippleSize:Bt,cb:Pe})},[g,Ue,_e]),ee=Ze.useCallback(()=>{ne({},{pulsate:!0})},[ne]),ae=Ze.useCallback((we,ke)=>{if(_e.clear(),(we==null?void 0:we.type)==="touchend"&&ge.current){ge.current(),ge.current=null,_e.start(0,()=>{ae(we,ke)});return}ge.current=null,O(Pe=>Pe.length>0?Pe.slice(1):Pe),q.current=ke},[_e]);return Ze.useImperativeHandle(a,()=>({pulsate:ee,start:ne,stop:ae}),[ee,ne,ae]),Wt.jsx(eL,ut({className:En(fo.root,x.root,v),ref:pe},d,{children:Wt.jsx(Tv,{component:null,exit:!0,children:L})}))});function nL(e){return qa("MuiButtonBase",e)}const iL=Us("MuiButtonBase",["root","disabled","focusVisible"]),oL=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],sL=e=>{const{disabled:n,focusVisible:a,focusVisibleClassName:c,classes:g}=e,v=Bl({root:["root",n&&"disabled",a&&"focusVisible"]},nL,g);return a&&c&&(v.root+=` ${c}`),v},aL=ls("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,n)=>n.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${iL.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),lL=Ze.forwardRef(function(n,a){const c=Va({props:n,name:"MuiButtonBase"}),{action:g,centerRipple:x=!1,children:v,className:d,component:L="button",disabled:O=!1,disableRipple:G=!1,disableTouchRipple:q=!1,focusRipple:$=!1,LinkComponent:_e="a",onBlur:ge,onClick:pe,onContextMenu:Ue,onDragLeave:ne,onFocus:ee,onFocusVisible:ae,onKeyDown:we,onKeyUp:ke,onMouseDown:Pe,onMouseLeave:Ie,onMouseUp:We,onTouchEnd:vt,onTouchMove:it,onTouchStart:ot,tabIndex:Nt=0,TouchRippleProps:Ct,touchRippleRef:Bt,type:Ir}=c,br=zn(c,oL),Lr=Ze.useRef(null),Ve=Ze.useRef(null),mt=K_(Ve,Bt),{isFocusVisibleRef:gt,onFocus:Pt,onBlur:jt,ref:Hn}=TT(),[mr,Ur]=Ze.useState(!1);O&&mr&&Ur(!1),Ze.useImperativeHandle(g,()=>({focusVisible:()=>{Ur(!0),Lr.current.focus()}}),[]);const[Gr,Rr]=Ze.useState(!1);Ze.useEffect(()=>{Rr(!0)},[]);const Wn=Gr&&!G&&!O;Ze.useEffect(()=>{mr&&$&&!G&&Gr&&Ve.current.pulsate()},[G,$,mr,Gr]);function rn(yt,Wr,li=q){return Zh(Ei=>(Wr&&Wr(Ei),!li&&Ve.current&&Ve.current[yt](Ei),!0))}const ko=rn("start",Pe),cs=rn("stop",Ue),ki=rn("stop",ne),Qi=rn("stop",We),eo=rn("stop",yt=>{mr&&yt.preventDefault(),Ie&&Ie(yt)}),Uo=rn("start",ot),ve=rn("stop",vt),Co=rn("stop",it),us=rn("stop",yt=>{jt(yt),gt.current===!1&&Ur(!1),ge&&ge(yt)},!1),zt=Zh(yt=>{Lr.current||(Lr.current=yt.currentTarget),Pt(yt),gt.current===!0&&(Ur(!0),ae&&ae(yt)),ee&&ee(yt)}),tr=()=>{const yt=Lr.current;return L&&L!=="button"&&!(yt.tagName==="A"&&yt.href)},Io=Ze.useRef(!1),to=Zh(yt=>{$&&!Io.current&&mr&&Ve.current&&yt.key===" "&&(Io.current=!0,Ve.current.stop(yt,()=>{Ve.current.start(yt)})),yt.target===yt.currentTarget&&tr()&&yt.key===" "&&yt.preventDefault(),we&&we(yt),yt.target===yt.currentTarget&&tr()&&yt.key==="Enter"&&!O&&(yt.preventDefault(),pe&&pe(yt))}),Ci=Zh(yt=>{$&&yt.key===" "&&Ve.current&&mr&&!yt.defaultPrevented&&(Io.current=!1,Ve.current.stop(yt,()=>{Ve.current.pulsate(yt)})),ke&&ke(yt),pe&&yt.target===yt.currentTarget&&tr()&&yt.key===" "&&!yt.defaultPrevented&&pe(yt)});let Ii=L;Ii==="button"&&(br.href||br.to)&&(Ii=_e);const Hr={};Ii==="button"?(Hr.type=Ir===void 0?"button":Ir,Hr.disabled=O):(!br.href&&!br.to&&(Hr.role="button"),O&&(Hr["aria-disabled"]=O));const hs=K_(a,Hn,Lr),jo=ut({},c,{centerRipple:x,component:L,disabled:O,disableRipple:G,disableTouchRipple:q,focusRipple:$,tabIndex:Nt,focusVisible:mr}),Me=sL(jo);return Wt.jsxs(aL,ut({as:Ii,className:En(Me.root,d),ownerState:jo,onBlur:us,onClick:pe,onContextMenu:cs,onFocus:zt,onKeyDown:to,onKeyUp:Ci,onMouseDown:ko,onMouseLeave:eo,onMouseUp:Qi,onDragLeave:ki,onTouchEnd:ve,onTouchMove:Co,onTouchStart:Uo,ref:hs,tabIndex:O?-1:Nt,type:Ir},Hr,br,{children:[v,Wn?Wt.jsx(rL,ut({ref:mt,center:x},Ct)):null]}))});function cL(e){return qa("MuiIconButton",e)}const uL=Us("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),hL=["edge","children","className","color","disabled","disableFocusRipple","size"],dL=e=>{const{classes:n,disabled:a,color:c,edge:g,size:x}=e,v={root:["root",a&&"disabled",c!=="default"&&`color${tn(c)}`,g&&`edge${tn(g)}`,`size${tn(x)}`]};return Bl(v,cL,n)},pL=ls(lL,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.root,a.color!=="default"&&n[`color${tn(a.color)}`],a.edge&&n[`edge${tn(a.edge)}`],n[`size${tn(a.size)}`]]}})(({theme:e,ownerState:n})=>ut({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:tm(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},n.edge==="start"&&{marginLeft:n.size==="small"?-3:-12},n.edge==="end"&&{marginRight:n.size==="small"?-3:-12}),({theme:e,ownerState:n})=>{var a;const c=(a=(e.vars||e).palette)==null?void 0:a[n.color];return ut({},n.color==="inherit"&&{color:"inherit"},n.color!=="inherit"&&n.color!=="default"&&ut({color:c==null?void 0:c.main},!n.disableRipple&&{"&:hover":ut({},c&&{backgroundColor:e.vars?`rgba(${c.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:tm(c.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),n.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},n.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${uL.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),fL=Ze.forwardRef(function(n,a){const c=Va({props:n,name:"MuiIconButton"}),{edge:g=!1,children:x,className:v,color:d="default",disabled:L=!1,disableFocusRipple:O=!1,size:G="medium"}=c,q=zn(c,hL),$=ut({},c,{edge:g,color:d,disabled:L,disableFocusRipple:O,size:G}),_e=dL($);return Wt.jsx(pL,ut({className:En(_e.root,v),centerRipple:!0,focusRipple:!O,disabled:L,ref:a},q,{ownerState:$,children:x}))}),ew=e=>{let n;return e<1?n=5.11916*e**2:n=4.5*Math.log(e+1)+2,(n/100).toFixed(2)};function mL(e){return qa("MuiPaper",e)}Us("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const gL=["className","component","elevation","square","variant"],yL=e=>{const{square:n,elevation:a,variant:c,classes:g}=e,x={root:["root",c,!n&&"rounded",c==="elevation"&&`elevation${a}`]};return Bl(x,mL,g)},_L=ls("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.root,n[a.variant],!a.square&&n.rounded,a.variant==="elevation"&&n[`elevation${a.elevation}`]]}})(({theme:e,ownerState:n})=>{var a;return ut({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!n.square&&{borderRadius:e.shape.borderRadius},n.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},n.variant==="elevation"&&ut({boxShadow:(e.vars||e).shadows[n.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${tm("#fff",ew(n.elevation))}, ${tm("#fff",ew(n.elevation))})`},e.vars&&{backgroundImage:(a=e.vars.overlays)==null?void 0:a[n.elevation]}))}),vL=Ze.forwardRef(function(n,a){const c=Va({props:n,name:"MuiPaper"}),{className:g,component:x="div",elevation:v=1,square:d=!1,variant:L="elevation"}=c,O=zn(c,gL),G=ut({},c,{component:x,elevation:v,square:d,variant:L}),q=yL(G);return Wt.jsx(_L,ut({as:x,ownerState:G,className:En(q.root,g),ref:a},O))});function xL(e){return qa("MuiAppBar",e)}Us("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const bL=["className","color","enableColorOnDark","position"],wL=e=>{const{color:n,position:a,classes:c}=e,g={root:["root",`color${tn(n)}`,`position${tn(a)}`]};return Bl(g,xL,c)},of=(e,n)=>e?`${e==null?void 0:e.replace(")","")}, ${n})`:n,SL=ls(vL,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.root,n[`position${tn(a.position)}`],n[`color${tn(a.color)}`]]}})(({theme:e,ownerState:n})=>{const a=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return ut({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},n.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},n.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},n.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},n.position==="static"&&{position:"static"},n.position==="relative"&&{position:"relative"},!e.vars&&ut({},n.color==="default"&&{backgroundColor:a,color:e.palette.getContrastText(a)},n.color&&n.color!=="default"&&n.color!=="inherit"&&n.color!=="transparent"&&{backgroundColor:e.palette[n.color].main,color:e.palette[n.color].contrastText},n.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!n.enableColorOnDark&&{backgroundColor:null,color:null},n.color==="transparent"&&ut({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&ut({},n.color==="default"&&{"--AppBar-background":n.enableColorOnDark?e.vars.palette.AppBar.defaultBg:of(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":n.enableColorOnDark?e.vars.palette.text.primary:of(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},n.color&&!n.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":n.enableColorOnDark?e.vars.palette[n.color].main:of(e.vars.palette.AppBar.darkBg,e.vars.palette[n.color].main),"--AppBar-color":n.enableColorOnDark?e.vars.palette[n.color].contrastText:of(e.vars.palette.AppBar.darkColor,e.vars.palette[n.color].contrastText)},!["inherit","transparent"].includes(n.color)&&{backgroundColor:"var(--AppBar-background)"},{color:n.color==="inherit"?"inherit":"var(--AppBar-color)"},n.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),TL=Ze.forwardRef(function(n,a){const c=Va({props:n,name:"MuiAppBar"}),{className:g,color:x="primary",enableColorOnDark:v=!1,position:d="fixed"}=c,L=zn(c,bL),O=ut({},c,{color:x,position:d,enableColorOnDark:v}),G=wL(O);return Wt.jsx(SL,ut({square:!0,component:"header",ownerState:O,elevation:4,className:En(G.root,g,d==="fixed"&&"mui-fixed"),ref:a},L))});var kv={},Gy={};function kL(e){return qa("MuiSvgIcon",e)}Us("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const CL=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],IL=e=>{const{color:n,fontSize:a,classes:c}=e,g={root:["root",n!=="inherit"&&`color${tn(n)}`,`fontSize${tn(a)}`]};return Bl(g,kL,c)},EL=ls("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.root,a.color!=="inherit"&&n[`color${tn(a.color)}`],n[`fontSize${tn(a.fontSize)}`]]}})(({theme:e,ownerState:n})=>{var a,c,g,x,v,d,L,O,G,q,$,_e,ge;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(a=e.transitions)==null||(c=a.create)==null?void 0:c.call(a,"fill",{duration:(g=e.transitions)==null||(g=g.duration)==null?void 0:g.shorter}),fontSize:{inherit:"inherit",small:((x=e.typography)==null||(v=x.pxToRem)==null?void 0:v.call(x,20))||"1.25rem",medium:((d=e.typography)==null||(L=d.pxToRem)==null?void 0:L.call(d,24))||"1.5rem",large:((O=e.typography)==null||(G=O.pxToRem)==null?void 0:G.call(O,35))||"2.1875rem"}[n.fontSize],color:(q=($=(e.vars||e).palette)==null||($=$[n.color])==null?void 0:$.main)!=null?q:{action:(_e=(e.vars||e).palette)==null||(_e=_e.action)==null?void 0:_e.active,disabled:(ge=(e.vars||e).palette)==null||(ge=ge.action)==null?void 0:ge.disabled,inherit:void 0}[n.color]}}),Q_=Ze.forwardRef(function(n,a){const c=Va({props:n,name:"MuiSvgIcon"}),{children:g,className:x,color:v="inherit",component:d="svg",fontSize:L="medium",htmlColor:O,inheritViewBox:G=!1,titleAccess:q,viewBox:$="0 0 24 24"}=c,_e=zn(c,CL),ge=Ze.isValidElement(g)&&g.type==="svg",pe=ut({},c,{color:v,component:d,fontSize:L,instanceFontSize:n.fontSize,inheritViewBox:G,viewBox:$,hasSvgAsChild:ge}),Ue={};G||(Ue.viewBox=$);const ne=IL(pe);return Wt.jsxs(EL,ut({as:d,className:En(ne.root,x),focusable:"false",color:O,"aria-hidden":q?void 0:!0,role:q?"img":void 0,ref:a},Ue,_e,ge&&g.props,{ownerState:pe,children:[ge?g.props.children:g,q?Wt.jsx("title",{children:q}):null]}))});Q_.muiName="SvgIcon";function PL(e,n){function a(c,g){return Wt.jsx(Q_,ut({"data-testid":`${n}Icon`,ref:g},c,{children:e}))}return a.muiName=Q_.muiName,Ze.memo(Ze.forwardRef(a))}const AL={configure:e=>{vv.configure(e)}},ML=Object.freeze(Object.defineProperty({__proto__:null,capitalize:tn,createChainedFunction:Oz,createSvgIcon:PL,debounce:Nz,deprecatedPropType:$z,isMuiElement:Uz,ownerDocument:kT,ownerWindow:jz,requirePropFactory:Vz,setRef:wT,unstable_ClassNameGenerator:AL,unstable_useEnhancedEffect:ST,unstable_useId:Zz,unsupportedProp:Gz,useControlled:Hz,useEventCallback:Zh,useForkRef:K_,useIsFocusVisible:TT},Symbol.toStringTag,{value:"Module"})),zL=Ns(ML);var tw;function LL(){return tw||(tw=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=zL}(Gy)),Gy}var RL=nv;Object.defineProperty(kv,"__esModule",{value:!0});var CT=kv.default=void 0,DL=RL(LL()),BL=Wt;CT=kv.default=(0,DL.default)((0,BL.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function FL({handleDrawerOpen:e,open:n}){const c=ls(TL,{shouldForwardProp:g=>g!=="open"})(({theme:g,open:x})=>({transition:g.transitions.create("margin",{easing:g.transitions.easing.sharp,duration:g.transitions.duration.leavingScreen}),...x&&{width:"calc(100% - 250px)",marginLeft:"-250px",transition:g.transitions.create("margin",{easing:g.transitions.easing.easeOut,duration:g.transitions.duration.enteringScreen})}}));return Wt.jsx(c,{position:"fixed",open:n,sx:{p:0},children:Wt.jsxs(sz,{children:[Wt.jsxs(fL,{edge:"start",color:"inherit","aria-label":"open drawer",onClick:e,sx:{mr:2,...n&&{display:"none"}},children:[Wt.jsx(CT,{})," "]}),Wt.jsx(pz,{variant:"h6",color:"inherit",component:"div",children:"This is my map App"})]})})}var IT={exports:{}};/** + * MapLibre GL JS + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.0/LICENSE.txt + */(function(e,n){(function(a,c){e.exports=c()})(tI,function(){var a={},c={};function g(v,d,L){if(c[v]=L,v==="index"){var O="var sharedModule = {}; ("+c.shared+")(sharedModule); ("+c.worker+")(sharedModule);",G={};return c.shared(G),c.index(a,G),typeof window<"u"&&a.setWorkerUrl(window.URL.createObjectURL(new Blob([O],{type:"text/javascript"}))),a}}g("shared",["exports"],function(v){function d(i,r,o,l){return new(o||(o=Promise))(function(p,y){function _(C){try{S(l.next(C))}catch(I){y(I)}}function b(C){try{S(l.throw(C))}catch(I){y(I)}}function S(C){var I;C.done?p(C.value):(I=C.value,I instanceof o?I:new o(function(P){P(I)})).then(_,b)}S((l=l.apply(i,r||[])).next())})}function L(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}typeof SuppressedError=="function"&&SuppressedError;var O=G;function G(i,r){this.x=i,this.y=r}G.prototype={clone:function(){return new G(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,r){return this.clone()._rotateAround(i,r)},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 r=i.x-this.x,o=i.y-this.y;return r*r+o*o},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,r){return Math.atan2(this.x*r-this.y*i,this.x*i+this.y*r)},_matMult:function(i){var r=i[2]*this.x+i[3]*this.y;return this.x=i[0]*this.x+i[1]*this.y,this.y=r,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 r=Math.cos(i),o=Math.sin(i),l=o*this.x+r*this.y;return this.x=r*this.x-o*this.y,this.y=l,this},_rotateAround:function(i,r){var o=Math.cos(i),l=Math.sin(i),p=r.y+l*(this.x-r.x)+o*(this.y-r.y);return this.x=r.x+o*(this.x-r.x)-l*(this.y-r.y),this.y=p,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},G.convert=function(i){return i instanceof G?i:Array.isArray(i)?new G(i[0],i[1]):i};var q=L(O),$=_e;function _e(i,r,o,l){this.cx=3*i,this.bx=3*(o-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(l-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=r,this.p2x=o,this.p2y=l}_e.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,r){if(r===void 0&&(r=1e-6),i<0)return 0;if(i>1)return 1;for(var o=i,l=0;l<8;l++){var p=this.sampleCurveX(o)-i;if(Math.abs(p)p?_=o:b=o,o=.5*(b-_)+_;return o},solve:function(i,r){return this.sampleCurveY(this.solveCurveX(i,r))}};var ge=L($);let pe,Ue;function ne(){return pe==null&&(pe=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),pe}function ee(){if(Ue==null&&(Ue=!1,ne())){const r=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(r){for(let l=0;l<5*5;l++){const p=4*l;r.fillStyle=`rgb(${p},${p+1},${p+2})`,r.fillRect(l%5,Math.floor(l/5),1,1)}const o=r.getImageData(0,0,5,5).data;for(let l=0;l<5*5*4;l++)if(l%4!=3&&o[l]!==l){Ue=!0;break}}}return Ue||!1}function ae(i,r,o,l){const p=new ge(i,r,o,l);return y=>p.solve(y)}const we=ae(.25,.1,.25,1);function ke(i,r,o){return Math.min(o,Math.max(r,i))}function Pe(i,r,o){const l=o-r,p=((i-r)%l+l)%l+r;return p===r?o:p}function Ie(i,...r){for(const o of r)for(const l in o)i[l]=o[l];return i}let We=1;function vt(i,r,o){const l={};for(const p in i)l[p]=r.call(this,i[p],p,i);return l}function it(i,r,o){const l={};for(const p in i)r.call(this,i[p],p,i)&&(l[p]=i[p]);return l}function ot(i){return Array.isArray(i)?i.map(ot):typeof i=="object"&&i?vt(i,ot):i}const Nt={};function Ct(i){Nt[i]||(typeof console<"u"&&console.warn(i),Nt[i]=!0)}function Bt(i,r,o){return(o.y-i.y)*(r.x-i.x)>(r.y-i.y)*(o.x-i.x)}function Ir(i){return typeof WorkerGlobalScope<"u"&&i!==void 0&&i instanceof WorkerGlobalScope}let br=null;function Lr(i){return typeof ImageBitmap<"u"&&i instanceof ImageBitmap}const Ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function mt(i,r,o,l,p){return d(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const y=new VideoFrame(i,{timestamp:0});try{const _=y==null?void 0:y.format;if(!_||!_.startsWith("BGR")&&!_.startsWith("RGB"))throw new Error(`Unrecognized format ${_}`);const b=_.startsWith("BGR"),S=new Uint8ClampedArray(l*p*4);if(yield y.copyTo(S,function(C,I,P,z,B){const N=4*Math.max(-I,0),U=(Math.max(0,P)-P)*z*4+N,W=4*z,J=Math.max(0,I),fe=Math.max(0,P);return{rect:{x:J,y:fe,width:Math.min(C.width,I+z)-J,height:Math.min(C.height,P+B)-fe},layout:[{offset:U,stride:W}]}}(i,r,o,l,p)),b)for(let C=0;CIr(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,rn=function(i,r){if(/:\/\//.test(i.url)&&!/^https?:|^file:/.test(i.url)){const l=Ur(i.url);if(l)return l(i,r);if(Ir(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:i,targetMapId:Gr},r)}if(!(/^file:/.test(o=i.url)||/^file:/.test(Wn())&&!/^\w+:/.test(o))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(l,p){return d(this,void 0,void 0,function*(){const y=new Request(l.url,{method:l.method||"GET",body:l.body,credentials:l.credentials,headers:l.headers,cache:l.cache,referrer:Wn(),signal:p.signal});l.type!=="json"||y.headers.has("Accept")||y.headers.set("Accept","application/json");const _=yield fetch(y);if(!_.ok){const C=yield _.blob();throw new Rr(_.status,_.statusText,l.url,C)}let b;b=l.type==="arrayBuffer"||l.type==="image"?_.arrayBuffer():l.type==="json"?_.json():_.text();const S=yield b;if(p.signal.aborted)throw Hn();return{data:S,cacheControl:_.headers.get("Cache-Control"),expires:_.headers.get("Expires")}})}(i,r);if(Ir(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:i,mustQueue:!0,targetMapId:Gr},r)}var o;return function(l,p){return new Promise((y,_)=>{var b;const S=new XMLHttpRequest;S.open(l.method||"GET",l.url,!0),l.type!=="arrayBuffer"&&l.type!=="image"||(S.responseType="arraybuffer");for(const C in l.headers)S.setRequestHeader(C,l.headers[C]);l.type==="json"&&(S.responseType="text",!((b=l.headers)===null||b===void 0)&&b.Accept||S.setRequestHeader("Accept","application/json")),S.withCredentials=l.credentials==="include",S.onerror=()=>{_(new Error(S.statusText))},S.onload=()=>{if(!p.signal.aborted)if((S.status>=200&&S.status<300||S.status===0)&&S.response!==null){let C=S.response;if(l.type==="json")try{C=JSON.parse(S.response)}catch(I){return void _(I)}y({data:C,cacheControl:S.getResponseHeader("Cache-Control"),expires:S.getResponseHeader("Expires")})}else{const C=new Blob([S.response],{type:S.getResponseHeader("Content-Type")});_(new Rr(S.status,S.statusText,l.url,C))}},p.signal.addEventListener("abort",()=>{S.abort(),_(Hn())}),S.send(l.body)})}(i,r)};function ko(i){if(!i||i.indexOf("://")<=0||i.indexOf("data:image/")===0||i.indexOf("blob:")===0)return!0;const r=new URL(i),o=window.location;return r.protocol===o.protocol&&r.host===o.host}function cs(i,r,o){o[i]&&o[i].indexOf(r)!==-1||(o[i]=o[i]||[],o[i].push(r))}function ki(i,r,o){if(o&&o[i]){const l=o[i].indexOf(r);l!==-1&&o[i].splice(l,1)}}class Qi{constructor(r,o={}){Ie(this,o),this.type=r}}class eo extends Qi{constructor(r,o={}){super("error",Ie({error:r},o))}}class Uo{on(r,o){return this._listeners=this._listeners||{},cs(r,o,this._listeners),this}off(r,o){return ki(r,o,this._listeners),ki(r,o,this._oneTimeListeners),this}once(r,o){return o?(this._oneTimeListeners=this._oneTimeListeners||{},cs(r,o,this._oneTimeListeners),this):new Promise(l=>this.once(r,l))}fire(r,o){typeof r=="string"&&(r=new Qi(r,o||{}));const l=r.type;if(this.listens(l)){r.target=this;const p=this._listeners&&this._listeners[l]?this._listeners[l].slice():[];for(const b of p)b.call(this,r);const y=this._oneTimeListeners&&this._oneTimeListeners[l]?this._oneTimeListeners[l].slice():[];for(const b of y)ki(l,b,this._oneTimeListeners),b.call(this,r);const _=this._eventedParent;_&&(Ie(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),_.fire(r))}else r instanceof eo&&console.error(r.error);return this}listens(r){return this._listeners&&this._listeners[r]&&this._listeners[r].length>0||this._oneTimeListeners&&this._oneTimeListeners[r]&&this._oneTimeListeners[r].length>0||this._eventedParent&&this._eventedParent.listens(r)}setEventedParent(r,o){return this._eventedParent=r,this._eventedParentData=o,this}}var ve={$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"},sky:{type:"sky"},projection:{type:"projection"},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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},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":{}}},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},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 Co=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function us(i,r){const o={};for(const l in i)l!=="ref"&&(o[l]=i[l]);return Co.forEach(l=>{l in r&&(o[l]=r[l])}),o}function zt(i,r){if(Array.isArray(i)){if(!Array.isArray(r)||i.length!==r.length)return!1;for(let o=0;o`:i.itemType.kind==="value"?"array":`array<${r}>`}return i.kind}const V=[Ei,Be,St,ht,Ln,Eo,Pi,D(xt),Vo,no,Y];function K(i,r){if(r.kind==="error")return null;if(i.kind==="array"){if(r.kind==="array"&&(r.N===0&&r.itemType.kind==="value"||!K(i.itemType,r.itemType))&&(typeof i.N!="number"||i.N===r.N))return null}else{if(i.kind===r.kind)return null;if(i.kind==="value"){for(const o of V)if(!K(o,r))return null}}return`Expected ${R(i)} but found ${R(r)} instead.`}function se(i,r){return r.some(o=>o.kind===i.kind)}function ce(i,r){return r.some(o=>o==="null"?i===null:o==="array"?Array.isArray(i):o==="object"?i&&!Array.isArray(i)&&typeof i=="object":o===typeof i)}function de(i,r){return i.kind==="array"&&r.kind==="array"?i.itemType.kind===r.itemType.kind&&typeof i.N=="number":i.kind===r.kind}const re=.96422,be=.82521,Ce=4/29,ye=6/29,Le=3*ye*ye,rt=ye*ye*ye,st=Math.PI/180,Lt=180/Math.PI;function bt(i){return(i%=360)<0&&(i+=360),i}function Rt([i,r,o,l]){let p,y;const _=Dr((.2225045*(i=It(i))+.7168786*(r=It(r))+.0606169*(o=It(o)))/1);i===r&&r===o?p=y=_:(p=Dr((.4360747*i+.3850649*r+.1430804*o)/re),y=Dr((.0139322*i+.0971045*r+.7141733*o)/be));const b=116*_-16;return[b<0?0:b,500*(p-_),200*(_-y),l]}function It(i){return i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Dr(i){return i>rt?Math.pow(i,1/3):i/Le+Ce}function yr([i,r,o,l]){let p=(i+16)/116,y=isNaN(r)?p:p+r/500,_=isNaN(o)?p:p-o/200;return p=1*Gt(p),y=re*Gt(y),_=be*Gt(_),[Tt(3.1338561*y-1.6168667*p-.4906146*_),Tt(-.9787684*y+1.9161415*p+.033454*_),Tt(.0719453*y-.2289914*p+1.4052427*_),l]}function Tt(i){return(i=i<=.00304?12.92*i:1.055*Math.pow(i,1/2.4)-.055)<0?0:i>1?1:i}function Gt(i){return i>ye?i*i*i:Le*(i-Ce)}function fr(i){return parseInt(i.padEnd(2,i),16)/255}function Kr(i,r){return nn(r?i/100:i,0,1)}function nn(i,r,o){return Math.min(Math.max(r,i),o)}function xn(i){return!i.some(Number.isNaN)}const js={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 Ht{constructor(r,o,l,p=1,y=!0){this.r=r,this.g=o,this.b=l,this.a=p,y||(this.r*=p,this.g*=p,this.b*=p,p||this.overwriteGetter("rgb",[r,o,l,p]))}static parse(r){if(r instanceof Ht)return r;if(typeof r!="string")return;const o=function(l){if((l=l.toLowerCase().trim())==="transparent")return[0,0,0,0];const p=js[l];if(p){const[_,b,S]=p;return[_/255,b/255,S/255,1]}if(l.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(l)){const _=l.length<6?1:2;let b=1;return[fr(l.slice(b,b+=_)),fr(l.slice(b,b+=_)),fr(l.slice(b,b+=_)),fr(l.slice(b,b+_)||"ff")]}if(l.startsWith("rgb")){const _=l.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(_){const[b,S,C,I,P,z,B,N,U,W,J,fe]=_,oe=[I||" ",B||" ",W].join("");if(oe===" "||oe===" /"||oe===",,"||oe===",,,"){const he=[C,z,U].join(""),xe=he==="%%%"?100:he===""?255:0;if(xe){const Ee=[nn(+S/xe,0,1),nn(+P/xe,0,1),nn(+N/xe,0,1),J?Kr(+J,fe):1];if(xn(Ee))return Ee}}return}}const y=l.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(y){const[_,b,S,C,I,P,z,B,N]=y,U=[S||" ",I||" ",z].join("");if(U===" "||U===" /"||U===",,"||U===",,,"){const W=[+b,nn(+C,0,100),nn(+P,0,100),B?Kr(+B,N):1];if(xn(W))return function([J,fe,oe,he]){function xe(Ee){const qe=(Ee+J/30)%12,at=fe*Math.min(oe,1-oe);return oe-at*Math.max(-1,Math.min(qe-3,9-qe,1))}return J=bt(J),fe/=100,oe/=100,[xe(0),xe(8),xe(4),he]}(W)}}}(r);return o?new Ht(...o,!1):void 0}get rgb(){const{r,g:o,b:l,a:p}=this,y=p||1/0;return this.overwriteGetter("rgb",[r/y,o/y,l/y,p])}get hcl(){return this.overwriteGetter("hcl",function(r){const[o,l,p,y]=Rt(r),_=Math.sqrt(l*l+p*p);return[Math.round(1e4*_)?bt(Math.atan2(p,l)*Lt):NaN,_,o,y]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Rt(this.rgb))}overwriteGetter(r,o){return Object.defineProperty(this,r,{value:o}),o}toString(){const[r,o,l,p]=this.rgb;return`rgba(${[r,o,l].map(y=>Math.round(255*y)).join(",")},${p})`}}Ht.black=new Ht(0,0,0,1),Ht.white=new Ht(1,1,1,1),Ht.transparent=new Ht(0,0,0,0),Ht.red=new Ht(1,0,0,1);class Su{constructor(r,o,l){this.sensitivity=r?o?"variant":"case":o?"accent":"base",this.locale=l,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(r,o){return this.collator.compare(r,o)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Tu{constructor(r,o,l,p,y){this.text=r,this.image=o,this.scale=l,this.fontStack=p,this.textColor=y}}class Kn{constructor(r){this.sections=r}static fromString(r){return new Kn([new Tu(r,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(r=>r.text.length!==0||r.image&&r.image.name.length!==0)}static factory(r){return r instanceof Kn?r:Kn.fromString(r)}toString(){return this.sections.length===0?"":this.sections.map(r=>r.text).join("")}}class Xn{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Xn)return r;if(typeof r=="number")return new Xn([r,r,r,r]);if(Array.isArray(r)&&!(r.length<1||r.length>4)){for(const o of r)if(typeof o!="number")return;switch(r.length){case 1:r=[r[0],r[0],r[0],r[0]];break;case 2:r=[r[0],r[1],r[0],r[1]];break;case 3:r=[r[0],r[1],r[2],r[1]]}return new Xn(r)}}toString(){return JSON.stringify(this.values)}}const eg=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class ci{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof ci)return r;if(Array.isArray(r)&&!(r.length<1)&&r.length%2==0){for(let o=0;o=0&&i<=255&&typeof r=="number"&&r>=0&&r<=255&&typeof o=="number"&&o>=0&&o<=255?l===void 0||typeof l=="number"&&l>=0&&l<=1?null:`Invalid rgba value [${[i,r,o,l].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof l=="number"?[i,r,o,l]:[i,r,o]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function ds(i){if(i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"||i instanceof Ht||i instanceof Su||i instanceof Kn||i instanceof Xn||i instanceof ci||i instanceof Yn)return!0;if(Array.isArray(i)){for(const r of i)if(!ds(r))return!1;return!0}if(typeof i=="object"){for(const r in i)if(!ds(i[r]))return!1;return!0}return!1}function Br(i){if(i===null)return Ei;if(typeof i=="string")return St;if(typeof i=="boolean")return ht;if(typeof i=="number")return Be;if(i instanceof Ht)return Ln;if(i instanceof Su)return ro;if(i instanceof Kn)return Eo;if(i instanceof Xn)return Vo;if(i instanceof ci)return Y;if(i instanceof Yn)return no;if(Array.isArray(i)){const r=i.length;let o;for(const l of i){const p=Br(l);if(o){if(o===p)continue;o=xt;break}o=p}return D(o||xt,r)}return Pi}function Za(i){const r=typeof i;return i===null?"":r==="string"||r==="number"||r==="boolean"?String(i):i instanceof Ht||i instanceof Kn||i instanceof Xn||i instanceof ci||i instanceof Yn?i.toString():JSON.stringify(i)}class Ai{constructor(r,o){this.type=r,this.value=o}static parse(r,o){if(r.length!==2)return o.error(`'literal' expression requires exactly one argument, but found ${r.length-1} instead.`);if(!ds(r[1]))return o.error("invalid value");const l=r[1];let p=Br(l);const y=o.expectedType;return p.kind!=="array"||p.N!==0||!y||y.kind!=="array"||typeof y.N=="number"&&y.N!==0||(p=y),new Ai(p,l)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Er{constructor(r){this.name="ExpressionEvaluationError",this.message=r}toJSON(){return this.message}}const Fl={string:St,number:Be,boolean:ht,object:Pi};class Mi{constructor(r,o){this.type=r,this.args=o}static parse(r,o){if(r.length<2)return o.error("Expected at least one argument.");let l,p=1;const y=r[0];if(y==="array"){let b,S;if(r.length>2){const C=r[1];if(typeof C!="string"||!(C in Fl)||C==="object")return o.error('The item type argument of "array" must be one of string, number, boolean',1);b=Fl[C],p++}else b=xt;if(r.length>3){if(r[2]!==null&&(typeof r[2]!="number"||r[2]<0||r[2]!==Math.floor(r[2])))return o.error('The length argument to "array" must be a positive integer literal',2);S=r[2],p++}l=D(b,S)}else{if(!Fl[y])throw new Error(`Types doesn't contain name = ${y}`);l=Fl[y]}const _=[];for(;pr.outputDefined())}}const ku={"to-boolean":ht,"to-color":Ln,"to-number":Be,"to-string":St};class zi{constructor(r,o){this.type=r,this.args=o}static parse(r,o){if(r.length<2)return o.error("Expected at least one argument.");const l=r[0];if(!ku[l])throw new Error(`Can't parse ${l} as it is not part of the known types`);if((l==="to-boolean"||l==="to-string")&&r.length!==2)return o.error("Expected one argument.");const p=ku[l],y=[];for(let _=1;_4?`Invalid rbga value ${JSON.stringify(o)}: expected an array containing either three or four numeric values.`:Vs(o[0],o[1],o[2],o[3]),!l))return new Ht(o[0]/255,o[1]/255,o[2]/255,o[3])}throw new Er(l||`Could not parse color from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"padding":{let o;for(const l of this.args){o=l.evaluate(r);const p=Xn.parse(o);if(p)return p}throw new Er(`Could not parse padding from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"variableAnchorOffsetCollection":{let o;for(const l of this.args){o=l.evaluate(r);const p=ci.parse(o);if(p)return p}throw new Er(`Could not parse variableAnchorOffsetCollection from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"number":{let o=null;for(const l of this.args){if(o=l.evaluate(r),o===null)return 0;const p=Number(o);if(!isNaN(p))return p}throw new Er(`Could not convert ${JSON.stringify(o)} to number.`)}case"formatted":return Kn.fromString(Za(this.args[0].evaluate(r)));case"resolvedImage":return Yn.fromString(Za(this.args[0].evaluate(r)));default:return Za(this.args[0].evaluate(r))}}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}}const tg=["Unknown","Point","LineString","Polygon"];class Ol{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"?tg[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(r){let o=this._parseColorCache[r];return o||(o=this._parseColorCache[r]=Ht.parse(r)),o}}class ps{constructor(r,o,l=[],p,y=new li,_=[]){this.registry=r,this.path=l,this.key=l.map(b=>`[${b}]`).join(""),this.scope=y,this.errors=_,this.expectedType=p,this._isConstant=o}parse(r,o,l,p,y={}){return o?this.concat(o,l,p)._parse(r,y):this._parse(r,y)}_parse(r,o){function l(p,y,_){return _==="assert"?new Mi(y,[p]):_==="coerce"?new zi(y,[p]):p}if(r!==null&&typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"||(r=["literal",r]),Array.isArray(r)){if(r.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const p=r[0];if(typeof p!="string")return this.error(`Expression name must be a string, but found ${typeof p} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const y=this.registry[p];if(y){let _=y.parse(r,this);if(!_)return null;if(this.expectedType){const b=this.expectedType,S=_.type;if(b.kind!=="string"&&b.kind!=="number"&&b.kind!=="boolean"&&b.kind!=="object"&&b.kind!=="array"||S.kind!=="value")if(b.kind!=="color"&&b.kind!=="formatted"&&b.kind!=="resolvedImage"||S.kind!=="value"&&S.kind!=="string")if(b.kind!=="padding"||S.kind!=="value"&&S.kind!=="number"&&S.kind!=="array")if(b.kind!=="variableAnchorOffsetCollection"||S.kind!=="value"&&S.kind!=="array"){if(this.checkSubtype(b,S))return null}else _=l(_,b,o.typeAnnotation||"coerce");else _=l(_,b,o.typeAnnotation||"coerce");else _=l(_,b,o.typeAnnotation||"coerce");else _=l(_,b,o.typeAnnotation||"assert")}if(!(_ instanceof Ai)&&_.type.kind!=="resolvedImage"&&this._isConstant(_)){const b=new Ol;try{_=new Ai(_.type,_.evaluate(b))}catch(S){return this.error(S.message),null}}return _}return this.error(`Unknown expression "${p}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(r===void 0?"'undefined' value invalid. Use null instead.":typeof r=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof r} instead.`)}concat(r,o,l){const p=typeof r=="number"?this.path.concat(r):this.path,y=l?this.scope.concat(l):this.scope;return new ps(this.registry,this._isConstant,p,o||null,y,this.errors)}error(r,...o){const l=`${this.key}${o.map(p=>`[${p}]`).join("")}`;this.errors.push(new Wr(l,r))}checkSubtype(r,o){const l=K(r,o);return l&&this.error(l),l}}class qo{constructor(r,o){this.type=o.type,this.bindings=[].concat(r),this.result=o}evaluate(r){return this.result.evaluate(r)}eachChild(r){for(const o of this.bindings)r(o[1]);r(this.result)}static parse(r,o){if(r.length<4)return o.error(`Expected at least 3 arguments, but found ${r.length-1} instead.`);const l=[];for(let y=1;y=l.length)throw new Er(`Array index out of bounds: ${o} > ${l.length-1}.`);if(o!==Math.floor(o))throw new Er(`Array index must be an integer, but found ${o} instead.`);return l[o]}eachChild(r){r(this.index),r(this.input)}outputDefined(){return!1}}class Iu{constructor(r,o){this.type=ht,this.needle=r,this.haystack=o}static parse(r,o){if(r.length!==3)return o.error(`Expected 2 arguments, but found ${r.length-1} instead.`);const l=o.parse(r[1],1,xt),p=o.parse(r[2],2,xt);return l&&p?se(l.type,[ht,St,Be,Ei,xt])?new Iu(l,p):o.error(`Expected first argument to be of type boolean, string, number or null, but found ${R(l.type)} instead`):null}evaluate(r){const o=this.needle.evaluate(r),l=this.haystack.evaluate(r);if(!l)return!1;if(!ce(o,["boolean","string","number","null"]))throw new Er(`Expected first argument to be of type boolean, string, number or null, but found ${R(Br(o))} instead.`);if(!ce(l,["string","array"]))throw new Er(`Expected second argument to be of type array or string, but found ${R(Br(l))} instead.`);return l.indexOf(o)>=0}eachChild(r){r(this.needle),r(this.haystack)}outputDefined(){return!0}}class qs{constructor(r,o,l){this.type=Be,this.needle=r,this.haystack=o,this.fromIndex=l}static parse(r,o){if(r.length<=2||r.length>=5)return o.error(`Expected 3 or 4 arguments, but found ${r.length-1} instead.`);const l=o.parse(r[1],1,xt),p=o.parse(r[2],2,xt);if(!l||!p)return null;if(!se(l.type,[ht,St,Be,Ei,xt]))return o.error(`Expected first argument to be of type boolean, string, number or null, but found ${R(l.type)} instead`);if(r.length===4){const y=o.parse(r[3],3,Be);return y?new qs(l,p,y):null}return new qs(l,p)}evaluate(r){const o=this.needle.evaluate(r),l=this.haystack.evaluate(r);if(!ce(o,["boolean","string","number","null"]))throw new Er(`Expected first argument to be of type boolean, string, number or null, but found ${R(Br(o))} instead.`);let p;if(this.fromIndex&&(p=this.fromIndex.evaluate(r)),ce(l,["string"])){const y=l.indexOf(o,p);return y===-1?-1:[...l.slice(0,y)].length}if(ce(l,["array"]))return l.indexOf(o,p);throw new Er(`Expected second argument to be of type array or string, but found ${R(Br(l))} instead.`)}eachChild(r){r(this.needle),r(this.haystack),this.fromIndex&&r(this.fromIndex)}outputDefined(){return!1}}class Eu{constructor(r,o,l,p,y,_){this.inputType=r,this.type=o,this.input=l,this.cases=p,this.outputs=y,this.otherwise=_}static parse(r,o){if(r.length<5)return o.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if(r.length%2!=1)return o.error("Expected an even number of arguments.");let l,p;o.expectedType&&o.expectedType.kind!=="value"&&(p=o.expectedType);const y={},_=[];for(let C=2;CNumber.MAX_SAFE_INTEGER)return z.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof N=="number"&&Math.floor(N)!==N)return z.error("Numeric branch labels must be integer values.");if(l){if(z.checkSubtype(l,Br(N)))return null}else l=Br(N);if(y[String(N)]!==void 0)return z.error("Branch labels must be unique.");y[String(N)]=_.length}const B=o.parse(P,C,p);if(!B)return null;p=p||B.type,_.push(B)}const b=o.parse(r[1],1,xt);if(!b)return null;const S=o.parse(r[r.length-1],r.length-1,p);return S?b.type.kind!=="value"&&o.concat(1).checkSubtype(l,b.type)?null:new Eu(l,p,b,y,_,S):null}evaluate(r){const o=this.input.evaluate(r);return(Br(o)===this.inputType&&this.outputs[this.cases[o]]||this.otherwise).evaluate(r)}eachChild(r){r(this.input),this.outputs.forEach(r),r(this.otherwise)}outputDefined(){return this.outputs.every(r=>r.outputDefined())&&this.otherwise.outputDefined()}}class Nl{constructor(r,o,l){this.type=r,this.branches=o,this.otherwise=l}static parse(r,o){if(r.length<4)return o.error(`Expected at least 3 arguments, but found only ${r.length-1}.`);if(r.length%2!=0)return o.error("Expected an odd number of arguments.");let l;o.expectedType&&o.expectedType.kind!=="value"&&(l=o.expectedType);const p=[];for(let _=1;_o.outputDefined())&&this.otherwise.outputDefined()}}class Ga{constructor(r,o,l,p){this.type=r,this.input=o,this.beginIndex=l,this.endIndex=p}static parse(r,o){if(r.length<=2||r.length>=5)return o.error(`Expected 3 or 4 arguments, but found ${r.length-1} instead.`);const l=o.parse(r[1],1,xt),p=o.parse(r[2],2,Be);if(!l||!p)return null;if(!se(l.type,[D(xt),St,xt]))return o.error(`Expected first argument to be of type array or string, but found ${R(l.type)} instead`);if(r.length===4){const y=o.parse(r[3],3,Be);return y?new Ga(l.type,l,p,y):null}return new Ga(l.type,l,p)}evaluate(r){const o=this.input.evaluate(r),l=this.beginIndex.evaluate(r);let p;if(this.endIndex&&(p=this.endIndex.evaluate(r)),ce(o,["string"]))return[...o].slice(l,p).join("");if(ce(o,["array"]))return o.slice(l,p);throw new Er(`Expected first argument to be of type array or string, but found ${R(Br(o))} instead.`)}eachChild(r){r(this.input),r(this.beginIndex),this.endIndex&&r(this.endIndex)}outputDefined(){return!1}}function $l(i,r){const o=i.length-1;let l,p,y=0,_=o,b=0;for(;y<=_;)if(b=Math.floor((y+_)/2),l=i[b],p=i[b+1],l<=r){if(b===o||rr))throw new Er("Input is not a number.");_=b-1}return 0}class Zs{constructor(r,o,l){this.type=r,this.input=o,this.labels=[],this.outputs=[];for(const[p,y]of l)this.labels.push(p),this.outputs.push(y)}static parse(r,o){if(r.length-1<4)return o.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if((r.length-1)%2!=0)return o.error("Expected an even number of arguments.");const l=o.parse(r[1],1,Be);if(!l)return null;const p=[];let y=null;o.expectedType&&o.expectedType.kind!=="value"&&(y=o.expectedType);for(let _=1;_=b)return o.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',C);const P=o.parse(S,I,y);if(!P)return null;y=y||P.type,p.push([b,P])}return new Zs(y,l,p)}evaluate(r){const o=this.labels,l=this.outputs;if(o.length===1)return l[0].evaluate(r);const p=this.input.evaluate(r);if(p<=o[0])return l[0].evaluate(r);const y=o.length;return p>=o[y-1]?l[y-1].evaluate(r):l[$l(o,p)].evaluate(r)}eachChild(r){r(this.input);for(const o of this.outputs)r(o)}outputDefined(){return this.outputs.every(r=>r.outputDefined())}}function Fd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var rg=Od;function Od(i,r,o,l){this.cx=3*i,this.bx=3*(o-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(l-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=r,this.p2x=o,this.p2y=l}Od.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,r){if(r===void 0&&(r=1e-6),i<0)return 0;if(i>1)return 1;for(var o=i,l=0;l<8;l++){var p=this.sampleCurveX(o)-i;if(Math.abs(p)p?_=o:b=o,o=.5*(b-_)+_;return o},solve:function(i,r){return this.sampleCurveY(this.solveCurveX(i,r))}};var ng=Fd(rg);function fs(i,r,o){return i+o*(r-i)}function Ha(i,r,o){return i.map((l,p)=>fs(l,r[p],o))}const Rn={number:fs,color:function(i,r,o,l="rgb"){switch(l){case"rgb":{const[p,y,_,b]=Ha(i.rgb,r.rgb,o);return new Ht(p,y,_,b,!1)}case"hcl":{const[p,y,_,b]=i.hcl,[S,C,I,P]=r.hcl;let z,B;if(isNaN(p)||isNaN(S))isNaN(p)?isNaN(S)?z=NaN:(z=S,_!==1&&_!==0||(B=C)):(z=p,I!==1&&I!==0||(B=y));else{let fe=S-p;S>p&&fe>180?fe-=360:S180&&(fe+=360),z=p+o*fe}const[N,U,W,J]=function([fe,oe,he,xe]){return fe=isNaN(fe)?0:fe*st,yr([he,Math.cos(fe)*oe,Math.sin(fe)*oe,xe])}([z,B??fs(y,C,o),fs(_,I,o),fs(b,P,o)]);return new Ht(N,U,W,J,!1)}case"lab":{const[p,y,_,b]=yr(Ha(i.lab,r.lab,o));return new Ht(p,y,_,b,!1)}}},array:Ha,padding:function(i,r,o){return new Xn(Ha(i.values,r.values,o))},variableAnchorOffsetCollection:function(i,r,o){const l=i.values,p=r.values;if(l.length!==p.length)throw new Er(`Cannot interpolate values of different length. from: ${i.toString()}, to: ${r.toString()}`);const y=[];for(let _=0;_typeof I!="number"||I<0||I>1))return o.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);p={name:"cubic-bezier",controlPoints:C}}}if(r.length-1<4)return o.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if((r.length-1)%2!=0)return o.error("Expected an even number of arguments.");if(y=o.parse(y,2,Be),!y)return null;const b=[];let S=null;l==="interpolate-hcl"||l==="interpolate-lab"?S=Ln:o.expectedType&&o.expectedType.kind!=="value"&&(S=o.expectedType);for(let C=0;C<_.length;C+=2){const I=_[C],P=_[C+1],z=C+3,B=C+4;if(typeof I!="number")return o.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',z);if(b.length&&b[b.length-1][0]>=I)return o.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',z);const N=o.parse(P,B,S);if(!N)return null;S=S||N.type,b.push([I,N])}return de(S,Be)||de(S,Ln)||de(S,Vo)||de(S,Y)||de(S,D(Be))?new Dn(S,l,p,y,b):o.error(`Type ${R(S)} is not interpolatable.`)}evaluate(r){const o=this.labels,l=this.outputs;if(o.length===1)return l[0].evaluate(r);const p=this.input.evaluate(r);if(p<=o[0])return l[0].evaluate(r);const y=o.length;if(p>=o[y-1])return l[y-1].evaluate(r);const _=$l(o,p),b=Dn.interpolationFactor(this.interpolation,p,o[_],o[_+1]),S=l[_].evaluate(r),C=l[_+1].evaluate(r);switch(this.operator){case"interpolate":return Rn[this.type.kind](S,C,b);case"interpolate-hcl":return Rn.color(S,C,b,"hcl");case"interpolate-lab":return Rn.color(S,C,b,"lab")}}eachChild(r){r(this.input);for(const o of this.outputs)r(o)}outputDefined(){return this.outputs.every(r=>r.outputDefined())}}function Ul(i,r,o,l){const p=l-o,y=i-o;return p===0?0:r===1?y/p:(Math.pow(r,y)-1)/(Math.pow(r,p)-1)}class jl{constructor(r,o){this.type=r,this.args=o}static parse(r,o){if(r.length<2)return o.error("Expectected at least one argument.");let l=null;const p=o.expectedType;p&&p.kind!=="value"&&(l=p);const y=[];for(const b of r.slice(1)){const S=o.parse(b,1+y.length,l,void 0,{typeAnnotation:"omit"});if(!S)return null;l=l||S.type,y.push(S)}if(!l)throw new Error("No output type");const _=p&&y.some(b=>K(p,b.type));return new jl(_?xt:l,y)}evaluate(r){let o,l=null,p=0;for(const y of this.args)if(p++,l=y.evaluate(r),l&&l instanceof Yn&&!l.available&&(o||(o=l.name),l=null,p===this.args.length&&(l=o)),l!==null)break;return l}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}}function Vl(i,r){return i==="=="||i==="!="?r.kind==="boolean"||r.kind==="string"||r.kind==="number"||r.kind==="null"||r.kind==="value":r.kind==="string"||r.kind==="number"||r.kind==="value"}function Nd(i,r,o,l){return l.compare(r,o)===0}function Gs(i,r,o){const l=i!=="=="&&i!=="!=";return class ET{constructor(y,_,b){this.type=ht,this.lhs=y,this.rhs=_,this.collator=b,this.hasUntypedArgument=y.type.kind==="value"||_.type.kind==="value"}static parse(y,_){if(y.length!==3&&y.length!==4)return _.error("Expected two or three arguments.");const b=y[0];let S=_.parse(y[1],1,xt);if(!S)return null;if(!Vl(b,S.type))return _.concat(1).error(`"${b}" comparisons are not supported for type '${R(S.type)}'.`);let C=_.parse(y[2],2,xt);if(!C)return null;if(!Vl(b,C.type))return _.concat(2).error(`"${b}" comparisons are not supported for type '${R(C.type)}'.`);if(S.type.kind!==C.type.kind&&S.type.kind!=="value"&&C.type.kind!=="value")return _.error(`Cannot compare types '${R(S.type)}' and '${R(C.type)}'.`);l&&(S.type.kind==="value"&&C.type.kind!=="value"?S=new Mi(C.type,[S]):S.type.kind!=="value"&&C.type.kind==="value"&&(C=new Mi(S.type,[C])));let I=null;if(y.length===4){if(S.type.kind!=="string"&&C.type.kind!=="string"&&S.type.kind!=="value"&&C.type.kind!=="value")return _.error("Cannot use collator to compare non-string types.");if(I=_.parse(y[3],3,ro),!I)return null}return new ET(S,C,I)}evaluate(y){const _=this.lhs.evaluate(y),b=this.rhs.evaluate(y);if(l&&this.hasUntypedArgument){const S=Br(_),C=Br(b);if(S.kind!==C.kind||S.kind!=="string"&&S.kind!=="number")throw new Er(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${S.kind}, ${C.kind}) instead.`)}if(this.collator&&!l&&this.hasUntypedArgument){const S=Br(_),C=Br(b);if(S.kind!=="string"||C.kind!=="string")return r(y,_,b)}return this.collator?o(y,_,b,this.collator.evaluate(y)):r(y,_,b)}eachChild(y){y(this.lhs),y(this.rhs),this.collator&&y(this.collator)}outputDefined(){return!0}}}const ig=Gs("==",function(i,r,o){return r===o},Nd),$d=Gs("!=",function(i,r,o){return r!==o},function(i,r,o,l){return!Nd(0,r,o,l)}),Ud=Gs("<",function(i,r,o){return r",function(i,r,o){return r>o},function(i,r,o,l){return l.compare(r,o)>0}),sg=Gs("<=",function(i,r,o){return r<=o},function(i,r,o,l){return l.compare(r,o)<=0}),jd=Gs(">=",function(i,r,o){return r>=o},function(i,r,o,l){return l.compare(r,o)>=0});class Wa{constructor(r,o,l){this.type=ro,this.locale=l,this.caseSensitive=r,this.diacriticSensitive=o}static parse(r,o){if(r.length!==2)return o.error("Expected one argument.");const l=r[1];if(typeof l!="object"||Array.isArray(l))return o.error("Collator options argument must be an object.");const p=o.parse(l["case-sensitive"]!==void 0&&l["case-sensitive"],1,ht);if(!p)return null;const y=o.parse(l["diacritic-sensitive"]!==void 0&&l["diacritic-sensitive"],1,ht);if(!y)return null;let _=null;return l.locale&&(_=o.parse(l.locale,1,St),!_)?null:new Wa(p,y,_)}evaluate(r){return new Su(this.caseSensitive.evaluate(r),this.diacriticSensitive.evaluate(r),this.locale?this.locale.evaluate(r):null)}eachChild(r){r(this.caseSensitive),r(this.diacriticSensitive),this.locale&&r(this.locale)}outputDefined(){return!1}}class Pu{constructor(r,o,l,p,y){this.type=St,this.number=r,this.locale=o,this.currency=l,this.minFractionDigits=p,this.maxFractionDigits=y}static parse(r,o){if(r.length!==3)return o.error("Expected two arguments.");const l=o.parse(r[1],1,Be);if(!l)return null;const p=r[2];if(typeof p!="object"||Array.isArray(p))return o.error("NumberFormat options argument must be an object.");let y=null;if(p.locale&&(y=o.parse(p.locale,1,St),!y))return null;let _=null;if(p.currency&&(_=o.parse(p.currency,1,St),!_))return null;let b=null;if(p["min-fraction-digits"]&&(b=o.parse(p["min-fraction-digits"],1,Be),!b))return null;let S=null;return p["max-fraction-digits"]&&(S=o.parse(p["max-fraction-digits"],1,Be),!S)?null:new Pu(l,y,_,b,S)}evaluate(r){return new Intl.NumberFormat(this.locale?this.locale.evaluate(r):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(r):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(r):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(r):void 0}).format(this.number.evaluate(r))}eachChild(r){r(this.number),this.locale&&r(this.locale),this.currency&&r(this.currency),this.minFractionDigits&&r(this.minFractionDigits),this.maxFractionDigits&&r(this.maxFractionDigits)}outputDefined(){return!1}}class ql{constructor(r){this.type=Eo,this.sections=r}static parse(r,o){if(r.length<2)return o.error("Expected at least one argument.");const l=r[1];if(!Array.isArray(l)&&typeof l=="object")return o.error("First argument must be an image or text section.");const p=[];let y=!1;for(let _=1;_<=r.length-1;++_){const b=r[_];if(y&&typeof b=="object"&&!Array.isArray(b)){y=!1;let S=null;if(b["font-scale"]&&(S=o.parse(b["font-scale"],1,Be),!S))return null;let C=null;if(b["text-font"]&&(C=o.parse(b["text-font"],1,D(St)),!C))return null;let I=null;if(b["text-color"]&&(I=o.parse(b["text-color"],1,Ln),!I))return null;const P=p[p.length-1];P.scale=S,P.font=C,P.textColor=I}else{const S=o.parse(r[_],1,xt);if(!S)return null;const C=S.type.kind;if(C!=="string"&&C!=="value"&&C!=="null"&&C!=="resolvedImage")return o.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");y=!0,p.push({content:S,scale:null,font:null,textColor:null})}}return new ql(p)}evaluate(r){return new Kn(this.sections.map(o=>{const l=o.content.evaluate(r);return Br(l)===no?new Tu("",l,null,null,null):new Tu(Za(l),null,o.scale?o.scale.evaluate(r):null,o.font?o.font.evaluate(r).join(","):null,o.textColor?o.textColor.evaluate(r):null)}))}eachChild(r){for(const o of this.sections)r(o.content),o.scale&&r(o.scale),o.font&&r(o.font),o.textColor&&r(o.textColor)}outputDefined(){return!1}}class Au{constructor(r){this.type=no,this.input=r}static parse(r,o){if(r.length!==2)return o.error("Expected two arguments.");const l=o.parse(r[1],1,St);return l?new Au(l):o.error("No image name provided.")}evaluate(r){const o=this.input.evaluate(r),l=Yn.fromString(o);return l&&r.availableImages&&(l.available=r.availableImages.indexOf(o)>-1),l}eachChild(r){r(this.input)}outputDefined(){return!1}}class Mu{constructor(r){this.type=Be,this.input=r}static parse(r,o){if(r.length!==2)return o.error(`Expected 1 argument, but found ${r.length-1} instead.`);const l=o.parse(r[1],1);return l?l.type.kind!=="array"&&l.type.kind!=="string"&&l.type.kind!=="value"?o.error(`Expected argument of type string or array, but found ${R(l.type)} instead.`):new Mu(l):null}evaluate(r){const o=this.input.evaluate(r);if(typeof o=="string")return[...o].length;if(Array.isArray(o))return o.length;throw new Er(`Expected value to be of type string or array, but found ${R(Br(o))} instead.`)}eachChild(r){r(this.input)}outputDefined(){return!1}}const io=8192;function ag(i,r){const o=(180+i[0])/360,l=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i[1]*Math.PI/360)))/360,p=Math.pow(2,r.z);return[Math.round(o*p*io),Math.round(l*p*io)]}function zu(i,r){const o=Math.pow(2,r.z);return[(p=(i[0]/io+r.x)/o,360*p-180),(l=(i[1]/io+r.y)/o,360/Math.PI*Math.atan(Math.exp((180-360*l)*Math.PI/180))-90)];var l,p}function ms(i,r){i[0]=Math.min(i[0],r[0]),i[1]=Math.min(i[1],r[1]),i[2]=Math.max(i[2],r[0]),i[3]=Math.max(i[3],r[1])}function Zo(i,r){return!(i[0]<=r[0]||i[2]>=r[2]||i[1]<=r[1]||i[3]>=r[3])}function Vt(i,r,o){const l=i[0]-r[0],p=i[1]-r[1],y=i[0]-o[0],_=i[1]-o[1];return l*_-y*p==0&&l*y<=0&&p*_<=0}function Zl(i,r,o,l){return(p=[l[0]-o[0],l[1]-o[1]])[0]*(y=[r[0]-i[0],r[1]-i[1]])[1]-p[1]*y[0]!=0&&!(!qd(i,r,o,l)||!qd(o,l,i,r));var p,y}function lg(i,r,o){for(const l of o)for(let p=0;p(p=i)[1]!=(_=b[S+1])[1]>p[1]&&p[0]<(_[0]-y[0])*(p[1]-y[1])/(_[1]-y[1])+y[0]&&(l=!l)}var p,y,_;return l}function cg(i,r){for(const o of r)if(Hs(i,o))return!0;return!1}function Vd(i,r){for(const o of i)if(!Hs(o,r))return!1;for(let o=0;o0&&b<0||_<0&&b>0}function Lu(i,r,o){const l=[];for(let p=0;po[2]){const p=.5*l;let y=i[0]-o[0]>p?-l:o[0]-i[0]>p?l:0;y===0&&(y=i[0]-o[2]>p?-l:o[2]-i[0]>p?l:0),i[0]+=y}ms(r,i)}function Hd(i,r,o,l){const p=Math.pow(2,l.z)*io,y=[l.x*io,l.y*io],_=[];for(const b of i)for(const S of b){const C=[S.x+y[0],S.y+y[1]];Gd(C,r,o,p),_.push(C)}return _}function Wd(i,r,o,l){const p=Math.pow(2,l.z)*io,y=[l.x*io,l.y*io],_=[];for(const S of i){const C=[];for(const I of S){const P=[I.x+y[0],I.y+y[1]];ms(r,P),C.push(P)}_.push(C)}if(r[2]-r[0]<=p/2){(b=r)[0]=b[1]=1/0,b[2]=b[3]=-1/0;for(const S of _)for(const C of S)Gd(C,r,o,p)}var b;return _}class gs{constructor(r,o){this.type=ht,this.geojson=r,this.geometries=o}static parse(r,o){if(r.length!==2)return o.error(`'within' expression requires exactly one argument, but found ${r.length-1} instead.`);if(ds(r[1])){const l=r[1];if(l.type==="FeatureCollection"){const p=[];for(const y of l.features){const{type:_,coordinates:b}=y.geometry;_==="Polygon"&&p.push(b),_==="MultiPolygon"&&p.push(...b)}if(p.length)return new gs(l,{type:"MultiPolygon",coordinates:p})}else if(l.type==="Feature"){const p=l.geometry.type;if(p==="Polygon"||p==="MultiPolygon")return new gs(l,l.geometry)}else if(l.type==="Polygon"||l.type==="MultiPolygon")return new gs(l,l)}return o.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(r){if(r.geometry()!=null&&r.canonicalID()!=null){if(r.geometryType()==="Point")return function(o,l){const p=[1/0,1/0,-1/0,-1/0],y=[1/0,1/0,-1/0,-1/0],_=o.canonicalID();if(l.type==="Polygon"){const b=Lu(l.coordinates,y,_),S=Hd(o.geometry(),p,y,_);if(!Zo(p,y))return!1;for(const C of S)if(!Hs(C,b))return!1}if(l.type==="MultiPolygon"){const b=Zd(l.coordinates,y,_),S=Hd(o.geometry(),p,y,_);if(!Zo(p,y))return!1;for(const C of S)if(!cg(C,b))return!1}return!0}(r,this.geometries);if(r.geometryType()==="LineString")return function(o,l){const p=[1/0,1/0,-1/0,-1/0],y=[1/0,1/0,-1/0,-1/0],_=o.canonicalID();if(l.type==="Polygon"){const b=Lu(l.coordinates,y,_),S=Wd(o.geometry(),p,y,_);if(!Zo(p,y))return!1;for(const C of S)if(!Vd(C,b))return!1}if(l.type==="MultiPolygon"){const b=Zd(l.coordinates,y,_),S=Wd(o.geometry(),p,y,_);if(!Zo(p,y))return!1;for(const C of S)if(!ug(C,b))return!1}return!0}(r,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Kd=class{constructor(i=[],r=(o,l)=>ol?1:0){if(this.data=i,this.length=this.data.length,this.compare=r,this.length>0)for(let o=(this.length>>1)-1;o>=0;o--)this._down(o)}push(i){this.data.push(i),this._up(this.length++)}pop(){if(this.length===0)return;const i=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),i}peek(){return this.data[0]}_up(i){const{data:r,compare:o}=this,l=r[i];for(;i>0;){const p=i-1>>1,y=r[p];if(o(l,y)>=0)break;r[i]=y,i=p}r[i]=l}_down(i){const{data:r,compare:o}=this,l=this.length>>1,p=r[i];for(;i=0)break;r[i]=r[y],i=y}r[i]=p}};function hg(i,r,o,l,p){Xd(i,r,o,l||i.length-1,p||dg)}function Xd(i,r,o,l,p){for(;l>o;){if(l-o>600){var y=l-o+1,_=r-o+1,b=Math.log(y),S=.5*Math.exp(2*b/3),C=.5*Math.sqrt(b*S*(y-S)/y)*(_-y/2<0?-1:1);Xd(i,r,Math.max(o,Math.floor(r-_*S/y+C)),Math.min(l,Math.floor(r+(y-_)*S/y+C)),p)}var I=i[r],P=o,z=l;for(Ka(i,o,r),p(i[l],I)>0&&Ka(i,o,l);P0;)z--}p(i[o],I)===0?Ka(i,o,z):Ka(i,++z,l),z<=r&&(o=z+1),r<=z&&(l=z-1)}}function Ka(i,r,o){var l=i[r];i[r]=i[o],i[o]=l}function dg(i,r){return ir?1:0}function Gl(i,r){if(i.length<=1)return[i];const o=[];let l,p;for(const y of i){const _=fg(y);_!==0&&(y.area=Math.abs(_),p===void 0&&(p=_<0),p===_<0?(l&&o.push(l),l=[y]):l.push(y))}if(l&&o.push(l),r>1)for(let y=0;y1?(C=r[S+1][0],I=r[S+1][1]):B>0&&(C+=P/this.kx*B,I+=z/this.ky*B)),P=this.wrap(o[0]-C)*this.kx,z=(o[1]-I)*this.ky;const N=P*P+z*z;N180;)r-=360;return r}}function ep(i,r){return r[0]-i[0]}function Hl(i){return i[1]-i[0]+1}function Po(i,r){return i[1]>=i[0]&&i[1]i[1])return[null,null];const o=Hl(i);if(r){if(o===2)return[i,null];const p=Math.floor(o/2);return[[i[0],i[0]+p],[i[0]+p,i[1]]]}if(o===1)return[i,null];const l=Math.floor(o/2)-1;return[[i[0],i[0]+l],[i[0]+l+1,i[1]]]}function Bu(i,r){if(!Po(r,i.length))return[1/0,1/0,-1/0,-1/0];const o=[1/0,1/0,-1/0,-1/0];for(let l=r[0];l<=r[1];++l)ms(o,i[l]);return o}function Fu(i){const r=[1/0,1/0,-1/0,-1/0];for(const o of i)for(const l of o)ms(r,l);return r}function Wl(i){return i[0]!==-1/0&&i[1]!==-1/0&&i[2]!==1/0&&i[3]!==1/0}function Ou(i,r,o){if(!Wl(i)||!Wl(r))return NaN;let l=0,p=0;return i[2]r[2]&&(l=i[0]-r[2]),i[1]>r[3]&&(p=i[1]-r[3]),i[3]=l)return l;if(Zo(p,y)){if(Kl(i,r))return 0}else if(Kl(r,i))return 0;let _=1/0;for(const b of i)for(let S=0,C=b.length,I=C-1;S0;){const S=_.pop();if(S[0]>=y)continue;const C=S[1],I=r?50:100;if(Hl(C)<=I){if(!Po(C,i.length))return NaN;if(r){const P=kt(i,C,o,l);if(isNaN(P)||P===0)return P;y=Math.min(y,P)}else for(let P=C[0];P<=C[1];++P){const z=gg(i[P],o,l);if(y=Math.min(y,z),y===0)return 0}}else{const P=Du(C,r);Kt(_,y,l,i,b,P[0]),Kt(_,y,l,i,b,P[1])}}return y}function Ya(i,r,o,l,p,y=1/0){let _=Math.min(y,p.distance(i[0],o[0]));if(_===0)return _;const b=new Kd([[0,[0,i.length-1],[0,o.length-1]]],ep);for(;b.length>0;){const S=b.pop();if(S[0]>=_)continue;const C=S[1],I=S[2],P=r?50:100,z=l?50:100;if(Hl(C)<=P&&Hl(I)<=z){if(!Po(C,i.length)&&Po(I,o.length))return NaN;let B;if(r&&l)B=mg(i,C,o,I,p),_=Math.min(_,B);else if(r&&!l){const N=i.slice(C[0],C[1]+1);for(let U=I[0];U<=I[1];++U)if(B=ys(o[U],N,p),_=Math.min(_,B),_===0)return _}else if(!r&&l){const N=o.slice(I[0],I[1]+1);for(let U=C[0];U<=C[1];++U)if(B=ys(i[U],N,p),_=Math.min(_,B),_===0)return _}else B=wr(i,C,o,I,p),_=Math.min(_,B)}else{const B=Du(C,r),N=Du(I,l);_s(b,_,p,i,o,B[0],N[0]),_s(b,_,p,i,o,B[0],N[1]),_s(b,_,p,i,o,B[1],N[0]),_s(b,_,p,i,o,B[1],N[1])}}return _}function $u(i){return i.type==="MultiPolygon"?i.coordinates.map(r=>({type:"Polygon",coordinates:r})):i.type==="MultiLineString"?i.coordinates.map(r=>({type:"LineString",coordinates:r})):i.type==="MultiPoint"?i.coordinates.map(r=>({type:"Point",coordinates:r})):[i]}class vs{constructor(r,o){this.type=Be,this.geojson=r,this.geometries=o}static parse(r,o){if(r.length!==2)return o.error(`'distance' expression requires exactly one argument, but found ${r.length-1} instead.`);if(ds(r[1])){const l=r[1];if(l.type==="FeatureCollection")return new vs(l,l.features.map(p=>$u(p.geometry)).flat());if(l.type==="Feature")return new vs(l,$u(l.geometry));if("type"in l&&"coordinates"in l)return new vs(l,$u(l))}return o.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(r){if(r.geometry()!=null&&r.canonicalID()!=null){if(r.geometryType()==="Point")return function(o,l){const p=o.geometry(),y=p.flat().map(S=>zu([S.x,S.y],o.canonical));if(p.length===0)return NaN;const _=new Ru(y[0][1]);let b=1/0;for(const S of l){switch(S.type){case"Point":b=Math.min(b,Ya(y,!1,[S.coordinates],!1,_,b));break;case"LineString":b=Math.min(b,Ya(y,!1,S.coordinates,!0,_,b));break;case"Polygon":b=Math.min(b,Xa(y,!1,S.coordinates,_,b))}if(b===0)return b}return b}(r,this.geometries);if(r.geometryType()==="LineString")return function(o,l){const p=o.geometry(),y=p.flat().map(S=>zu([S.x,S.y],o.canonical));if(p.length===0)return NaN;const _=new Ru(y[0][1]);let b=1/0;for(const S of l){switch(S.type){case"Point":b=Math.min(b,Ya(y,!0,[S.coordinates],!1,_,b));break;case"LineString":b=Math.min(b,Ya(y,!0,S.coordinates,!0,_,b));break;case"Polygon":b=Math.min(b,Xa(y,!0,S.coordinates,_,b))}if(b===0)return b}return b}(r,this.geometries);if(r.geometryType()==="Polygon")return function(o,l){const p=o.geometry();if(p.length===0||p[0].length===0)return NaN;const y=Gl(p,0).map(S=>S.map(C=>C.map(I=>zu([I.x,I.y],o.canonical)))),_=new Ru(y[0][0][0][1]);let b=1/0;for(const S of l)for(const C of y){switch(S.type){case"Point":b=Math.min(b,Xa([S.coordinates],!1,C,_,b));break;case"LineString":b=Math.min(b,Xa(S.coordinates,!0,C,_,b));break;case"Polygon":b=Math.min(b,rr(C,S.coordinates,_,b))}if(b===0)return b}return b}(r,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const Ws={"==":ig,"!=":$d,">":og,"<":Ud,">=":jd,"<=":sg,array:Mi,at:Cu,boolean:Mi,case:Nl,coalesce:jl,collator:Wa,format:ql,image:Au,in:Iu,"index-of":qs,interpolate:Dn,"interpolate-hcl":Dn,"interpolate-lab":Dn,length:Mu,let:qo,literal:Ai,match:Eu,number:Mi,"number-format":Pu,object:Mi,slice:Ga,step:Zs,string:Mi,"to-boolean":zi,"to-color":zi,"to-number":zi,"to-string":zi,var:$t,within:gs,distance:vs};class ui{constructor(r,o,l,p){this.name=r,this.type=o,this._evaluate=l,this.args=p}evaluate(r){return this._evaluate(r,this.args)}eachChild(r){this.args.forEach(r)}outputDefined(){return!1}static parse(r,o){const l=r[0],p=ui.definitions[l];if(!p)return o.error(`Unknown expression "${l}". If you wanted a literal array, use ["literal", [...]].`,0);const y=Array.isArray(p)?p[0]:p.type,_=Array.isArray(p)?[[p[1],p[2]]]:p.overloads,b=_.filter(([C])=>!Array.isArray(C)||C.length===r.length-1);let S=null;for(const[C,I]of b){S=new ps(o.registry,Ja,o.path,null,o.scope);const P=[];let z=!1;for(let B=1;B{return z=P,Array.isArray(z)?`(${z.map(R).join(", ")})`:`(${R(z.type)}...)`;var z}).join(" | "),I=[];for(let P=1;P{o=r?o&&Ja(l):o&&l instanceof Ai}),!!o&&Qa(i)&&el(i,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Qa(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 gs||i instanceof vs)return!1;let r=!0;return i.eachChild(o=>{r&&!Qa(o)&&(r=!1)}),r}function Ks(i){if(i instanceof ui&&i.name==="feature-state")return!1;let r=!0;return i.eachChild(o=>{r&&!Ks(o)&&(r=!1)}),r}function el(i,r){if(i instanceof ui&&r.indexOf(i.name)>=0)return!1;let o=!0;return i.eachChild(l=>{o&&!el(l,r)&&(o=!1)}),o}function Xl(i){return{result:"success",value:i}}function Xs(i){return{result:"error",value:i}}function Ys(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function tp(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function qu(i){return!!i.expression&&i.expression.interpolated}function Ft(i){return i instanceof Number?"number":i instanceof String?"string":i instanceof Boolean?"boolean":Array.isArray(i)?"array":i===null?"null":typeof i}function Yl(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function yg(i){return i}function rp(i,r){const o=r.type==="color",l=i.stops&&typeof i.stops[0][0]=="object",p=l||!(l||i.property!==void 0),y=i.type||(qu(r)?"exponential":"interval");if(o||r.type==="padding"){const I=o?Ht.parse:Xn.parse;(i=yt({},i)).stops&&(i.stops=i.stops.map(P=>[P[0],I(P[1])])),i.default=I(i.default?i.default:r.default)}if(i.colorSpace&&(_=i.colorSpace)!=="rgb"&&_!=="hcl"&&_!=="lab")throw new Error(`Unknown color space: "${i.colorSpace}"`);var _;let b,S,C;if(y==="exponential")b=ip;else if(y==="interval")b=Jl;else if(y==="categorical"){b=np,S=Object.create(null);for(const I of i.stops)S[I[0]]=I[1];C=typeof i.stops[0][0]}else{if(y!=="identity")throw new Error(`Unknown function type "${y}"`);b=op}if(l){const I={},P=[];for(let N=0;NN[0]),evaluate:({zoom:N},U)=>ip({stops:z,base:i.base},r,N).evaluate(N,U)}}if(p){const I=y==="exponential"?{name:"exponential",base:i.base!==void 0?i.base:1}:null;return{kind:"camera",interpolationType:I,interpolationFactor:Dn.interpolationFactor.bind(void 0,I),zoomStops:i.stops.map(P=>P[0]),evaluate:({zoom:P})=>b(i,r,P,S,C)}}return{kind:"source",evaluate(I,P){const z=P&&P.properties?P.properties[i.property]:void 0;return z===void 0?Js(i.default,r.default):b(i,r,z,S,C)}}}function Js(i,r,o){return i!==void 0?i:r!==void 0?r:o!==void 0?o:void 0}function np(i,r,o,l,p){return Js(typeof o===p?l[o]:void 0,i.default,r.default)}function Jl(i,r,o){if(Ft(o)!=="number")return Js(i.default,r.default);const l=i.stops.length;if(l===1||o<=i.stops[0][0])return i.stops[0][1];if(o>=i.stops[l-1][0])return i.stops[l-1][1];const p=$l(i.stops.map(y=>y[0]),o);return i.stops[p][1]}function ip(i,r,o){const l=i.base!==void 0?i.base:1;if(Ft(o)!=="number")return Js(i.default,r.default);const p=i.stops.length;if(p===1||o<=i.stops[0][0])return i.stops[0][1];if(o>=i.stops[p-1][0])return i.stops[p-1][1];const y=$l(i.stops.map(I=>I[0]),o),_=function(I,P,z,B){const N=B-z,U=I-z;return N===0?0:P===1?U/N:(Math.pow(P,U)-1)/(Math.pow(P,N)-1)}(o,l,i.stops[y][0],i.stops[y+1][0]),b=i.stops[y][1],S=i.stops[y+1][1],C=Rn[r.type]||yg;return typeof b.evaluate=="function"?{evaluate(...I){const P=b.evaluate.apply(void 0,I),z=S.evaluate.apply(void 0,I);if(P!==void 0&&z!==void 0)return C(P,z,_,i.colorSpace)}}:C(b,S,_,i.colorSpace)}function op(i,r,o){switch(r.type){case"color":o=Ht.parse(o);break;case"formatted":o=Kn.fromString(o.toString());break;case"resolvedImage":o=Yn.fromString(o.toString());break;case"padding":o=Xn.parse(o);break;default:Ft(o)===r.type||r.type==="enum"&&r.values[o]||(o=void 0)}return Js(o,i.default,r.default)}ui.register(Ws,{error:[{kind:"error"},[St],(i,[r])=>{throw new Er(r.evaluate(i))}],typeof:[St,[xt],(i,[r])=>R(Br(r.evaluate(i)))],"to-rgba":[D(Be,4),[Ln],(i,[r])=>{const[o,l,p,y]=r.evaluate(i).rgb;return[255*o,255*l,255*p,y]}],rgb:[Ln,[Be,Be,Be],Uu],rgba:[Ln,[Be,Be,Be,Be],Uu],has:{type:ht,overloads:[[[St],(i,[r])=>ju(r.evaluate(i),i.properties())],[[St,Pi],(i,[r,o])=>ju(r.evaluate(i),o.evaluate(i))]]},get:{type:xt,overloads:[[[St],(i,[r])=>Vu(r.evaluate(i),i.properties())],[[St,Pi],(i,[r,o])=>Vu(r.evaluate(i),o.evaluate(i))]]},"feature-state":[xt,[St],(i,[r])=>Vu(r.evaluate(i),i.featureState||{})],properties:[Pi,[],i=>i.properties()],"geometry-type":[St,[],i=>i.geometryType()],id:[xt,[],i=>i.id()],zoom:[Be,[],i=>i.globals.zoom],"heatmap-density":[Be,[],i=>i.globals.heatmapDensity||0],"line-progress":[Be,[],i=>i.globals.lineProgress||0],accumulated:[xt,[],i=>i.globals.accumulated===void 0?null:i.globals.accumulated],"+":[Be,xs(Be),(i,r)=>{let o=0;for(const l of r)o+=l.evaluate(i);return o}],"*":[Be,xs(Be),(i,r)=>{let o=1;for(const l of r)o*=l.evaluate(i);return o}],"-":{type:Be,overloads:[[[Be,Be],(i,[r,o])=>r.evaluate(i)-o.evaluate(i)],[[Be],(i,[r])=>-r.evaluate(i)]]},"/":[Be,[Be,Be],(i,[r,o])=>r.evaluate(i)/o.evaluate(i)],"%":[Be,[Be,Be],(i,[r,o])=>r.evaluate(i)%o.evaluate(i)],ln2:[Be,[],()=>Math.LN2],pi:[Be,[],()=>Math.PI],e:[Be,[],()=>Math.E],"^":[Be,[Be,Be],(i,[r,o])=>Math.pow(r.evaluate(i),o.evaluate(i))],sqrt:[Be,[Be],(i,[r])=>Math.sqrt(r.evaluate(i))],log10:[Be,[Be],(i,[r])=>Math.log(r.evaluate(i))/Math.LN10],ln:[Be,[Be],(i,[r])=>Math.log(r.evaluate(i))],log2:[Be,[Be],(i,[r])=>Math.log(r.evaluate(i))/Math.LN2],sin:[Be,[Be],(i,[r])=>Math.sin(r.evaluate(i))],cos:[Be,[Be],(i,[r])=>Math.cos(r.evaluate(i))],tan:[Be,[Be],(i,[r])=>Math.tan(r.evaluate(i))],asin:[Be,[Be],(i,[r])=>Math.asin(r.evaluate(i))],acos:[Be,[Be],(i,[r])=>Math.acos(r.evaluate(i))],atan:[Be,[Be],(i,[r])=>Math.atan(r.evaluate(i))],min:[Be,xs(Be),(i,r)=>Math.min(...r.map(o=>o.evaluate(i)))],max:[Be,xs(Be),(i,r)=>Math.max(...r.map(o=>o.evaluate(i)))],abs:[Be,[Be],(i,[r])=>Math.abs(r.evaluate(i))],round:[Be,[Be],(i,[r])=>{const o=r.evaluate(i);return o<0?-Math.round(-o):Math.round(o)}],floor:[Be,[Be],(i,[r])=>Math.floor(r.evaluate(i))],ceil:[Be,[Be],(i,[r])=>Math.ceil(r.evaluate(i))],"filter-==":[ht,[St,xt],(i,[r,o])=>i.properties()[r.value]===o.value],"filter-id-==":[ht,[xt],(i,[r])=>i.id()===r.value],"filter-type-==":[ht,[St],(i,[r])=>i.geometryType()===r.value],"filter-<":[ht,[St,xt],(i,[r,o])=>{const l=i.properties()[r.value],p=o.value;return typeof l==typeof p&&l{const o=i.id(),l=r.value;return typeof o==typeof l&&o":[ht,[St,xt],(i,[r,o])=>{const l=i.properties()[r.value],p=o.value;return typeof l==typeof p&&l>p}],"filter-id->":[ht,[xt],(i,[r])=>{const o=i.id(),l=r.value;return typeof o==typeof l&&o>l}],"filter-<=":[ht,[St,xt],(i,[r,o])=>{const l=i.properties()[r.value],p=o.value;return typeof l==typeof p&&l<=p}],"filter-id-<=":[ht,[xt],(i,[r])=>{const o=i.id(),l=r.value;return typeof o==typeof l&&o<=l}],"filter->=":[ht,[St,xt],(i,[r,o])=>{const l=i.properties()[r.value],p=o.value;return typeof l==typeof p&&l>=p}],"filter-id->=":[ht,[xt],(i,[r])=>{const o=i.id(),l=r.value;return typeof o==typeof l&&o>=l}],"filter-has":[ht,[xt],(i,[r])=>r.value in i.properties()],"filter-has-id":[ht,[],i=>i.id()!==null&&i.id()!==void 0],"filter-type-in":[ht,[D(St)],(i,[r])=>r.value.indexOf(i.geometryType())>=0],"filter-id-in":[ht,[D(xt)],(i,[r])=>r.value.indexOf(i.id())>=0],"filter-in-small":[ht,[St,D(xt)],(i,[r,o])=>o.value.indexOf(i.properties()[r.value])>=0],"filter-in-large":[ht,[St,D(xt)],(i,[r,o])=>function(l,p,y,_){for(;y<=_;){const b=y+_>>1;if(p[b]===l)return!0;p[b]>l?_=b-1:y=b+1}return!1}(i.properties()[r.value],o.value,0,o.value.length-1)],all:{type:ht,overloads:[[[ht,ht],(i,[r,o])=>r.evaluate(i)&&o.evaluate(i)],[xs(ht),(i,r)=>{for(const o of r)if(!o.evaluate(i))return!1;return!0}]]},any:{type:ht,overloads:[[[ht,ht],(i,[r,o])=>r.evaluate(i)||o.evaluate(i)],[xs(ht),(i,r)=>{for(const o of r)if(o.evaluate(i))return!0;return!1}]]},"!":[ht,[ht],(i,[r])=>!r.evaluate(i)],"is-supported-script":[ht,[St],(i,[r])=>{const o=i.globals&&i.globals.isSupportedScript;return!o||o(r.evaluate(i))}],upcase:[St,[St],(i,[r])=>r.evaluate(i).toUpperCase()],downcase:[St,[St],(i,[r])=>r.evaluate(i).toLowerCase()],concat:[St,xs(xt),(i,r)=>r.map(o=>Za(o.evaluate(i))).join("")],"resolved-locale":[St,[ro],(i,[r])=>r.evaluate(i).resolvedLocale()]});class Ql{constructor(r,o){var l;this.expression=r,this._warningHistory={},this._evaluator=new Ol,this._defaultValue=o?(l=o).type==="color"&&Yl(l.default)?new Ht(0,0,0,0):l.type==="color"?Ht.parse(l.default)||null:l.type==="padding"?Xn.parse(l.default)||null:l.type==="variableAnchorOffsetCollection"?ci.parse(l.default)||null:l.default===void 0?null:l.default:null,this._enumValues=o&&o.type==="enum"?o.values:null}evaluateWithoutErrorHandling(r,o,l,p,y,_){return this._evaluator.globals=r,this._evaluator.feature=o,this._evaluator.featureState=l,this._evaluator.canonical=p,this._evaluator.availableImages=y||null,this._evaluator.formattedSection=_,this.expression.evaluate(this._evaluator)}evaluate(r,o,l,p,y,_){this._evaluator.globals=r,this._evaluator.feature=o||null,this._evaluator.featureState=l||null,this._evaluator.canonical=p,this._evaluator.availableImages=y||null,this._evaluator.formattedSection=_||null;try{const b=this.expression.evaluate(this._evaluator);if(b==null||typeof b=="number"&&b!=b)return this._defaultValue;if(this._enumValues&&!(b in this._enumValues))throw new Er(`Expected value to be one of ${Object.keys(this._enumValues).map(S=>JSON.stringify(S)).join(", ")}, but found ${JSON.stringify(b)} instead.`);return b}catch(b){return this._warningHistory[b.message]||(this._warningHistory[b.message]=!0,typeof console<"u"&&console.warn(b.message)),this._defaultValue}}}function ec(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Ws}function Qs(i,r){const o=new ps(Ws,Ja,[],r?function(p){const y={color:Ln,string:St,number:Be,enum:St,boolean:ht,formatted:Eo,padding:Vo,resolvedImage:no,variableAnchorOffsetCollection:Y};return p.type==="array"?D(y[p.value]||xt,p.length):y[p.type]}(r):void 0),l=o.parse(i,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return l?Xl(new Ql(l,r)):Xs(o.errors)}class ea{constructor(r,o){this.kind=r,this._styleExpression=o,this.isStateDependent=r!=="constant"&&!Ks(o.expression)}evaluateWithoutErrorHandling(r,o,l,p,y,_){return this._styleExpression.evaluateWithoutErrorHandling(r,o,l,p,y,_)}evaluate(r,o,l,p,y,_){return this._styleExpression.evaluate(r,o,l,p,y,_)}}class ta{constructor(r,o,l,p){this.kind=r,this.zoomStops=l,this._styleExpression=o,this.isStateDependent=r!=="camera"&&!Ks(o.expression),this.interpolationType=p}evaluateWithoutErrorHandling(r,o,l,p,y,_){return this._styleExpression.evaluateWithoutErrorHandling(r,o,l,p,y,_)}evaluate(r,o,l,p,y,_){return this._styleExpression.evaluate(r,o,l,p,y,_)}interpolationFactor(r,o,l){return this.interpolationType?Dn.interpolationFactor(this.interpolationType,r,o,l):0}}function Zu(i,r){const o=Qs(i,r);if(o.result==="error")return o;const l=o.value.expression,p=Qa(l);if(!p&&!Ys(r))return Xs([new Wr("","data expressions not supported")]);const y=el(l,["zoom"]);if(!y&&!tp(r))return Xs([new Wr("","zoom expressions not supported")]);const _=tl(l);return _||y?_ instanceof Wr?Xs([_]):_ instanceof Dn&&!qu(r)?Xs([new Wr("",'"interpolate" expressions cannot be used with this property')]):Xl(_?new ta(p?"camera":"composite",o.value,_.labels,_ instanceof Dn?_.interpolation:void 0):new ea(p?"constant":"source",o.value)):Xs([new Wr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class ra{constructor(r,o){this._parameters=r,this._specification=o,yt(this,rp(this._parameters,this._specification))}static deserialize(r){return new ra(r._parameters,r._specification)}static serialize(r){return{_parameters:r._parameters,_specification:r._specification}}}function tl(i){let r=null;if(i instanceof qo)r=tl(i.result);else if(i instanceof jl){for(const o of i.args)if(r=tl(o),r)break}else(i instanceof Zs||i instanceof Dn)&&i.input instanceof ui&&i.input.name==="zoom"&&(r=i);return r instanceof Wr||i.eachChild(o=>{const l=tl(o);l instanceof Wr?r=l:!r&&l?r=new Wr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&l&&r!==l&&(r=new Wr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}function tc(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 r of i.slice(1))if(!tc(r)&&typeof r!="boolean")return!1;return!0;default:return!0}}const rc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Gu(i){if(i==null)return{filter:()=>!0,needGeometry:!1};tc(i)||(i=nc(i));const r=Qs(i,rc);if(r.result==="error")throw new Error(r.value.map(o=>`${o.key}: ${o.message}`).join(", "));return{filter:(o,l,p)=>r.value.evaluate(o,l,{},p),needGeometry:sp(i)}}function _g(i,r){return ir?1:0}function sp(i){if(!Array.isArray(i))return!1;if(i[0]==="within"||i[0]==="distance")return!0;for(let r=1;r"||r==="<="||r===">="?Hu(i[1],i[2],r):r==="any"?(o=i.slice(1),["any"].concat(o.map(nc))):r==="all"?["all"].concat(i.slice(1).map(nc)):r==="none"?["all"].concat(i.slice(1).map(nc).map(cn)):r==="in"?rl(i[1],i.slice(2)):r==="!in"?cn(rl(i[1],i.slice(2))):r==="has"?nl(i[1]):r!=="!has"||cn(nl(i[1]));var o}function Hu(i,r,o){switch(i){case"$type":return[`filter-type-${o}`,r];case"$id":return[`filter-id-${o}`,r];default:return[`filter-${o}`,i,r]}}function rl(i,r){if(r.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",r]];case"$id":return["filter-id-in",["literal",r]];default:return r.length>200&&!r.some(o=>typeof o!=typeof r[0])?["filter-in-large",i,["literal",r.sort(_g)]]:["filter-in-small",i,["literal",r]]}}function nl(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function cn(i){return["!",i]}function bs(i){const r=typeof i;if(r==="number"||r==="boolean"||r==="string"||i==null)return JSON.stringify(i);if(Array.isArray(i)){let p="[";for(const y of i)p+=`${bs(y)},`;return`${p}]`}const o=Object.keys(i).sort();let l="{";for(let p=0;pl.maximum?[new Me(r,o,`${o} is greater than the maximum value ${l.maximum}`)]:[]}function ic(i){const r=i.valueSpec,o=Sr(i.value.type);let l,p,y,_={};const b=o!=="categorical"&&i.value.property===void 0,S=!b,C=Ft(i.value.stops)==="array"&&Ft(i.value.stops[0])==="array"&&Ft(i.value.stops[0][0])==="object",I=Jn({key:i.key,value:i.value,valueSpec:i.styleSpec.function,validateSpec:i.validateSpec,style:i.style,styleSpec:i.styleSpec,objectElementValidators:{stops:function(B){if(o==="identity")return[new Me(B.key,B.value,'identity function may not have a "stops" property')];let N=[];const U=B.value;return N=N.concat(il({key:B.key,value:U,valueSpec:B.valueSpec,validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec,arrayElementValidator:P})),Ft(U)==="array"&&U.length===0&&N.push(new Me(B.key,U,"array must have at least one stop")),N},default:function(B){return B.validateSpec({key:B.key,value:B.value,valueSpec:r,validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec})}}});return o==="identity"&&b&&I.push(new Me(i.key,i.value,'missing required property "property"')),o==="identity"||i.value.stops||I.push(new Me(i.key,i.value,'missing required property "stops"')),o==="exponential"&&i.valueSpec.expression&&!qu(i.valueSpec)&&I.push(new Me(i.key,i.value,"exponential functions not supported")),i.styleSpec.$version>=8&&(S&&!Ys(i.valueSpec)?I.push(new Me(i.key,i.value,"property functions not supported")):b&&!tp(i.valueSpec)&&I.push(new Me(i.key,i.value,"zoom functions not supported"))),o!=="categorical"&&!C||i.value.property!==void 0||I.push(new Me(i.key,i.value,'"property" property is required')),I;function P(B){let N=[];const U=B.value,W=B.key;if(Ft(U)!=="array")return[new Me(W,U,`array expected, ${Ft(U)} found`)];if(U.length!==2)return[new Me(W,U,`array length 2 expected, length ${U.length} found`)];if(C){if(Ft(U[0])!=="object")return[new Me(W,U,`object expected, ${Ft(U[0])} found`)];if(U[0].zoom===void 0)return[new Me(W,U,"object stop key must have zoom")];if(U[0].value===void 0)return[new Me(W,U,"object stop key must have value")];if(y&&y>Sr(U[0].zoom))return[new Me(W,U[0].zoom,"stop zoom values must appear in ascending order")];Sr(U[0].zoom)!==y&&(y=Sr(U[0].zoom),p=void 0,_={}),N=N.concat(Jn({key:`${W}[0]`,value:U[0],valueSpec:{zoom:{}},validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec,objectElementValidators:{zoom:Wu,value:z}}))}else N=N.concat(z({key:`${W}[0]`,value:U[0],valueSpec:{},validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec},U));return ec(Li(U[1]))?N.concat([new Me(`${W}[1]`,U[1],"expressions are not allowed in function stops.")]):N.concat(B.validateSpec({key:`${W}[1]`,value:U[1],valueSpec:r,validateSpec:B.validateSpec,style:B.style,styleSpec:B.styleSpec}))}function z(B,N){const U=Ft(B.value),W=Sr(B.value),J=B.value!==null?B.value:N;if(l){if(U!==l)return[new Me(B.key,J,`${U} stop domain type must match previous stop domain type ${l}`)]}else l=U;if(U!=="number"&&U!=="string"&&U!=="boolean")return[new Me(B.key,J,"stop domain value must be a number, string, or boolean")];if(U!=="number"&&o!=="categorical"){let fe=`number expected, ${U} found`;return Ys(r)&&o===void 0&&(fe+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Me(B.key,J,fe)]}return o!=="categorical"||U!=="number"||isFinite(W)&&Math.floor(W)===W?o!=="categorical"&&U==="number"&&p!==void 0&&Wnew Me(`${i.key}${l.key}`,i.value,l.message));const o=r.value.expression||r.value._styleExpression.expression;if(i.expressionContext==="property"&&i.propertyKey==="text-font"&&!o.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"&&!Ks(o))return[new Me(i.key,i.value,'"feature-state" data expressions are not supported with layout properties.')];if(i.expressionContext==="filter"&&!Ks(o))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(!el(o,["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"&&!Qa(o))return[new Me(i.key,i.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ao(i){const r=i.key,o=i.value,l=i.valueSpec,p=[];return Array.isArray(l.values)?l.values.indexOf(Sr(o))===-1&&p.push(new Me(r,o,`expected one of [${l.values.join(", ")}], ${JSON.stringify(o)} found`)):Object.keys(l.values).indexOf(Sr(o))===-1&&p.push(new Me(r,o,`expected one of [${Object.keys(l.values).join(", ")}], ${JSON.stringify(o)} found`)),p}function Ku(i){return tc(Li(i.value))?na(yt({},i,{expressionContext:"filter",valueSpec:{value:"boolean"}})):oc(i)}function oc(i){const r=i.value,o=i.key;if(Ft(r)!=="array")return[new Me(o,r,`array expected, ${Ft(r)} found`)];const l=i.styleSpec;let p,y=[];if(r.length<1)return[new Me(o,r,"filter array must have at least 1 element")];switch(y=y.concat(Ao({key:`${o}[0]`,value:r[0],valueSpec:l.filter_operator,style:i.style,styleSpec:i.styleSpec})),Sr(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&Sr(r[1])==="$type"&&y.push(new Me(o,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":r.length!==3&&y.push(new Me(o,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&(p=Ft(r[1]),p!=="string"&&y.push(new Me(`${o}[1]`,r[1],`string expected, ${p} found`)));for(let _=2;_{C in o&&r.push(new Me(l,o[C],`"${C}" is prohibited for ref layers`))}),p.layers.forEach(C=>{Sr(C.id)===b&&(S=C)}),S?S.ref?r.push(new Me(l,o.ref,"ref cannot reference another ref layer")):_=Sr(S.type):r.push(new Me(l,o.ref,`ref layer "${b}" not found`))}else if(_!=="background")if(o.source){const S=p.sources&&p.sources[o.source],C=S&&Sr(S.type);S?C==="vector"&&_==="raster"?r.push(new Me(l,o.source,`layer "${o.id}" requires a raster source`)):C!=="raster-dem"&&_==="hillshade"?r.push(new Me(l,o.source,`layer "${o.id}" requires a raster-dem source`)):C==="raster"&&_!=="raster"?r.push(new Me(l,o.source,`layer "${o.id}" requires a vector source`)):C!=="vector"||o["source-layer"]?C==="raster-dem"&&_!=="hillshade"?r.push(new Me(l,o.source,"raster-dem source can only be used with layer type 'hillshade'.")):_!=="line"||!o.paint||!o.paint["line-gradient"]||C==="geojson"&&S.lineMetrics||r.push(new Me(l,o,`layer "${o.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):r.push(new Me(l,o,`layer "${o.id}" must specify a "source-layer"`)):r.push(new Me(l,o.source,`source "${o.source}" not found`))}else r.push(new Me(l,o,'missing required property "source"'));return r=r.concat(Jn({key:l,value:o,valueSpec:y.layer,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,objectElementValidators:{"*":()=>[],type:()=>i.validateSpec({key:`${l}.type`,value:o.type,valueSpec:y.layer.type,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,object:o,objectKey:"type"}),filter:Ku,layout:S=>Jn({layer:o,key:S.key,value:S.value,style:S.style,styleSpec:S.styleSpec,validateSpec:S.validateSpec,objectElementValidators:{"*":C=>Yu(yt({layerType:_},C))}}),paint:S=>Jn({layer:o,key:S.key,value:S.value,style:S.style,styleSpec:S.styleSpec,validateSpec:S.validateSpec,objectElementValidators:{"*":C=>sc(yt({layerType:_},C))}})}})),r}function ws(i){const r=i.value,o=i.key,l=Ft(r);return l!=="string"?[new Me(o,r,`string expected, ${l} found`)]:[]}const ac={promoteId:function({key:i,value:r}){if(Ft(r)==="string")return ws({key:i,value:r});{const o=[];for(const l in r)o.push(...ws({key:`${i}.${l}`,value:r[l]}));return o}}};function ol(i){const r=i.value,o=i.key,l=i.styleSpec,p=i.style,y=i.validateSpec;if(!r.type)return[new Me(o,r,'"type" is required')];const _=Sr(r.type);let b;switch(_){case"vector":case"raster":return b=Jn({key:o,value:r,valueSpec:l[`source_${_.replace("-","_")}`],style:i.style,styleSpec:l,objectElementValidators:ac,validateSpec:y}),b;case"raster-dem":return b=function(S){var C;const I=(C=S.sourceName)!==null&&C!==void 0?C:"",P=S.value,z=S.styleSpec,B=z.source_raster_dem,N=S.style;let U=[];const W=Ft(P);if(P===void 0)return U;if(W!=="object")return U.push(new Me("source_raster_dem",P,`object expected, ${W} found`)),U;const J=Sr(P.encoding)==="custom",fe=["redFactor","greenFactor","blueFactor","baseShift"],oe=S.value.encoding?`"${S.value.encoding}"`:"Default";for(const he in P)!J&&fe.includes(he)?U.push(new Me(he,P[he],`In "${I}": "${he}" is only valid when "encoding" is set to "custom". ${oe} encoding found`)):B[he]?U=U.concat(S.validateSpec({key:he,value:P[he],valueSpec:B[he],validateSpec:S.validateSpec,style:N,styleSpec:z})):U.push(new Me(he,P[he],`unknown property "${he}"`));return U}({sourceName:o,value:r,style:i.style,styleSpec:l,validateSpec:y}),b;case"geojson":if(b=Jn({key:o,value:r,valueSpec:l.source_geojson,style:p,styleSpec:l,validateSpec:y,objectElementValidators:ac}),r.cluster)for(const S in r.clusterProperties){const[C,I]=r.clusterProperties[S],P=typeof C=="string"?[C,["accumulated"],["get",S]]:C;b.push(...na({key:`${o}.${S}.map`,value:I,validateSpec:y,expressionContext:"cluster-map"})),b.push(...na({key:`${o}.${S}.reduce`,value:P,validateSpec:y,expressionContext:"cluster-reduce"}))}return b;case"video":return Jn({key:o,value:r,valueSpec:l.source_video,style:p,validateSpec:y,styleSpec:l});case"image":return Jn({key:o,value:r,valueSpec:l.source_image,style:p,validateSpec:y,styleSpec:l});case"canvas":return[new Me(o,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ao({key:`${o}.type`,value:r.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:p,validateSpec:y,styleSpec:l})}}function Qu(i){const r=i.value,o=i.styleSpec,l=o.light,p=i.style;let y=[];const _=Ft(r);if(r===void 0)return y;if(_!=="object")return y=y.concat([new Me("light",r,`object expected, ${_} found`)]),y;for(const b in r){const S=b.match(/^(.*)-transition$/);y=y.concat(S&&l[S[1]]&&l[S[1]].transition?i.validateSpec({key:b,value:r[b],valueSpec:o.transition,validateSpec:i.validateSpec,style:p,styleSpec:o}):l[b]?i.validateSpec({key:b,value:r[b],valueSpec:l[b],validateSpec:i.validateSpec,style:p,styleSpec:o}):[new Me(b,r[b],`unknown property "${b}"`)])}return y}function eh(i){const r=i.value,o=i.styleSpec,l=o.sky,p=i.style,y=Ft(r);if(r===void 0)return[];if(y!=="object")return[new Me("sky",r,`object expected, ${y} found`)];let _=[];for(const b in r)_=_.concat(l[b]?i.validateSpec({key:b,value:r[b],valueSpec:l[b],style:p,styleSpec:o}):[new Me(b,r[b],`unknown property "${b}"`)]);return _}function th(i){const r=i.value,o=i.styleSpec,l=o.terrain,p=i.style;let y=[];const _=Ft(r);if(r===void 0)return y;if(_!=="object")return y=y.concat([new Me("terrain",r,`object expected, ${_} found`)]),y;for(const b in r)y=y.concat(l[b]?i.validateSpec({key:b,value:r[b],valueSpec:l[b],validateSpec:i.validateSpec,style:p,styleSpec:o}):[new Me(b,r[b],`unknown property "${b}"`)]);return y}function rh(i){let r=[];const o=i.value,l=i.key;if(Array.isArray(o)){const p=[],y=[];for(const _ in o)o[_].id&&p.includes(o[_].id)&&r.push(new Me(l,o,`all the sprites' ids must be unique, but ${o[_].id} is duplicated`)),p.push(o[_].id),o[_].url&&y.includes(o[_].url)&&r.push(new Me(l,o,`all the sprites' URLs must be unique, but ${o[_].url} is duplicated`)),y.push(o[_].url),r=r.concat(Jn({key:`${l}[${_}]`,value:o[_],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:i.validateSpec}));return r}return ws({key:l,value:o})}const lc={"*":()=>[],array:il,boolean:function(i){const r=i.value,o=i.key,l=Ft(r);return l!=="boolean"?[new Me(o,r,`boolean expected, ${l} found`)]:[]},number:Wu,color:function(i){const r=i.key,o=i.value,l=Ft(o);return l!=="string"?[new Me(r,o,`color expected, ${l} found`)]:Ht.parse(String(o))?[]:[new Me(r,o,`color expected, "${o}" found`)]},constants:lp,enum:Ao,filter:Ku,function:ic,layer:Ju,object:Jn,source:ol,light:Qu,sky:eh,terrain:th,projection:function(i){const r=i.value,o=i.styleSpec,l=o.projection,p=i.style,y=Ft(r);if(r===void 0)return[];if(y!=="object")return[new Me("projection",r,`object expected, ${y} found`)];let _=[];for(const b in r)_=_.concat(l[b]?i.validateSpec({key:b,value:r[b],valueSpec:l[b],style:p,styleSpec:o}):[new Me(b,r[b],`unknown property "${b}"`)]);return _},string:ws,formatted:function(i){return ws(i).length===0?[]:na(i)},resolvedImage:function(i){return ws(i).length===0?[]:na(i)},padding:function(i){const r=i.key,o=i.value;if(Ft(o)==="array"){if(o.length<1||o.length>4)return[new Me(r,o,`padding requires 1 to 4 values; ${o.length} values found`)];const l={type:"number"};let p=[];for(let y=0;y[]}})),i.constants&&(o=o.concat(lp({key:"constants",value:i.constants,style:i,styleSpec:r,validateSpec:ia}))),nh(o)}function oo(i){return function(r){return i({...r,validateSpec:ia})}}function nh(i){return[].concat(i).sort((r,o)=>r.line-o.line)}function Ri(i){return function(...r){return nh(i.apply(this,r))}}hi.source=Ri(oo(ol)),hi.sprite=Ri(oo(rh)),hi.glyphs=Ri(oo(cp)),hi.light=Ri(oo(Qu)),hi.sky=Ri(oo(eh)),hi.terrain=Ri(oo(th)),hi.layer=Ri(oo(Ju)),hi.filter=Ri(oo(Ku)),hi.paintProperty=Ri(oo(sc)),hi.layoutProperty=Ri(oo(Yu));const Ss=hi,vg=Ss.light,xg=Ss.sky,up=Ss.paintProperty,hp=Ss.layoutProperty;function ih(i,r){let o=!1;if(r&&r.length)for(const l of r)i.fire(new eo(new Error(l.message))),o=!0;return o}class oa{constructor(r,o,l){const p=this.cells=[];if(r instanceof ArrayBuffer){this.arrayBuffer=r;const _=new Int32Array(this.arrayBuffer);r=_[0],this.d=(o=_[1])+2*(l=_[2]);for(let S=0;S=P[N+0]&&p>=P[N+1])?(b[B]=!0,_.push(I[B])):b[B]=!1}}}}_forEachCell(r,o,l,p,y,_,b,S){const C=this._convertToCellCoord(r),I=this._convertToCellCoord(o),P=this._convertToCellCoord(l),z=this._convertToCellCoord(p);for(let B=C;B<=P;B++)for(let N=I;N<=z;N++){const U=this.d*N+B;if((!S||S(this._convertFromCellCoord(B),this._convertFromCellCoord(N),this._convertFromCellCoord(B+1),this._convertFromCellCoord(N+1)))&&y.call(this,r,o,l,p,U,_,b,S))return}}_convertFromCellCoord(r){return(r-this.padding)/this.scale}_convertToCellCoord(r){return Math.max(0,Math.min(this.d-1,Math.floor(r*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const r=this.cells,o=3+this.cells.length+1+1;let l=0;for(let _=0;_=0)continue;const _=i[y];p[y]=di[o].shallow.indexOf(y)>=0?_:sa(_,r)}i instanceof Error&&(p.message=i.message)}if(p.$name)throw new Error("$name property is reserved for worker serialization logic.");return o!=="Object"&&(p.$name=o),p}function aa(i){if(dp(i))return i;if(Array.isArray(i))return i.map(aa);if(typeof i!="object")throw new Error("can't deserialize object of type "+typeof i);const r=oh(i)||"Object";if(!di[r])throw new Error(`can't deserialize unregistered class ${r}`);const{klass:o}=di[r];if(!o)throw new Error(`can't deserialize unregistered class ${r}`);if(o.deserialize)return o.deserialize(i);const l=Object.create(o.prototype);for(const p of Object.keys(i)){if(p==="$name")continue;const y=i[p];l[p]=di[r].shallow.indexOf(p)>=0?y:aa(y)}return l}class sh{constructor(){this.first=!0}update(r,o){const l=Math.floor(r);return this.first?(this.first=!1,this.lastIntegerZoom=l,this.lastIntegerZoomTime=0,this.lastZoom=r,this.lastFloorZoom=l,!0):(this.lastFloorZoom>l?(this.lastIntegerZoom=l+1,this.lastIntegerZoomTime=o):this.lastFloorZoomi>=128&&i<=255,"Hangul Jamo":i=>i>=4352&&i<=4607,Khmer:i=>i>=6016&&i<=6143,"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,"Ideographic Description Characters":i=>i>=12272&&i<=12287,"CJK Symbols and Punctuation":i=>i>=12288&&i<=12351,Katakana:i=>i>=12448&&i<=12543,Kanbun:i=>i>=12688&&i<=12703,"CJK Strokes":i=>i>=12736&&i<=12783,"Enclosed CJK Letters and Months":i=>i>=12800&&i<=13055,"CJK Compatibility":i=>i>=13056&&i<=13311,"Yijing Hexagram Symbols":i=>i>=19904&&i<=19967,"Private Use Area":i=>i>=57344&&i<=63743,"Vertical Forms":i=>i>=65040&&i<=65055,"CJK Compatibility Forms":i=>i>=65072&&i<=65103,"Small Form Variants":i=>i>=65104&&i<=65135,"Halfwidth and Fullwidth Forms":i=>i>=65280&&i<=65519};function ah(i){for(const r of i)if(ch(r.charCodeAt(0)))return!0;return!1}function bg(i){for(const r of i)if(!la(r.charCodeAt(0)))return!1;return!0}function lh(i){const r=i.map(o=>{try{return new RegExp(`\\p{sc=${o}}`,"u").source}catch{return null}}).filter(o=>o);return new RegExp(r.join("|"),"u")}const wg=lh(["Arab","Dupl","Mong","Ougr","Syrc"]);function la(i){return!wg.test(String.fromCodePoint(i))}const pp=lh(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ch(i){return!(i!==746&&i!==747&&(i<4352||!(At["CJK Compatibility Forms"](i)&&!(i>=65097&&i<=65103)||At["CJK Compatibility"](i)||At["CJK Strokes"](i)||!(!At["CJK Symbols and Punctuation"](i)||i>=12296&&i<=12305||i>=12308&&i<=12319||i===12336)||At["Enclosed CJK Letters and Months"](i)||At["Ideographic Description Characters"](i)||At.Kanbun(i)||At.Katakana(i)&&i!==12540||!(!At["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)||!(!At["Small Form Variants"](i)||i>=65112&&i<=65118||i>=65123&&i<=65126)||At["Vertical Forms"](i)||At["Yijing Hexagram Symbols"](i)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(i))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(i))||pp.test(String.fromCodePoint(i)))))}function fp(i){return!(ch(i)||function(r){return!!(At["Latin-1 Supplement"](r)&&(r===167||r===169||r===174||r===177||r===188||r===189||r===190||r===215||r===247)||At["General Punctuation"](r)&&(r===8214||r===8224||r===8225||r===8240||r===8241||r===8251||r===8252||r===8258||r===8263||r===8264||r===8265||r===8273)||At["Letterlike Symbols"](r)||At["Number Forms"](r)||At["Miscellaneous Technical"](r)&&(r>=8960&&r<=8967||r>=8972&&r<=8991||r>=8996&&r<=9e3||r===9003||r>=9085&&r<=9114||r>=9150&&r<=9165||r===9167||r>=9169&&r<=9179||r>=9186&&r<=9215)||At["Control Pictures"](r)&&r!==9251||At["Optical Character Recognition"](r)||At["Enclosed Alphanumerics"](r)||At["Geometric Shapes"](r)||At["Miscellaneous Symbols"](r)&&!(r>=9754&&r<=9759)||At["Miscellaneous Symbols and Arrows"](r)&&(r>=11026&&r<=11055||r>=11088&&r<=11097||r>=11192&&r<=11243)||At["CJK Symbols and Punctuation"](r)||At.Katakana(r)||At["Private Use Area"](r)||At["CJK Compatibility Forms"](r)||At["Small Form Variants"](r)||At["Halfwidth and Fullwidth Forms"](r)||r===8734||r===8756||r===8757||r>=9984&&r<=10087||r>=10102&&r<=10131||r===65532||r===65533)}(i))}const Sg=lh(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function uh(i){return Sg.test(String.fromCodePoint(i))}function Tg(i,r){return!(!r&&uh(i)||i>=2304&&i<=3583||i>=3840&&i<=4255||At.Khmer(i))}function kg(i){for(const r of i)if(uh(r.charCodeAt(0)))return!0;return!1}const Qn=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(i){this.pluginStatus=i.pluginStatus,this.pluginURL=i.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(i){this.applyArabicShaping=i.applyArabicShaping,this.processBidirectionalText=i.processBidirectionalText,this.processStyledBidirectionalText=i.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class ar{constructor(r,o){this.zoom=r,o?(this.now=o.now,this.fadeDuration=o.fadeDuration,this.zoomHistory=o.zoomHistory,this.transition=o.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new sh,this.transition={})}isSupportedScript(r){return function(o,l){for(const p of o)if(!Tg(p.charCodeAt(0),l))return!1;return!0}(r,Qn.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const r=this.zoom,o=r-Math.floor(r),l=this.crossFadingFactor();return r>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:o+(1-o)*l}:{fromScale:.5,toScale:1,t:1-(1-l)*o}}}class ca{constructor(r,o){this.property=r,this.value=o,this.expression=function(l,p){if(Yl(l))return new ra(l,p);if(ec(l)){const y=Zu(l,p);if(y.result==="error")throw new Error(y.value.map(_=>`${_.key}: ${_.message}`).join(", "));return y.value}{let y=l;return p.type==="color"&&typeof l=="string"?y=Ht.parse(l):p.type!=="padding"||typeof l!="number"&&!Array.isArray(l)?p.type==="variableAnchorOffsetCollection"&&Array.isArray(l)&&(y=ci.parse(l)):y=Xn.parse(l),{kind:"constant",evaluate:()=>y}}}(o===void 0?r.specification.default:o,r.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(r,o,l){return this.property.possiblyEvaluate(this,r,o,l)}}class uc{constructor(r){this.property=r,this.value=new ca(r,void 0)}transitioned(r,o){return new mp(this.property,this.value,o,Ie({},r.transition,this.transition),r.now)}untransitioned(){return new mp(this.property,this.value,null,{},0)}}class hc{constructor(r){this._properties=r,this._values=Object.create(r.defaultTransitionablePropertyValues)}getValue(r){return ot(this._values[r].value.value)}setValue(r,o){Object.prototype.hasOwnProperty.call(this._values,r)||(this._values[r]=new uc(this._values[r].property)),this._values[r].value=new ca(this._values[r].property,o===null?void 0:ot(o))}getTransition(r){return ot(this._values[r].transition)}setTransition(r,o){Object.prototype.hasOwnProperty.call(this._values,r)||(this._values[r]=new uc(this._values[r].property)),this._values[r].transition=ot(o)||void 0}serialize(){const r={};for(const o of Object.keys(this._values)){const l=this.getValue(o);l!==void 0&&(r[o]=l);const p=this.getTransition(o);p!==void 0&&(r[`${o}-transition`]=p)}return r}transitioned(r,o){const l=new sl(this._properties);for(const p of Object.keys(this._values))l._values[p]=this._values[p].transitioned(r,o._values[p]);return l}untransitioned(){const r=new sl(this._properties);for(const o of Object.keys(this._values))r._values[o]=this._values[o].untransitioned();return r}}class mp{constructor(r,o,l,p,y){this.property=r,this.value=o,this.begin=y+p.delay||0,this.end=this.begin+p.duration||0,r.specification.transition&&(p.delay||p.duration)&&(this.prior=l)}possiblyEvaluate(r,o,l){const p=r.now||0,y=this.value.possiblyEvaluate(r,o,l),_=this.prior;if(_){if(p>this.end)return this.prior=null,y;if(this.value.isDataDriven())return this.prior=null,y;if(p=1)return 1;const C=S*S,I=C*S;return 4*(S<.5?I:3*(S-C)+I-.75)}(b))}}return y}}class sl{constructor(r){this._properties=r,this._values=Object.create(r.defaultTransitioningPropertyValues)}possiblyEvaluate(r,o,l){const p=new ll(this._properties);for(const y of Object.keys(this._values))p._values[y]=this._values[y].possiblyEvaluate(r,o,l);return p}hasTransition(){for(const r of Object.keys(this._values))if(this._values[r].prior)return!0;return!1}}class al{constructor(r){this._properties=r,this._values=Object.create(r.defaultPropertyValues)}hasValue(r){return this._values[r].value!==void 0}getValue(r){return ot(this._values[r].value)}setValue(r,o){this._values[r]=new ca(this._values[r].property,o===null?void 0:ot(o))}serialize(){const r={};for(const o of Object.keys(this._values)){const l=this.getValue(o);l!==void 0&&(r[o]=l)}return r}possiblyEvaluate(r,o,l){const p=new ll(this._properties);for(const y of Object.keys(this._values))p._values[y]=this._values[y].possiblyEvaluate(r,o,l);return p}}class so{constructor(r,o,l){this.property=r,this.value=o,this.parameters=l}isConstant(){return this.value.kind==="constant"}constantOr(r){return this.value.kind==="constant"?this.value.value:r}evaluate(r,o,l,p){return this.property.evaluate(this.value,this.parameters,r,o,l,p)}}class ll{constructor(r){this._properties=r,this._values=Object.create(r.defaultPossiblyEvaluatedValues)}get(r){return this._values[r]}}class Ye{constructor(r){this.specification=r}possiblyEvaluate(r,o){if(r.isDataDriven())throw new Error("Value should not be data driven");return r.expression.evaluate(o)}interpolate(r,o,l){const p=Rn[this.specification.type];return p?p(r,o,l):r}}class ct{constructor(r,o){this.specification=r,this.overrides=o}possiblyEvaluate(r,o,l,p){return new so(this,r.expression.kind==="constant"||r.expression.kind==="camera"?{kind:"constant",value:r.expression.evaluate(o,null,{},l,p)}:r.expression,o)}interpolate(r,o,l){if(r.value.kind!=="constant"||o.value.kind!=="constant")return r;if(r.value.value===void 0||o.value.value===void 0)return new so(this,{kind:"constant",value:void 0},r.parameters);const p=Rn[this.specification.type];if(p){const y=p(r.value.value,o.value.value,l);return new so(this,{kind:"constant",value:y},r.parameters)}return r}evaluate(r,o,l,p,y,_){return r.kind==="constant"?r.value:r.evaluate(o,l,p,y,_)}}class dc extends ct{possiblyEvaluate(r,o,l,p){if(r.value===void 0)return new so(this,{kind:"constant",value:void 0},o);if(r.expression.kind==="constant"){const y=r.expression.evaluate(o,null,{},l,p),_=r.property.specification.type==="resolvedImage"&&typeof y!="string"?y.name:y,b=this._calculate(_,_,_,o);return new so(this,{kind:"constant",value:b},o)}if(r.expression.kind==="camera"){const y=this._calculate(r.expression.evaluate({zoom:o.zoom-1}),r.expression.evaluate({zoom:o.zoom}),r.expression.evaluate({zoom:o.zoom+1}),o);return new so(this,{kind:"constant",value:y},o)}return new so(this,r.expression,o)}evaluate(r,o,l,p,y,_){if(r.kind==="source"){const b=r.evaluate(o,l,p,y,_);return this._calculate(b,b,b,o)}return r.kind==="composite"?this._calculate(r.evaluate({zoom:Math.floor(o.zoom)-1},l,p),r.evaluate({zoom:Math.floor(o.zoom)},l,p),r.evaluate({zoom:Math.floor(o.zoom)+1},l,p),o):r.value}_calculate(r,o,l,p){return p.zoom>p.zoomHistory.lastIntegerZoom?{from:r,to:o}:{from:l,to:o}}interpolate(r){return r}}class pc{constructor(r){this.specification=r}possiblyEvaluate(r,o,l,p){if(r.value!==void 0){if(r.expression.kind==="constant"){const y=r.expression.evaluate(o,null,{},l,p);return this._calculate(y,y,y,o)}return this._calculate(r.expression.evaluate(new ar(Math.floor(o.zoom-1),o)),r.expression.evaluate(new ar(Math.floor(o.zoom),o)),r.expression.evaluate(new ar(Math.floor(o.zoom+1),o)),o)}}_calculate(r,o,l,p){return p.zoom>p.zoomHistory.lastIntegerZoom?{from:r,to:o}:{from:l,to:o}}interpolate(r){return r}}class hh{constructor(r){this.specification=r}possiblyEvaluate(r,o,l,p){return!!r.expression.evaluate(o,null,{},l,p)}interpolate(){return!1}}class m{constructor(r){this.properties=r,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const o in r){const l=r[o];l.specification.overridable&&this.overridableProperties.push(o);const p=this.defaultPropertyValues[o]=new ca(l,void 0),y=this.defaultTransitionablePropertyValues[o]=new uc(l);this.defaultTransitioningPropertyValues[o]=y.untransitioned(),this.defaultPossiblyEvaluatedValues[o]=p.possiblyEvaluate({})}}}Ke("DataDrivenProperty",ct),Ke("DataConstantProperty",Ye),Ke("CrossFadedDataDrivenProperty",dc),Ke("CrossFadedProperty",pc),Ke("ColorRampProperty",hh);const t="-transition";class s extends Uo{constructor(r,o){if(super(),this.id=r.id,this.type=r.type,this._featureFilter={filter:()=>!0,needGeometry:!1},r.type!=="custom"&&(this.metadata=r.metadata,this.minzoom=r.minzoom,this.maxzoom=r.maxzoom,r.type!=="background"&&(this.source=r.source,this.sourceLayer=r["source-layer"],this.filter=r.filter),o.layout&&(this._unevaluatedLayout=new al(o.layout)),o.paint)){this._transitionablePaint=new hc(o.paint);for(const l in r.paint)this.setPaintProperty(l,r.paint[l],{validate:!1});for(const l in r.layout)this.setLayoutProperty(l,r.layout[l],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ll(o.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(r){return r==="visibility"?this.visibility:this._unevaluatedLayout.getValue(r)}setLayoutProperty(r,o,l={}){o!=null&&this._validate(hp,`layers.${this.id}.layout.${r}`,r,o,l)||(r!=="visibility"?this._unevaluatedLayout.setValue(r,o):this.visibility=o)}getPaintProperty(r){return r.endsWith(t)?this._transitionablePaint.getTransition(r.slice(0,-11)):this._transitionablePaint.getValue(r)}setPaintProperty(r,o,l={}){if(o!=null&&this._validate(up,`layers.${this.id}.paint.${r}`,r,o,l))return!1;if(r.endsWith(t))return this._transitionablePaint.setTransition(r.slice(0,-11),o||void 0),!1;{const p=this._transitionablePaint._values[r],y=p.property.specification["property-type"]==="cross-faded-data-driven",_=p.value.isDataDriven(),b=p.value;this._transitionablePaint.setValue(r,o),this._handleSpecialPaintPropertyUpdate(r);const S=this._transitionablePaint._values[r].value;return S.isDataDriven()||_||y||this._handleOverridablePaintPropertyUpdate(r,b,S)}}_handleSpecialPaintPropertyUpdate(r){}_handleOverridablePaintPropertyUpdate(r,o,l){return!1}isHidden(r){return!!(this.minzoom&&r=this.maxzoom)||this.visibility==="none"}updateTransitions(r){this._transitioningPaint=this._transitionablePaint.transitioned(r,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(r,o){r.getCrossfadeParameters&&(this._crossfadeParameters=r.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(r,void 0,o)),this.paint=this._transitioningPaint.possiblyEvaluate(r,void 0,o)}serialize(){const r={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&&(r.layout=r.layout||{},r.layout.visibility=this.visibility),it(r,(o,l)=>!(o===void 0||l==="layout"&&!Object.keys(o).length||l==="paint"&&!Object.keys(o).length))}_validate(r,o,l,p,y={}){return(!y||y.validate!==!1)&&ih(this,r.call(Ss,{key:o,layerType:this.type,objectKey:l,value:p,styleSpec:ve,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const r in this.paint._values){const o=this.paint.get(r);if(o instanceof so&&Ys(o.property.specification)&&(o.value.kind==="source"||o.value.kind==="composite")&&o.value.isStateDependent)return!0}return!1}}const u={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class h{constructor(r,o){this._structArray=r,this._pos1=o*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class f{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(r,o){return r._trim(),o&&(r.isTransferred=!0,o.push(r.arrayBuffer)),{length:r.length,arrayBuffer:r.arrayBuffer}}static deserialize(r){const o=Object.create(this.prototype);return o.arrayBuffer=r.arrayBuffer,o.length=r.length,o.capacity=r.arrayBuffer.byteLength/o.bytesPerElement,o._refreshViews(),o}_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(r){this.reserve(r),this.length=r}reserve(r){if(r>this.capacity){this.capacity=Math.max(r,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const o=this.uint8;this._refreshViews(),o&&this.uint8.set(o)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function w(i,r=1){let o=0,l=0;return{members:i.map(p=>{const y=u[p.type].BYTES_PER_ELEMENT,_=o=T(o,Math.max(r,y)),b=p.components||1;return l=Math.max(l,y),o+=y*b,{name:p.name,type:p.type,components:b,offset:_}}),size:T(o,Math.max(l,r)),alignment:r}}function T(i,r){return Math.ceil(i/r)*r}class k extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,o){const l=this.length;return this.resize(l+1),this.emplace(l,r,o)}emplace(r,o,l){const p=2*r;return this.int16[p+0]=o,this.int16[p+1]=l,r}}k.prototype.bytesPerElement=4,Ke("StructArrayLayout2i4",k);class E extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,o,l){const p=this.length;return this.resize(p+1),this.emplace(p,r,o,l)}emplace(r,o,l,p){const y=3*r;return this.int16[y+0]=o,this.int16[y+1]=l,this.int16[y+2]=p,r}}E.prototype.bytesPerElement=6,Ke("StructArrayLayout3i6",E);class A extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,o,l,p){const y=this.length;return this.resize(y+1),this.emplace(y,r,o,l,p)}emplace(r,o,l,p,y){const _=4*r;return this.int16[_+0]=o,this.int16[_+1]=l,this.int16[_+2]=p,this.int16[_+3]=y,r}}A.prototype.bytesPerElement=8,Ke("StructArrayLayout4i8",A);class M extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,o,l,p,y,_){const b=this.length;return this.resize(b+1),this.emplace(b,r,o,l,p,y,_)}emplace(r,o,l,p,y,_,b){const S=6*r;return this.int16[S+0]=o,this.int16[S+1]=l,this.int16[S+2]=p,this.int16[S+3]=y,this.int16[S+4]=_,this.int16[S+5]=b,r}}M.prototype.bytesPerElement=12,Ke("StructArrayLayout2i4i12",M);class F extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,o,l,p,y,_){const b=this.length;return this.resize(b+1),this.emplace(b,r,o,l,p,y,_)}emplace(r,o,l,p,y,_,b){const S=4*r,C=8*r;return this.int16[S+0]=o,this.int16[S+1]=l,this.uint8[C+4]=p,this.uint8[C+5]=y,this.uint8[C+6]=_,this.uint8[C+7]=b,r}}F.prototype.bytesPerElement=8,Ke("StructArrayLayout2i4ub8",F);class j extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r,o){const l=this.length;return this.resize(l+1),this.emplace(l,r,o)}emplace(r,o,l){const p=2*r;return this.float32[p+0]=o,this.float32[p+1]=l,r}}j.prototype.bytesPerElement=8,Ke("StructArrayLayout2f8",j);class Z extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,o,l,p,y,_,b,S,C,I){const P=this.length;return this.resize(P+1),this.emplace(P,r,o,l,p,y,_,b,S,C,I)}emplace(r,o,l,p,y,_,b,S,C,I,P){const z=10*r;return this.uint16[z+0]=o,this.uint16[z+1]=l,this.uint16[z+2]=p,this.uint16[z+3]=y,this.uint16[z+4]=_,this.uint16[z+5]=b,this.uint16[z+6]=S,this.uint16[z+7]=C,this.uint16[z+8]=I,this.uint16[z+9]=P,r}}Z.prototype.bytesPerElement=20,Ke("StructArrayLayout10ui20",Z);class X extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,o,l,p,y,_,b,S,C,I,P,z){const B=this.length;return this.resize(B+1),this.emplace(B,r,o,l,p,y,_,b,S,C,I,P,z)}emplace(r,o,l,p,y,_,b,S,C,I,P,z,B){const N=12*r;return this.int16[N+0]=o,this.int16[N+1]=l,this.int16[N+2]=p,this.int16[N+3]=y,this.uint16[N+4]=_,this.uint16[N+5]=b,this.uint16[N+6]=S,this.uint16[N+7]=C,this.int16[N+8]=I,this.int16[N+9]=P,this.int16[N+10]=z,this.int16[N+11]=B,r}}X.prototype.bytesPerElement=24,Ke("StructArrayLayout4i4ui4i24",X);class Q extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r,o,l){const p=this.length;return this.resize(p+1),this.emplace(p,r,o,l)}emplace(r,o,l,p){const y=3*r;return this.float32[y+0]=o,this.float32[y+1]=l,this.float32[y+2]=p,r}}Q.prototype.bytesPerElement=12,Ke("StructArrayLayout3f12",Q);class te extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(r){const o=this.length;return this.resize(o+1),this.emplace(o,r)}emplace(r,o){return this.uint32[1*r+0]=o,r}}te.prototype.bytesPerElement=4,Ke("StructArrayLayout1ul4",te);class ie extends f{_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(r,o,l,p,y,_,b,S,C){const I=this.length;return this.resize(I+1),this.emplace(I,r,o,l,p,y,_,b,S,C)}emplace(r,o,l,p,y,_,b,S,C,I){const P=10*r,z=5*r;return this.int16[P+0]=o,this.int16[P+1]=l,this.int16[P+2]=p,this.int16[P+3]=y,this.int16[P+4]=_,this.int16[P+5]=b,this.uint32[z+3]=S,this.uint16[P+8]=C,this.uint16[P+9]=I,r}}ie.prototype.bytesPerElement=20,Ke("StructArrayLayout6i1ul2ui20",ie);class H extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,o,l,p,y,_){const b=this.length;return this.resize(b+1),this.emplace(b,r,o,l,p,y,_)}emplace(r,o,l,p,y,_,b){const S=6*r;return this.int16[S+0]=o,this.int16[S+1]=l,this.int16[S+2]=p,this.int16[S+3]=y,this.int16[S+4]=_,this.int16[S+5]=b,r}}H.prototype.bytesPerElement=12,Ke("StructArrayLayout2i2i2i12",H);class le extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,o,l,p,y){const _=this.length;return this.resize(_+1),this.emplace(_,r,o,l,p,y)}emplace(r,o,l,p,y,_){const b=4*r,S=8*r;return this.float32[b+0]=o,this.float32[b+1]=l,this.float32[b+2]=p,this.int16[S+6]=y,this.int16[S+7]=_,r}}le.prototype.bytesPerElement=16,Ke("StructArrayLayout2f1f2i16",le);class ue extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,o,l,p,y,_){const b=this.length;return this.resize(b+1),this.emplace(b,r,o,l,p,y,_)}emplace(r,o,l,p,y,_,b){const S=16*r,C=4*r,I=8*r;return this.uint8[S+0]=o,this.uint8[S+1]=l,this.float32[C+1]=p,this.float32[C+2]=y,this.int16[I+6]=_,this.int16[I+7]=b,r}}ue.prototype.bytesPerElement=16,Ke("StructArrayLayout2ub2f2i16",ue);class me extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,o,l){const p=this.length;return this.resize(p+1),this.emplace(p,r,o,l)}emplace(r,o,l,p){const y=3*r;return this.uint16[y+0]=o,this.uint16[y+1]=l,this.uint16[y+2]=p,r}}me.prototype.bytesPerElement=6,Ke("StructArrayLayout3ui6",me);class Te extends f{_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(r,o,l,p,y,_,b,S,C,I,P,z,B,N,U,W,J){const fe=this.length;return this.resize(fe+1),this.emplace(fe,r,o,l,p,y,_,b,S,C,I,P,z,B,N,U,W,J)}emplace(r,o,l,p,y,_,b,S,C,I,P,z,B,N,U,W,J,fe){const oe=24*r,he=12*r,xe=48*r;return this.int16[oe+0]=o,this.int16[oe+1]=l,this.uint16[oe+2]=p,this.uint16[oe+3]=y,this.uint32[he+2]=_,this.uint32[he+3]=b,this.uint32[he+4]=S,this.uint16[oe+10]=C,this.uint16[oe+11]=I,this.uint16[oe+12]=P,this.float32[he+7]=z,this.float32[he+8]=B,this.uint8[xe+36]=N,this.uint8[xe+37]=U,this.uint8[xe+38]=W,this.uint32[he+10]=J,this.int16[oe+22]=fe,r}}Te.prototype.bytesPerElement=48,Ke("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Te);class Ae extends f{_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(r,o,l,p,y,_,b,S,C,I,P,z,B,N,U,W,J,fe,oe,he,xe,Ee,qe,at,$e,Oe,et,Xe){const He=this.length;return this.resize(He+1),this.emplace(He,r,o,l,p,y,_,b,S,C,I,P,z,B,N,U,W,J,fe,oe,he,xe,Ee,qe,at,$e,Oe,et,Xe)}emplace(r,o,l,p,y,_,b,S,C,I,P,z,B,N,U,W,J,fe,oe,he,xe,Ee,qe,at,$e,Oe,et,Xe,He){const Se=32*r,tt=16*r;return this.int16[Se+0]=o,this.int16[Se+1]=l,this.int16[Se+2]=p,this.int16[Se+3]=y,this.int16[Se+4]=_,this.int16[Se+5]=b,this.int16[Se+6]=S,this.int16[Se+7]=C,this.uint16[Se+8]=I,this.uint16[Se+9]=P,this.uint16[Se+10]=z,this.uint16[Se+11]=B,this.uint16[Se+12]=N,this.uint16[Se+13]=U,this.uint16[Se+14]=W,this.uint16[Se+15]=J,this.uint16[Se+16]=fe,this.uint16[Se+17]=oe,this.uint16[Se+18]=he,this.uint16[Se+19]=xe,this.uint16[Se+20]=Ee,this.uint16[Se+21]=qe,this.uint16[Se+22]=at,this.uint32[tt+12]=$e,this.float32[tt+13]=Oe,this.float32[tt+14]=et,this.uint16[Se+30]=Xe,this.uint16[Se+31]=He,r}}Ae.prototype.bytesPerElement=64,Ke("StructArrayLayout8i15ui1ul2f2ui64",Ae);class Ne extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r){const o=this.length;return this.resize(o+1),this.emplace(o,r)}emplace(r,o){return this.float32[1*r+0]=o,r}}Ne.prototype.bytesPerElement=4,Ke("StructArrayLayout1f4",Ne);class Ge extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r,o,l){const p=this.length;return this.resize(p+1),this.emplace(p,r,o,l)}emplace(r,o,l,p){const y=3*r;return this.uint16[6*r+0]=o,this.float32[y+1]=l,this.float32[y+2]=p,r}}Ge.prototype.bytesPerElement=12,Ke("StructArrayLayout1ui2f12",Ge);class De extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,o,l){const p=this.length;return this.resize(p+1),this.emplace(p,r,o,l)}emplace(r,o,l,p){const y=4*r;return this.uint32[2*r+0]=o,this.uint16[y+2]=l,this.uint16[y+3]=p,r}}De.prototype.bytesPerElement=8,Ke("StructArrayLayout1ul2ui8",De);class Re extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,o){const l=this.length;return this.resize(l+1),this.emplace(l,r,o)}emplace(r,o,l){const p=2*r;return this.uint16[p+0]=o,this.uint16[p+1]=l,r}}Re.prototype.bytesPerElement=4,Ke("StructArrayLayout2ui4",Re);class Je extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r){const o=this.length;return this.resize(o+1),this.emplace(o,r)}emplace(r,o){return this.uint16[1*r+0]=o,r}}Je.prototype.bytesPerElement=2,Ke("StructArrayLayout1ui2",Je);class _t extends f{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r,o,l,p){const y=this.length;return this.resize(y+1),this.emplace(y,r,o,l,p)}emplace(r,o,l,p,y){const _=4*r;return this.float32[_+0]=o,this.float32[_+1]=l,this.float32[_+2]=p,this.float32[_+3]=y,r}}_t.prototype.bytesPerElement=16,Ke("StructArrayLayout4f16",_t);class Fe extends h{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 q(this.anchorPointX,this.anchorPointY)}}Fe.prototype.size=20;class je extends ie{get(r){return new Fe(this,r)}}Ke("CollisionBoxArray",je);class pt extends h{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(r){this._structArray.uint8[this._pos1+37]=r}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(r){this._structArray.uint8[this._pos1+38]=r}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(r){this._structArray.uint32[this._pos4+10]=r}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}pt.prototype.size=48;class lr extends Te{get(r){return new pt(this,r)}}Ke("PlacedSymbolArray",lr);class wt extends h{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(r){this._structArray.uint32[this._pos4+12]=r}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]}}wt.prototype.size=64;class Et extends Ae{get(r){return new wt(this,r)}}Ke("SymbolInstanceArray",Et);class cr extends Ne{getoffsetX(r){return this.float32[1*r+0]}}Ke("GlyphOffsetArray",cr);class un extends E{getx(r){return this.int16[3*r+0]}gety(r){return this.int16[3*r+1]}gettileUnitDistanceFromAnchor(r){return this.int16[3*r+2]}}Ke("SymbolLineVertexArray",un);class Di extends h{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]}}Di.prototype.size=12;class ur extends Ge{get(r){return new Di(this,r)}}Ke("TextAnchorOffsetArray",ur);class Bn extends h{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]}}Bn.prototype.size=8;class bn extends De{get(r){return new Bn(this,r)}}Ke("FeatureIndexArray",bn);class hn extends k{}class wn extends k{}class ao extends k{}class ua extends M{}class fc extends F{}class ha extends j{}class pi extends Z{}class mc extends X{}class dh extends Q{}class fi extends te{}class mi extends H{}class Go extends ue{}class Bi extends me{}class on extends Re{}const dn=w([{name:"a_pos",components:2,type:"Int16"}],4),{members:ei}=dn;class Mt{constructor(r=[]){this.segments=r}prepareSegment(r,o,l,p){let y=this.segments[this.segments.length-1];return r>Mt.MAX_VERTEX_ARRAY_LENGTH&&Ct(`Max vertices per segment is ${Mt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${r}`),(!y||y.vertexLength+r>Mt.MAX_VERTEX_ARRAY_LENGTH||y.sortKey!==p)&&(y={vertexOffset:o.length,primitiveOffset:l.length,vertexLength:0,primitiveLength:0},p!==void 0&&(y.sortKey=p),this.segments.push(y)),y}get(){return this.segments}destroy(){for(const r of this.segments)for(const o in r.vaos)r.vaos[o].destroy()}static simpleSegment(r,o,l,p){return new Mt([{vertexOffset:r,primitiveOffset:o,vertexLength:l,primitiveLength:p,vaos:{},sortKey:0}])}}function Ts(i,r){return 256*(i=ke(Math.floor(i),0,255))+ke(Math.floor(r),0,255)}Mt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ke("SegmentVector",Mt);const da=w([{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 pa={exports:{}},gp={exports:{}};gp.exports=function(i,r){var o,l,p,y,_,b,S,C;for(l=i.length-(o=3&i.length),p=r,_=3432918353,b=461845907,C=0;C>>16)*_&65535)<<16)&4294967295)<<15|S>>>17))*b+(((S>>>16)*b&65535)<<16)&4294967295)<<13|p>>>19))+((5*(p>>>16)&65535)<<16)&4294967295))+((58964+(y>>>16)&65535)<<16);switch(S=0,o){case 3:S^=(255&i.charCodeAt(C+2))<<16;case 2:S^=(255&i.charCodeAt(C+1))<<8;case 1:p^=S=(65535&(S=(S=(65535&(S^=255&i.charCodeAt(C)))*_+(((S>>>16)*_&65535)<<16)&4294967295)<<15|S>>>17))*b+(((S>>>16)*b&65535)<<16)&4294967295}return p^=i.length,p=2246822507*(65535&(p^=p>>>16))+((2246822507*(p>>>16)&65535)<<16)&4294967295,p=3266489909*(65535&(p^=p>>>13))+((3266489909*(p>>>16)&65535)<<16)&4294967295,(p^=p>>>16)>>>0};var Cg=gp.exports,yp={exports:{}};yp.exports=function(i,r){for(var o,l=i.length,p=r^l,y=0;l>=4;)o=1540483477*(65535&(o=255&i.charCodeAt(y)|(255&i.charCodeAt(++y))<<8|(255&i.charCodeAt(++y))<<16|(255&i.charCodeAt(++y))<<24))+((1540483477*(o>>>16)&65535)<<16),p=1540483477*(65535&p)+((1540483477*(p>>>16)&65535)<<16)^(o=1540483477*(65535&(o^=o>>>24))+((1540483477*(o>>>16)&65535)<<16)),l-=4,++y;switch(l){case 3:p^=(255&i.charCodeAt(y+2))<<16;case 2:p^=(255&i.charCodeAt(y+1))<<8;case 1:p=1540483477*(65535&(p^=255&i.charCodeAt(y)))+((1540483477*(p>>>16)&65535)<<16)}return p=1540483477*(65535&(p^=p>>>13))+((1540483477*(p>>>16)&65535)<<16),(p^=p>>>15)>>>0};var Ho=Cg,_p=yp.exports;pa.exports=Ho,pa.exports.murmur3=Ho,pa.exports.murmur2=_p;var gc=L(pa.exports);class cl{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(r,o,l,p){this.ids.push(yc(r)),this.positions.push(o,l,p)}getPositions(r){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const o=yc(r);let l=0,p=this.ids.length-1;for(;l>1;this.ids[_]>=o?p=_:l=_+1}const y=[];for(;this.ids[l]===o;)y.push({index:this.positions[3*l],start:this.positions[3*l+1],end:this.positions[3*l+2]}),l++;return y}static serialize(r,o){const l=new Float64Array(r.ids),p=new Uint32Array(r.positions);return _c(l,p,0,l.length-1),o&&o.push(l.buffer,p.buffer),{ids:l,positions:p}}static deserialize(r){const o=new cl;return o.ids=r.ids,o.positions=r.positions,o.indexed=!0,o}}function yc(i){const r=+i;return!isNaN(r)&&r<=Number.MAX_SAFE_INTEGER?r:gc(String(i))}function _c(i,r,o,l){for(;o>1];let y=o-1,_=l+1;for(;;){do y++;while(i[y]p);if(y>=_)break;fa(i,y,_),fa(r,3*y,3*_),fa(r,3*y+1,3*_+1),fa(r,3*y+2,3*_+2)}_-o`u_${p}`),this.type=l}setUniform(r,o,l){r.set(l.constantOr(this.value))}getBinding(r,o,l){return this.type==="color"?new Mv(r,o):new vp(r,o)}}class vc{constructor(r,o){this.uniformNames=o.map(l=>`u_${l}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(r,o){this.pixelRatioFrom=o.pixelRatio,this.pixelRatioTo=r.pixelRatio,this.patternFrom=o.tlbr,this.patternTo=r.tlbr}setUniform(r,o,l,p){const y=p==="u_pattern_to"?this.patternTo:p==="u_pattern_from"?this.patternFrom:p==="u_pixel_ratio_to"?this.pixelRatioTo:p==="u_pixel_ratio_from"?this.pixelRatioFrom:null;y&&r.set(y)}getBinding(r,o,l){return l.substr(0,9)==="u_pattern"?new Av(r,o):new vp(r,o)}}class ks{constructor(r,o,l,p){this.expression=r,this.type=l,this.maxValue=0,this.paintVertexAttributes=o.map(y=>({name:`a_${y}`,type:"Float32",components:l==="color"?2:1,offset:0})),this.paintVertexArray=new p}populatePaintArray(r,o,l,p,y){const _=this.paintVertexArray.length,b=this.expression.evaluate(new ar(0),o,{},p,[],y);this.paintVertexArray.resize(r),this._setPaintValue(_,r,b)}updatePaintArray(r,o,l,p){const y=this.expression.evaluate({zoom:0},l,p);this._setPaintValue(r,o,y)}_setPaintValue(r,o,l){if(this.type==="color"){const p=Ig(l);for(let y=r;y`u_${b}_t`),this.type=l,this.useIntegerZoom=p,this.zoom=y,this.maxValue=0,this.paintVertexAttributes=o.map(b=>({name:`a_${b}`,type:"Float32",components:l==="color"?4:2,offset:0})),this.paintVertexArray=new _}populatePaintArray(r,o,l,p,y){const _=this.expression.evaluate(new ar(this.zoom),o,{},p,[],y),b=this.expression.evaluate(new ar(this.zoom+1),o,{},p,[],y),S=this.paintVertexArray.length;this.paintVertexArray.resize(r),this._setPaintValue(S,r,_,b)}updatePaintArray(r,o,l,p){const y=this.expression.evaluate({zoom:this.zoom},l,p),_=this.expression.evaluate({zoom:this.zoom+1},l,p);this._setPaintValue(r,o,y,_)}_setPaintValue(r,o,l,p){if(this.type==="color"){const y=Ig(l),_=Ig(p);for(let b=r;b`#define HAS_UNIFORM_${p}`))}return r}getBinderAttributes(){const r=[];for(const o in this.binders){const l=this.binders[o];if(l instanceof ks||l instanceof Mo)for(let p=0;p!0){this.programConfigurations={};for(const p of r)this.programConfigurations[p.id]=new zv(p,o,l);this.needsUpload=!1,this._featureMap=new cl,this._bufferOffset=0}populatePaintArrays(r,o,l,p,y,_){for(const b in this.programConfigurations)this.programConfigurations[b].populatePaintArrays(r,o,p,y,_);o.id!==void 0&&this._featureMap.add(o.id,l,this._bufferOffset,r),this._bufferOffset=r,this.needsUpload=!0}updatePaintArrays(r,o,l,p){for(const y of l)this.needsUpload=this.programConfigurations[y.id].updatePaintArrays(r,this._featureMap,o,y,p)||this.needsUpload}get(r){return this.programConfigurations[r]}upload(r){if(this.needsUpload){for(const o in this.programConfigurations)this.programConfigurations[o].upload(r);this.needsUpload=!1}}destroy(){for(const r in this.programConfigurations)this.programConfigurations[r].destroy()}}function ck(i,r){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(`${r}-`,"").replace(/-/g,"_")]}function Lv(i,r,o){const l={color:{source:j,composite:_t},number:{source:Ne,composite:j}},p=function(y){return{"line-pattern":{source:pi,composite:pi},"fill-pattern":{source:pi,composite:pi},"fill-extrusion-pattern":{source:pi,composite:pi}}[y]}(i);return p&&p[o]||l[r][o]}Ke("ConstantBinder",ph),Ke("CrossFadedConstantBinder",vc),Ke("SourceExpressionBinder",ks),Ke("CrossFadedCompositeBinder",ma),Ke("CompositeExpressionBinder",Mo),Ke("ProgramConfiguration",zv,{omit:["_buffers"]}),Ke("ProgramConfigurationSet",hl);const Fr=8192,Eg=Math.pow(2,14)-1,Rv=-Eg-1;function dl(i){const r=Fr/i.extent,o=i.loadGeometry();for(let l=0;l_.x+1||S<_.y||S>_.y+1)&&Ct("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return o}function pl(i,r){return{type:i.type,id:i.id,properties:i.properties,geometry:r?dl(i):[]}}function xp(i,r,o,l,p){i.emplaceBack(2*r+(l+1)/2,2*o+(p+1)/2)}class Pg{constructor(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(o=>o.id),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new wn,this.indexArray=new Bi,this.segments=new Mt,this.programConfigurations=new hl(r.layers,r.zoom),this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(r,o,l){const p=this.layers[0],y=[];let _=null,b=!1;p.type==="circle"&&(_=p.layout.get("circle-sort-key"),b=!_.isConstant());for(const{feature:S,id:C,index:I,sourceLayerIndex:P}of r){const z=this.layers[0]._featureFilter.needGeometry,B=pl(S,z);if(!this.layers[0]._featureFilter.filter(new ar(this.zoom),B,l))continue;const N=b?_.evaluate(B,{},l):void 0,U={id:C,properties:S.properties,type:S.type,sourceLayerIndex:P,index:I,geometry:z?B.geometry:dl(S),patterns:{},sortKey:N};y.push(U)}b&&y.sort((S,C)=>S.sortKey-C.sortKey);for(const S of y){const{geometry:C,index:I,sourceLayerIndex:P}=S,z=r[I].feature;this.addFeature(S,C,I,l),o.featureIndex.insert(z,C,I,P,this.index)}}update(r,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(r,o,this.stateDependentLayers,l)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(r){this.uploaded||(this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,ei),this.indexBuffer=r.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(r),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(r,o,l,p){for(const y of o)for(const _ of y){const b=_.x,S=_.y;if(b<0||b>=Fr||S<0||S>=Fr)continue;const C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,r.sortKey),I=C.vertexLength;xp(this.layoutVertexArray,b,S,-1,-1),xp(this.layoutVertexArray,b,S,1,-1),xp(this.layoutVertexArray,b,S,1,1),xp(this.layoutVertexArray,b,S,-1,1),this.indexArray.emplaceBack(I,I+1,I+2),this.indexArray.emplaceBack(I,I+3,I+2),C.vertexLength+=4,C.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,l,{},p)}}function Dv(i,r){for(let o=0;o1){if(Ag(i,r))return!0;for(let l=0;l1?o:o.sub(r)._mult(p)._add(r))}function Ov(i,r){let o,l,p,y=!1;for(let _=0;_r.y!=p.y>r.y&&r.x<(p.x-l.x)*(r.y-l.y)/(p.y-l.y)+l.x&&(y=!y)}return y}function xc(i,r){let o=!1;for(let l=0,p=i.length-1;lr.y!=_.y>r.y&&r.x<(_.x-y.x)*(r.y-y.y)/(_.y-y.y)+y.x&&(o=!o)}return o}function pk(i,r,o){const l=o[0],p=o[2];if(i.xp.x&&r.x>p.x||i.yp.y&&r.y>p.y)return!1;const y=Bt(i,r,o[0]);return y!==Bt(i,r,o[1])||y!==Bt(i,r,o[2])||y!==Bt(i,r,o[3])}function fh(i,r,o){const l=r.paint.get(i).value;return l.kind==="constant"?l.value:o.programConfigurations.get(r.id).getMaxValue(i)}function bp(i){return Math.sqrt(i[0]*i[0]+i[1]*i[1])}function wp(i,r,o,l,p){if(!r[0]&&!r[1])return i;const y=q.convert(r)._mult(p);o==="viewport"&&y._rotate(-l);const _=[];for(let b=0;bjv(W,U))}(C,S),B=P?I*b:I;for(const N of p)for(const U of N){const W=P?U:jv(U,S);let J=B;const fe=Sp([],[U.x,U.y,0,1],S);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?J*=fe[3]/_.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(J*=_.cameraToCenterDistance/fe[3]),uk(z,W,J))return!0}return!1}}function jv(i,r){const o=Sp([],[i.x,i.y,0,1],r);return new q(o[0]/o[3],o[1]/o[3])}class Vv extends Pg{}let qv;Ke("HeatmapBucket",Vv,{omit:["layers"]});var yk={get paint(){return qv=qv||new m({"heatmap-radius":new ct(ve.paint_heatmap["heatmap-radius"]),"heatmap-weight":new ct(ve.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ye(ve.paint_heatmap["heatmap-intensity"]),"heatmap-color":new hh(ve.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ye(ve.paint_heatmap["heatmap-opacity"])})}};function Lg(i,{width:r,height:o},l,p){if(p){if(p instanceof Uint8ClampedArray)p=new Uint8Array(p.buffer);else if(p.length!==r*o*l)throw new RangeError(`mismatched image size. expected: ${p.length} but got: ${r*o*l}`)}else p=new Uint8Array(r*o*l);return i.width=r,i.height=o,i.data=p,i}function Zv(i,{width:r,height:o},l){if(r===i.width&&o===i.height)return;const p=Lg({},{width:r,height:o},l);Rg(i,p,{x:0,y:0},{x:0,y:0},{width:Math.min(i.width,r),height:Math.min(i.height,o)},l),i.width=r,i.height=o,i.data=p.data}function Rg(i,r,o,l,p,y){if(p.width===0||p.height===0)return r;if(p.width>i.width||p.height>i.height||o.x>i.width-p.width||o.y>i.height-p.height)throw new RangeError("out of range source coordinates for image copy");if(p.width>r.width||p.height>r.height||l.x>r.width-p.width||l.y>r.height-p.height)throw new RangeError("out of range destination coordinates for image copy");const _=i.data,b=r.data;if(_===b)throw new Error("srcData equals dstData, so image is already copied");for(let S=0;S{r[i.evaluationKey]=S;const C=i.expression.evaluate(r);p.data[_+b+0]=Math.floor(255*C.r/C.a),p.data[_+b+1]=Math.floor(255*C.g/C.a),p.data[_+b+2]=Math.floor(255*C.b/C.a),p.data[_+b+3]=Math.floor(255*C.a)};if(i.clips)for(let _=0,b=0;_80*o){b=1/0,S=1/0;let I=-1/0,P=-1/0;for(let z=o;zI&&(I=B),N>P&&(P=N)}C=Math.max(I-b,P-S),C=C!==0?32767/C:0}return yh(y,_,o,b,S,C,0),_}function Kv(i,r,o,l,p){let y;if(p===function(_,b,S,C){let I=0;for(let P=b,z=S-C;P0)for(let _=r;_=r;_-=l)y=Jv(_/l|0,i[_],i[_+1],y);return y&&Tp(y,y.next)&&(vh(y),y=y.next),y}function fl(i,r){if(!i)return i;r||(r=i);let o,l=i;do if(o=!1,l.steiner||!Tp(l,l.next)&&Pr(l.prev,l,l.next)!==0)l=l.next;else{if(vh(l),l=r=l.prev,l===l.next)break;o=!0}while(o||l!==r);return r}function yh(i,r,o,l,p,y,_){if(!i)return;!_&&y&&function(S,C,I,P){let z=S;do z.z===0&&(z.z=Bg(z.x,z.y,C,I,P)),z.prevZ=z.prev,z.nextZ=z.next,z=z.next;while(z!==S);z.prevZ.nextZ=null,z.prevZ=null,function(B){let N,U=1;do{let W,J=B;B=null;let fe=null;for(N=0;J;){N++;let oe=J,he=0;for(let Ee=0;Ee0||xe>0&&oe;)he!==0&&(xe===0||!oe||J.z<=oe.z)?(W=J,J=J.nextZ,he--):(W=oe,oe=oe.nextZ,xe--),fe?fe.nextZ=W:B=W,W.prevZ=fe,fe=W;J=oe}fe.nextZ=null,U*=2}while(N>1)}(z)}(i,l,p,y);let b=i;for(;i.prev!==i.next;){const S=i.prev,C=i.next;if(y?Tk(i,l,p,y):Sk(i))r.push(S.i,i.i,C.i),vh(i),i=C.next,b=C.next;else if((i=C)===b){_?_===1?yh(i=kk(fl(i),r),r,o,l,p,y,2):_===2&&Ck(i,r,o,l,p,y):yh(fl(i),r,o,l,p,y,1);break}}}function Sk(i){const r=i.prev,o=i,l=i.next;if(Pr(r,o,l)>=0)return!1;const p=r.x,y=o.x,_=l.x,b=r.y,S=o.y,C=l.y,I=py?p>_?p:_:y>_?y:_,B=b>S?b>C?b:C:S>C?S:C;let N=l.next;for(;N!==r;){if(N.x>=I&&N.x<=z&&N.y>=P&&N.y<=B&&wc(p,b,y,S,_,C,N.x,N.y)&&Pr(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function Tk(i,r,o,l){const p=i.prev,y=i,_=i.next;if(Pr(p,y,_)>=0)return!1;const b=p.x,S=y.x,C=_.x,I=p.y,P=y.y,z=_.y,B=bS?b>C?b:C:S>C?S:C,W=I>P?I>z?I:z:P>z?P:z,J=Bg(B,N,r,o,l),fe=Bg(U,W,r,o,l);let oe=i.prevZ,he=i.nextZ;for(;oe&&oe.z>=J&&he&&he.z<=fe;){if(oe.x>=B&&oe.x<=U&&oe.y>=N&&oe.y<=W&&oe!==p&&oe!==_&&wc(b,I,S,P,C,z,oe.x,oe.y)&&Pr(oe.prev,oe,oe.next)>=0||(oe=oe.prevZ,he.x>=B&&he.x<=U&&he.y>=N&&he.y<=W&&he!==p&&he!==_&&wc(b,I,S,P,C,z,he.x,he.y)&&Pr(he.prev,he,he.next)>=0))return!1;he=he.nextZ}for(;oe&&oe.z>=J;){if(oe.x>=B&&oe.x<=U&&oe.y>=N&&oe.y<=W&&oe!==p&&oe!==_&&wc(b,I,S,P,C,z,oe.x,oe.y)&&Pr(oe.prev,oe,oe.next)>=0)return!1;oe=oe.prevZ}for(;he&&he.z<=fe;){if(he.x>=B&&he.x<=U&&he.y>=N&&he.y<=W&&he!==p&&he!==_&&wc(b,I,S,P,C,z,he.x,he.y)&&Pr(he.prev,he,he.next)>=0)return!1;he=he.nextZ}return!0}function kk(i,r){let o=i;do{const l=o.prev,p=o.next.next;!Tp(l,p)&&Xv(l,o,o.next,p)&&_h(l,p)&&_h(p,l)&&(r.push(l.i,o.i,p.i),vh(o),vh(o.next),o=i=p),o=o.next}while(o!==i);return fl(o)}function Ck(i,r,o,l,p,y){let _=i;do{let b=_.next.next;for(;b!==_.prev;){if(_.i!==b.i&&Mk(_,b)){let S=Yv(_,b);return _=fl(_,_.next),S=fl(S,S.next),yh(_,r,o,l,p,y,0),void yh(S,r,o,l,p,y,0)}b=b.next}_=_.next}while(_!==i)}function Ik(i,r){return i.x-r.x}function Ek(i,r){const o=function(p,y){let _=y;const b=p.x,S=p.y;let C,I=-1/0;do{if(S<=_.y&&S>=_.next.y&&_.next.y!==_.y){const U=_.x+(S-_.y)*(_.next.x-_.x)/(_.next.y-_.y);if(U<=b&&U>I&&(I=U,C=_.x<_.next.x?_:_.next,U===b))return C}_=_.next}while(_!==y);if(!C)return null;const P=C,z=C.x,B=C.y;let N=1/0;_=C;do{if(b>=_.x&&_.x>=z&&b!==_.x&&wc(SC.x||_.x===C.x&&Pk(C,_)))&&(C=_,N=U)}_=_.next}while(_!==P);return C}(i,r);if(!o)return r;const l=Yv(o,i);return fl(l,l.next),fl(o,o.next)}function Pk(i,r){return Pr(i.prev,i,r.prev)<0&&Pr(r.next,i,i.next)<0}function Bg(i,r,o,l,p){return(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=(i-o)*p|0)|i<<8))|i<<4))|i<<2))|i<<1))|(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=(r-l)*p|0)|r<<8))|r<<4))|r<<2))|r<<1))<<1}function Ak(i){let r=i,o=i;do(r.x=(i-_)*(y-b)&&(i-_)*(l-b)>=(o-_)*(r-b)&&(o-_)*(y-b)>=(p-_)*(l-b)}function Mk(i,r){return i.next.i!==r.i&&i.prev.i!==r.i&&!function(o,l){let p=o;do{if(p.i!==o.i&&p.next.i!==o.i&&p.i!==l.i&&p.next.i!==l.i&&Xv(p,p.next,o,l))return!0;p=p.next}while(p!==o);return!1}(i,r)&&(_h(i,r)&&_h(r,i)&&function(o,l){let p=o,y=!1;const _=(o.x+l.x)/2,b=(o.y+l.y)/2;do p.y>b!=p.next.y>b&&p.next.y!==p.y&&_<(p.next.x-p.x)*(b-p.y)/(p.next.y-p.y)+p.x&&(y=!y),p=p.next;while(p!==o);return y}(i,r)&&(Pr(i.prev,i,r.prev)||Pr(i,r.prev,r))||Tp(i,r)&&Pr(i.prev,i,i.next)>0&&Pr(r.prev,r,r.next)>0)}function Pr(i,r,o){return(r.y-i.y)*(o.x-r.x)-(r.x-i.x)*(o.y-r.y)}function Tp(i,r){return i.x===r.x&&i.y===r.y}function Xv(i,r,o,l){const p=Cp(Pr(i,r,o)),y=Cp(Pr(i,r,l)),_=Cp(Pr(o,l,i)),b=Cp(Pr(o,l,r));return p!==y&&_!==b||!(p!==0||!kp(i,o,r))||!(y!==0||!kp(i,l,r))||!(_!==0||!kp(o,i,l))||!(b!==0||!kp(o,r,l))}function kp(i,r,o){return r.x<=Math.max(i.x,o.x)&&r.x>=Math.min(i.x,o.x)&&r.y<=Math.max(i.y,o.y)&&r.y>=Math.min(i.y,o.y)}function Cp(i){return i>0?1:i<0?-1:0}function _h(i,r){return Pr(i.prev,i,i.next)<0?Pr(i,r,i.next)>=0&&Pr(i,i.prev,r)>=0:Pr(i,r,i.prev)<0||Pr(i,i.next,r)<0}function Yv(i,r){const o=Fg(i.i,i.x,i.y),l=Fg(r.i,r.x,r.y),p=i.next,y=r.prev;return i.next=r,r.prev=i,o.next=p,p.prev=o,l.next=o,o.prev=l,y.next=l,l.prev=y,l}function Jv(i,r,o,l){const p=Fg(i,r,o);return l?(p.next=l.next,p.prev=l,l.next.prev=p,l.next=p):(p.prev=p,p.next=p),p}function vh(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 Fg(i,r,o){return{i,x:r,y:o,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Og(i,r,o){const l=o.patternDependencies;let p=!1;for(const y of r){const _=y.paint.get(`${i}-pattern`);_.isConstant()||(p=!0);const b=_.constantOr(null);b&&(p=!0,l[b.to]=!0,l[b.from]=!0)}return p}function Ng(i,r,o,l,p){const y=p.patternDependencies;for(const _ of r){const b=_.paint.get(`${i}-pattern`).value;if(b.kind!=="constant"){let S=b.evaluate({zoom:l-1},o,{},p.availableImages),C=b.evaluate({zoom:l},o,{},p.availableImages),I=b.evaluate({zoom:l+1},o,{},p.availableImages);S=S&&S.name?S.name:S,C=C&&C.name?C.name:C,I=I&&I.name?I.name:I,y[S]=!0,y[C]=!0,y[I]=!0,o.patterns[_.id]={min:S,mid:C,max:I}}}return o}class $g{constructor(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(o=>o.id),this.index=r.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ao,this.indexArray=new Bi,this.indexArray2=new on,this.programConfigurations=new hl(r.layers,r.zoom),this.segments=new Mt,this.segments2=new Mt,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(r,o,l){this.hasPattern=Og("fill",this.layers,o);const p=this.layers[0].layout.get("fill-sort-key"),y=!p.isConstant(),_=[];for(const{feature:b,id:S,index:C,sourceLayerIndex:I}of r){const P=this.layers[0]._featureFilter.needGeometry,z=pl(b,P);if(!this.layers[0]._featureFilter.filter(new ar(this.zoom),z,l))continue;const B=y?p.evaluate(z,{},l,o.availableImages):void 0,N={id:S,properties:b.properties,type:b.type,sourceLayerIndex:I,index:C,geometry:P?z.geometry:dl(b),patterns:{},sortKey:B};_.push(N)}y&&_.sort((b,S)=>b.sortKey-S.sortKey);for(const b of _){const{geometry:S,index:C,sourceLayerIndex:I}=b;if(this.hasPattern){const P=Ng("fill",this.layers,b,this.zoom,o);this.patternFeatures.push(P)}else this.addFeature(b,S,C,l,{});o.featureIndex.insert(r[C].feature,S,C,I,this.index)}}update(r,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(r,o,this.stateDependentLayers,l)}addFeatures(r,o,l){for(const p of this.patternFeatures)this.addFeature(p,p.geometry,p.index,o,l)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(r){this.uploaded||(this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,wk),this.indexBuffer=r.createIndexBuffer(this.indexArray),this.indexBuffer2=r.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(r),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(r,o,l,p,y){for(const _ of Gl(o,500)){let b=0;for(const B of _)b+=B.length;const S=this.segments.prepareSegment(b,this.layoutVertexArray,this.indexArray),C=S.vertexLength,I=[],P=[];for(const B of _){if(B.length===0)continue;B!==_[0]&&P.push(I.length/2);const N=this.segments2.prepareSegment(B.length,this.layoutVertexArray,this.indexArray2),U=N.vertexLength;this.layoutVertexArray.emplaceBack(B[0].x,B[0].y),this.indexArray2.emplaceBack(U+B.length-1,U),I.push(B[0].x),I.push(B[0].y);for(let W=1;W>3}if(p--,l===1||l===2)y+=i.readSVarint(),_+=i.readSVarint(),l===1&&(r&&b.push(r),r=[]),r.push(new Fk(y,_));else{if(l!==7)throw new Error("unknown command "+l);r&&r.push(r[0].clone())}}return r&&b.push(r),b},Sc.prototype.bbox=function(){var i=this._pbf;i.pos=this._geometry;for(var r=i.readVarint()+i.pos,o=1,l=0,p=0,y=0,_=1/0,b=-1/0,S=1/0,C=-1/0;i.pos>3}if(l--,o===1||o===2)(p+=i.readSVarint())<_&&(_=p),p>b&&(b=p),(y+=i.readSVarint())C&&(C=y);else if(o!==7)throw new Error("unknown command "+o)}return[_,S,b,C]},Sc.prototype.toGeoJSON=function(i,r,o){var l,p,y=this.extent*Math.pow(2,o),_=this.extent*i,b=this.extent*r,S=this.loadGeometry(),C=Sc.types[this.type];function I(B){for(var N=0;N>3;p=_===1?l.readString():_===2?l.readFloat():_===3?l.readDouble():_===4?l.readVarint64():_===5?l.readVarint():_===6?l.readSVarint():_===7?l.readBoolean():null}return p}(o))}n1.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 r=this._pbf.readVarint()+this._pbf.pos;return new $k(this._pbf,r,this.extent,this._keys,this._values)};var jk=r1;function Vk(i,r,o){if(i===3){var l=new jk(o,o.readVarint()+o.pos);l.length&&(r[l.name]=l)}}ga.VectorTile=function(i,r){this.layers=i.readFields(Vk,{},r)},ga.VectorTileFeature=t1,ga.VectorTileLayer=r1;const qk=ga.VectorTileFeature.types,Ug=Math.pow(2,13);function xh(i,r,o,l,p,y,_,b){i.emplaceBack(r,o,2*Math.floor(l*Ug)+_,p*Ug*2,y*Ug*2,Math.round(b))}class jg{constructor(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(o=>o.id),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new ua,this.centroidVertexArray=new hn,this.indexArray=new Bi,this.programConfigurations=new hl(r.layers,r.zoom),this.segments=new Mt,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(r,o,l){this.features=[],this.hasPattern=Og("fill-extrusion",this.layers,o);for(const{feature:p,id:y,index:_,sourceLayerIndex:b}of r){const S=this.layers[0]._featureFilter.needGeometry,C=pl(p,S);if(!this.layers[0]._featureFilter.filter(new ar(this.zoom),C,l))continue;const I={id:y,sourceLayerIndex:b,index:_,geometry:S?C.geometry:dl(p),properties:p.properties,type:p.type,patterns:{}};this.hasPattern?this.features.push(Ng("fill-extrusion",this.layers,I,this.zoom,o)):this.addFeature(I,I.geometry,_,l,{}),o.featureIndex.insert(p,I.geometry,_,b,this.index,!0)}}addFeatures(r,o,l){for(const p of this.features){const{geometry:y}=p;this.addFeature(p,y,p.index,o,l)}}update(r,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(r,o,this.stateDependentLayers,l)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(r){this.uploaded||(this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,Bk),this.centroidVertexBuffer=r.createVertexBuffer(this.centroidVertexArray,Dk.members,!0),this.indexBuffer=r.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(r),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(r,o,l,p,y){for(const _ of Gl(o,500)){const b={x:0,y:0,vertexCount:0};let S=0;for(const N of _)S+=N.length;let C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const N of _){if(N.length===0||Gk(N))continue;let U=0;for(let W=0;W=1){const fe=N[W-1];if(!Zk(J,fe)){C.vertexLength+4>Mt.MAX_VERTEX_ARRAY_LENGTH&&(C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const oe=J.sub(fe)._perp()._unit(),he=fe.dist(J);U+he>32768&&(U=0),xh(this.layoutVertexArray,J.x,J.y,oe.x,oe.y,0,0,U),xh(this.layoutVertexArray,J.x,J.y,oe.x,oe.y,0,1,U),b.x+=2*J.x,b.y+=2*J.y,b.vertexCount+=2,U+=he,xh(this.layoutVertexArray,fe.x,fe.y,oe.x,oe.y,0,0,U),xh(this.layoutVertexArray,fe.x,fe.y,oe.x,oe.y,0,1,U),b.x+=2*fe.x,b.y+=2*fe.y,b.vertexCount+=2;const xe=C.vertexLength;this.indexArray.emplaceBack(xe,xe+2,xe+1),this.indexArray.emplaceBack(xe+1,xe+2,xe+3),C.vertexLength+=4,C.primitiveLength+=2}}}}if(C.vertexLength+S>Mt.MAX_VERTEX_ARRAY_LENGTH&&(C=this.segments.prepareSegment(S,this.layoutVertexArray,this.indexArray)),qk[r.type]!=="Polygon")continue;const I=[],P=[],z=C.vertexLength;for(const N of _)if(N.length!==0){N!==_[0]&&P.push(I.length/2);for(let U=0;UFr)||i.y===r.y&&(i.y<0||i.y>Fr)}function Gk(i){return i.every(r=>r.x<0)||i.every(r=>r.x>Fr)||i.every(r=>r.y<0)||i.every(r=>r.y>Fr)}let i1;Ke("FillExtrusionBucket",jg,{omit:["layers","features"]});var Hk={get paint(){return i1=i1||new m({"fill-extrusion-opacity":new Ye(ve["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ct(ve["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ye(ve["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ye(ve["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new dc(ve["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ct(ve["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ct(ve["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ye(ve["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Wk extends s{constructor(r){super(r,Hk)}createBucket(r){return new jg(r)}queryRadius(){return bp(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(r,o,l,p,y,_,b,S){const C=wp(r,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),_.angle,b),I=this.paint.get("fill-extrusion-height").evaluate(o,l),P=this.paint.get("fill-extrusion-base").evaluate(o,l),z=function(N,U,W,J){const fe=[];for(const oe of N){const he=[oe.x,oe.y,0,1];Sp(he,he,U),fe.push(new q(he[0]/he[3],he[1]/he[3]))}return fe}(C,S),B=function(N,U,W,J){const fe=[],oe=[],he=J[8]*U,xe=J[9]*U,Ee=J[10]*U,qe=J[11]*U,at=J[8]*W,$e=J[9]*W,Oe=J[10]*W,et=J[11]*W;for(const Xe of N){const He=[],Se=[];for(const tt of Xe){const Qe=tt.x,ft=tt.y,er=J[0]*Qe+J[4]*ft+J[12],Yt=J[1]*Qe+J[5]*ft+J[13],Xr=J[2]*Qe+J[6]*ft+J[14],lo=J[3]*Qe+J[7]*ft+J[15],fn=Xr+Ee,Yr=lo+qe,On=er+at,Nn=Yt+$e,$n=Xr+Oe,Tr=lo+et,Jr=new q((er+he)/Yr,(Yt+xe)/Yr);Jr.z=fn/Yr,He.push(Jr);const Sn=new q(On/Tr,Nn/Tr);Sn.z=$n/Tr,Se.push(Sn)}fe.push(He),oe.push(Se)}return[fe,oe]}(p,P,I,S);return function(N,U,W){let J=1/0;Bv(W,U)&&(J=o1(W,U[0]));for(let fe=0;feo.id),this.index=r.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(o=>{this.gradients[o.id]={}}),this.layoutVertexArray=new fc,this.layoutVertexArray2=new ha,this.indexArray=new Bi,this.programConfigurations=new hl(r.layers,r.zoom),this.segments=new Mt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(r,o,l){this.hasPattern=Og("line",this.layers,o);const p=this.layers[0].layout.get("line-sort-key"),y=!p.isConstant(),_=[];for(const{feature:b,id:S,index:C,sourceLayerIndex:I}of r){const P=this.layers[0]._featureFilter.needGeometry,z=pl(b,P);if(!this.layers[0]._featureFilter.filter(new ar(this.zoom),z,l))continue;const B=y?p.evaluate(z,{},l):void 0,N={id:S,properties:b.properties,type:b.type,sourceLayerIndex:I,index:C,geometry:P?z.geometry:dl(b),patterns:{},sortKey:B};_.push(N)}y&&_.sort((b,S)=>b.sortKey-S.sortKey);for(const b of _){const{geometry:S,index:C,sourceLayerIndex:I}=b;if(this.hasPattern){const P=Ng("line",this.layers,b,this.zoom,o);this.patternFeatures.push(P)}else this.addFeature(b,S,C,l,{});o.featureIndex.insert(r[C].feature,S,C,I,this.index)}}update(r,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(r,o,this.stateDependentLayers,l)}addFeatures(r,o,l){for(const p of this.patternFeatures)this.addFeature(p,p.geometry,p.index,o,l)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(r){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=r.createVertexBuffer(this.layoutVertexArray2,Jk)),this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,Xk),this.indexBuffer=r.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(r),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(r){if(r.properties&&Object.prototype.hasOwnProperty.call(r.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(r.properties,"mapbox_clip_end"))return{start:+r.properties.mapbox_clip_start,end:+r.properties.mapbox_clip_end}}addFeature(r,o,l,p,y){const _=this.layers[0].layout,b=_.get("line-join").evaluate(r,{}),S=_.get("line-cap"),C=_.get("line-miter-limit"),I=_.get("line-round-limit");this.lineClips=this.lineFeatureClips(r);for(const P of o)this.addLine(P,r,b,S,C,I);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,l,y,p)}addLine(r,o,l,p,y,_){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let J=0;J=2&&r[S-1].equals(r[S-2]);)S--;let C=0;for(;C0;if(qe&&J>C){const et=z.dist(B);if(et>2*I){const Xe=z.sub(z.sub(B)._mult(I/et)._round());this.updateDistance(B,Xe),this.addCurrentVertex(Xe,U,0,0,P),B=Xe}}const $e=B&&N;let Oe=$e?l:b?"butt":p;if($e&&Oe==="round"&&(xe<_?Oe="miter":xe<=2&&(Oe="fakeround")),Oe==="miter"&&xe>y&&(Oe="bevel"),Oe==="bevel"&&(xe>2&&(Oe="flipbevel"),xe100)fe=W.mult(-1);else{const et=xe*U.add(W).mag()/U.sub(W).mag();fe._perp()._mult(et*(at?-1:1))}this.addCurrentVertex(z,fe,0,0,P),this.addCurrentVertex(z,fe.mult(-1),0,0,P)}else if(Oe==="bevel"||Oe==="fakeround"){const et=-Math.sqrt(xe*xe-1),Xe=at?et:0,He=at?0:et;if(B&&this.addCurrentVertex(z,U,Xe,He,P),Oe==="fakeround"){const Se=Math.round(180*Ee/Math.PI/20);for(let tt=1;tt2*I){const Xe=z.add(N.sub(z)._mult(I/et)._round());this.updateDistance(z,Xe),this.addCurrentVertex(Xe,W,0,0,P),z=Xe}}}}addCurrentVertex(r,o,l,p,y,_=!1){const b=o.y*p-o.x,S=-o.y-o.x*p;this.addHalfVertex(r,o.x+o.y*l,o.y-o.x*l,_,!1,l,y),this.addHalfVertex(r,b,S,_,!0,-p,y),this.distance>s1/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(r,o,l,p,y,_))}addHalfVertex({x:r,y:o},l,p,y,_,b,S){const C=.5*(this.lineClips?this.scaledDistance*(s1-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((r<<1)+(y?1:0),(o<<1)+(_?1:0),Math.round(63*l)+128,Math.round(63*p)+128,1+(b===0?0:b<0?-1:1)|(63&C)<<2,C>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const I=S.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,I),S.primitiveLength++),_?this.e2=I:this.e1=I}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(r,o){this.distance+=r.dist(o),this.updateScaledDistance()}}let a1,l1;Ke("LineBucket",Vg,{omit:["layers","patternFeatures"]});var c1={get paint(){return l1=l1||new m({"line-opacity":new ct(ve.paint_line["line-opacity"]),"line-color":new ct(ve.paint_line["line-color"]),"line-translate":new Ye(ve.paint_line["line-translate"]),"line-translate-anchor":new Ye(ve.paint_line["line-translate-anchor"]),"line-width":new ct(ve.paint_line["line-width"]),"line-gap-width":new ct(ve.paint_line["line-gap-width"]),"line-offset":new ct(ve.paint_line["line-offset"]),"line-blur":new ct(ve.paint_line["line-blur"]),"line-dasharray":new pc(ve.paint_line["line-dasharray"]),"line-pattern":new dc(ve.paint_line["line-pattern"]),"line-gradient":new hh(ve.paint_line["line-gradient"])})},get layout(){return a1=a1||new m({"line-cap":new Ye(ve.layout_line["line-cap"]),"line-join":new ct(ve.layout_line["line-join"]),"line-miter-limit":new Ye(ve.layout_line["line-miter-limit"]),"line-round-limit":new Ye(ve.layout_line["line-round-limit"]),"line-sort-key":new ct(ve.layout_line["line-sort-key"])})}};class tC extends ct{possiblyEvaluate(r,o){return o=new ar(Math.floor(o.zoom),{now:o.now,fadeDuration:o.fadeDuration,zoomHistory:o.zoomHistory,transition:o.transition}),super.possiblyEvaluate(r,o)}evaluate(r,o,l,p){return o=Ie({},o,{zoom:Math.floor(o.zoom)}),super.evaluate(r,o,l,p)}}let Ip;class rC extends s{constructor(r){super(r,c1),this.gradientVersion=0,Ip||(Ip=new tC(c1.paint.properties["line-width"].specification),Ip.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(r){if(r==="line-gradient"){const o=this.gradientExpression();this.stepInterpolant=!!function(l){return l._styleExpression!==void 0}(o)&&o._styleExpression.expression instanceof Zs,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(r,o){super.recalculate(r,o),this.paint._values["line-floorwidth"]=Ip.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,r)}createBucket(r){return new Vg(r)}queryRadius(r){const o=r,l=u1(fh("line-width",this,o),fh("line-gap-width",this,o)),p=fh("line-offset",this,o);return l/2+Math.abs(p)+bp(this.paint.get("line-translate"))}queryIntersectsFeature(r,o,l,p,y,_,b){const S=wp(r,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),_.angle,b),C=b/2*u1(this.paint.get("line-width").evaluate(o,l),this.paint.get("line-gap-width").evaluate(o,l)),I=this.paint.get("line-offset").evaluate(o,l);return I&&(p=function(P,z){const B=[];for(let N=0;N=3){for(let W=0;W0?r+2*i:i}const nC=w([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),iC=w([{name:"a_projected_pos",components:3,type:"Float32"}],4);w([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const oC=w([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);w([{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 h1=w([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),sC=w([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function aC(i,r,o){return i.sections.forEach(l=>{l.text=function(p,y,_){const b=y.layout.get("text-transform").evaluate(_,{});return b==="uppercase"?p=p.toLocaleUpperCase():b==="lowercase"&&(p=p.toLocaleLowerCase()),Qn.applyArabicShaping&&(p=Qn.applyArabicShaping(p)),p}(l.text,r,o)}),i}w([{name:"triangle",components:3,type:"Uint16"}]),w([{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"}]),w([{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"}]),w([{type:"Float32",name:"offsetX"}]),w([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),w([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const wh={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var jr=24,d1=Xt,p1=function(i,r,o,l,p){var y,_,b=8*p-l-1,S=(1<>1,I=-7,P=p-1,z=-1,B=i[r+P];for(P+=z,y=B&(1<<-I)-1,B>>=-I,I+=b;I>0;y=256*y+i[r+P],P+=z,I-=8);for(_=y&(1<<-I)-1,y>>=-I,I+=l;I>0;_=256*_+i[r+P],P+=z,I-=8);if(y===0)y=1-C;else{if(y===S)return _?NaN:1/0*(B?-1:1);_+=Math.pow(2,l),y-=C}return(B?-1:1)*_*Math.pow(2,y-l)},f1=function(i,r,o,l,p,y){var _,b,S,C=8*y-p-1,I=(1<>1,z=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=0,N=1,U=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(b=isNaN(r)?1:0,_=I):(_=Math.floor(Math.log(r)/Math.LN2),r*(S=Math.pow(2,-_))<1&&(_--,S*=2),(r+=_+P>=1?z/S:z*Math.pow(2,1-P))*S>=2&&(_++,S/=2),_+P>=I?(b=0,_=I):_+P>=1?(b=(r*S-1)*Math.pow(2,p),_+=P):(b=r*Math.pow(2,P-1)*Math.pow(2,p),_=0));p>=8;i[o+B]=255&b,B+=N,b/=256,p-=8);for(_=_<0;i[o+B]=255&_,B+=N,_/=256,C-=8);i[o+B-N]|=128*U};function Xt(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}Xt.Varint=0,Xt.Fixed64=1,Xt.Bytes=2,Xt.Fixed32=5;var qg=4294967296,m1=1/qg,g1=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Cs(i){return i.type===Xt.Bytes?i.readVarint()+i.pos:i.pos+1}function Tc(i,r,o){return o?4294967296*r+(i>>>0):4294967296*(r>>>0)+(i>>>0)}function y1(i,r,o){var l=r<=16383?1:r<=2097151?2:r<=268435455?3:Math.floor(Math.log(r)/(7*Math.LN2));o.realloc(l);for(var p=o.pos-1;p>=i;p--)o.buf[p+l]=o.buf[p]}function lC(i,r){for(var o=0;o>>8,i[o+2]=r>>>16,i[o+3]=r>>>24}function _1(i,r){return(i[r]|i[r+1]<<8|i[r+2]<<16)+(i[r+3]<<24)}Xt.prototype={destroy:function(){this.buf=null},readFields:function(i,r,o){for(o=o||this.length;this.pos>3,y=this.pos;this.type=7&l,i(p,r,this),this.pos===y&&this.skip(l)}return r},readMessage:function(i,r){return this.readFields(i,r,this.readVarint()+this.pos)},readFixed32:function(){var i=Ep(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=_1(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=Ep(this.buf,this.pos)+Ep(this.buf,this.pos+4)*qg;return this.pos+=8,i},readSFixed64:function(){var i=Ep(this.buf,this.pos)+_1(this.buf,this.pos+4)*qg;return this.pos+=8,i},readFloat:function(){var i=p1(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=p1(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var r,o,l=this.buf;return r=127&(o=l[this.pos++]),o<128?r:(r|=(127&(o=l[this.pos++]))<<7,o<128?r:(r|=(127&(o=l[this.pos++]))<<14,o<128?r:(r|=(127&(o=l[this.pos++]))<<21,o<128?r:function(p,y,_){var b,S,C=_.buf;if(b=(112&(S=C[_.pos++]))>>4,S<128||(b|=(127&(S=C[_.pos++]))<<3,S<128)||(b|=(127&(S=C[_.pos++]))<<10,S<128)||(b|=(127&(S=C[_.pos++]))<<17,S<128)||(b|=(127&(S=C[_.pos++]))<<24,S<128)||(b|=(1&(S=C[_.pos++]))<<31,S<128))return Tc(p,b,y);throw new Error("Expected varint not more than 10 bytes")}(r|=(15&(o=l[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,r=this.pos;return this.pos=i,i-r>=12&&g1?function(o,l,p){return g1.decode(o.subarray(l,p))}(this.buf,r,i):function(o,l,p){for(var y="",_=l;_239?4:I>223?3:I>191?2:1;if(_+z>p)break;z===1?I<128&&(P=I):z===2?(192&(b=o[_+1]))==128&&(P=(31&I)<<6|63&b)<=127&&(P=null):z===3?(S=o[_+2],(192&(b=o[_+1]))==128&&(192&S)==128&&((P=(15&I)<<12|(63&b)<<6|63&S)<=2047||P>=55296&&P<=57343)&&(P=null)):z===4&&(S=o[_+2],C=o[_+3],(192&(b=o[_+1]))==128&&(192&S)==128&&(192&C)==128&&((P=(15&I)<<18|(63&b)<<12|(63&S)<<6|63&C)<=65535||P>=1114112)&&(P=null)),P===null?(P=65533,z=1):P>65535&&(P-=65536,y+=String.fromCharCode(P>>>10&1023|55296),P=56320|1023&P),y+=String.fromCharCode(P),_+=z}return y}(this.buf,r,i)},readBytes:function(){var i=this.readVarint()+this.pos,r=this.buf.subarray(this.pos,i);return this.pos=i,r},readPackedVarint:function(i,r){if(this.type!==Xt.Bytes)return i.push(this.readVarint(r));var o=Cs(this);for(i=i||[];this.pos127;);else if(r===Xt.Bytes)this.pos=this.readVarint()+this.pos;else if(r===Xt.Fixed32)this.pos+=4;else{if(r!==Xt.Fixed64)throw new Error("Unimplemented type: "+r);this.pos+=8}},writeTag:function(i,r){this.writeVarint(i<<3|r)},realloc:function(i){for(var r=this.length||16;r268435455||i<0?function(r,o){var l,p;if(r>=0?(l=r%4294967296|0,p=r/4294967296|0):(p=~(-r/4294967296),4294967295^(l=~(-r%4294967296))?l=l+1|0:(l=0,p=p+1|0)),r>=18446744073709552e3||r<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");o.realloc(10),function(y,_,b){b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,b.buf[b.pos]=127&(y>>>=7)}(l,0,o),function(y,_){var b=(7&y)<<4;_.buf[_.pos++]|=b|((y>>>=3)?128:0),y&&(_.buf[_.pos++]=127&y|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=127&y|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=127&y|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=127&y|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=127&y)))))}(p,o)}(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 r=this.pos;this.pos=function(l,p,y){for(var _,b,S=0;S55295&&_<57344){if(!b){_>56319||S+1===p.length?(l[y++]=239,l[y++]=191,l[y++]=189):b=_;continue}if(_<56320){l[y++]=239,l[y++]=191,l[y++]=189,b=_;continue}_=b-55296<<10|_-56320|65536,b=null}else b&&(l[y++]=239,l[y++]=191,l[y++]=189,b=null);_<128?l[y++]=_:(_<2048?l[y++]=_>>6|192:(_<65536?l[y++]=_>>12|224:(l[y++]=_>>18|240,l[y++]=_>>12&63|128),l[y++]=_>>6&63|128),l[y++]=63&_|128)}return y}(this.buf,i,this.pos);var o=this.pos-r;o>=128&&y1(r,o,this),this.pos=r-1,this.writeVarint(o),this.pos+=o},writeFloat:function(i){this.realloc(4),f1(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),f1(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var r=i.length;this.writeVarint(r),this.realloc(r);for(var o=0;o=128&&y1(o,l,this),this.pos=o-1,this.writeVarint(l),this.pos+=l},writeMessage:function(i,r,o){this.writeTag(i,Xt.Bytes),this.writeRawMessage(r,o)},writePackedVarint:function(i,r){r.length&&this.writeMessage(i,lC,r)},writePackedSVarint:function(i,r){r.length&&this.writeMessage(i,cC,r)},writePackedBoolean:function(i,r){r.length&&this.writeMessage(i,dC,r)},writePackedFloat:function(i,r){r.length&&this.writeMessage(i,uC,r)},writePackedDouble:function(i,r){r.length&&this.writeMessage(i,hC,r)},writePackedFixed32:function(i,r){r.length&&this.writeMessage(i,pC,r)},writePackedSFixed32:function(i,r){r.length&&this.writeMessage(i,fC,r)},writePackedFixed64:function(i,r){r.length&&this.writeMessage(i,mC,r)},writePackedSFixed64:function(i,r){r.length&&this.writeMessage(i,gC,r)},writeBytesField:function(i,r){this.writeTag(i,Xt.Bytes),this.writeBytes(r)},writeFixed32Field:function(i,r){this.writeTag(i,Xt.Fixed32),this.writeFixed32(r)},writeSFixed32Field:function(i,r){this.writeTag(i,Xt.Fixed32),this.writeSFixed32(r)},writeFixed64Field:function(i,r){this.writeTag(i,Xt.Fixed64),this.writeFixed64(r)},writeSFixed64Field:function(i,r){this.writeTag(i,Xt.Fixed64),this.writeSFixed64(r)},writeVarintField:function(i,r){this.writeTag(i,Xt.Varint),this.writeVarint(r)},writeSVarintField:function(i,r){this.writeTag(i,Xt.Varint),this.writeSVarint(r)},writeStringField:function(i,r){this.writeTag(i,Xt.Bytes),this.writeString(r)},writeFloatField:function(i,r){this.writeTag(i,Xt.Fixed32),this.writeFloat(r)},writeDoubleField:function(i,r){this.writeTag(i,Xt.Fixed64),this.writeDouble(r)},writeBooleanField:function(i,r){this.writeVarintField(i,!!r)}};var Zg=L(d1);const Gg=3;function yC(i,r,o){i===1&&o.readMessage(_C,r)}function _C(i,r,o){if(i===3){const{id:l,bitmap:p,width:y,height:_,left:b,top:S,advance:C}=o.readMessage(vC,{});r.push({id:l,bitmap:new gh({width:y+2*Gg,height:_+2*Gg},p),metrics:{width:y,height:_,left:b,top:S,advance:C}})}}function vC(i,r,o){i===1?r.id=o.readVarint():i===2?r.bitmap=o.readBytes():i===3?r.width=o.readVarint():i===4?r.height=o.readVarint():i===5?r.left=o.readSVarint():i===6?r.top=o.readSVarint():i===7&&(r.advance=o.readVarint())}const v1=Gg;function x1(i){let r=0,o=0;for(const _ of i)r+=_.w*_.h,o=Math.max(o,_.w);i.sort((_,b)=>b.h-_.h);const l=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(r/.95)),o),h:1/0}];let p=0,y=0;for(const _ of i)for(let b=l.length-1;b>=0;b--){const S=l[b];if(!(_.w>S.w||_.h>S.h)){if(_.x=S.x,_.y=S.y,y=Math.max(y,_.y+_.h),p=Math.max(p,_.x+_.w),_.w===S.w&&_.h===S.h){const C=l.pop();b=0&&l>=r&&Ap[this.text.charCodeAt(l)];l--)o--;this.text=this.text.substring(r,o),this.sectionIndex=this.sectionIndex.slice(r,o)}substring(r,o){const l=new Cc;return l.text=this.text.substring(r,o),l.sectionIndex=this.sectionIndex.slice(r,o),l.sections=this.sections,l}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((r,o)=>Math.max(r,this.sections[o].scale),0)}addTextSection(r,o){this.text+=r.text,this.sections.push(Th.forText(r.scale,r.fontStack||o));const l=this.sections.length-1;for(let p=0;p=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Pp(i,r,o,l,p,y,_,b,S,C,I,P,z,B,N){const U=Cc.fromFeature(i,p);let W;P===v.ah.vertical&&U.verticalizePunctuation();const{processBidirectionalText:J,processStyledBidirectionalText:fe}=Qn;if(J&&U.sections.length===1){W=[];const xe=J(U.toString(),Wg(U,C,y,r,l,B));for(const Ee of xe){const qe=new Cc;qe.text=Ee,qe.sections=U.sections;for(let at=0;at0&&Is>gn&&(gn=Is)}else{const $i=qe[Ot.fontStack],sn=$i&&$i[hr];if(sn&&sn.rect)Ac=sn.rect,_r=sn.metrics;else{const Is=Ee[Ot.fontStack],Ah=Is&&Is[hr];if(!Ah)continue;_r=Ah.metrics}gi=(Jr-Ot.scale)*jr}co?(xe.verticalizable=!0,Un.push({glyph:hr,imageName:Ko,x:ft,y:er+gi,vertical:co,scale:Ot.scale,fontStack:Ot.fontStack,sectionIndex:nr,metrics:_r,rect:Ac}),ft+=Xo*Ot.scale+Se):(Un.push({glyph:hr,imageName:Ko,x:ft,y:er+gi,vertical:co,scale:Ot.scale,fontStack:Ot.fontStack,sectionIndex:nr,metrics:_r,rect:Ac}),ft+=_r.advance*Ot.scale+Se)}Un.length!==0&&(Yt=Math.max(ft-Se,Yt),SC(Un,0,Un.length-1,lo,gn)),ft=0;const Ni=Oe*Jr+gn;mn.lineOffset=Math.max(gn,Sn),er+=Ni,Xr=Math.max(Ni,Xr),++fn}var Yr;const On=er-Sh,{horizontalAlign:Nn,verticalAlign:$n}=Kg(et);(function(Tr,Jr,Sn,mn,Un,gn,Ni,ri,Ot){const nr=(Jr-Sn)*Un;let hr=0;hr=gn!==Ni?-ri*mn-Sh:(-mn*Ot+.5)*Ni;for(const gi of Tr)for(const _r of gi.positionedGlyphs)_r.x+=nr,_r.y+=hr})(xe.positionedLines,lo,Nn,$n,Yt,Xr,Oe,On,$e.length),xe.top+=-$n*On,xe.bottom=xe.top+On,xe.left+=-Nn*Yt,xe.right=xe.left+Yt}(he,r,o,l,W,_,b,S,P,C,z,N),!function(xe){for(const Ee of xe)if(Ee.positionedGlyphs.length!==0)return!1;return!0}(oe)&&he}const Ap={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},xC={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},bC={40:!0};function w1(i,r,o,l,p,y){if(r.imageName){const _=l[r.imageName];return _?_.displaySize[0]*r.scale*jr/y+p:0}{const _=o[r.fontStack],b=_&&_[i];return b?b.metrics.advance*r.scale+p:0}}function S1(i,r,o,l){const p=Math.pow(i-r,2);return l?i=0;let C=0;for(let P=0;PC){const I=Math.ceil(y/C);p*=I/_,_=I}return{x1:l,y1:p,x2:l+y,y2:p+_}}function I1(i,r,o,l,p,y){const _=i.image;let b;if(_.content){const W=_.content,J=_.pixelRatio||1;b=[W[0]/J,W[1]/J,_.displaySize[0]-W[2]/J,_.displaySize[1]-W[3]/J]}const S=r.left*y,C=r.right*y;let I,P,z,B;o==="width"||o==="both"?(B=p[0]+S-l[3],P=p[0]+C+l[1]):(B=p[0]+(S+C-_.displaySize[0])/2,P=B+_.displaySize[0]);const N=r.top*y,U=r.bottom*y;return o==="height"||o==="both"?(I=p[1]+N-l[0],z=p[1]+U+l[2]):(I=p[1]+(N+U-_.displaySize[1])/2,z=I+_.displaySize[1]),{image:_,top:I,right:P,bottom:z,left:B,collisionPadding:b}}const kh=255,Wo=128,_a=kh*Wo;function E1(i,r){const{expression:o}=r;if(o.kind==="constant")return{kind:"constant",layoutSize:o.evaluate(new ar(i+1))};if(o.kind==="source")return{kind:"source"};{const{zoomStops:l,interpolationType:p}=o;let y=0;for(;y_.id),this.index=r.index,this.pixelRatio=r.pixelRatio,this.sourceLayerIndex=r.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=zg([]),this.placementViewportMatrix=zg([]);const o=this.layers[0]._unevaluatedLayout._values;this.textSizeData=E1(this.zoom,o["text-size"]),this.iconSizeData=E1(this.zoom,o["icon-size"]);const l=this.layers[0].layout,p=l.get("symbol-sort-key"),y=l.get("symbol-z-order");this.canOverlap=Xg(l,"text-overlap","text-allow-overlap")!=="never"||Xg(l,"icon-overlap","icon-allow-overlap")!=="never"||l.get("text-ignore-placement")||l.get("icon-ignore-placement"),this.sortFeaturesByKey=y!=="viewport-y"&&!p.isConstant(),this.sortFeaturesByY=(y==="viewport-y"||y==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,l.get("symbol-placement")==="point"&&(this.writingModes=l.get("text-writing-mode").map(_=>v.ah[_])),this.stateDependentLayerIds=this.layers.filter(_=>_.isStateDependent()).map(_=>_.id),this.sourceID=r.sourceID}createArrays(){this.text=new Jg(new hl(this.layers,this.zoom,r=>/^text/.test(r))),this.icon=new Jg(new hl(this.layers,this.zoom,r=>/^icon/.test(r))),this.glyphOffsetArray=new cr,this.lineVertexArray=new un,this.symbolInstances=new Et,this.textAnchorOffsets=new ur}calculateGlyphDependencies(r,o,l,p,y){for(let _=0;_0)&&(_.value.kind!=="constant"||_.value.value.length>0),I=S.value.kind!=="constant"||!!S.value.value||Object.keys(S.parameters).length>0,P=y.get("symbol-sort-key");if(this.features=[],!C&&!I)return;const z=o.iconDependencies,B=o.glyphDependencies,N=o.availableImages,U=new ar(this.zoom);for(const{feature:W,id:J,index:fe,sourceLayerIndex:oe}of r){const he=p._featureFilter.needGeometry,xe=pl(W,he);if(!p._featureFilter.filter(U,xe,l))continue;let Ee,qe;if(he||(xe.geometry=dl(W)),C){const $e=p.getValueAndResolveTokens("text-field",xe,l,N),Oe=Kn.factory($e),et=this.hasRTLText=this.hasRTLText||IC(Oe);(!et||Qn.getRTLTextPluginStatus()==="unavailable"||et&&Qn.isParsed())&&(Ee=aC(Oe,p,xe))}if(I){const $e=p.getValueAndResolveTokens("icon-image",xe,l,N);qe=$e instanceof Yn?$e:Yn.fromString($e)}if(!Ee&&!qe)continue;const at=this.sortFeaturesByKey?P.evaluate(xe,{},l):void 0;if(this.features.push({id:J,text:Ee,icon:qe,index:fe,sourceLayerIndex:oe,geometry:xe.geometry,properties:W.properties,type:kC[W.type],sortKey:at}),qe&&(z[qe.name]=!0),Ee){const $e=_.evaluate(xe,{},l).join(","),Oe=y.get("text-rotation-alignment")!=="viewport"&&y.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(v.ah.vertical)>=0;for(const et of Ee.sections)if(et.image)z[et.image.name]=!0;else{const Xe=ah(Ee.toString()),He=et.fontStack||$e,Se=B[He]=B[He]||{};this.calculateGlyphDependencies(et.text,Se,Oe,this.allowVerticalPlacement,Xe)}}}y.get("symbol-placement")==="line"&&(this.features=function(W){const J={},fe={},oe=[];let he=0;function xe($e){oe.push(W[$e]),he++}function Ee($e,Oe,et){const Xe=fe[$e];return delete fe[$e],fe[Oe]=Xe,oe[Xe].geometry[0].pop(),oe[Xe].geometry[0]=oe[Xe].geometry[0].concat(et[0]),Xe}function qe($e,Oe,et){const Xe=J[Oe];return delete J[Oe],J[$e]=Xe,oe[Xe].geometry[0].shift(),oe[Xe].geometry[0]=et[0].concat(oe[Xe].geometry[0]),Xe}function at($e,Oe,et){const Xe=et?Oe[0][Oe[0].length-1]:Oe[0][0];return`${$e}:${Xe.x}:${Xe.y}`}for(let $e=0;$e$e.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((W,J)=>W.sortKey-J.sortKey)}update(r,o,l){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(r,o,this.layers,l),this.icon.programConfigurations.updatePaintArrays(r,o,this.layers,l))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(r){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(r),this.iconCollisionBox.upload(r)),this.text.upload(r,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(r,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(r,o){const l=this.lineVertexArray.length;if(r.segment!==void 0){let p=r.dist(o[r.segment+1]),y=r.dist(o[r.segment]);const _={};for(let b=r.segment+1;b=0;b--)_[b]={x:o[b].x,y:o[b].y,tileUnitDistanceFromAnchor:y},b>0&&(y+=o[b-1].dist(o[b]));for(let b=0;b0}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(r,o){const l=r.placedSymbolArray.get(o),p=l.vertexStartIndex+4*l.numGlyphs;for(let y=l.vertexStartIndex;yp[b]-p[S]||y[S]-y[b]),_}addToSortKeyRanges(r,o){const l=this.sortKeyRanges[this.sortKeyRanges.length-1];l&&l.sortKey===o?l.symbolInstanceEnd=r+1:this.sortKeyRanges.push({sortKey:o,symbolInstanceStart:r,symbolInstanceEnd:r+1})}sortFeatures(r){if(this.sortFeaturesByY&&this.sortedAngle!==r&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(r),this.sortedAngle=r,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const o of this.symbolInstanceIndexes){const l=this.symbolInstances.get(o);this.featureSortOrder.push(l.featureIndex),[l.rightJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.leftJustifiedTextSymbolIndex].forEach((p,y,_)=>{p>=0&&_.indexOf(p)===y&&this.addIndicesForPlacedSymbol(this.text,p)}),l.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,l.verticalPlacedTextSymbolIndex),l.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.placedIconSymbolIndex),l.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let P1,A1;Ke("SymbolBucket",Ic,{omit:["layers","collisionBoxArray","features","compareText"]}),Ic.MAX_GLYPHS=65535,Ic.addDynamicAttributes=Yg;var ey={get paint(){return A1=A1||new m({"icon-opacity":new ct(ve.paint_symbol["icon-opacity"]),"icon-color":new ct(ve.paint_symbol["icon-color"]),"icon-halo-color":new ct(ve.paint_symbol["icon-halo-color"]),"icon-halo-width":new ct(ve.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ct(ve.paint_symbol["icon-halo-blur"]),"icon-translate":new Ye(ve.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ye(ve.paint_symbol["icon-translate-anchor"]),"text-opacity":new ct(ve.paint_symbol["text-opacity"]),"text-color":new ct(ve.paint_symbol["text-color"],{runtimeType:Ln,getOverride:i=>i.textColor,hasOverride:i=>!!i.textColor}),"text-halo-color":new ct(ve.paint_symbol["text-halo-color"]),"text-halo-width":new ct(ve.paint_symbol["text-halo-width"]),"text-halo-blur":new ct(ve.paint_symbol["text-halo-blur"]),"text-translate":new Ye(ve.paint_symbol["text-translate"]),"text-translate-anchor":new Ye(ve.paint_symbol["text-translate-anchor"])})},get layout(){return P1=P1||new m({"symbol-placement":new Ye(ve.layout_symbol["symbol-placement"]),"symbol-spacing":new Ye(ve.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ye(ve.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ct(ve.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ye(ve.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ye(ve.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ye(ve.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ye(ve.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ye(ve.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ye(ve.layout_symbol["icon-rotation-alignment"]),"icon-size":new ct(ve.layout_symbol["icon-size"]),"icon-text-fit":new Ye(ve.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ye(ve.layout_symbol["icon-text-fit-padding"]),"icon-image":new ct(ve.layout_symbol["icon-image"]),"icon-rotate":new ct(ve.layout_symbol["icon-rotate"]),"icon-padding":new ct(ve.layout_symbol["icon-padding"]),"icon-keep-upright":new Ye(ve.layout_symbol["icon-keep-upright"]),"icon-offset":new ct(ve.layout_symbol["icon-offset"]),"icon-anchor":new ct(ve.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ye(ve.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ye(ve.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ye(ve.layout_symbol["text-rotation-alignment"]),"text-field":new ct(ve.layout_symbol["text-field"]),"text-font":new ct(ve.layout_symbol["text-font"]),"text-size":new ct(ve.layout_symbol["text-size"]),"text-max-width":new ct(ve.layout_symbol["text-max-width"]),"text-line-height":new Ye(ve.layout_symbol["text-line-height"]),"text-letter-spacing":new ct(ve.layout_symbol["text-letter-spacing"]),"text-justify":new ct(ve.layout_symbol["text-justify"]),"text-radial-offset":new ct(ve.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ye(ve.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new ct(ve.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new ct(ve.layout_symbol["text-anchor"]),"text-max-angle":new Ye(ve.layout_symbol["text-max-angle"]),"text-writing-mode":new Ye(ve.layout_symbol["text-writing-mode"]),"text-rotate":new ct(ve.layout_symbol["text-rotate"]),"text-padding":new Ye(ve.layout_symbol["text-padding"]),"text-keep-upright":new Ye(ve.layout_symbol["text-keep-upright"]),"text-transform":new ct(ve.layout_symbol["text-transform"]),"text-offset":new ct(ve.layout_symbol["text-offset"]),"text-allow-overlap":new Ye(ve.layout_symbol["text-allow-overlap"]),"text-overlap":new Ye(ve.layout_symbol["text-overlap"]),"text-ignore-placement":new Ye(ve.layout_symbol["text-ignore-placement"]),"text-optional":new Ye(ve.layout_symbol["text-optional"])})}};class M1{constructor(r){if(r.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=r.property.overrides?r.property.overrides.runtimeType:Ei,this.defaultValue=r}evaluate(r){if(r.formattedSection){const o=this.defaultValue.property.overrides;if(o&&o.hasOverride(r.formattedSection))return o.getOverride(r.formattedSection)}return r.feature&&r.featureState?this.defaultValue.evaluate(r.feature,r.featureState):this.defaultValue.property.specification.default}eachChild(r){this.defaultValue.isConstant()||r(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ke("FormatSectionOverride",M1,{omit:["defaultValue"]});class zp extends s{constructor(r){super(r,ey)}recalculate(r,o){if(super.recalculate(r,o),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 l=this.layout.get("text-writing-mode");if(l){const p=[];for(const y of l)p.indexOf(y)<0&&p.push(y);this.layout._values["text-writing-mode"]=p}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(r,o,l,p){const y=this.layout.get(r).evaluate(o,{},l,p),_=this._unevaluatedLayout._values[r];return _.isDataDriven()||ec(_.value)||!y?y:function(b,S){return S.replace(/{([^{}]+)}/g,(C,I)=>b&&I in b?String(b[I]):"")}(o.properties,y)}createBucket(r){return new Ic(r)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const r of ey.paint.overridableProperties){if(!zp.hasPaintOverride(this.layout,r))continue;const o=this.paint.get(r),l=new M1(o),p=new Ql(l,o.property.specification);let y=null;y=o.value.kind==="constant"||o.value.kind==="source"?new ea("source",p):new ta("composite",p,o.value.zoomStops),this.paint._values[r]=new so(o.property,y,o.parameters)}}_handleOverridablePaintPropertyUpdate(r,o,l){return!(!this.layout||o.isDataDriven()||l.isDataDriven())&&zp.hasPaintOverride(this.layout,r)}static hasPaintOverride(r,o){const l=r.get("text-field"),p=ey.paint.properties[o];let y=!1;const _=b=>{for(const S of b)if(p.overrides&&p.overrides.hasOverride(S))return void(y=!0)};if(l.value.kind==="constant"&&l.value.value instanceof Kn)_(l.value.value.sections);else if(l.value.kind==="source"){const b=C=>{y||(C instanceof Ai&&Br(C.value)===Eo?_(C.value.sections):C instanceof ql?_(C.sections):C.eachChild(b))},S=l.value;S._styleExpression&&b(S._styleExpression.expression)}return y}}let z1;var EC={get paint(){return z1=z1||new m({"background-color":new Ye(ve.paint_background["background-color"]),"background-pattern":new pc(ve.paint_background["background-pattern"]),"background-opacity":new Ye(ve.paint_background["background-opacity"])})}};class PC extends s{constructor(r){super(r,EC)}}let L1;var AC={get paint(){return L1=L1||new m({"raster-opacity":new Ye(ve.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ye(ve.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ye(ve.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ye(ve.paint_raster["raster-brightness-max"]),"raster-saturation":new Ye(ve.paint_raster["raster-saturation"]),"raster-contrast":new Ye(ve.paint_raster["raster-contrast"]),"raster-resampling":new Ye(ve.paint_raster["raster-resampling"]),"raster-fade-duration":new Ye(ve.paint_raster["raster-fade-duration"])})}};class MC extends s{constructor(r){super(r,AC)}}class zC extends s{constructor(r){super(r,{}),this.onAdd=o=>{this.implementation.onAdd&&this.implementation.onAdd(o,o.painter.context.gl)},this.onRemove=o=>{this.implementation.onRemove&&this.implementation.onRemove(o,o.painter.context.gl)},this.implementation=r}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 LC{constructor(r){this._methodToThrottle=r,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const ty=63710088e-1;class va{constructor(r,o){if(isNaN(r)||isNaN(o))throw new Error(`Invalid LngLat object: (${r}, ${o})`);if(this.lng=+r,this.lat=+o,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new va(Pe(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(r){const o=Math.PI/180,l=this.lat*o,p=r.lat*o,y=Math.sin(l)*Math.sin(p)+Math.cos(l)*Math.cos(p)*Math.cos((r.lng-this.lng)*o);return ty*Math.acos(Math.min(y,1))}static convert(r){if(r instanceof va)return r;if(Array.isArray(r)&&(r.length===2||r.length===3))return new va(Number(r[0]),Number(r[1]));if(!Array.isArray(r)&&typeof r=="object"&&r!==null)return new va(Number("lng"in r?r.lng:r.lon),Number(r.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 R1=2*Math.PI*ty;function D1(i){return R1*Math.cos(i*Math.PI/180)}function B1(i){return(180+i)/360}function F1(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function O1(i,r){return i/D1(r)}function ry(i){return 360/Math.PI*Math.atan(Math.exp((180-360*i)*Math.PI/180))-90}class Ch{constructor(r,o,l=0){this.x=+r,this.y=+o,this.z=+l}static fromLngLat(r,o=0){const l=va.convert(r);return new Ch(B1(l.lng),F1(l.lat),O1(o,l.lat))}toLngLat(){return new va(360*this.x-180,ry(this.y))}toAltitude(){return this.z*D1(ry(this.y))}meterInMercatorCoordinateUnits(){return 1/R1*(r=ry(this.y),1/Math.cos(r*Math.PI/180));var r}}function N1(i,r,o){var l=2*Math.PI*6378137/256/Math.pow(2,o);return[i*l-2*Math.PI*6378137/2,r*l-2*Math.PI*6378137/2]}class ny{constructor(r,o,l){if(!function(p,y,_){return!(p<0||p>25||_<0||_>=Math.pow(2,p)||y<0||y>=Math.pow(2,p))}(r,o,l))throw new Error(`x=${o}, y=${l}, z=${r} outside of bounds. 0<=x<${Math.pow(2,r)}, 0<=y<${Math.pow(2,r)} 0<=z<=25 `);this.z=r,this.x=o,this.y=l,this.key=Ih(0,r,r,o,l)}equals(r){return this.z===r.z&&this.x===r.x&&this.y===r.y}url(r,o,l){const p=(_=this.y,b=this.z,S=N1(256*(y=this.x),256*(_=Math.pow(2,b)-_-1),b),C=N1(256*(y+1),256*(_+1),b),S[0]+","+S[1]+","+C[0]+","+C[1]);var y,_,b,S,C;const I=function(P,z,B){let N,U="";for(let W=P;W>0;W--)N=1<1?"@2x":"").replace(/{quadkey}/g,I).replace(/{bbox-epsg-3857}/g,p)}isChildOf(r){const o=this.z-r.z;return o>0&&r.x===this.x>>o&&r.y===this.y>>o}getTilePoint(r){const o=Math.pow(2,this.z);return new q((r.x*o-this.x)*Fr,(r.y*o-this.y)*Fr)}toString(){return`${this.z}/${this.x}/${this.y}`}}class $1{constructor(r,o){this.wrap=r,this.canonical=o,this.key=Ih(r,o.z,o.z,o.x,o.y)}}class Oi{constructor(r,o,l,p,y){if(r= z; overscaledZ = ${r}; z = ${l}`);this.overscaledZ=r,this.wrap=o,this.canonical=new ny(l,+p,+y),this.key=Ih(o,r,l,p,y)}clone(){return new Oi(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(r){return this.overscaledZ===r.overscaledZ&&this.wrap===r.wrap&&this.canonical.equals(r.canonical)}scaledTo(r){if(r>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${r}; overscaledZ = ${this.overscaledZ}`);const o=this.canonical.z-r;return r>this.canonical.z?new Oi(r,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Oi(r,this.wrap,r,this.canonical.x>>o,this.canonical.y>>o)}calculateScaledKey(r,o){if(r>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${r}; overscaledZ = ${this.overscaledZ}`);const l=this.canonical.z-r;return r>this.canonical.z?Ih(this.wrap*+o,r,this.canonical.z,this.canonical.x,this.canonical.y):Ih(this.wrap*+o,r,r,this.canonical.x>>l,this.canonical.y>>l)}isChildOf(r){if(r.wrap!==this.wrap)return!1;const o=this.canonical.z-r.canonical.z;return r.overscaledZ===0||r.overscaledZ>o&&r.canonical.y===this.canonical.y>>o}children(r){if(this.overscaledZ>=r)return[new Oi(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const o=this.canonical.z+1,l=2*this.canonical.x,p=2*this.canonical.y;return[new Oi(o,this.wrap,o,l,p),new Oi(o,this.wrap,o,l+1,p),new Oi(o,this.wrap,o,l,p+1),new Oi(o,this.wrap,o,l+1,p+1)]}isLessThan(r){return this.wrapr.wrap)&&(this.overscaledZr.overscaledZ)&&(this.canonical.xr.canonical.x)&&this.canonical.ythis.max&&(this.max=P),P=this.dim+1||o<-1||o>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(o+1)*this.stride+(r+1)}unpack(r,o,l){return r*this.redFactor+o*this.greenFactor+l*this.blueFactor-this.baseShift}getPixels(){return new Fi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(r,o,l){if(this.dim!==r.dim)throw new Error("dem dimension mismatch");let p=o*this.dim,y=o*this.dim+this.dim,_=l*this.dim,b=l*this.dim+this.dim;switch(o){case-1:p=y-1;break;case 1:y=p+1}switch(l){case-1:_=b-1;break;case 1:b=_+1}const S=-o*this.dim,C=-l*this.dim;for(let I=_;I=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${r} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[r]}}class V1{constructor(r,o,l,p,y){this.type="Feature",this._vectorTileFeature=r,r._z=o,r._x=l,r._y=p,this.properties=r.properties,this.id=y}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(r){this._geometry=r}toJSON(){const r={geometry:this.geometry};for(const o in this)o!=="_geometry"&&o!=="_vectorTileFeature"&&(r[o]=this[o]);return r}}class q1{constructor(r,o){this.tileID=r,this.x=r.canonical.x,this.y=r.canonical.y,this.z=r.canonical.z,this.grid=new oa(Fr,16,0),this.grid3D=new oa(Fr,16,0),this.featureIndexArray=new bn,this.promoteId=o}insert(r,o,l,p,y,_){const b=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(l,p,y);const S=_?this.grid3D:this.grid;for(let C=0;C=0&&P[3]>=0&&S.insert(b,P[0],P[1],P[2],P[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new ga.VectorTile(new Zg(this.rawTileData)).layers,this.sourceLayerCoder=new j1(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(r,o,l,p){this.loadVTLayers();const y=r.params||{},_=Fr/r.tileSize/r.scale,b=Gu(y.filter),S=r.queryGeometry,C=r.queryPadding*_,I=G1(S),P=this.grid.query(I.minX-C,I.minY-C,I.maxX+C,I.maxY+C),z=G1(r.cameraQueryGeometry),B=this.grid3D.query(z.minX-C,z.minY-C,z.maxX+C,z.maxY+C,(W,J,fe,oe)=>function(he,xe,Ee,qe,at){for(const Oe of he)if(xe<=Oe.x&&Ee<=Oe.y&&qe>=Oe.x&&at>=Oe.y)return!0;const $e=[new q(xe,Ee),new q(xe,at),new q(qe,at),new q(qe,Ee)];if(he.length>2){for(const Oe of $e)if(xc(he,Oe))return!0}for(let Oe=0;Oe(oe||(oe=dl(he)),xe.queryIntersectsFeature(S,he,Ee,oe,this.z,r.transform,_,r.pixelPosMatrix)))}return N}loadMatchingFeature(r,o,l,p,y,_,b,S,C,I,P){const z=this.bucketLayerIDs[o];if(_&&!function(W,J){for(let fe=0;fe=0)return!0;return!1}(_,z))return;const B=this.sourceLayerCoder.decode(l),N=this.vtLayers[B].feature(p);if(y.needGeometry){const W=pl(N,!0);if(!y.filter(new ar(this.tileID.overscaledZ),W,this.tileID.canonical))return}else if(!y.filter(new ar(this.tileID.overscaledZ),N))return;const U=this.getId(N,B);for(let W=0;W{const b=r instanceof ll?r.get(_):null;return b&&b.evaluate?b.evaluate(o,l,p):b})}function G1(i){let r=1/0,o=1/0,l=-1/0,p=-1/0;for(const y of i)r=Math.min(r,y.x),o=Math.min(o,y.y),l=Math.max(l,y.x),p=Math.max(p,y.y);return{minX:r,minY:o,maxX:l,maxY:p}}function RC(i,r){return r-i}function H1(i,r,o,l,p){const y=[];for(let _=0;_=l&&P.x>=l||(I.x>=l?I=new q(l,I.y+(l-I.x)/(P.x-I.x)*(P.y-I.y))._round():P.x>=l&&(P=new q(l,I.y+(l-I.x)/(P.x-I.x)*(P.y-I.y))._round()),I.y>=p&&P.y>=p||(I.y>=p?I=new q(I.x+(p-I.y)/(P.y-I.y)*(P.x-I.x),p)._round():P.y>=p&&(P=new q(I.x+(p-I.y)/(P.y-I.y)*(P.x-I.x),p)._round()),S&&I.equals(S[S.length-1])||(S=[I],y.push(S)),S.push(P)))))}}return y}Ke("FeatureIndex",q1,{omit:["rawTileData","sourceLayerCoder"]});class xa extends q{constructor(r,o,l,p){super(r,o),this.angle=l,p!==void 0&&(this.segment=p)}clone(){return new xa(this.x,this.y,this.angle,this.segment)}}function W1(i,r,o,l,p){if(r.segment===void 0||o===0)return!0;let y=r,_=r.segment+1,b=0;for(;b>-o/2;){if(_--,_<0)return!1;b-=i[_].dist(y),y=i[_]}b+=i[_].dist(i[_+1]),_++;const S=[];let C=0;for(;bl;)C-=S.shift().angleDelta;if(C>p)return!1;_++,b+=I.dist(P)}return!0}function K1(i){let r=0;for(let o=0;oC){const N=(C-S)/B,U=Rn.number(P.x,z.x,N),W=Rn.number(P.y,z.y,N),J=new xa(U,W,z.angleTo(P),I);return J._round(),!_||W1(i,J,b,_,r)?J:void 0}S+=B}}function BC(i,r,o,l,p,y,_,b,S){const C=X1(l,y,_),I=Y1(l,p),P=I*_,z=i[0].x===0||i[0].x===S||i[0].y===0||i[0].y===S;return r-P=0&&he=0&&xe=0&&z+C<=I){const Ee=new xa(he,xe,fe,N);Ee._round(),l&&!W1(i,Ee,y,l,p)||B.push(Ee)}}P+=J}return b||B.length||_||(B=J1(i,P/2,o,l,p,y,_,!0,S)),B}Ke("Anchor",xa);const Ec=ti;function Q1(i,r,o,l){const p=[],y=i.image,_=y.pixelRatio,b=y.paddedRect.w-2*Ec,S=y.paddedRect.h-2*Ec;let C={x1:i.left,y1:i.top,x2:i.right,y2:i.bottom};const I=y.stretchX||[[0,b]],P=y.stretchY||[[0,S]],z=(Se,tt)=>Se+tt[1]-tt[0],B=I.reduce(z,0),N=P.reduce(z,0),U=b-B,W=S-N;let J=0,fe=B,oe=0,he=N,xe=0,Ee=U,qe=0,at=W;if(y.content&&l){const Se=y.content,tt=Se[2]-Se[0],Qe=Se[3]-Se[1];(y.textFitWidth||y.textFitHeight)&&(C=C1(i)),J=Lp(I,0,Se[0]),oe=Lp(P,0,Se[1]),fe=Lp(I,Se[0],Se[2]),he=Lp(P,Se[1],Se[3]),xe=Se[0]-J,qe=Se[1]-oe,Ee=tt-fe,at=Qe-he}const $e=C.x1,Oe=C.y1,et=C.x2-$e,Xe=C.y2-Oe,He=(Se,tt,Qe,ft)=>{const er=Rp(Se.stretch-J,fe,et,$e),Yt=Dp(Se.fixed-xe,Ee,Se.stretch,B),Xr=Rp(tt.stretch-oe,he,Xe,Oe),lo=Dp(tt.fixed-qe,at,tt.stretch,N),fn=Rp(Qe.stretch-J,fe,et,$e),Yr=Dp(Qe.fixed-xe,Ee,Qe.stretch,B),On=Rp(ft.stretch-oe,he,Xe,Oe),Nn=Dp(ft.fixed-qe,at,ft.stretch,N),$n=new q(er,Xr),Tr=new q(fn,Xr),Jr=new q(fn,On),Sn=new q(er,On),mn=new q(Yt/_,lo/_),Un=new q(Yr/_,Nn/_),gn=r*Math.PI/180;if(gn){const Ot=Math.sin(gn),nr=Math.cos(gn),hr=[nr,-Ot,Ot,nr];$n._matMult(hr),Tr._matMult(hr),Sn._matMult(hr),Jr._matMult(hr)}const Ni=Se.stretch+Se.fixed,ri=tt.stretch+tt.fixed;return{tl:$n,tr:Tr,bl:Sn,br:Jr,tex:{x:y.paddedRect.x+Ec+Ni,y:y.paddedRect.y+Ec+ri,w:Qe.stretch+Qe.fixed-Ni,h:ft.stretch+ft.fixed-ri},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:mn,pixelOffsetBR:Un,minFontScaleX:Ee/_/et,minFontScaleY:at/_/Xe,isSDF:o}};if(l&&(y.stretchX||y.stretchY)){const Se=ex(I,U,B),tt=ex(P,W,N);for(let Qe=0;Qe0&&(U=Math.max(10,U),this.circleDiameter=U)}else{const z=!((P=_.image)===null||P===void 0)&&P.content&&(_.image.textFitWidth||_.image.textFitHeight)?C1(_):{x1:_.left,y1:_.top,x2:_.right,y2:_.bottom};z.y1=z.y1*b-S[0],z.y2=z.y2*b+S[2],z.x1=z.x1*b-S[3],z.x2=z.x2*b+S[1];const B=_.collisionPadding;if(B&&(z.x1-=B[0]*b,z.y1-=B[1]*b,z.x2+=B[2]*b,z.y2+=B[3]*b),I){const N=new q(z.x1,z.y1),U=new q(z.x2,z.y1),W=new q(z.x1,z.y2),J=new q(z.x2,z.y2),fe=I*Math.PI/180;N._rotate(fe),U._rotate(fe),W._rotate(fe),J._rotate(fe),z.x1=Math.min(N.x,U.x,W.x,J.x),z.x2=Math.max(N.x,U.x,W.x,J.x),z.y1=Math.min(N.y,U.y,W.y,J.y),z.y2=Math.max(N.y,U.y,W.y,J.y)}r.emplaceBack(o.x,o.y,z.x1,z.y1,z.x2,z.y2,l,p,y)}this.boxEndIndex=r.length}}class FC{constructor(r=[],o=(l,p)=>lp?1:0){if(this.data=r,this.length=this.data.length,this.compare=o,this.length>0)for(let l=(this.length>>1)-1;l>=0;l--)this._down(l)}push(r){this.data.push(r),this._up(this.length++)}pop(){if(this.length===0)return;const r=this.data[0],o=this.data.pop();return--this.length>0&&(this.data[0]=o,this._down(0)),r}peek(){return this.data[0]}_up(r){const{data:o,compare:l}=this,p=o[r];for(;r>0;){const y=r-1>>1,_=o[y];if(l(p,_)>=0)break;o[r]=_,r=y}o[r]=p}_down(r){const{data:o,compare:l}=this,p=this.length>>1,y=o[r];for(;r=0)break;o[r]=o[_],r=_}o[r]=y}}function OC(i,r=1,o=!1){let l=1/0,p=1/0,y=-1/0,_=-1/0;const b=i[0];for(let B=0;By)&&(y=N.x),(!B||N.y>_)&&(_=N.y)}const S=Math.min(y-l,_-p);let C=S/2;const I=new FC([],NC);if(S===0)return new q(l,p);for(let B=l;BP.d||!P.d)&&(P=B,o&&console.log("found best %d after %d probes",Math.round(1e4*B.d)/1e4,z)),B.max-P.d<=r||(C=B.h/2,I.push(new Pc(B.p.x-C,B.p.y-C,C,i)),I.push(new Pc(B.p.x+C,B.p.y-C,C,i)),I.push(new Pc(B.p.x-C,B.p.y+C,C,i)),I.push(new Pc(B.p.x+C,B.p.y+C,C,i)),z+=4)}return o&&(console.log(`num probes: ${z}`),console.log(`best distance: ${P.d}`)),P.p}function NC(i,r){return r.max-i.max}function Pc(i,r,o,l){this.p=new q(i,r),this.h=o,this.d=function(p,y){let _=!1,b=1/0;for(let S=0;Sp.y!=N.y>p.y&&p.x<(N.x-B.x)*(p.y-B.y)/(N.y-B.y)+B.x&&(_=!_),b=Math.min(b,Fv(p,B,N))}}return(_?1:-1)*Math.sqrt(b)}(this.p,l),this.max=this.d+this.h*Math.SQRT2}var pn;v.aq=void 0,(pn=v.aq||(v.aq={}))[pn.center=1]="center",pn[pn.left=2]="left",pn[pn.right=3]="right",pn[pn.top=4]="top",pn[pn.bottom=5]="bottom",pn[pn["top-left"]=6]="top-left",pn[pn["top-right"]=7]="top-right",pn[pn["bottom-left"]=8]="bottom-left",pn[pn["bottom-right"]=9]="bottom-right";const ba=7,iy=Number.POSITIVE_INFINITY;function tx(i,r){return r[1]!==iy?function(o,l,p){let y=0,_=0;switch(l=Math.abs(l),p=Math.abs(p),o){case"top-right":case"top-left":case"top":_=p-ba;break;case"bottom-right":case"bottom-left":case"bottom":_=-p+ba}switch(o){case"top-right":case"bottom-right":case"right":y=-l;break;case"top-left":case"bottom-left":case"left":y=l}return[y,_]}(i,r[0],r[1]):function(o,l){let p=0,y=0;l<0&&(l=0);const _=l/Math.SQRT2;switch(o){case"top-right":case"top-left":y=_-ba;break;case"bottom-right":case"bottom-left":y=-_+ba;break;case"bottom":y=-l+ba;break;case"top":y=l-ba}switch(o){case"top-right":case"bottom-right":p=-_;break;case"top-left":case"bottom-left":p=_;break;case"left":p=l;break;case"right":p=-l}return[p,y]}(i,r[0])}function rx(i,r,o){var l;const p=i.layout,y=(l=p.get("text-variable-anchor-offset"))===null||l===void 0?void 0:l.evaluate(r,{},o);if(y){const b=y.values,S=[];for(let C=0;Cz*jr);I.startsWith("top")?P[1]-=ba:I.startsWith("bottom")&&(P[1]+=ba),S[C+1]=P}return new ci(S)}const _=p.get("text-variable-anchor");if(_){let b;b=i._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[p.get("text-radial-offset").evaluate(r,{},o)*jr,iy]:p.get("text-offset").evaluate(r,{},o).map(C=>C*jr);const S=[];for(const C of _)S.push(C,tx(C,b));return new ci(S)}return null}function oy(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 $C(i,r,o,l,p,y,_,b,S,C,I){let P=y.textMaxSize.evaluate(r,{});P===void 0&&(P=_);const z=i.layers[0].layout,B=z.get("icon-offset").evaluate(r,{},I),N=ix(o.horizontal),U=_/24,W=i.tilePixelRatio*U,J=i.tilePixelRatio*P/24,fe=i.tilePixelRatio*b,oe=i.tilePixelRatio*z.get("symbol-spacing"),he=z.get("text-padding")*i.tilePixelRatio,xe=function(Se,tt,Qe,ft=1){const er=Se.get("icon-padding").evaluate(tt,{},Qe),Yt=er&&er.values;return[Yt[0]*ft,Yt[1]*ft,Yt[2]*ft,Yt[3]*ft]}(z,r,I,i.tilePixelRatio),Ee=z.get("text-max-angle")/180*Math.PI,qe=z.get("text-rotation-alignment")!=="viewport"&&z.get("symbol-placement")!=="point",at=z.get("icon-rotation-alignment")==="map"&&z.get("symbol-placement")!=="point",$e=z.get("symbol-placement"),Oe=oe/2,et=z.get("icon-text-fit");let Xe;l&&et!=="none"&&(i.allowVerticalPlacement&&o.vertical&&(Xe=I1(l,o.vertical,et,z.get("icon-text-fit-padding"),B,U)),N&&(l=I1(l,N,et,z.get("icon-text-fit-padding"),B,U)));const He=(Se,tt)=>{tt.x<0||tt.x>=Fr||tt.y<0||tt.y>=Fr||function(Qe,ft,er,Yt,Xr,lo,fn,Yr,On,Nn,$n,Tr,Jr,Sn,mn,Un,gn,Ni,ri,Ot,nr,hr,gi,_r,Ac){const Ko=Qe.addToLineVertexArray(ft,er);let Xo,co,$i,sn,Is=0,Ah=0,lx=0,cx=0,py=-1,fy=-1;const Es={};let ux=gc("");if(Qe.allowVerticalPlacement&&Yt.vertical){const Tn=Yr.layout.get("text-rotate").evaluate(nr,{},_r)+90;$i=new Bp(On,ft,Nn,$n,Tr,Yt.vertical,Jr,Sn,mn,Tn),fn&&(sn=new Bp(On,ft,Nn,$n,Tr,fn,gn,Ni,mn,Tn))}if(Xr){const Tn=Yr.layout.get("icon-rotate").evaluate(nr,{}),Ui=Yr.layout.get("icon-text-fit")!=="none",ml=Q1(Xr,Tn,gi,Ui),Lo=fn?Q1(fn,Tn,gi,Ui):void 0;co=new Bp(On,ft,Nn,$n,Tr,Xr,gn,Ni,!1,Tn),Is=4*ml.length;const gl=Qe.iconSizeData;let Yo=null;gl.kind==="source"?(Yo=[Wo*Yr.layout.get("icon-size").evaluate(nr,{})],Yo[0]>_a&&Ct(`${Qe.layerIds[0]}: Value for "icon-size" is >= ${kh}. Reduce your "icon-size".`)):gl.kind==="composite"&&(Yo=[Wo*hr.compositeIconSizes[0].evaluate(nr,{},_r),Wo*hr.compositeIconSizes[1].evaluate(nr,{},_r)],(Yo[0]>_a||Yo[1]>_a)&&Ct(`${Qe.layerIds[0]}: Value for "icon-size" is >= ${kh}. Reduce your "icon-size".`)),Qe.addSymbols(Qe.icon,ml,Yo,Ot,ri,nr,v.ah.none,ft,Ko.lineStartIndex,Ko.lineLength,-1,_r),py=Qe.icon.placedSymbolArray.length-1,Lo&&(Ah=4*Lo.length,Qe.addSymbols(Qe.icon,Lo,Yo,Ot,ri,nr,v.ah.vertical,ft,Ko.lineStartIndex,Ko.lineLength,-1,_r),fy=Qe.icon.placedSymbolArray.length-1)}const hx=Object.keys(Yt.horizontal);for(const Tn of hx){const Ui=Yt.horizontal[Tn];if(!Xo){ux=gc(Ui.text);const Lo=Yr.layout.get("text-rotate").evaluate(nr,{},_r);Xo=new Bp(On,ft,Nn,$n,Tr,Ui,Jr,Sn,mn,Lo)}const ml=Ui.positionedLines.length===1;if(lx+=nx(Qe,ft,Ui,lo,Yr,mn,nr,Un,Ko,Yt.vertical?v.ah.horizontal:v.ah.horizontalOnly,ml?hx:[Tn],Es,py,hr,_r),ml)break}Yt.vertical&&(cx+=nx(Qe,ft,Yt.vertical,lo,Yr,mn,nr,Un,Ko,v.ah.vertical,["vertical"],Es,fy,hr,_r));const VC=Xo?Xo.boxStartIndex:Qe.collisionBoxArray.length,qC=Xo?Xo.boxEndIndex:Qe.collisionBoxArray.length,ZC=$i?$i.boxStartIndex:Qe.collisionBoxArray.length,GC=$i?$i.boxEndIndex:Qe.collisionBoxArray.length,HC=co?co.boxStartIndex:Qe.collisionBoxArray.length,WC=co?co.boxEndIndex:Qe.collisionBoxArray.length,KC=sn?sn.boxStartIndex:Qe.collisionBoxArray.length,XC=sn?sn.boxEndIndex:Qe.collisionBoxArray.length;let zo=-1;const Op=(Tn,Ui)=>Tn&&Tn.circleDiameter?Math.max(Tn.circleDiameter,Ui):Ui;zo=Op(Xo,zo),zo=Op($i,zo),zo=Op(co,zo),zo=Op(sn,zo);const dx=zo>-1?1:0;dx&&(zo*=Ac/jr),Qe.glyphOffsetArray.length>=Ic.MAX_GLYPHS&&Ct("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),nr.sortKey!==void 0&&Qe.addToSortKeyRanges(Qe.symbolInstances.length,nr.sortKey);const YC=rx(Yr,nr,_r),[JC,QC]=function(Tn,Ui){const ml=Tn.length,Lo=Ui==null?void 0:Ui.values;if((Lo==null?void 0:Lo.length)>0)for(let gl=0;gl=0?Es.right:-1,Es.center>=0?Es.center:-1,Es.left>=0?Es.left:-1,Es.vertical||-1,py,fy,ux,VC,qC,ZC,GC,HC,WC,KC,XC,Nn,lx,cx,Is,Ah,dx,0,Jr,zo,JC,QC)}(i,tt,Se,o,l,p,Xe,i.layers[0],i.collisionBoxArray,r.index,r.sourceLayerIndex,i.index,W,[he,he,he,he],qe,S,fe,xe,at,B,r,y,C,I,_)};if($e==="line")for(const Se of H1(r.geometry,0,0,Fr,Fr)){const tt=BC(Se,oe,Ee,o.vertical||N,l,24,J,i.overscaling,Fr);for(const Qe of tt)N&&UC(i,N.text,Oe,Qe)||He(Se,Qe)}else if($e==="line-center"){for(const Se of r.geometry)if(Se.length>1){const tt=DC(Se,Ee,o.vertical||N,l,24,J);tt&&He(Se,tt)}}else if(r.type==="Polygon")for(const Se of Gl(r.geometry,0)){const tt=OC(Se,16);He(Se[0],new xa(tt.x,tt.y,0))}else if(r.type==="LineString")for(const Se of r.geometry)He(Se,new xa(Se[0].x,Se[0].y,0));else if(r.type==="Point")for(const Se of r.geometry)for(const tt of Se)He([tt],new xa(tt.x,tt.y,0))}function nx(i,r,o,l,p,y,_,b,S,C,I,P,z,B,N){const U=function(fe,oe,he,xe,Ee,qe,at,$e){const Oe=xe.layout.get("text-rotate").evaluate(qe,{})*Math.PI/180,et=[];for(const Xe of oe.positionedLines)for(const He of Xe.positionedGlyphs){if(!He.rect)continue;const Se=He.rect||{};let tt=v1+1,Qe=!0,ft=1,er=0;const Yt=(Ee||$e)&&He.vertical,Xr=He.metrics.advance*He.scale/2;if($e&&oe.verticalizable&&(er=Xe.lineOffset/2-(He.imageName?-(jr-He.metrics.width*He.scale)/2:(He.scale-1)*jr)),He.imageName){const Ot=at[He.imageName];Qe=Ot.sdf,ft=Ot.pixelRatio,tt=ti/ft}const lo=Ee?[He.x+Xr,He.y]:[0,0];let fn=Ee?[0,0]:[He.x+Xr+he[0],He.y+he[1]-er],Yr=[0,0];Yt&&(Yr=fn,fn=[0,0]);const On=He.metrics.isDoubleResolution?2:1,Nn=(He.metrics.left-tt)*He.scale-Xr+fn[0],$n=(-He.metrics.top-tt)*He.scale+fn[1],Tr=Nn+Se.w/On*He.scale/ft,Jr=$n+Se.h/On*He.scale/ft,Sn=new q(Nn,$n),mn=new q(Tr,$n),Un=new q(Nn,Jr),gn=new q(Tr,Jr);if(Yt){const Ot=new q(-Xr,Xr-Sh),nr=-Math.PI/2,hr=jr/2-Xr,gi=new q(5-Sh-hr,-(He.imageName?hr:0)),_r=new q(...Yr);Sn._rotateAround(nr,Ot)._add(gi)._add(_r),mn._rotateAround(nr,Ot)._add(gi)._add(_r),Un._rotateAround(nr,Ot)._add(gi)._add(_r),gn._rotateAround(nr,Ot)._add(gi)._add(_r)}if(Oe){const Ot=Math.sin(Oe),nr=Math.cos(Oe),hr=[nr,-Ot,Ot,nr];Sn._matMult(hr),mn._matMult(hr),Un._matMult(hr),gn._matMult(hr)}const Ni=new q(0,0),ri=new q(0,0);et.push({tl:Sn,tr:mn,bl:Un,br:gn,tex:Se,writingMode:oe.writingMode,glyphOffset:lo,sectionIndex:He.sectionIndex,isSDF:Qe,pixelOffsetTL:Ni,pixelOffsetBR:ri,minFontScaleX:0,minFontScaleY:0})}return et}(0,o,b,p,y,_,l,i.allowVerticalPlacement),W=i.textSizeData;let J=null;W.kind==="source"?(J=[Wo*p.layout.get("text-size").evaluate(_,{})],J[0]>_a&&Ct(`${i.layerIds[0]}: Value for "text-size" is >= ${kh}. Reduce your "text-size".`)):W.kind==="composite"&&(J=[Wo*B.compositeTextSizes[0].evaluate(_,{},N),Wo*B.compositeTextSizes[1].evaluate(_,{},N)],(J[0]>_a||J[1]>_a)&&Ct(`${i.layerIds[0]}: Value for "text-size" is >= ${kh}. Reduce your "text-size".`)),i.addSymbols(i.text,U,J,b,y,_,C,r,S.lineStartIndex,S.lineLength,z,N);for(const fe of I)P[fe]=i.text.placedSymbolArray.length-1;return 4*U.length}function ix(i){for(const r in i)return i[r];return null}function UC(i,r,o,l){const p=i.compareText;if(r in p){const y=p[r];for(let _=y.length-1;_>=0;_--)if(l.dist(y[_])>4;if(p!==1)throw new Error(`Got v${p} data when expected v1.`);const y=ox[15&l];if(!y)throw new Error("Unrecognized array type.");const[_]=new Uint16Array(r,2,1),[b]=new Uint32Array(r,4,1);return new sy(b,_,y,r)}constructor(r,o=64,l=Float64Array,p){if(isNaN(r)||r<0)throw new Error(`Unpexpected numItems value: ${r}.`);this.numItems=+r,this.nodeSize=Math.min(Math.max(+o,2),65535),this.ArrayType=l,this.IndexArrayType=r<65536?Uint16Array:Uint32Array;const y=ox.indexOf(this.ArrayType),_=2*r*this.ArrayType.BYTES_PER_ELEMENT,b=r*this.IndexArrayType.BYTES_PER_ELEMENT,S=(8-b%8)%8;if(y<0)throw new Error(`Unexpected typed array class: ${l}.`);p&&p instanceof ArrayBuffer?(this.data=p,this.ids=new this.IndexArrayType(this.data,8,r),this.coords=new this.ArrayType(this.data,8+b+S,2*r),this._pos=2*r,this._finished=!0):(this.data=new ArrayBuffer(8+_+b+S),this.ids=new this.IndexArrayType(this.data,8,r),this.coords=new this.ArrayType(this.data,8+b+S,2*r),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+y]),new Uint16Array(this.data,2,1)[0]=o,new Uint32Array(this.data,4,1)[0]=r)}add(r,o){const l=this._pos>>1;return this.ids[l]=l,this.coords[this._pos++]=r,this.coords[this._pos++]=o,l}finish(){const r=this._pos>>1;if(r!==this.numItems)throw new Error(`Added ${r} items when expected ${this.numItems}.`);return ay(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(r,o,l,p){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:y,coords:_,nodeSize:b}=this,S=[0,y.length-1,0],C=[];for(;S.length;){const I=S.pop()||0,P=S.pop()||0,z=S.pop()||0;if(P-z<=b){for(let W=z;W<=P;W++){const J=_[2*W],fe=_[2*W+1];J>=r&&J<=l&&fe>=o&&fe<=p&&C.push(y[W])}continue}const B=z+P>>1,N=_[2*B],U=_[2*B+1];N>=r&&N<=l&&U>=o&&U<=p&&C.push(y[B]),(I===0?r<=N:o<=U)&&(S.push(z),S.push(B-1),S.push(1-I)),(I===0?l>=N:p>=U)&&(S.push(B+1),S.push(P),S.push(1-I))}return C}within(r,o,l){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:p,coords:y,nodeSize:_}=this,b=[0,p.length-1,0],S=[],C=l*l;for(;b.length;){const I=b.pop()||0,P=b.pop()||0,z=b.pop()||0;if(P-z<=_){for(let W=z;W<=P;W++)ax(y[2*W],y[2*W+1],r,o)<=C&&S.push(p[W]);continue}const B=z+P>>1,N=y[2*B],U=y[2*B+1];ax(N,U,r,o)<=C&&S.push(p[B]),(I===0?r-l<=N:o-l<=U)&&(b.push(z),b.push(B-1),b.push(1-I)),(I===0?r+l>=N:o+l>=U)&&(b.push(B+1),b.push(P),b.push(1-I))}return S}}function ay(i,r,o,l,p,y){if(p-l<=o)return;const _=l+p>>1;sx(i,r,_,l,p,y),ay(i,r,o,l,_-1,1-y),ay(i,r,o,_+1,p,1-y)}function sx(i,r,o,l,p,y){for(;p>l;){if(p-l>600){const C=p-l+1,I=o-l+1,P=Math.log(C),z=.5*Math.exp(2*P/3),B=.5*Math.sqrt(P*z*(C-z)/C)*(I-C/2<0?-1:1);sx(i,r,o,Math.max(l,Math.floor(o-I*z/C+B)),Math.min(p,Math.floor(o+(C-I)*z/C+B)),y)}const _=r[2*o+y];let b=l,S=p;for(Eh(i,r,l,o),r[2*p+y]>_&&Eh(i,r,l,p);b_;)S--}r[2*l+y]===_?Eh(i,r,l,S):(S++,Eh(i,r,S,p)),S<=o&&(l=S+1),o<=S&&(p=S-1)}}function Eh(i,r,o,l){ly(i,o,l),ly(r,2*o,2*l),ly(r,2*o+1,2*l+1)}function ly(i,r,o){const l=i[r];i[r]=i[o],i[o]=l}function ax(i,r,o,l){const p=i-o,y=r-l;return p*p+y*y}var cy;v.bg=void 0,(cy=v.bg||(v.bg={})).create="create",cy.load="load",cy.fullLoad="fullLoad";let Fp=null,Ph=[];const uy=1e3/60,hy="loadTime",dy="fullLoadTime",jC={mark(i){performance.mark(i)},frame(i){const r=i;Fp!=null&&Ph.push(r-Fp),Fp=r},clearMetrics(){Fp=null,Ph=[],performance.clearMeasures(hy),performance.clearMeasures(dy);for(const i in v.bg)performance.clearMarks(v.bg[i])},getPerformanceMetrics(){performance.measure(hy,v.bg.create,v.bg.load),performance.measure(dy,v.bg.create,v.bg.fullLoad);const i=performance.getEntriesByName(hy)[0].duration,r=performance.getEntriesByName(dy)[0].duration,o=Ph.length,l=1/(Ph.reduce((y,_)=>y+_,0)/o/1e3),p=Ph.filter(y=>y>uy).reduce((y,_)=>y+(_-uy)/uy,0);return{loadTime:i,fullLoadTime:r,fps:l,percentDroppedFrames:p/(o+p)*100,totalFrames:o}}};v.$=class extends A{},v.A=bc,v.B=xg,v.C=function(i){if(br==null){const r=i.navigator?i.navigator.userAgent:null;br=!!i.safari||!(!r||!(/\b(iPad|iPhone|iPod)\b/.test(r)||r.match("Safari")&&!r.match("Chrome")))}return br},v.D=Ye,v.E=Uo,v.F=class{constructor(i,r){this.target=i,this.mapId=r,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new LC(()=>this.process()),this.subscription=function(o,l,p,y){return o.addEventListener(l,p,!1),{unsubscribe:()=>{o.removeEventListener(l,p,!1)}}}(this.target,"message",o=>this.receive(o)),this.globalScope=Ir(self)?i:window}registerMessageHandler(i,r){this.messageHandlers[i]=r}sendAsync(i,r){return new Promise((o,l)=>{const p=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[p]={resolve:o,reject:l},r&&r.signal.addEventListener("abort",()=>{delete this.resolveRejects[p];const b={id:p,type:"",origin:location.origin,targetMapId:i.targetMapId,sourceMapId:this.mapId};this.target.postMessage(b)},{once:!0});const y=[],_=Object.assign(Object.assign({},i),{id:p,sourceMapId:this.mapId,origin:location.origin,data:sa(i.data,y)});this.target.postMessage(_,{transfer:y})})}receive(i){const r=i.data,o=r.id;if(!(r.origin!=="file://"&&location.origin!=="file://"&&r.origin!=="resource://android"&&location.origin!=="resource://android"&&r.origin!==location.origin||r.targetMapId&&this.mapId!==r.targetMapId)){if(r.type===""){delete this.tasks[o];const l=this.abortControllers[o];return delete this.abortControllers[o],void(l&&l.abort())}if(Ir(self)||r.mustQueue)return this.tasks[o]=r,this.taskQueue.push(o),void this.invoker.trigger();this.processTask(o,r)}}process(){if(this.taskQueue.length===0)return;const i=this.taskQueue.shift(),r=this.tasks[i];delete this.tasks[i],this.taskQueue.length>0&&this.invoker.trigger(),r&&this.processTask(i,r)}processTask(i,r){return d(this,void 0,void 0,function*(){if(r.type===""){const p=this.resolveRejects[i];return delete this.resolveRejects[i],p?void(r.error?p.reject(aa(r.error)):p.resolve(aa(r.data))):void 0}if(!this.messageHandlers[r.type])return void this.completeTask(i,new Error(`Could not find a registered handler for ${r.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const o=aa(r.data),l=new AbortController;this.abortControllers[i]=l;try{const p=yield this.messageHandlers[r.type](r.sourceMapId,o,l);this.completeTask(i,null,p)}catch(p){this.completeTask(i,p)}})}completeTask(i,r,o){const l=[];delete this.abortControllers[i];const p={id:i,type:"",sourceMapId:this.mapId,origin:location.origin,error:r?sa(r):null,data:sa(o,l)};this.target.postMessage(p,{transfer:l})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},v.G=Gr,v.H=function(){var i=new bc(16);return bc!=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},v.I=Hg,v.J=function(i,r,o){var l,p,y,_,b,S,C,I,P,z,B,N,U=o[0],W=o[1],J=o[2];return r===i?(i[12]=r[0]*U+r[4]*W+r[8]*J+r[12],i[13]=r[1]*U+r[5]*W+r[9]*J+r[13],i[14]=r[2]*U+r[6]*W+r[10]*J+r[14],i[15]=r[3]*U+r[7]*W+r[11]*J+r[15]):(p=r[1],y=r[2],_=r[3],b=r[4],S=r[5],C=r[6],I=r[7],P=r[8],z=r[9],B=r[10],N=r[11],i[0]=l=r[0],i[1]=p,i[2]=y,i[3]=_,i[4]=b,i[5]=S,i[6]=C,i[7]=I,i[8]=P,i[9]=z,i[10]=B,i[11]=N,i[12]=l*U+b*W+P*J+r[12],i[13]=p*U+S*W+z*J+r[13],i[14]=y*U+C*W+B*J+r[14],i[15]=_*U+I*W+N*J+r[15]),i},v.K=function(i,r,o){var l=o[0],p=o[1],y=o[2];return i[0]=r[0]*l,i[1]=r[1]*l,i[2]=r[2]*l,i[3]=r[3]*l,i[4]=r[4]*p,i[5]=r[5]*p,i[6]=r[6]*p,i[7]=r[7]*p,i[8]=r[8]*y,i[9]=r[9]*y,i[10]=r[10]*y,i[11]=r[11]*y,i[12]=r[12],i[13]=r[13],i[14]=r[14],i[15]=r[15],i},v.L=Uv,v.M=function(i,r){const o={};for(let l=0;l{const r=window.document.createElement("video");return r.muted=!0,new Promise(o=>{r.onloadstart=()=>{o(r)};for(const l of i){const p=window.document.createElement("source");ko(l)||(r.crossOrigin="Anonymous"),p.src=l,r.appendChild(p)}})},v.a4=function(){return We++},v.a5=je,v.a6=Ic,v.a7=Gu,v.a8=pl,v.a9=V1,v.aA=function(i){if(i.type==="custom")return new zC(i);switch(i.type){case"background":return new PC(i);case"circle":return new gk(i);case"fill":return new Lk(i);case"fill-extrusion":return new Wk(i);case"heatmap":return new _k(i);case"hillshade":return new xk(i);case"line":return new rC(i);case"raster":return new MC(i);case"symbol":return new zp(i)}},v.aB=ot,v.aC=function(i,r){if(!i)return[{command:"setStyle",args:[r]}];let o=[];try{if(!zt(i.version,r.version))return[{command:"setStyle",args:[r]}];zt(i.center,r.center)||o.push({command:"setCenter",args:[r.center]}),zt(i.zoom,r.zoom)||o.push({command:"setZoom",args:[r.zoom]}),zt(i.bearing,r.bearing)||o.push({command:"setBearing",args:[r.bearing]}),zt(i.pitch,r.pitch)||o.push({command:"setPitch",args:[r.pitch]}),zt(i.sprite,r.sprite)||o.push({command:"setSprite",args:[r.sprite]}),zt(i.glyphs,r.glyphs)||o.push({command:"setGlyphs",args:[r.glyphs]}),zt(i.transition,r.transition)||o.push({command:"setTransition",args:[r.transition]}),zt(i.light,r.light)||o.push({command:"setLight",args:[r.light]}),zt(i.terrain,r.terrain)||o.push({command:"setTerrain",args:[r.terrain]}),zt(i.sky,r.sky)||o.push({command:"setSky",args:[r.sky]}),zt(i.projection,r.projection)||o.push({command:"setProjection",args:[r.projection]});const l={},p=[];(function(_,b,S,C){let I;for(I in b=b||{},_=_||{})Object.prototype.hasOwnProperty.call(_,I)&&(Object.prototype.hasOwnProperty.call(b,I)||to(I,S,C));for(I in b)Object.prototype.hasOwnProperty.call(b,I)&&(Object.prototype.hasOwnProperty.call(_,I)?zt(_[I],b[I])||(_[I].type==="geojson"&&b[I].type==="geojson"&&Ii(_,b,I)?tr(S,{command:"setGeoJSONSourceData",args:[I,b[I].data]}):Ci(I,b,S,C)):Io(I,b,S))})(i.sources,r.sources,p,l);const y=[];i.layers&&i.layers.forEach(_=>{"source"in _&&l[_.source]?o.push({command:"removeLayer",args:[_.id]}):y.push(_)}),o=o.concat(p),function(_,b,S){b=b||[];const C=(_=_||[]).map(hs),I=b.map(hs),P=_.reduce(jo,{}),z=b.reduce(jo,{}),B=C.slice(),N=Object.create(null);let U,W,J,fe,oe;for(let he=0,xe=0;he@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(o,l,p,y)=>{const _=p||y;return r[l]=!_||_.toLowerCase(),""}),r["max-age"]){const o=parseInt(r["max-age"],10);isNaN(o)?delete r["max-age"]:r["max-age"]=o}return r},v.ab=function(i,r){const o=[];for(const l in i)l in r||o.push(l);return o},v.ac=ke,v.ad=function(i,r,o){var l=Math.sin(o),p=Math.cos(o),y=r[0],_=r[1],b=r[2],S=r[3],C=r[4],I=r[5],P=r[6],z=r[7];return r!==i&&(i[8]=r[8],i[9]=r[9],i[10]=r[10],i[11]=r[11],i[12]=r[12],i[13]=r[13],i[14]=r[14],i[15]=r[15]),i[0]=y*p+C*l,i[1]=_*p+I*l,i[2]=b*p+P*l,i[3]=S*p+z*l,i[4]=C*p-y*l,i[5]=I*p-_*l,i[6]=P*p-b*l,i[7]=z*p-S*l,i},v.ae=function(i){var r=new bc(16);return r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],r[4]=i[4],r[5]=i[5],r[6]=i[6],r[7]=i[7],r[8]=i[8],r[9]=i[9],r[10]=i[10],r[11]=i[11],r[12]=i[12],r[13]=i[13],r[14]=i[14],r[15]=i[15],r},v.af=Sp,v.ag=function(i,r){let o=0,l=0;if(i.kind==="constant")l=i.layoutSize;else if(i.kind!=="source"){const{interpolationType:p,minZoom:y,maxZoom:_}=i,b=p?ke(Dn.interpolationFactor(p,r,y,_),0,1):0;i.kind==="camera"?l=Rn.number(i.minSize,i.maxSize,b):o=b}return{uSizeT:o,uSize:l}},v.ai=function(i,{uSize:r,uSizeT:o},{lowerSize:l,upperSize:p}){return i.kind==="source"?l/Wo:i.kind==="composite"?Rn.number(l/Wo,p/Wo,o):r},v.aj=Yg,v.ak=function(i,r,o,l){const p=r.y-i.y,y=r.x-i.x,_=l.y-o.y,b=l.x-o.x,S=_*y-b*p;if(S===0)return null;const C=(b*(i.y-o.y)-_*(i.x-o.x))/S;return new q(i.x+C*y,i.y+C*p)},v.al=H1,v.am=Dv,v.an=zg,v.ao=function(i){let r=1/0,o=1/0,l=-1/0,p=-1/0;for(const y of i)r=Math.min(r,y.x),o=Math.min(o,y.y),l=Math.max(l,y.x),p=Math.max(p,y.y);return[r,o,l,p]},v.ap=jr,v.ar=Xg,v.as=function(i,r){var o=r[0],l=r[1],p=r[2],y=r[3],_=r[4],b=r[5],S=r[6],C=r[7],I=r[8],P=r[9],z=r[10],B=r[11],N=r[12],U=r[13],W=r[14],J=r[15],fe=o*b-l*_,oe=o*S-p*_,he=o*C-y*_,xe=l*S-p*b,Ee=l*C-y*b,qe=p*C-y*S,at=I*U-P*N,$e=I*W-z*N,Oe=I*J-B*N,et=P*W-z*U,Xe=P*J-B*U,He=z*J-B*W,Se=fe*He-oe*Xe+he*et+xe*Oe-Ee*$e+qe*at;return Se?(i[0]=(b*He-S*Xe+C*et)*(Se=1/Se),i[1]=(p*Xe-l*He-y*et)*Se,i[2]=(U*qe-W*Ee+J*xe)*Se,i[3]=(z*Ee-P*qe-B*xe)*Se,i[4]=(S*Oe-_*He-C*$e)*Se,i[5]=(o*He-p*Oe+y*$e)*Se,i[6]=(W*he-N*qe-J*oe)*Se,i[7]=(I*qe-z*he+B*oe)*Se,i[8]=(_*Xe-b*Oe+C*at)*Se,i[9]=(l*Oe-o*Xe-y*at)*Se,i[10]=(N*Ee-U*he+J*fe)*Se,i[11]=(P*he-I*Ee-B*fe)*Se,i[12]=(b*$e-_*et-S*at)*Se,i[13]=(o*et-l*$e+p*at)*Se,i[14]=(U*oe-N*xe-W*fe)*Se,i[15]=(I*xe-P*oe+z*fe)*Se,i):null},v.at=oy,v.au=Kg,v.av=sy,v.aw=function(){const i={},r=ve.$version;for(const o in ve.$root){const l=ve.$root[o];if(l.required){let p=null;p=o==="version"?r:l.type==="array"?[]:{},p!=null&&(i[o]=p)}}return i},v.ax=sh,v.ay=Wn,v.az=function(i){i=i.slice();const r=Object.create(null);for(let o=0;o25||l<0||l>=1||o<0||o>=1)},v.bc=function(i,r){return i[0]=r[0],i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=r[1],i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=r[2],i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i},v.bd=class extends E{},v.be=ty,v.bf=jC,v.bh=Rr,v.bi=function(i,r){mr.REGISTERED_PROTOCOLS[i]=r},v.bj=function(i){delete mr.REGISTERED_PROTOCOLS[i]},v.bk=function(i,r){const o={};for(let p=0;pHe*jr)}let $e=_?"center":o.get("text-justify").evaluate(C,{},i.canonical);const Oe=o.get("symbol-placement")==="point"?o.get("text-max-width").evaluate(C,{},i.canonical)*jr:1/0,et=()=>{i.bucket.allowVerticalPlacement&&ah(he)&&(N.vertical=Pp(U,i.glyphMap,i.glyphPositions,i.imagePositions,I,Oe,y,qe,"left",Ee,J,v.ah.vertical,!0,z,P))};if(!_&&at){const Xe=new Set;if($e==="auto")for(let Se=0;Sed(void 0,void 0,void 0,function*(){if(i.byteLength===0)return createImageBitmap(new ImageData(1,1));const r=new Blob([new Uint8Array(i)],{type:"image/png"});try{return createImageBitmap(r)}catch(o){throw new Error(`Could not load image because of ${o.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),v.e=Ie,v.f=i=>new Promise((r,o)=>{const l=new Image;l.onload=()=>{r(l),URL.revokeObjectURL(l.src),l.onload=null,window.requestAnimationFrame(()=>{l.src=Ve})},l.onerror=()=>o(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 p=new Blob([new Uint8Array(i)],{type:"image/png"});l.src=i.byteLength?URL.createObjectURL(p):Ve}),v.g=Ur,v.h=(i,r)=>rn(Ie(i,{type:"json"}),r),v.i=Ir,v.j=eo,v.k=Qi,v.l=(i,r)=>rn(Ie(i,{type:"arrayBuffer"}),r),v.m=rn,v.n=function(i){return new Zg(i).readFields(yC,[])},v.o=gh,v.p=x1,v.q=m,v.r=vg,v.s=ko,v.t=ih,v.u=Ss,v.v=ve,v.w=Ct,v.x=function([i,r,o]){return r+=90,r*=Math.PI/180,o*=Math.PI/180,{x:i*Math.cos(r)*Math.sin(o),y:i*Math.sin(r)*Math.sin(o),z:i*Math.cos(o)}},v.y=Rn,v.z=ar}),g("worker",["./shared"],function(v){class d{constructor(D){this.keyCache={},D&&this.replace(D)}replace(D){this._layerConfigs={},this._layers={},this.update(D,[])}update(D,R){for(const K of D){this._layerConfigs[K.id]=K;const se=this._layers[K.id]=v.aA(K);se._featureFilter=v.a7(se.filter),this.keyCache[K.id]&&delete this.keyCache[K.id]}for(const K of R)delete this.keyCache[K],delete this._layerConfigs[K],delete this._layers[K];this.familiesBySource={};const V=v.bk(Object.values(this._layerConfigs),this.keyCache);for(const K of V){const se=K.map(ye=>this._layers[ye.id]),ce=se[0];if(ce.visibility==="none")continue;const de=ce.source||"";let re=this.familiesBySource[de];re||(re=this.familiesBySource[de]={});const be=ce.sourceLayer||"_geojsonTileLayer";let Ce=re[be];Ce||(Ce=re[be]=[]),Ce.push(se)}}}class L{constructor(D){const R={},V=[];for(const de in D){const re=D[de],be=R[de]={};for(const Ce in re){const ye=re[+Ce];if(!ye||ye.bitmap.width===0||ye.bitmap.height===0)continue;const Le={x:0,y:0,w:ye.bitmap.width+2,h:ye.bitmap.height+2};V.push(Le),be[Ce]={rect:Le,metrics:ye.metrics}}}const{w:K,h:se}=v.p(V),ce=new v.o({width:K||1,height:se||1});for(const de in D){const re=D[de];for(const be in re){const Ce=re[+be];if(!Ce||Ce.bitmap.width===0||Ce.bitmap.height===0)continue;const ye=R[de][be].rect;v.o.copy(Ce.bitmap,ce,{x:0,y:0},{x:ye.x+1,y:ye.y+1},Ce.bitmap)}}this.image=ce,this.positions=R}}v.bl("GlyphAtlas",L);class O{constructor(D){this.tileID=new v.S(D.tileID.overscaledZ,D.tileID.wrap,D.tileID.canonical.z,D.tileID.canonical.x,D.tileID.canonical.y),this.uid=D.uid,this.zoom=D.zoom,this.pixelRatio=D.pixelRatio,this.tileSize=D.tileSize,this.source=D.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=D.showCollisionBoxes,this.collectResourceTiming=!!D.collectResourceTiming,this.returnDependencies=!!D.returnDependencies,this.promoteId=D.promoteId,this.inFlightDependencies=[]}parse(D,R,V,K){return v._(this,void 0,void 0,function*(){this.status="parsing",this.data=D,this.collisionBoxArray=new v.a5;const se=new v.bm(Object.keys(D.layers).sort()),ce=new v.bn(this.tileID,this.promoteId);ce.bucketLayerIDs=[];const de={},re={featureIndex:ce,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:V},be=R.familiesBySource[this.source];for(const Tt in be){const Gt=D.layers[Tt];if(!Gt)continue;Gt.version===1&&v.w(`Vector tile source "${this.source}" layer "${Tt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const fr=se.encode(Tt),Kr=[];for(let nn=0;nn=xn.maxzoom||xn.visibility!=="none"&&(G(nn,this.zoom,V),(de[xn.id]=xn.createBucket({index:ce.bucketLayerIDs.length,layers:nn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:fr,sourceID:this.source})).populate(Kr,re,this.tileID.canonical),ce.bucketLayerIDs.push(nn.map(js=>js.id)))}}const Ce=v.aF(re.glyphDependencies,Tt=>Object.keys(Tt).map(Number));this.inFlightDependencies.forEach(Tt=>Tt==null?void 0:Tt.abort()),this.inFlightDependencies=[];let ye=Promise.resolve({});if(Object.keys(Ce).length){const Tt=new AbortController;this.inFlightDependencies.push(Tt),ye=K.sendAsync({type:"GG",data:{stacks:Ce,source:this.source,tileID:this.tileID,type:"glyphs"}},Tt)}const Le=Object.keys(re.iconDependencies);let rt=Promise.resolve({});if(Le.length){const Tt=new AbortController;this.inFlightDependencies.push(Tt),rt=K.sendAsync({type:"GI",data:{icons:Le,source:this.source,tileID:this.tileID,type:"icons"}},Tt)}const st=Object.keys(re.patternDependencies);let Lt=Promise.resolve({});if(st.length){const Tt=new AbortController;this.inFlightDependencies.push(Tt),Lt=K.sendAsync({type:"GI",data:{icons:st,source:this.source,tileID:this.tileID,type:"patterns"}},Tt)}const[bt,Rt,It]=yield Promise.all([ye,rt,Lt]),Dr=new L(bt),yr=new v.bo(Rt,It);for(const Tt in de){const Gt=de[Tt];Gt instanceof v.a6?(G(Gt.layers,this.zoom,V),v.bp({bucket:Gt,glyphMap:bt,glyphPositions:Dr.positions,imageMap:Rt,imagePositions:yr.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Gt.hasPattern&&(Gt instanceof v.bq||Gt instanceof v.br||Gt instanceof v.bs)&&(G(Gt.layers,this.zoom,V),Gt.addFeatures(re,this.tileID.canonical,yr.patternPositions))}return this.status="done",{buckets:Object.values(de).filter(Tt=>!Tt.isEmpty()),featureIndex:ce,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Dr.image,imageAtlas:yr,glyphMap:this.returnDependencies?bt:null,iconMap:this.returnDependencies?Rt:null,glyphPositions:this.returnDependencies?Dr.positions:null}})}}function G(Y,D,R){const V=new v.z(D);for(const K of Y)K.recalculate(V,R)}class q{constructor(D,R,V){this.actor=D,this.layerIndex=R,this.availableImages=V,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(D,R){return v._(this,void 0,void 0,function*(){const V=yield v.l(D.request,R);try{return{vectorTile:new v.bt.VectorTile(new v.bu(V.data)),rawData:V.data,cacheControl:V.cacheControl,expires:V.expires}}catch(K){const se=new Uint8Array(V.data);let ce=`Unable to parse the tile at ${D.request.url}, `;throw ce+=se[0]===31&&se[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${K.message}`,new Error(ce)}})}loadTile(D){return v._(this,void 0,void 0,function*(){const R=D.uid,V=!!(D&&D.request&&D.request.collectResourceTiming)&&new v.bv(D.request),K=new O(D);this.loading[R]=K;const se=new AbortController;K.abort=se;try{const ce=yield this.loadVectorTile(D,se);if(delete this.loading[R],!ce)return null;const de=ce.rawData,re={};ce.expires&&(re.expires=ce.expires),ce.cacheControl&&(re.cacheControl=ce.cacheControl);const be={};if(V){const ye=V.finish();ye&&(be.resourceTiming=JSON.parse(JSON.stringify(ye)))}K.vectorTile=ce.vectorTile;const Ce=K.parse(ce.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[R]=K,this.fetching[R]={rawTileData:de,cacheControl:re,resourceTiming:be};try{const ye=yield Ce;return v.e({rawTileData:de.slice(0)},ye,re,be)}finally{delete this.fetching[R]}}catch(ce){throw delete this.loading[R],K.status="done",this.loaded[R]=K,ce}})}reloadTile(D){return v._(this,void 0,void 0,function*(){const R=D.uid;if(!this.loaded||!this.loaded[R])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const V=this.loaded[R];if(V.showCollisionBoxes=D.showCollisionBoxes,V.status==="parsing"){const K=yield V.parse(V.vectorTile,this.layerIndex,this.availableImages,this.actor);let se;if(this.fetching[R]){const{rawTileData:ce,cacheControl:de,resourceTiming:re}=this.fetching[R];delete this.fetching[R],se=v.e({rawTileData:ce.slice(0)},K,de,re)}else se=K;return se}if(V.status==="done"&&V.vectorTile)return V.parse(V.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(D){return v._(this,void 0,void 0,function*(){const R=this.loading,V=D.uid;R&&R[V]&&R[V].abort&&(R[V].abort.abort(),delete R[V])})}removeTile(D){return v._(this,void 0,void 0,function*(){this.loaded&&this.loaded[D.uid]&&delete this.loaded[D.uid]})}}class ${constructor(){this.loaded={}}loadTile(D){return v._(this,void 0,void 0,function*(){const{uid:R,encoding:V,rawImageData:K,redFactor:se,greenFactor:ce,blueFactor:de,baseShift:re}=D,be=K.width+2,Ce=K.height+2,ye=v.b(K)?new v.R({width:be,height:Ce},yield v.bw(K,-1,-1,be,Ce)):K,Le=new v.bx(R,ye,V,se,ce,de,re);return this.loaded=this.loaded||{},this.loaded[R]=Le,Le})}removeTile(D){const R=this.loaded,V=D.uid;R&&R[V]&&delete R[V]}}function _e(Y,D){if(Y.length!==0){ge(Y[0],D);for(var R=1;R=Math.abs(de)?R-re+de:de-re+R,R=re}R+V>=0!=!!D&&Y.reverse()}var pe=v.by(function Y(D,R){var V,K=D&&D.type;if(K==="FeatureCollection")for(V=0;V>31}function Ir(Y,D){for(var R=Y.loadGeometry(),V=Y.type,K=0,se=0,ce=R.length,de=0;deY},mt=Math.fround||(gt=new Float32Array(1),Y=>(gt[0]=+Y,gt[0]));var gt;const Pt=3,jt=5,Hn=6;class mr{constructor(D){this.options=Object.assign(Object.create(Ve),D),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(D){const{log:R,minZoom:V,maxZoom:K}=this.options;R&&console.time("total time");const se=`prepare ${D.length} points`;R&&console.time(se),this.points=D;const ce=[];for(let re=0;re=V;re--){const be=+Date.now();de=this.trees[re]=this._createTree(this._cluster(de,re)),R&&console.log("z%d: %d clusters in %dms",re,de.numItems,+Date.now()-be)}return R&&console.timeEnd("total time"),this}getClusters(D,R){let V=((D[0]+180)%360+360)%360-180;const K=Math.max(-90,Math.min(90,D[1]));let se=D[2]===180?180:((D[2]+180)%360+360)%360-180;const ce=Math.max(-90,Math.min(90,D[3]));if(D[2]-D[0]>=360)V=-180,se=180;else if(V>se){const ye=this.getClusters([V,K,180,ce],R),Le=this.getClusters([-180,K,se,ce],R);return ye.concat(Le)}const de=this.trees[this._limitZoom(R)],re=de.range(Rr(V),Wn(ce),Rr(se),Wn(K)),be=de.data,Ce=[];for(const ye of re){const Le=this.stride*ye;Ce.push(be[Le+jt]>1?Ur(be,Le,this.clusterProps):this.points[be[Le+Pt]])}return Ce}getChildren(D){const R=this._getOriginId(D),V=this._getOriginZoom(D),K="No cluster with the specified id.",se=this.trees[V];if(!se)throw new Error(K);const ce=se.data;if(R*this.stride>=ce.length)throw new Error(K);const de=this.options.radius/(this.options.extent*Math.pow(2,V-1)),re=se.within(ce[R*this.stride],ce[R*this.stride+1],de),be=[];for(const Ce of re){const ye=Ce*this.stride;ce[ye+4]===D&&be.push(ce[ye+jt]>1?Ur(ce,ye,this.clusterProps):this.points[ce[ye+Pt]])}if(be.length===0)throw new Error(K);return be}getLeaves(D,R,V){const K=[];return this._appendLeaves(K,D,R=R||10,V=V||0,0),K}getTile(D,R,V){const K=this.trees[this._limitZoom(D)],se=Math.pow(2,D),{extent:ce,radius:de}=this.options,re=de/ce,be=(V-re)/se,Ce=(V+1+re)/se,ye={features:[]};return this._addTileFeatures(K.range((R-re)/se,be,(R+1+re)/se,Ce),K.data,R,V,se,ye),R===0&&this._addTileFeatures(K.range(1-re/se,be,1,Ce),K.data,se,V,se,ye),R===se-1&&this._addTileFeatures(K.range(0,be,re/se,Ce),K.data,-1,V,se,ye),ye.features.length?ye:null}getClusterExpansionZoom(D){let R=this._getOriginZoom(D)-1;for(;R<=this.options.maxZoom;){const V=this.getChildren(D);if(R++,V.length!==1)break;D=V[0].properties.cluster_id}return R}_appendLeaves(D,R,V,K,se){const ce=this.getChildren(R);for(const de of ce){const re=de.properties;if(re&&re.cluster?se+re.point_count<=K?se+=re.point_count:se=this._appendLeaves(D,re.cluster_id,V,K,se):se1;let Ce,ye,Le;if(be)Ce=Gr(R,re,this.clusterProps),ye=R[re],Le=R[re+1];else{const Lt=this.points[R[re+Pt]];Ce=Lt.properties;const[bt,Rt]=Lt.geometry.coordinates;ye=Rr(bt),Le=Wn(Rt)}const rt={type:1,geometry:[[Math.round(this.options.extent*(ye*se-V)),Math.round(this.options.extent*(Le*se-K))]],tags:Ce};let st;st=be||this.options.generateId?R[re+Pt]:this.points[R[re+Pt]].id,st!==void 0&&(rt.id=st),ce.features.push(rt)}}_limitZoom(D){return Math.max(this.options.minZoom,Math.min(Math.floor(+D),this.options.maxZoom+1))}_cluster(D,R){const{radius:V,extent:K,reduce:se,minPoints:ce}=this.options,de=V/(K*Math.pow(2,R)),re=D.data,be=[],Ce=this.stride;for(let ye=0;yeR&&(bt+=re[It+jt])}if(bt>Lt&&bt>=ce){let Rt,It=Le*Lt,Dr=rt*Lt,yr=-1;const Tt=((ye/Ce|0)<<5)+(R+1)+this.points.length;for(const Gt of st){const fr=Gt*Ce;if(re[fr+2]<=R)continue;re[fr+2]=R;const Kr=re[fr+jt];It+=re[fr]*Kr,Dr+=re[fr+1]*Kr,re[fr+4]=Tt,se&&(Rt||(Rt=this._map(re,ye,!0),yr=this.clusterProps.length,this.clusterProps.push(Rt)),se(Rt,this._map(re,fr)))}re[ye+4]=Tt,be.push(It/bt,Dr/bt,1/0,Tt,-1,bt),se&&be.push(yr)}else{for(let Rt=0;Rt1)for(const Rt of st){const It=Rt*Ce;if(!(re[It+2]<=R)){re[It+2]=R;for(let Dr=0;Dr>5}_getOriginZoom(D){return(D-this.points.length)%32}_map(D,R,V){if(D[R+jt]>1){const ce=this.clusterProps[D[R+Hn]];return V?Object.assign({},ce):ce}const K=this.points[D[R+Pt]].properties,se=this.options.map(K);return V&&se===K?Object.assign({},se):se}}function Ur(Y,D,R){return{type:"Feature",id:Y[D+Pt],properties:Gr(Y,D,R),geometry:{type:"Point",coordinates:[(V=Y[D],360*(V-.5)),rn(Y[D+1])]}};var V}function Gr(Y,D,R){const V=Y[D+jt],K=V>=1e4?`${Math.round(V/1e3)}k`:V>=1e3?Math.round(V/100)/10+"k":V,se=Y[D+Hn],ce=se===-1?{}:Object.assign({},R[se]);return Object.assign(ce,{cluster:!0,cluster_id:Y[D+Pt],point_count:V,point_count_abbreviated:K})}function Rr(Y){return Y/360+.5}function Wn(Y){const D=Math.sin(Y*Math.PI/180),R=.5-.25*Math.log((1+D)/(1-D))/Math.PI;return R<0?0:R>1?1:R}function rn(Y){const D=(180-360*Y)*Math.PI/180;return 360*Math.atan(Math.exp(D))/Math.PI-90}function ko(Y,D,R,V){let K=V;const se=D+(R-D>>1);let ce,de=R-D;const re=Y[D],be=Y[D+1],Ce=Y[R],ye=Y[R+1];for(let Le=D+3;LeK)ce=Le,K=rt;else if(rt===K){const st=Math.abs(Le-se);stV&&(ce-D>3&&ko(Y,D,ce,V),Y[ce+2]=K,R-ce>3&&ko(Y,ce,R,V))}function cs(Y,D,R,V,K,se){let ce=K-R,de=se-V;if(ce!==0||de!==0){const re=((Y-R)*ce+(D-V)*de)/(ce*ce+de*de);re>1?(R=K,V=se):re>0&&(R+=ce*re,V+=de*re)}return ce=Y-R,de=D-V,ce*ce+de*de}function ki(Y,D,R,V){const K={id:Y??null,type:D,geometry:R,tags:V,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(D==="Point"||D==="MultiPoint"||D==="LineString")Qi(K,R);else if(D==="Polygon")Qi(K,R[0]);else if(D==="MultiLineString")for(const se of R)Qi(K,se);else if(D==="MultiPolygon")for(const se of R)Qi(K,se[0]);return K}function Qi(Y,D){for(let R=0;R0&&(ce+=V?(K*Ce-be*se)/2:Math.sqrt(Math.pow(be-K,2)+Math.pow(Ce-se,2))),K=be,se=Ce}const de=D.length-3;D[2]=1,ko(D,0,de,R),D[de+2]=1,D.size=Math.abs(ce),D.start=0,D.end=D.size}function Co(Y,D,R,V){for(let K=0;K1?1:R}function tr(Y,D,R,V,K,se,ce,de){if(V/=D,se>=(R/=D)&&ce=V)return null;const re=[];for(const be of Y){const Ce=be.geometry;let ye=be.type;const Le=K===0?be.minX:be.minY,rt=K===0?be.maxX:be.maxY;if(Le>=R&&rt=V)continue;let st=[];if(ye==="Point"||ye==="MultiPoint")Io(Ce,st,R,V,K);else if(ye==="LineString")to(Ce,st,R,V,K,!1,de.lineMetrics);else if(ye==="MultiLineString")Ii(Ce,st,R,V,K,!1);else if(ye==="Polygon")Ii(Ce,st,R,V,K,!0);else if(ye==="MultiPolygon")for(const Lt of Ce){const bt=[];Ii(Lt,bt,R,V,K,!0),bt.length&&st.push(bt)}if(st.length){if(de.lineMetrics&&ye==="LineString"){for(const Lt of st)re.push(ki(be.id,ye,Lt,be.tags));continue}ye!=="LineString"&&ye!=="MultiLineString"||(st.length===1?(ye="LineString",st=st[0]):ye="MultiLineString"),ye!=="Point"&&ye!=="MultiPoint"||(ye=st.length===3?"Point":"MultiPoint"),re.push(ki(be.id,ye,st,be.tags))}}return re.length?re:null}function Io(Y,D,R,V,K){for(let se=0;se=R&&ce<=V&&Hr(D,Y[se],Y[se+1],Y[se+2])}}function to(Y,D,R,V,K,se,ce){let de=Ci(Y);const re=K===0?hs:jo;let be,Ce,ye=Y.start;for(let bt=0;btR&&(Ce=re(de,Rt,It,yr,Tt,R),ce&&(de.start=ye+be*Ce)):Gt>V?fr=R&&(Ce=re(de,Rt,It,yr,Tt,R),Kr=!0),fr>V&&Gt<=V&&(Ce=re(de,Rt,It,yr,Tt,V),Kr=!0),!se&&Kr&&(ce&&(de.end=ye+be*Ce),D.push(de),de=Ci(Y)),ce&&(ye+=be)}let Le=Y.length-3;const rt=Y[Le],st=Y[Le+1],Lt=K===0?rt:st;Lt>=R&&Lt<=V&&Hr(de,rt,st,Y[Le+2]),Le=de.length-3,se&&Le>=3&&(de[Le]!==de[0]||de[Le+1]!==de[1])&&Hr(de,de[0],de[1],de[2]),de.length&&D.push(de)}function Ci(Y){const D=[];return D.size=Y.size,D.start=Y.start,D.end=Y.end,D}function Ii(Y,D,R,V,K,se){for(const ce of Y)to(ce,D,R,V,K,se,!1)}function Hr(Y,D,R,V){Y.push(D,R,V)}function hs(Y,D,R,V,K,se){const ce=(se-D)/(V-D);return Hr(Y,se,R+(K-R)*ce,1),ce}function jo(Y,D,R,V,K,se){const ce=(se-R)/(K-R);return Hr(Y,D+(V-D)*ce,se,1),ce}function Me(Y,D){const R=[];for(let V=0;V0&&D.size<(K?ce:V))return void(R.numPoints+=D.length/3);const de=[];for(let re=0;rece)&&(R.numSimplified++,de.push(D[re],D[re+1])),R.numPoints++;K&&function(re,be){let Ce=0;for(let ye=0,Le=re.length,rt=Le-2;ye0===be)for(let ye=0,Le=re.length;ye24)throw new Error("maxZoom should be in the 0-24 range");if(R.promoteId&&R.generateId)throw new Error("promoteId and generateId cannot be used together.");let K=function(se,ce){const de=[];if(se.type==="FeatureCollection")for(let re=0;re1&&console.time("creation"),rt=this.tiles[Le]=Ei(D,R,V,K,be),this.tileCoords.push({z:R,x:V,y:K}),Ce)){Ce>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",R,V,K,rt.numFeatures,rt.numPoints,rt.numSimplified),console.timeEnd("creation"));const Kr=`z${R}`;this.stats[Kr]=(this.stats[Kr]||0)+1,this.total++}if(rt.source=D,se==null){if(R===be.indexMaxZoom||rt.numPoints<=be.indexMaxPoints)continue}else{if(R===be.maxZoom||R===se)continue;if(se!=null){const Kr=se-R;if(V!==ce>>Kr||K!==de>>Kr)continue}}if(rt.source=null,D.length===0)continue;Ce>1&&console.time("clipping");const st=.5*be.buffer/be.extent,Lt=.5-st,bt=.5+st,Rt=1+st;let It=null,Dr=null,yr=null,Tt=null,Gt=tr(D,ye,V-st,V+bt,0,rt.minX,rt.maxX,be),fr=tr(D,ye,V+Lt,V+Rt,0,rt.minX,rt.maxX,be);D=null,Gt&&(It=tr(Gt,ye,K-st,K+bt,1,rt.minY,rt.maxY,be),Dr=tr(Gt,ye,K+Lt,K+Rt,1,rt.minY,rt.maxY,be),Gt=null),fr&&(yr=tr(fr,ye,K-st,K+bt,1,rt.minY,rt.maxY,be),Tt=tr(fr,ye,K+Lt,K+Rt,1,rt.minY,rt.maxY,be),fr=null),Ce>1&&console.timeEnd("clipping"),re.push(It||[],R+1,2*V,2*K),re.push(Dr||[],R+1,2*V,2*K+1),re.push(yr||[],R+1,2*V+1,2*K),re.push(Tt||[],R+1,2*V+1,2*K+1)}}getTile(D,R,V){D=+D,R=+R,V=+V;const K=this.options,{extent:se,debug:ce}=K;if(D<0||D>24)return null;const de=1<1&&console.log("drilling down to z%d-%d-%d",D,R,V);let be,Ce=D,ye=R,Le=V;for(;!be&&Ce>0;)Ce--,ye>>=1,Le>>=1,be=this.tiles[Pi(Ce,ye,Le)];return be&&be.source?(ce>1&&(console.log("found parent tile z%d-%d-%d",Ce,ye,Le),console.time("drilling down")),this.splitTile(be.source,Ce,ye,Le,D,R,V),ce>1&&console.timeEnd("drilling down"),this.tiles[re]?Wr(this.tiles[re],se):null):null}}function Pi(Y,D,R){return 32*((1<{ye.properties=rt;const st={};for(const Lt of Le)st[Lt]=re[Lt].evaluate(Ce,ye);return st},ce.reduce=(rt,st)=>{ye.properties=st;for(const Lt of Le)Ce.accumulated=rt[Lt],rt[Lt]=be[Lt].evaluate(Ce,ye)},ce}(D)).load((yield this._pendingData).features):(K=yield this._pendingData,new Ln(K,D.geojsonVtOptions)),this.loaded={};const se={};if(V){const ce=V.finish();ce&&(se.resourceTiming={},se.resourceTiming[D.source]=JSON.parse(JSON.stringify(ce)))}return se}catch(se){if(delete this._pendingRequest,v.bB(se))return{abandoned:!0};throw se}var K})}getData(){return v._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(D){const R=this.loaded;return R&&R[D.uid]?super.reloadTile(D):this.loadTile(D)}loadAndProcessGeoJSON(D,R){return v._(this,void 0,void 0,function*(){let V=yield this.loadGeoJSON(D,R);if(delete this._pendingRequest,typeof V!="object")throw new Error(`Input data given to '${D.source}' is not a valid GeoJSON object.`);if(pe(V,!0),D.filter){const K=v.bC(D.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(K.result==="error")throw new Error(K.value.map(ce=>`${ce.key}: ${ce.message}`).join(", "));V={type:"FeatureCollection",features:V.features.filter(ce=>K.value.evaluate({zoom:0},ce))}}return V})}loadGeoJSON(D,R){return v._(this,void 0,void 0,function*(){const{promoteId:V}=D;if(D.request){const K=yield v.h(D.request,R);return this._dataUpdateable=ro(K.data,V)?Eo(K.data,V):void 0,K.data}if(typeof D.data=="string")try{const K=JSON.parse(D.data);return this._dataUpdateable=ro(K,V)?Eo(K,V):void 0,K}catch{throw new Error(`Input data given to '${D.source}' is not a valid GeoJSON object.`)}if(!D.dataDiff)throw new Error(`Input data given to '${D.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${D.source}`);return function(K,se,ce){var de,re,be,Ce;if(se.removeAll&&K.clear(),se.remove)for(const ye of se.remove)K.delete(ye);if(se.add)for(const ye of se.add){const Le=xt(ye,ce);Le!=null&&K.set(Le,ye)}if(se.update)for(const ye of se.update){let Le=K.get(ye.id);if(Le==null)continue;const rt=!ye.removeAllProperties&&(((de=ye.removeProperties)===null||de===void 0?void 0:de.length)>0||((re=ye.addOrUpdateProperties)===null||re===void 0?void 0:re.length)>0);if((ye.newGeometry||ye.removeAllProperties||rt)&&(Le=Object.assign({},Le),K.set(ye.id,Le),rt&&(Le.properties=Object.assign({},Le.properties))),ye.newGeometry&&(Le.geometry=ye.newGeometry),ye.removeAllProperties)Le.properties={};else if(((be=ye.removeProperties)===null||be===void 0?void 0:be.length)>0)for(const st of ye.removeProperties)Object.prototype.hasOwnProperty.call(Le.properties,st)&&delete Le.properties[st];if(((Ce=ye.addOrUpdateProperties)===null||Ce===void 0?void 0:Ce.length)>0)for(const{key:st,value:Lt}of ye.addOrUpdateProperties)Le.properties[st]=Lt}}(this._dataUpdateable,D.dataDiff,V),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(D){return v._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(D){return this._geoJSONIndex.getClusterExpansionZoom(D.clusterId)}getClusterChildren(D){return this._geoJSONIndex.getChildren(D.clusterId)}getClusterLeaves(D){return this._geoJSONIndex.getLeaves(D.clusterId,D.limit,D.offset)}}class no{constructor(D){this.self=D,this.actor=new v.F(D),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(R,V)=>{if(this.externalWorkerSourceTypes[R])throw new Error(`Worker source with name "${R}" already registered.`);this.externalWorkerSourceTypes[R]=V},this.self.addProtocol=v.bi,this.self.removeProtocol=v.bj,this.self.registerRTLTextPlugin=R=>{if(v.bD.isParsed())throw new Error("RTL text plugin already registered.");v.bD.setMethods(R)},this.actor.registerMessageHandler("LDT",(R,V)=>this._getDEMWorkerSource(R,V.source).loadTile(V)),this.actor.registerMessageHandler("RDT",(R,V)=>v._(this,void 0,void 0,function*(){this._getDEMWorkerSource(R,V.source).removeTile(V)})),this.actor.registerMessageHandler("GCEZ",(R,V)=>v._(this,void 0,void 0,function*(){return this._getWorkerSource(R,V.type,V.source).getClusterExpansionZoom(V)})),this.actor.registerMessageHandler("GCC",(R,V)=>v._(this,void 0,void 0,function*(){return this._getWorkerSource(R,V.type,V.source).getClusterChildren(V)})),this.actor.registerMessageHandler("GCL",(R,V)=>v._(this,void 0,void 0,function*(){return this._getWorkerSource(R,V.type,V.source).getClusterLeaves(V)})),this.actor.registerMessageHandler("LD",(R,V)=>this._getWorkerSource(R,V.type,V.source).loadData(V)),this.actor.registerMessageHandler("GD",(R,V)=>this._getWorkerSource(R,V.type,V.source).getData()),this.actor.registerMessageHandler("LT",(R,V)=>this._getWorkerSource(R,V.type,V.source).loadTile(V)),this.actor.registerMessageHandler("RT",(R,V)=>this._getWorkerSource(R,V.type,V.source).reloadTile(V)),this.actor.registerMessageHandler("AT",(R,V)=>this._getWorkerSource(R,V.type,V.source).abortTile(V)),this.actor.registerMessageHandler("RMT",(R,V)=>this._getWorkerSource(R,V.type,V.source).removeTile(V)),this.actor.registerMessageHandler("RS",(R,V)=>v._(this,void 0,void 0,function*(){if(!this.workerSources[R]||!this.workerSources[R][V.type]||!this.workerSources[R][V.type][V.source])return;const K=this.workerSources[R][V.type][V.source];delete this.workerSources[R][V.type][V.source],K.removeSource!==void 0&&K.removeSource(V)})),this.actor.registerMessageHandler("RM",R=>v._(this,void 0,void 0,function*(){delete this.layerIndexes[R],delete this.availableImages[R],delete this.workerSources[R],delete this.demWorkerSources[R]})),this.actor.registerMessageHandler("SR",(R,V)=>v._(this,void 0,void 0,function*(){this.referrer=V})),this.actor.registerMessageHandler("SRPS",(R,V)=>this._syncRTLPluginState(R,V)),this.actor.registerMessageHandler("IS",(R,V)=>v._(this,void 0,void 0,function*(){this.self.importScripts(V)})),this.actor.registerMessageHandler("SI",(R,V)=>this._setImages(R,V)),this.actor.registerMessageHandler("UL",(R,V)=>v._(this,void 0,void 0,function*(){this._getLayerIndex(R).update(V.layers,V.removedIds)})),this.actor.registerMessageHandler("SL",(R,V)=>v._(this,void 0,void 0,function*(){this._getLayerIndex(R).replace(V)}))}_setImages(D,R){return v._(this,void 0,void 0,function*(){this.availableImages[D]=R;for(const V in this.workerSources[D]){const K=this.workerSources[D][V];for(const se in K)K[se].availableImages=R}})}_syncRTLPluginState(D,R){return v._(this,void 0,void 0,function*(){if(v.bD.isParsed())return v.bD.getState();if(R.pluginStatus!=="loading")return v.bD.setState(R),R;const V=R.pluginURL;if(this.self.importScripts(V),v.bD.isParsed()){const K={pluginStatus:"loaded",pluginURL:V};return v.bD.setState(K),K}throw v.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${V}`)})}_getAvailableImages(D){let R=this.availableImages[D];return R||(R=[]),R}_getLayerIndex(D){let R=this.layerIndexes[D];return R||(R=this.layerIndexes[D]=new d),R}_getWorkerSource(D,R,V){if(this.workerSources[D]||(this.workerSources[D]={}),this.workerSources[D][R]||(this.workerSources[D][R]={}),!this.workerSources[D][R][V]){const K={sendAsync:(se,ce)=>(se.targetMapId=D,this.actor.sendAsync(se,ce))};switch(R){case"vector":this.workerSources[D][R][V]=new q(K,this._getLayerIndex(D),this._getAvailableImages(D));break;case"geojson":this.workerSources[D][R][V]=new Vo(K,this._getLayerIndex(D),this._getAvailableImages(D));break;default:this.workerSources[D][R][V]=new this.externalWorkerSourceTypes[R](K,this._getLayerIndex(D),this._getAvailableImages(D))}}return this.workerSources[D][R][V]}_getDEMWorkerSource(D,R){return this.demWorkerSources[D]||(this.demWorkerSources[D]={}),this.demWorkerSources[D][R]||(this.demWorkerSources[D][R]=new $),this.demWorkerSources[D][R]}}return v.i(self)&&(self.worker=new no(self)),no}),g("index",["exports","./shared"],function(v,d){var L="4.7.0";let O,G;const q={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:m=>new Promise((t,s)=>{const u=requestAnimationFrame(t);m.signal.addEventListener("abort",()=>{cancelAnimationFrame(u),s(d.c())})}),getImageData(m,t=0){return this.getImageCanvasContext(m).getImageData(-t,-t,m.width+2*t,m.height+2*t)},getImageCanvasContext(m){const t=window.document.createElement("canvas"),s=t.getContext("2d",{willReadFrequently:!0});if(!s)throw new Error("failed to create canvas 2d context");return t.width=m.width,t.height=m.height,s.drawImage(m,0,0,m.width,m.height),s},resolveURL:m=>(O||(O=document.createElement("a")),O.href=m,O.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(G==null&&(G=matchMedia("(prefers-reduced-motion: reduce)")),G.matches)}};class ${static testProp(t){if(!$.docStyle)return t[0];for(let s=0;s{window.removeEventListener("click",$.suppressClickInternal,!0)},0)}static getScale(t){const s=t.getBoundingClientRect();return{x:s.width/t.offsetWidth||1,y:s.height/t.offsetHeight||1,boundingClientRect:s}}static getPoint(t,s,u){const h=s.boundingClientRect;return new d.P((u.clientX-h.left)/s.x-t.clientLeft,(u.clientY-h.top)/s.y-t.clientTop)}static mousePos(t,s){const u=$.getScale(t);return $.getPoint(t,u,s)}static touchPos(t,s){const u=[],h=$.getScale(t);for(let f=0;f{ge&&ee(ge),ge=null,ne=!0},pe.onerror=()=>{Ue=!0,ge=null},pe.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(m){let t,s,u,h;m.resetRequestQueue=()=>{t=[],s=0,u=0,h={}},m.addThrottleControl=k=>{const E=u++;return h[E]=k,E},m.removeThrottleControl=k=>{delete h[k],w()},m.getImage=(k,E,A=!0)=>new Promise((M,F)=>{_e.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),d.e(k,{type:"image"}),t.push({abortController:E,requestParameters:k,supportImageRefresh:A,state:"queued",onError:j=>{F(j)},onSuccess:j=>{M(j)}}),w()});const f=k=>d._(this,void 0,void 0,function*(){k.state="running";const{requestParameters:E,supportImageRefresh:A,onError:M,onSuccess:F,abortController:j}=k,Z=A===!1&&!d.i(self)&&!d.g(E.url)&&(!E.headers||Object.keys(E.headers).reduce((te,ie)=>te&&ie==="accept",!0));s++;const X=Z?T(E,j):d.m(E,j);try{const te=yield X;delete k.abortController,k.state="completed",te.data instanceof HTMLImageElement||d.b(te.data)?F(te):te.data&&F({data:yield(Q=te.data,typeof createImageBitmap=="function"?d.d(Q):d.f(Q)),cacheControl:te.cacheControl,expires:te.expires})}catch(te){delete k.abortController,M(te)}finally{s--,w()}var Q}),w=()=>{const k=(()=>{for(const E of Object.keys(h))if(h[E]())return!0;return!1})()?d.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:d.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let E=s;E0;E++){const A=t.shift();A.abortController.signal.aborted?E--:f(A)}},T=(k,E)=>new Promise((A,M)=>{const F=new Image,j=k.url,Z=k.credentials;Z&&Z==="include"?F.crossOrigin="use-credentials":(Z&&Z==="same-origin"||!d.s(j))&&(F.crossOrigin="anonymous"),E.signal.addEventListener("abort",()=>{F.src="",M(d.c())}),F.fetchPriority="high",F.onload=()=>{F.onerror=F.onload=null,A({data:F})},F.onerror=()=>{F.onerror=F.onload=null,E.signal.aborted||M(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."))},F.src=j})}(ae||(ae={})),ae.resetRequestQueue();class we{constructor(t){this._transformRequestFn=t}transformRequest(t,s){return this._transformRequestFn&&this._transformRequestFn(t,s)||{url:t}}setTransformRequest(t){this._transformRequestFn=t}}function ke(m){var t=new d.A(3);return t[0]=m[0],t[1]=m[1],t[2]=m[2],t}var Pe,Ie=function(m,t,s){return m[0]=t[0]-s[0],m[1]=t[1]-s[1],m[2]=t[2]-s[2],m};Pe=new d.A(3),d.A!=Float32Array&&(Pe[0]=0,Pe[1]=0,Pe[2]=0);var We=function(m){var t=m[0],s=m[1];return t*t+s*s};function vt(m){const t=[];if(typeof m=="string")t.push({id:"default",url:m});else if(m&&m.length>0){const s=[];for(const{id:u,url:h}of m){const f=`${u}${h}`;s.indexOf(f)===-1&&(s.push(f),t.push({id:u,url:h}))}}return t}function it(m,t,s){const u=m.split("?");return u[0]+=`${t}${s}`,u.join("?")}(function(){var m=new d.A(2);d.A!=Float32Array&&(m[0]=0,m[1]=0)})();class ot{constructor(t,s,u,h){this.context=t,this.format=u,this.texture=t.gl.createTexture(),this.update(s,h)}update(t,s,u){const{width:h,height:f}=t,w=!(this.size&&this.size[0]===h&&this.size[1]===f||u),{context:T}=this,{gl:k}=T;if(this.useMipmap=!!(s&&s.useMipmap),k.bindTexture(k.TEXTURE_2D,this.texture),T.pixelStoreUnpackFlipY.set(!1),T.pixelStoreUnpack.set(1),T.pixelStoreUnpackPremultiplyAlpha.set(this.format===k.RGBA&&(!s||s.premultiply!==!1)),w)this.size=[h,f],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||d.b(t)?k.texImage2D(k.TEXTURE_2D,0,this.format,this.format,k.UNSIGNED_BYTE,t):k.texImage2D(k.TEXTURE_2D,0,this.format,h,f,0,this.format,k.UNSIGNED_BYTE,t.data);else{const{x:E,y:A}=u||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||d.b(t)?k.texSubImage2D(k.TEXTURE_2D,0,E,A,k.RGBA,k.UNSIGNED_BYTE,t):k.texSubImage2D(k.TEXTURE_2D,0,E,A,h,f,k.RGBA,k.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&k.generateMipmap(k.TEXTURE_2D)}bind(t,s,u){const{context:h}=this,{gl:f}=h;f.bindTexture(f.TEXTURE_2D,this.texture),u!==f.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(u=f.LINEAR),t!==this.filter&&(f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,t),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,u||t),this.filter=t),s!==this.wrap&&(f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,s),this.wrap=s)}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 Nt(m){const{userImage:t}=m;return!!(t&&t.render&&t.render())&&(m.data.replace(new Uint8Array(t.data.buffer)),!0)}class Ct extends d.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new d.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(const{ids:s,promiseResolve:u}of this.requestors)u(this._getImagesForIds(s));this.requestors=[]}}getImage(t){const s=this.images[t];if(s&&!s.data&&s.spriteData){const u=s.spriteData;s.data=new d.R({width:u.width,height:u.height},u.context.getImageData(u.x,u.y,u.width,u.height).data),s.spriteData=null}return s}addImage(t,s){if(this.images[t])throw new Error(`Image id ${t} already exist, use updateImage instead`);this._validate(t,s)&&(this.images[t]=s)}_validate(t,s){let u=!0;const h=s.data||s.spriteData;return this._validateStretch(s.stretchX,h&&h.width)||(this.fire(new d.j(new Error(`Image "${t}" has invalid "stretchX" value`))),u=!1),this._validateStretch(s.stretchY,h&&h.height)||(this.fire(new d.j(new Error(`Image "${t}" has invalid "stretchY" value`))),u=!1),this._validateContent(s.content,s)||(this.fire(new d.j(new Error(`Image "${t}" has invalid "content" value`))),u=!1),u}_validateStretch(t,s){if(!t)return!0;let u=0;for(const h of t){if(h[0]{let h=!0;if(!this.isLoaded())for(const f of t)this.images[f]||(h=!1);this.isLoaded()||h?s(this._getImagesForIds(t)):this.requestors.push({ids:t,promiseResolve:s})})}_getImagesForIds(t){const s={};for(const u of t){let h=this.getImage(u);h||(this.fire(new d.k("styleimagemissing",{id:u})),h=this.getImage(u)),h?s[u]={data:h.data.clone(),pixelRatio:h.pixelRatio,sdf:h.sdf,version:h.version,stretchX:h.stretchX,stretchY:h.stretchY,content:h.content,textFitWidth:h.textFitWidth,textFitHeight:h.textFitHeight,hasRenderCallback:!!(h.userImage&&h.userImage.render)}:d.w(`Image "${u}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return s}getPixelSize(){const{width:t,height:s}=this.atlasImage;return{width:t,height:s}}getPattern(t){const s=this.patterns[t],u=this.getImage(t);if(!u)return null;if(s&&s.position.version===u.version)return s.position;if(s)s.position.version=u.version;else{const h={w:u.data.width+2,h:u.data.height+2,x:0,y:0},f=new d.I(h,u);this.patterns[t]={bin:h,position:f}}return this._updatePatternAtlas(),this.patterns[t].position}bind(t){const s=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new ot(t,this.atlasImage,s.RGBA),this.atlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE)}_updatePatternAtlas(){const t=[];for(const f in this.patterns)t.push(this.patterns[f].bin);const{w:s,h:u}=d.p(t),h=this.atlasImage;h.resize({width:s||1,height:u||1});for(const f in this.patterns){const{bin:w}=this.patterns[f],T=w.x+1,k=w.y+1,E=this.getImage(f).data,A=E.width,M=E.height;d.R.copy(E,h,{x:0,y:0},{x:T,y:k},{width:A,height:M}),d.R.copy(E,h,{x:0,y:M-1},{x:T,y:k-1},{width:A,height:1}),d.R.copy(E,h,{x:0,y:0},{x:T,y:k+M},{width:A,height:1}),d.R.copy(E,h,{x:A-1,y:0},{x:T-1,y:k},{width:1,height:M}),d.R.copy(E,h,{x:0,y:0},{x:T+A,y:k},{width:1,height:M})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(t){for(const s of t){if(this.callbackDispatchedThisFrame[s])continue;this.callbackDispatchedThisFrame[s]=!0;const u=this.getImage(s);u||d.w(`Image with ID: "${s}" was not found`),Nt(u)&&this.updateImage(s,u)}}}const Bt=1e20;function Ir(m,t,s,u,h,f,w,T,k){for(let E=t;E-1);k++,f[k]=T,w[k]=E,w[k+1]=Bt}for(let T=0,k=0;T65535)throw new Error("glyphs > 65535 not supported");if(u.ranges[f])return{stack:t,id:s,glyph:h};if(!this.url)throw new Error("glyphsUrl is not set");if(!u.requests[f]){const T=Lr.loadGlyphRange(t,f,this.url,this.requestManager);u.requests[f]=T}const w=yield u.requests[f];for(const T in w)this._doesCharSupportLocalGlyph(+T)||(u.glyphs[+T]=w[+T]);return u.ranges[f]=!0,{stack:t,id:s,glyph:w[s]||null}})}_doesCharSupportLocalGlyph(t){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(t))}_tinySDF(t,s,u){const h=this.localIdeographFontFamily;if(!h||!this._doesCharSupportLocalGlyph(u))return;let f=t.tinySDF;if(!f){let T="400";/bold/i.test(s)?T="900":/medium/i.test(s)?T="500":/light/i.test(s)&&(T="200"),f=t.tinySDF=new Lr.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:h,fontWeight:T})}const w=f.draw(String.fromCharCode(u));return{id:u,bitmap:new d.o({width:w.width||60,height:w.height||60},w.data),metrics:{width:w.glyphWidth/2||24,height:w.glyphHeight/2||24,left:w.glyphLeft/2+.5||0,top:w.glyphTop/2-27.5||-8,advance:w.glyphAdvance/2||24,isDoubleResolution:!0}}}}Lr.loadGlyphRange=function(m,t,s,u){return d._(this,void 0,void 0,function*(){const h=256*t,f=h+255,w=u.transformRequest(s.replace("{fontstack}",m).replace("{range}",`${h}-${f}`),"Glyphs"),T=yield d.l(w,new AbortController);if(!T||!T.data)throw new Error(`Could not load glyph range. range: ${t}, ${h}-${f}`);const k={};for(const E of d.n(T.data))k[E.id]=E;return k})},Lr.TinySDF=class{constructor({fontSize:m=24,buffer:t=3,radius:s=8,cutoff:u=.25,fontFamily:h="sans-serif",fontWeight:f="normal",fontStyle:w="normal"}={}){this.buffer=t,this.cutoff=u,this.radius=s;const T=this.size=m+4*t,k=this._createCanvas(T),E=this.ctx=k.getContext("2d",{willReadFrequently:!0});E.font=`${w} ${f} ${m}px ${h}`,E.textBaseline="alphabetic",E.textAlign="left",E.fillStyle="black",this.gridOuter=new Float64Array(T*T),this.gridInner=new Float64Array(T*T),this.f=new Float64Array(T),this.z=new Float64Array(T+1),this.v=new Uint16Array(T)}_createCanvas(m){const t=document.createElement("canvas");return t.width=t.height=m,t}draw(m){const{width:t,actualBoundingBoxAscent:s,actualBoundingBoxDescent:u,actualBoundingBoxLeft:h,actualBoundingBoxRight:f}=this.ctx.measureText(m),w=Math.ceil(s),T=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(f-h))),k=Math.min(this.size-this.buffer,w+Math.ceil(u)),E=T+2*this.buffer,A=k+2*this.buffer,M=Math.max(E*A,0),F=new Uint8ClampedArray(M),j={data:F,width:E,height:A,glyphWidth:T,glyphHeight:k,glyphTop:w,glyphLeft:0,glyphAdvance:t};if(T===0||k===0)return j;const{ctx:Z,buffer:X,gridInner:Q,gridOuter:te}=this;Z.clearRect(X,X,T,k),Z.fillText(m,X,X+w);const ie=Z.getImageData(X,X,T,k);te.fill(Bt,0,M),Q.fill(0,0,M);for(let H=0;H0?Te*Te:0,Q[me]=Te<0?Te*Te:0}}Ir(te,0,0,E,A,E,this.f,this.v,this.z),Ir(Q,X,X,T,k,E,this.f,this.v,this.z);for(let H=0;H1&&(k=t[++T]);const A=Math.abs(E-k.left),M=Math.abs(E-k.right),F=Math.min(A,M);let j;const Z=f/u*(h+1);if(k.isDash){const X=h-Math.abs(Z);j=Math.sqrt(F*F+X*X)}else j=h-Math.sqrt(F*F+Z*Z);this.data[w+E]=Math.max(0,Math.min(255,j+128))}}}addRegularDash(t){for(let T=t.length-1;T>=0;--T){const k=t[T],E=t[T+1];k.zeroLength?t.splice(T,1):E&&E.isDash===k.isDash&&(E.left=k.left,t.splice(T,1))}const s=t[0],u=t[t.length-1];s.isDash===u.isDash&&(s.left=u.left-this.width,u.right=s.right+this.width);const h=this.width*this.nextRow;let f=0,w=t[f];for(let T=0;T1&&(w=t[++f]);const k=Math.abs(T-w.left),E=Math.abs(T-w.right),A=Math.min(k,E);this.data[h+T]=Math.max(0,Math.min(255,(w.isDash?A:-A)+128))}}addDash(t,s){const u=s?7:0,h=2*u+1;if(this.nextRow+h>this.height)return d.w("LineAtlas out of space"),null;let f=0;for(let T=0;T{s.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[mr]}numActive(){return Object.keys(this.active).length}}const Gr=Math.floor(q.hardwareConcurrency/2);let Rr,Wn;function rn(){return Rr||(Rr=new Ur),Rr}Ur.workerCount=d.C(globalThis)?Math.max(Math.min(Gr,3),1):1;class ko{constructor(t,s){this.workerPool=t,this.actors=[],this.currentActor=0,this.id=s;const u=this.workerPool.acquire(s);for(let h=0;h{s.remove()}),this.actors=[],t&&this.workerPool.release(this.id)}registerMessageHandler(t,s){for(const u of this.actors)u.registerMessageHandler(t,s)}}function cs(){return Wn||(Wn=new ko(rn(),d.G),Wn.registerMessageHandler("GR",(m,t,s)=>d.m(t,s))),Wn}function ki(m,t){const s=d.H();return d.J(s,s,[1,1,0]),d.K(s,s,[.5*m.width,.5*m.height,1]),d.L(s,s,m.calculatePosMatrix(t.toUnwrapped()))}function Qi(m,t,s,u,h,f){const w=function(M,F,j){if(M)for(const Z of M){const X=F[Z];if(X&&X.source===j&&X.type==="fill-extrusion")return!0}else for(const Z in F){const X=F[Z];if(X.source===j&&X.type==="fill-extrusion")return!0}return!1}(h&&h.layers,t,m.id),T=f.maxPitchScaleFactor(),k=m.tilesIn(u,T,w);k.sort(eo);const E=[];for(const M of k)E.push({wrappedTileID:M.tileID.wrapped().key,queryResults:M.tile.queryRenderedFeatures(t,s,m._state,M.queryGeometry,M.cameraQueryGeometry,M.scale,h,f,T,ki(m.transform,M.tileID))});const A=function(M){const F={},j={};for(const Z of M){const X=Z.queryResults,Q=Z.wrappedTileID,te=j[Q]=j[Q]||{};for(const ie in X){const H=X[ie],le=te[ie]=te[ie]||{},ue=F[ie]=F[ie]||[];for(const me of H)le[me.featureIndex]||(le[me.featureIndex]=!0,ue.push(me))}}return F}(E);for(const M in A)A[M].forEach(F=>{const j=F.feature,Z=m.getFeatureState(j.layer["source-layer"],j.id);j.source=j.layer.source,j.layer["source-layer"]&&(j.sourceLayer=j.layer["source-layer"]),j.state=Z});return A}function eo(m,t){const s=m.tileID,u=t.tileID;return s.overscaledZ-u.overscaledZ||s.canonical.y-u.canonical.y||s.wrap-u.wrap||s.canonical.x-u.canonical.x}function Uo(m,t,s){return d._(this,void 0,void 0,function*(){let u=m;if(m.url?u=(yield d.h(t.transformRequest(m.url,"Source"),s)).data:yield q.frameAsync(s),!u)return null;const h=d.M(d.e(u,m),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in u&&u.vector_layers&&(h.vectorLayerIds=u.vector_layers.map(f=>f.id)),h})}class ve{constructor(t,s){t&&(s?this.setSouthWest(t).setNorthEast(s):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 d.N?new d.N(t.lng,t.lat):d.N.convert(t),this}setSouthWest(t){return this._sw=t instanceof d.N?new d.N(t.lng,t.lat):d.N.convert(t),this}extend(t){const s=this._sw,u=this._ne;let h,f;if(t instanceof d.N)h=t,f=t;else{if(!(t instanceof ve))return Array.isArray(t)?t.length===4||t.every(Array.isArray)?this.extend(ve.convert(t)):this.extend(d.N.convert(t)):t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(d.N.convert(t)):this;if(h=t._sw,f=t._ne,!h||!f)return this}return s||u?(s.lng=Math.min(h.lng,s.lng),s.lat=Math.min(h.lat,s.lat),u.lng=Math.max(f.lng,u.lng),u.lat=Math.max(f.lat,u.lat)):(this._sw=new d.N(h.lng,h.lat),this._ne=new d.N(f.lng,f.lat)),this}getCenter(){return new d.N((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 d.N(this.getWest(),this.getNorth())}getSouthEast(){return new d.N(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:s,lat:u}=d.N.convert(t);let h=this._sw.lng<=s&&s<=this._ne.lng;return this._sw.lng>this._ne.lng&&(h=this._sw.lng>=s&&s>=this._ne.lng),this._sw.lat<=u&&u<=this._ne.lat&&h}static convert(t){return t instanceof ve?t:t&&new ve(t)}static fromLngLat(t,s=0){const u=360*s/40075017,h=u/Math.cos(Math.PI/180*t.lat);return new ve(new d.N(t.lng-h,t.lat-u),new d.N(t.lng+h,t.lat+u))}adjustAntiMeridian(){const t=new d.N(this._sw.lng,this._sw.lat),s=new d.N(this._ne.lng,this._ne.lat);return new ve(t,t.lng>s.lng?new d.N(s.lng+360,s.lat):s)}}class Co{constructor(t,s,u){this.bounds=ve.convert(this.validateBounds(t)),this.minzoom=s||0,this.maxzoom=u||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 s=Math.pow(2,t.z),u=Math.floor(d.O(this.bounds.getWest())*s),h=Math.floor(d.Q(this.bounds.getNorth())*s),f=Math.ceil(d.O(this.bounds.getEast())*s),w=Math.ceil(d.Q(this.bounds.getSouth())*s);return t.x>=u&&t.x=h&&t.y{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return d.e({},this._options)}loadTile(t){return d._(this,void 0,void 0,function*(){const s=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),u={request:this.map._requestManager.transformRequest(s,"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};u.request.collectResourceTiming=this._collectResourceTiming;let h="RT";if(t.actor&&t.state!=="expired"){if(t.state==="loading")return new Promise((f,w)=>{t.reloadPromise={resolve:f,reject:w}})}else t.actor=this.dispatcher.getActor(),h="LT";t.abortController=new AbortController;try{const f=yield t.actor.sendAsync({type:h,data:u},t.abortController);if(delete t.abortController,t.aborted)return;this._afterTileLoadWorkerResponse(t,f)}catch(f){if(delete t.abortController,t.aborted)return;if(f&&f.status!==404)throw f;this._afterTileLoadWorkerResponse(t,null)}})}_afterTileLoadWorkerResponse(t,s){if(s&&s.resourceTiming&&(t.resourceTiming=s.resourceTiming),s&&this.map._refreshExpiredTiles&&t.setExpiryData(s),t.loadVectorData(s,this.map.painter),t.reloadPromise){const u=t.reloadPromise;t.reloadPromise=null,this.loadTile(t).then(u.resolve).catch(u.reject)}}abortTile(t){return d._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController),t.actor&&(yield t.actor.sendAsync({type:"AT",data:{uid:t.uid,type:this.type,source:this.id}}))})}unloadTile(t){return d._(this,void 0,void 0,function*(){t.unloadVectorData(),t.actor&&(yield t.actor.sendAsync({type:"RMT",data:{uid:t.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class zt extends d.E{constructor(t,s,u,h){super(),this.id=t,this.dispatcher=u,this.setEventedParent(h),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=d.e({type:"raster"},s),d.e(this,d.M(s,["url","scheme","tileSize"]))}load(){return d._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new d.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const t=yield Uo(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,t&&(d.e(this,t),t.bounds&&(this.tileBounds=new Co(t.bounds,this.minzoom,this.maxzoom)),this.fire(new d.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new d.k("data",{dataType:"source",sourceDataType:"content"})))}catch(t){this._tileJSONRequest=null,this.fire(new d.j(t))}})}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(t){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),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}serialize(){return d.e({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t){return d._(this,void 0,void 0,function*(){const s=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);t.abortController=new AbortController;try{const u=yield ae.getImage(this.map._requestManager.transformRequest(s,"Tile"),t.abortController,this.map._refreshExpiredTiles);if(delete t.abortController,t.aborted)return void(t.state="unloaded");if(u&&u.data){this.map._refreshExpiredTiles&&u.cacheControl&&u.expires&&t.setExpiryData({cacheControl:u.cacheControl,expires:u.expires});const h=this.map.painter.context,f=h.gl,w=u.data;t.texture=this.map.painter.getTileTexture(w.width),t.texture?t.texture.update(w,{useMipmap:!0}):(t.texture=new ot(h,w,f.RGBA,{useMipmap:!0}),t.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST)),t.state="loaded"}}catch(u){if(delete t.abortController,t.aborted)t.state="unloaded";else if(u)throw t.state="errored",u}})}abortTile(t){return d._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController)})}unloadTile(t){return d._(this,void 0,void 0,function*(){t.texture&&this.map.painter.saveTileTexture(t.texture)})}hasTransition(){return!1}}class tr extends zt{constructor(t,s,u,h){super(t,s,u,h),this.type="raster-dem",this.maxzoom=22,this._options=d.e({type:"raster-dem"},s),this.encoding=s.encoding||"mapbox",this.redFactor=s.redFactor,this.greenFactor=s.greenFactor,this.blueFactor=s.blueFactor,this.baseShift=s.baseShift}loadTile(t){return d._(this,void 0,void 0,function*(){const s=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),u=this.map._requestManager.transformRequest(s,"Tile");t.neighboringTiles=this._getNeighboringTiles(t.tileID),t.abortController=new AbortController;try{const h=yield ae.getImage(u,t.abortController,this.map._refreshExpiredTiles);if(delete t.abortController,t.aborted)return void(t.state="unloaded");if(h&&h.data){const f=h.data;this.map._refreshExpiredTiles&&h.cacheControl&&h.expires&&t.setExpiryData({cacheControl:h.cacheControl,expires:h.expires});const w=d.b(f)&&d.U()?f:yield this.readImageNow(f),T={type:this.type,uid:t.uid,source:this.id,rawImageData:w,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!t.actor||t.state==="expired"){t.actor=this.dispatcher.getActor();const k=yield t.actor.sendAsync({type:"LDT",data:T});t.dem=k,t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded"}}}catch(h){if(delete t.abortController,t.aborted)t.state="unloaded";else if(h)throw t.state="errored",h}})}readImageNow(t){return d._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&d.V()){const s=t.width+2,u=t.height+2;try{return new d.R({width:s,height:u},yield d.W(t,-1,-1,s,u))}catch{}}return q.getImageData(t,1)})}_getNeighboringTiles(t){const s=t.canonical,u=Math.pow(2,s.z),h=(s.x-1+u)%u,f=s.x===0?t.wrap-1:t.wrap,w=(s.x+1+u)%u,T=s.x+1===u?t.wrap+1:t.wrap,k={};return k[new d.S(t.overscaledZ,f,s.z,h,s.y).key]={backfilled:!1},k[new d.S(t.overscaledZ,T,s.z,w,s.y).key]={backfilled:!1},s.y>0&&(k[new d.S(t.overscaledZ,f,s.z,h,s.y-1).key]={backfilled:!1},k[new d.S(t.overscaledZ,t.wrap,s.z,s.x,s.y-1).key]={backfilled:!1},k[new d.S(t.overscaledZ,T,s.z,w,s.y-1).key]={backfilled:!1}),s.y+10&&d.e(f,{resourceTiming:h}),this.fire(new d.k("data",Object.assign(Object.assign({},f),{sourceDataType:"metadata"}))),this.fire(new d.k("data",Object.assign(Object.assign({},f),{sourceDataType:"content"})))}catch(u){if(this._pendingLoads--,this._removed)return void this.fire(new d.k("dataabort",{dataType:"source"}));this.fire(new d.j(u))}})}loaded(){return this._pendingLoads===0}loadTile(t){return d._(this,void 0,void 0,function*(){const s=t.actor?"RT":"LT";t.actor=this.actor;const u={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.abortController=new AbortController;const h=yield this.actor.sendAsync({type:s,data:u},t.abortController);delete t.abortController,t.unloadVectorData(),t.aborted||t.loadVectorData(h,this.map.painter,s==="RT")})}abortTile(t){return d._(this,void 0,void 0,function*(){t.abortController&&(t.abortController.abort(),delete t.abortController),t.aborted=!0})}unloadTile(t){return d._(this,void 0,void 0,function*(){t.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:t.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return d.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var to=d.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Ci extends d.E{constructor(t,s,u,h){super(),this.id=t,this.dispatcher=u,this.coordinates=s.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(h),this.options=s}load(t){return d._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new d.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const s=yield ae.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,s&&s.data&&(this.image=s.data,t&&(this.coordinates=t),this._finishLoading())}catch(s){this._request=null,this._loaded=!0,this.fire(new d.j(s))}})}loaded(){return this._loaded}updateImage(t){return t.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=t.url,this.load(t.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new d.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(t){this.coordinates=t;const s=t.map(d.Z.fromLngLat);this.tileID=function(h){let f=1/0,w=1/0,T=-1/0,k=-1/0;for(const F of h)f=Math.min(f,F.x),w=Math.min(w,F.y),T=Math.max(T,F.x),k=Math.max(k,F.y);const E=Math.max(T-f,k-w),A=Math.max(0,Math.floor(-Math.log(E)/Math.LN2)),M=Math.pow(2,A);return new d.a1(A,Math.floor((f+T)/2*M),Math.floor((w+k)/2*M))}(s),this.minzoom=this.maxzoom=this.tileID.z;const u=s.map(h=>this.tileID.getTilePoint(h)._round());return this._boundsArray=new d.$,this._boundsArray.emplaceBack(u[0].x,u[0].y,0,0),this._boundsArray.emplaceBack(u[1].x,u[1].y,d.X,0),this._boundsArray.emplaceBack(u[3].x,u[3].y,0,d.X),this._boundsArray.emplaceBack(u[2].x,u[2].y,d.X,d.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new d.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const t=this.map.painter.context,s=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,to.members)),this.boundsSegments||(this.boundsSegments=d.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new ot(t,this.image,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE));let u=!1;for(const h in this.tiles){const f=this.tiles[h];f.state!=="loaded"&&(f.state="loaded",f.texture=this.texture,u=!0)}u&&this.fire(new d.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(t){return d._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={}):t.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Ii extends Ci{constructor(t,s,u,h){super(t,s,u,h),this.roundZoom=!0,this.type="video",this.options=s}load(){return d._(this,void 0,void 0,function*(){this._loaded=!1;const t=this.options;this.urls=[];for(const s of t.urls)this.urls.push(this.map._requestManager.transformRequest(s,"Source").url);try{const s=yield d.a3(this.urls);if(this._loaded=!0,!s)return;this.video=s,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(s){this.fire(new d.j(s))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const s=this.video.seekable;ts.end(0)?this.fire(new d.j(new d.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${s.start(0)} and ${s.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,s=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,to.members)),this.boundsSegments||(this.boundsSegments=d.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE),s.texSubImage2D(s.TEXTURE_2D,0,0,0,s.RGBA,s.UNSIGNED_BYTE,this.video)):(this.texture=new ot(t,this.video,s.RGBA),this.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE));let u=!1;for(const h in this.tiles){const f=this.tiles[h];f.state!=="loaded"&&(f.state="loaded",f.texture=this.texture,u=!0)}u&&this.fire(new d.k("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 Hr extends Ci{constructor(t,s,u,h){super(t,s,u,h),s.coordinates?Array.isArray(s.coordinates)&&s.coordinates.length===4&&!s.coordinates.some(f=>!Array.isArray(f)||f.length!==2||f.some(w=>typeof w!="number"))||this.fire(new d.j(new d.a2(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new d.j(new d.a2(`sources.${t}`,null,'missing required property "coordinates"'))),s.animate&&typeof s.animate!="boolean"&&this.fire(new d.j(new d.a2(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),s.canvas?typeof s.canvas=="string"||s.canvas instanceof HTMLCanvasElement||this.fire(new d.j(new d.a2(`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 d.j(new d.a2(`sources.${t}`,null,'missing required property "canvas"'))),this.options=s,this.animate=s.animate===void 0||s.animate}load(){return d._(this,void 0,void 0,function*(){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 d.j(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 s=this.map.painter.context,u=s.gl;this.boundsBuffer||(this.boundsBuffer=s.createVertexBuffer(this._boundsArray,to.members)),this.boundsSegments||(this.boundsSegments=d.a0.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new ot(s,this.canvas,u.RGBA,{premultiply:!0});let h=!1;for(const f in this.tiles){const w=this.tiles[f];w.state!=="loaded"&&(w.state="loaded",w.texture=this.texture,h=!0)}h&&this.fire(new d.k("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 hs={},jo=m=>{switch(m){case"geojson":return Io;case"image":return Ci;case"raster":return zt;case"raster-dem":return tr;case"vector":return us;case"video":return Ii;case"canvas":return Hr}return hs[m]},Me="RTLPluginLoaded";class yt extends d.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=cs()}_syncState(t){return this.status=t,this.dispatcher.broadcast("SRPS",{pluginStatus:t,pluginURL:this.url}).catch(s=>{throw this.status="error",s})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(t){return d._(this,arguments,void 0,function*(s,u=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=q.resolveURL(s),!this.url)throw new Error(`requested url ${s} is invalid`);if(this.status==="unavailable"){if(!u)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return d._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new d.k(Me))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Wr=null;function li(){return Wr||(Wr=new yt),Wr}class Ei{constructor(t,s){this.timeAdded=0,this.fadeEndTime=0,this.tileID=t,this.uid=d.a4(),this.uses=0,this.tileSize=s,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 s=t+this.timeAdded;sf.getLayer(E)).filter(Boolean);if(k.length!==0){T.layers=k,T.stateDependentLayerIds&&(T.stateDependentLayers=T.stateDependentLayerIds.map(E=>k.filter(A=>A.id===E)[0]));for(const E of k)w[E.id]=T}}return w}(t.buckets,s.style),this.hasSymbolBuckets=!1;for(const h in this.buckets){const f=this.buckets[h];if(f instanceof d.a6){if(this.hasSymbolBuckets=!0,!u)break;f.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const h in this.buckets){const f=this.buckets[h];if(f instanceof d.a6&&f.hasRTLText){this.hasRTLText=!0,li().lazyLoad();break}}this.queryPadding=0;for(const h in this.buckets){const f=this.buckets[h];this.queryPadding=Math.max(this.queryPadding,s.style.getLayer(h).queryRadius(f))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new d.a5}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 u in this.buckets){const h=this.buckets[u];h.uploadPending()&&h.upload(t)}const s=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new ot(t,this.imageAtlas.image,s.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new ot(t,this.glyphAtlasImage,s.ALPHA),this.glyphAtlasImage=null)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,s,u,h,f,w,T,k,E,A){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:h,cameraQueryGeometry:f,scale:w,tileSize:this.tileSize,pixelPosMatrix:A,transform:k,params:T,queryPadding:this.queryPadding*E},t,s,u):{}}querySourceFeatures(t,s){const u=this.latestFeatureIndex;if(!u||!u.rawTileData)return;const h=u.loadVTLayers(),f=s&&s.sourceLayer?s.sourceLayer:"",w=h._geojsonTileLayer||h[f];if(!w)return;const T=d.a7(s&&s.filter),{z:k,x:E,y:A}=this.tileID.canonical,M={z:k,x:E,y:A};for(let F=0;Fu)h=!1;else if(s)if(this.expirationTime{this.remove(t,f)},u)),this.data[h].push(f),this.order.push(h),this.order.length>this.max){const w=this._getAndRemoveByKey(this.order[0]);w&&this.onRemove(w)}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 s=this.data[t].shift();return s.timeout&&clearTimeout(s.timeout),this.data[t].length===0&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),s.value}getByKey(t){const s=this.data[t];return s?s[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,s){if(!this.has(t))return this;const u=t.wrapped().key,h=s===void 0?0:this.data[u].indexOf(s),f=this.data[u][h];return this.data[u].splice(h,1),f.timeout&&clearTimeout(f.timeout),this.data[u].length===0&&delete this.data[u],this.onRemove(f.value),this.order.splice(this.order.indexOf(u),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const s=this._getAndRemoveByKey(this.order[0]);s&&this.onRemove(s)}return this}filter(t){const s=[];for(const u in this.data)for(const h of this.data[u])t(h.value)||s.push(h);for(const u of s)this.remove(u.value.tileID,u)}}class St{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,s,u){const h=String(s);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][h]=this.stateChanges[t][h]||{},d.e(this.stateChanges[t][h],u),this.deletedStates[t]===null){this.deletedStates[t]={};for(const f in this.state[t])f!==h&&(this.deletedStates[t][f]=null)}else if(this.deletedStates[t]&&this.deletedStates[t][h]===null){this.deletedStates[t][h]={};for(const f in this.state[t][h])u[f]||(this.deletedStates[t][h][f]=null)}else for(const f in u)this.deletedStates[t]&&this.deletedStates[t][h]&&this.deletedStates[t][h][f]===null&&delete this.deletedStates[t][h][f]}removeFeatureState(t,s,u){if(this.deletedStates[t]===null)return;const h=String(s);if(this.deletedStates[t]=this.deletedStates[t]||{},u&&s!==void 0)this.deletedStates[t][h]!==null&&(this.deletedStates[t][h]=this.deletedStates[t][h]||{},this.deletedStates[t][h][u]=null);else if(s!==void 0)if(this.stateChanges[t]&&this.stateChanges[t][h])for(u in this.deletedStates[t][h]={},this.stateChanges[t][h])this.deletedStates[t][h][u]=null;else this.deletedStates[t][h]=null;else this.deletedStates[t]=null}getState(t,s){const u=String(s),h=d.e({},(this.state[t]||{})[u],(this.stateChanges[t]||{})[u]);if(this.deletedStates[t]===null)return{};if(this.deletedStates[t]){const f=this.deletedStates[t][s];if(f===null)return{};for(const w in f)delete h[w]}return h}initializeTileState(t,s){t.setFeatureState(this.state,s)}coalesceChanges(t,s){const u={};for(const h in this.stateChanges){this.state[h]=this.state[h]||{};const f={};for(const w in this.stateChanges[h])this.state[h][w]||(this.state[h][w]={}),d.e(this.state[h][w],this.stateChanges[h][w]),f[w]=this.state[h][w];u[h]=f}for(const h in this.deletedStates){this.state[h]=this.state[h]||{};const f={};if(this.deletedStates[h]===null)for(const w in this.state[h])f[w]={},this.state[h][w]={};else for(const w in this.deletedStates[h]){if(this.deletedStates[h][w]===null)this.state[h][w]={};else for(const T of Object.keys(this.deletedStates[h][w]))delete this.state[h][w][T];f[w]=this.state[h][w]}u[h]=u[h]||{},d.e(u[h],f)}if(this.stateChanges={},this.deletedStates={},Object.keys(u).length!==0)for(const h in t)t[h].setFeatureState(u,s)}}class ht extends d.E{constructor(t,s,u){super(),this.id=t,this.dispatcher=u,this.on("data",h=>this._dataHandler(h)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((h,f,w,T)=>{const k=new(jo(f.type))(h,f,w,T);if(k.id!==h)throw new Error(`Expected Source id to be ${h} instead of ${k.id}`);return k})(t,s,u,this),this._tiles={},this._cache=new Be(0,h=>this._unloadTile(h)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new St,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 s=this._tiles[t];if(s.state!=="loaded"&&s.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,s,u){return d._(this,void 0,void 0,function*(){try{yield this._source.loadTile(t),this._tileLoaded(t,s,u)}catch(h){t.state="errored",h.status!==404?this._source.fire(new d.j(h,{tile:t})):this.update(this.transform,this.terrain)}})}_unloadTile(t){this._source.unloadTile&&this._source.unloadTile(t)}_abortTile(t){this._source.abortTile&&this._source.abortTile(t),this._source.fire(new d.k("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 s in this._tiles){const u=this._tiles[s];u.upload(t),u.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(t=>t.tileID).sort(Ln).map(t=>t.key)}getRenderableIds(t){const s=[];for(const u in this._tiles)this._isIdRenderable(u,t)&&s.push(this._tiles[u]);return t?s.sort((u,h)=>{const f=u.tileID,w=h.tileID,T=new d.P(f.canonical.x,f.canonical.y)._rotate(this.transform.angle),k=new d.P(w.canonical.x,w.canonical.y)._rotate(this.transform.angle);return f.overscaledZ-w.overscaledZ||k.y-T.y||k.x-T.x}).map(u=>u.tileID.key):s.map(u=>u.tileID).sort(Ln).map(u=>u.key)}hasRenderableParent(t){const s=this.findLoadedParent(t,0);return!!s&&this._isIdRenderable(s.tileID.key)}_isIdRenderable(t,s){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(s||!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,s){return d._(this,void 0,void 0,function*(){const u=this._tiles[t];u&&(u.state!=="loading"&&(u.state=s),yield this._loadTile(u,t,s))})}_tileLoaded(t,s,u){t.timeAdded=q.now(),u==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(s,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 d.k("data",{dataType:"source",tile:t,coord:t.tileID}))}_backfillDEM(t){const s=this.getRenderableIds();for(let h=0;h1||(Math.abs(w)>1&&(Math.abs(w+k)===1?w+=k:Math.abs(w-k)===1&&(w-=k)),f.dem&&h.dem&&(h.dem.backfillBorder(f.dem,w,T),h.neighboringTiles&&h.neighboringTiles[E]&&(h.neighboringTiles[E].backfilled=!0)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,s,u,h){for(const f in this._tiles){let w=this._tiles[f];if(h[f]||!w.hasData()||w.tileID.overscaledZ<=s||w.tileID.overscaledZ>u)continue;let T=w.tileID;for(;w&&w.tileID.overscaledZ>s+1;){const E=w.tileID.scaledTo(w.tileID.overscaledZ-1);w=this._tiles[E.key],w&&w.hasData()&&(T=E)}let k=T;for(;k.overscaledZ>s;)if(k=k.scaledTo(k.overscaledZ-1),t[k.key]){h[T.key]=T;break}}}findLoadedParent(t,s){if(t.key in this._loadedParentTiles){const u=this._loadedParentTiles[t.key];return u&&u.tileID.overscaledZ>=s?u:null}for(let u=t.overscaledZ-1;u>=s;u--){const h=t.scaledTo(u),f=this._getLoadedTile(h);if(f)return f}}findLoadedSibling(t){return this._getLoadedTile(t)}_getLoadedTile(t){const s=this._tiles[t.key];return s&&s.hasData()?s:this._cache.getByKey(t.wrapped().key)}updateCacheSize(t){const s=Math.ceil(t.width/this._source.tileSize)+1,u=Math.ceil(t.height/this._source.tileSize)+1,h=Math.floor(s*u*(this._maxTileCacheZoomLevels===null?d.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),f=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,h):h;this._cache.setMaxSize(f)}handleWrapJump(t){const s=Math.round((t-(this._prevLng===void 0?t:this._prevLng))/360);if(this._prevLng=t,s){const u={};for(const h in this._tiles){const f=this._tiles[h];f.tileID=f.tileID.unwrapTo(f.tileID.wrap+s),u[f.tileID.key]=f}this._tiles=u;for(const h in this._timers)clearTimeout(this._timers[h]),delete this._timers[h];for(const h in this._tiles)this._setTileReloadTimer(h,this._tiles[h])}}_updateCoveredAndRetainedTiles(t,s,u,h,f,w){const T={},k={},E=Object.keys(t),A=q.now();for(const M of E){const F=t[M],j=this._tiles[M];if(!j||j.fadeEndTime!==0&&j.fadeEndTime<=A)continue;const Z=this.findLoadedParent(F,s),X=this.findLoadedSibling(F),Q=Z||X||null;Q&&(this._addTile(Q.tileID),T[Q.tileID.key]=Q.tileID),k[M]=F}this._retainLoadedChildren(k,h,u,t);for(const M in T)t[M]||(this._coveredTiles[M]=!0,t[M]=T[M]);if(w){const M={},F={};for(const j of f)this._tiles[j.key].hasData()?M[j.key]=j:F[j.key]=j;for(const j in F){const Z=F[j].children(this._source.maxzoom);this._tiles[Z[0].key]&&this._tiles[Z[1].key]&&this._tiles[Z[2].key]&&this._tiles[Z[3].key]&&(M[Z[0].key]=t[Z[0].key]=Z[0],M[Z[1].key]=t[Z[1].key]=Z[1],M[Z[2].key]=t[Z[2].key]=Z[2],M[Z[3].key]=t[Z[3].key]=Z[3],delete F[j])}for(const j in F){const Z=F[j],X=this.findLoadedParent(Z,this._source.minzoom),Q=this.findLoadedSibling(Z),te=X||Q||null;if(te){M[te.tileID.key]=t[te.tileID.key]=te.tileID;for(const ie in M)M[ie].isChildOf(te.tileID)&&delete M[ie]}}for(const j in this._tiles)M[j]||(this._coveredTiles[j]=!0)}}update(t,s){if(!this._sourceLoaded||this._paused)return;let u;this.transform=t,this.terrain=s,this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?u=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(A=>new d.S(A.canonical.z,A.wrap,A.canonical.z,A.canonical.x,A.canonical.y)):(u=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:s}),this._source.hasTile&&(u=u.filter(A=>this._source.hasTile(A)))):u=[];const h=t.coveringZoomLevel(this._source),f=Math.max(h-ht.maxOverzooming,this._source.minzoom),w=Math.max(h+ht.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const A={};for(const M of u)if(M.canonical.z>this._source.minzoom){const F=M.scaledTo(M.canonical.z-1);A[F.key]=F;const j=M.scaledTo(Math.max(this._source.minzoom,Math.min(M.canonical.z,5)));A[j.key]=j}u=u.concat(Object.values(A))}const T=u.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,T&&this.fire(new d.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const k=this._updateRetainedTiles(u,h);Pi(this._source.type)&&this._updateCoveredAndRetainedTiles(k,f,w,h,u,s);for(const A in k)this._tiles[A].clearFadeHold();const E=d.ab(this._tiles,k);for(const A of E){const M=this._tiles[A];M.hasSymbolBuckets&&!M.holdingForFade()?M.setHoldDuration(this.map._fadeDuration):M.hasSymbolBuckets&&!M.symbolFadeFinished()||this._removeTile(A)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)}_updateRetainedTiles(t,s){var u;const h={},f={},w=Math.max(s-ht.maxOverzooming,this._source.minzoom),T=Math.max(s+ht.maxUnderzooming,this._source.minzoom),k={};for(const E of t){const A=this._addTile(E);h[E.key]=E,A.hasData()||sthis._source.maxzoom){const F=E.children(this._source.maxzoom)[0],j=this.getTile(F);if(j&&j.hasData()){h[F.key]=F;continue}}else{const F=E.children(this._source.maxzoom);if(h[F[0].key]&&h[F[1].key]&&h[F[2].key]&&h[F[3].key])continue}let M=A.wasRequested();for(let F=E.overscaledZ-1;F>=w;--F){const j=E.scaledTo(F);if(f[j.key])break;if(f[j.key]=!0,A=this.getTile(j),!A&&M&&(A=this._addTile(j)),A){const Z=A.hasData();if((Z||!(!((u=this.map)===null||u===void 0)&&u.cancelPendingTileRequestsWhileZooming)||M)&&(h[j.key]=j),M=A.wasRequested(),Z)break}}}return h}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const t in this._tiles){const s=[];let u,h=this._tiles[t].tileID;for(;h.overscaledZ>0;){if(h.key in this._loadedParentTiles){u=this._loadedParentTiles[h.key];break}s.push(h.key);const f=h.scaledTo(h.overscaledZ-1);if(u=this._getLoadedTile(f),u)break;h=f}for(const f of s)this._loadedParentTiles[f]=u}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const t in this._tiles){const s=this._tiles[t].tileID,u=this._getLoadedTile(s);this._loadedSiblingTiles[s.key]=u}}_addTile(t){let s=this._tiles[t.key];if(s)return s;s=this._cache.getAndRemove(t),s&&(this._setTileReloadTimer(t.key,s),s.tileID=t,this._state.initializeTileState(s,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,s)));const u=s;return s||(s=new Ei(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(s,t.key,s.state)),s.uses++,this._tiles[t.key]=s,u||this._source.fire(new d.k("dataloading",{tile:s,coord:s.tileID,dataType:"source"})),s}_setTileReloadTimer(t,s){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);const u=s.getExpiryTimeout();u&&(this._timers[t]=setTimeout(()=>{this._reloadTile(t,"expired"),delete this._timers[t]},u))}_removeTile(t){const s=this._tiles[t];s&&(s.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),s.uses>0||(s.hasData()&&s.state!=="reloading"?this._cache.add(s.tileID,s,s.getExpiryTimeout()):(s.aborted=!0,this._abortTile(s),this._unloadTile(s))))}_dataHandler(t){const s=t.sourceDataType;t.dataType==="source"&&s==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&t.dataType==="source"&&s==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t in this._tiles)this._removeTile(t);this._cache.reset()}tilesIn(t,s,u){const h=[],f=this.transform;if(!f)return h;const w=u?f.getCameraQueryGeometry(t):t,T=t.map(Z=>f.pointCoordinate(Z,this.terrain)),k=w.map(Z=>f.pointCoordinate(Z,this.terrain)),E=this.getIds();let A=1/0,M=1/0,F=-1/0,j=-1/0;for(const Z of k)A=Math.min(A,Z.x),M=Math.min(M,Z.y),F=Math.max(F,Z.x),j=Math.max(j,Z.y);for(let Z=0;Z=0&&H[1].y+ie>=0){const le=T.map(me=>Q.getTilePoint(me)),ue=k.map(me=>Q.getTilePoint(me));h.push({tile:X,tileID:Q,queryGeometry:le,cameraQueryGeometry:ue,scale:te})}}return h}getVisibleCoordinates(t){const s=this.getRenderableIds(t).map(u=>this._tiles[u].tileID);for(const u of s)u.posMatrix=this.transform.calculatePosMatrix(u.toUnwrapped());return s}hasTransition(){if(this._source.hasTransition())return!0;if(Pi(this._source.type)){const t=q.now();for(const s in this._tiles)if(this._tiles[s].fadeEndTime>=t)return!0}return!1}setFeatureState(t,s,u){this._state.updateState(t=t||"_geojsonTileLayer",s,u)}removeFeatureState(t,s,u){this._state.removeFeatureState(t=t||"_geojsonTileLayer",s,u)}getFeatureState(t,s){return this._state.getState(t=t||"_geojsonTileLayer",s)}setDependencies(t,s,u){const h=this._tiles[t];h&&h.setDependencies(s,u)}reloadTilesForDependencies(t,s){for(const u in this._tiles)this._tiles[u].hasDependency(t,s)&&this._reloadTile(u,"reloading");this._cache.filter(u=>!u.hasDependency(t,s))}}function Ln(m,t){const s=Math.abs(2*m.wrap)-+(m.wrap<0),u=Math.abs(2*t.wrap)-+(t.wrap<0);return m.overscaledZ-t.overscaledZ||u-s||t.canonical.y-m.canonical.y||t.canonical.x-m.canonical.x}function Pi(m){return m==="raster"||m==="image"||m==="video"}ht.maxOverzooming=10,ht.maxUnderzooming=3;class xt{constructor(t,s){this.reset(t,s)}reset(t,s){this.points=t||[],this._distances=[0];for(let u=1;u0?(h-w)/T:0;return this.points[f].mult(1-k).add(this.points[s].mult(k))}}function ro(m,t){let s=!0;return m==="always"||m!=="never"&&t!=="never"||(s=!1),s}class Eo{constructor(t,s,u){const h=this.boxCells=[],f=this.circleCells=[];this.xCellCount=Math.ceil(t/u),this.yCellCount=Math.ceil(s/u);for(let w=0;wthis.width||h<0||s>this.height)return[];const k=[];if(t<=0&&s<=0&&this.width<=u&&this.height<=h){if(f)return[{key:null,x1:t,y1:s,x2:u,y2:h}];for(let E=0;E0}hitTestCircle(t,s,u,h,f){const w=t-u,T=t+u,k=s-u,E=s+u;if(T<0||w>this.width||E<0||k>this.height)return!1;const A=[];return this._forEachCell(w,k,T,E,this._queryCellCircle,A,{hitTest:!0,overlapMode:h,circle:{x:t,y:s,radius:u},seenUids:{box:{},circle:{}}},f),A.length>0}_queryCell(t,s,u,h,f,w,T,k){const{seenUids:E,hitTest:A,overlapMode:M}=T,F=this.boxCells[f];if(F!==null){const Z=this.bboxes;for(const X of F)if(!E.box[X]){E.box[X]=!0;const Q=4*X,te=this.boxKeys[X];if(t<=Z[Q+2]&&s<=Z[Q+3]&&u>=Z[Q+0]&&h>=Z[Q+1]&&(!k||k(te))&&(!A||!ro(M,te.overlapMode))&&(w.push({key:te,x1:Z[Q],y1:Z[Q+1],x2:Z[Q+2],y2:Z[Q+3]}),A))return!0}}const j=this.circleCells[f];if(j!==null){const Z=this.circles;for(const X of j)if(!E.circle[X]){E.circle[X]=!0;const Q=3*X,te=this.circleKeys[X];if(this._circleAndRectCollide(Z[Q],Z[Q+1],Z[Q+2],t,s,u,h)&&(!k||k(te))&&(!A||!ro(M,te.overlapMode))){const ie=Z[Q],H=Z[Q+1],le=Z[Q+2];if(w.push({key:te,x1:ie-le,y1:H-le,x2:ie+le,y2:H+le}),A)return!0}}}return!1}_queryCellCircle(t,s,u,h,f,w,T,k){const{circle:E,seenUids:A,overlapMode:M}=T,F=this.boxCells[f];if(F!==null){const Z=this.bboxes;for(const X of F)if(!A.box[X]){A.box[X]=!0;const Q=4*X,te=this.boxKeys[X];if(this._circleAndRectCollide(E.x,E.y,E.radius,Z[Q+0],Z[Q+1],Z[Q+2],Z[Q+3])&&(!k||k(te))&&!ro(M,te.overlapMode))return w.push(!0),!0}}const j=this.circleCells[f];if(j!==null){const Z=this.circles;for(const X of j)if(!A.circle[X]){A.circle[X]=!0;const Q=3*X,te=this.circleKeys[X];if(this._circlesCollide(Z[Q],Z[Q+1],Z[Q+2],E.x,E.y,E.radius)&&(!k||k(te))&&!ro(M,te.overlapMode))return w.push(!0),!0}}}_forEachCell(t,s,u,h,f,w,T,k){const E=this._convertToXCellCoord(t),A=this._convertToYCellCoord(s),M=this._convertToXCellCoord(u),F=this._convertToYCellCoord(h);for(let j=E;j<=M;j++)for(let Z=A;Z<=F;Z++)if(f.call(this,t,s,u,h,this.xCellCount*Z+j,w,T,k))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,s,u,h,f,w){const T=h-t,k=f-s,E=u+w;return E*E>T*T+k*k}_circleAndRectCollide(t,s,u,h,f,w,T){const k=(w-h)/2,E=Math.abs(t-(h+k));if(E>k+u)return!1;const A=(T-f)/2,M=Math.abs(s-(f+A));if(M>A+u)return!1;if(E<=k||M<=A)return!0;const F=E-k,j=M-A;return F*F+j*j<=u*u}}function Vo(m,t,s,u,h){const f=d.H();return t?(d.K(f,f,[1/h,1/h,1]),s||d.ad(f,f,u.angle)):d.L(f,u.labelPlaneMatrix,m),f}function no(m,t,s,u,h){if(t){const f=d.ae(m);return d.K(f,f,[h,h,1]),s||d.ad(f,f,-u.angle),f}return u.glCoordMatrix}function Y(m,t,s,u){let h;u?(h=[m,t,u(m,t),1],d.af(h,h,s)):(h=[m,t,0,1],Lt(h,h,s));const f=h[3];return{point:new d.P(h[0]/f,h[1]/f),signedDistanceFromCamera:f,isOccluded:!1}}function D(m,t){return .5+m/t*.5}function R(m,t){return m.x>=-t[0]&&m.x<=t[0]&&m.y>=-t[1]&&m.y<=t[1]}function V(m,t,s,u,h,f,w,T,k,E,A,M,F,j,Z){const X=u?m.textSizeData:m.iconSizeData,Q=d.ag(X,s.transform.zoom),te=[256/s.width*2+1,256/s.height*2+1],ie=u?m.text.dynamicLayoutVertexArray:m.icon.dynamicLayoutVertexArray;ie.clear();const H=m.lineVertexArray,le=u?m.text.placedSymbolArray:m.icon.placedSymbolArray,ue=s.transform.width/s.transform.height;let me=!1;for(let Te=0;TeMath.abs(s.x-t.x)*u?{useVertical:!0}:(m===d.ah.vertical?t.ys.x)?{needsFlipping:!0}:null}function ce(m,t,s,u,h,f,w,T,k,E,A){const M=s/24,F=t.lineOffsetX*M,j=t.lineOffsetY*M;let Z;if(t.numGlyphs>1){const X=t.glyphStartIndex+t.numGlyphs,Q=t.lineStartIndex,te=t.lineStartIndex+t.lineLength,ie=K(M,T,F,j,u,t,A,m);if(!ie)return{notEnoughRoom:!0};const H=Y(ie.first.point.x,ie.first.point.y,w,m.getElevation).point,le=Y(ie.last.point.x,ie.last.point.y,w,m.getElevation).point;if(h&&!u){const ue=se(t.writingMode,H,le,E);if(ue)return ue}Z=[ie.first];for(let ue=t.glyphStartIndex+1;ue0?H.point:function(me,Te,Ae,Ne,Ge,De){return de(me,Te,Ae,1,Ge,De)}(m.tileAnchorPoint,ie,Q,0,f,m),ue=se(t.writingMode,Q,le,E);if(ue)return ue}const X=Le(M*T.getoffsetX(t.glyphStartIndex),F,j,u,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,m,A);if(!X||m.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Z=[X]}for(const X of Z)d.aj(k,X.point,X.angle);return{}}function de(m,t,s,u,h,f){const w=m.add(m.sub(t)._unit()),T=h!==void 0?Y(w.x,w.y,h,f.getElevation).point:be(w.x,w.y,f).point,k=s.sub(T);return s.add(k._mult(u/k.mag()))}function re(m,t,s){const u=t.projectionCache;if(u.projections[m])return u.projections[m];const h=new d.P(t.lineVertexArray.getx(m),t.lineVertexArray.gety(m)),f=be(h.x,h.y,t);if(f.signedDistanceFromCamera>0)return u.projections[m]=f.point,u.anyProjectionOccluded=u.anyProjectionOccluded||f.isOccluded,f.point;const w=m-s.direction;return function(T,k,E,A,M){return de(T,k,E,A,void 0,M)}(s.distanceFromAnchor===0?t.tileAnchorPoint:new d.P(t.lineVertexArray.getx(w),t.lineVertexArray.gety(w)),h,s.previousVertex,s.absOffsetX-s.distanceFromAnchor+1,t)}function be(m,t,s){const u=m+s.translation[0],h=t+s.translation[1];let f;return!s.pitchWithMap&&s.projection.useSpecialProjectionForSymbols?(f=s.projection.projectTileCoordinates(u,h,s.unwrappedTileID,s.getElevation),f.point.x=(.5*f.point.x+.5)*s.width,f.point.y=(.5*-f.point.y+.5)*s.height):(f=Y(u,h,s.labelPlaneMatrix,s.getElevation),f.isOccluded=!1),f}function Ce(m,t,s){return m._unit()._perp()._mult(t*s)}function ye(m,t,s,u,h,f,w,T,k){if(T.projectionCache.offsets[m])return T.projectionCache.offsets[m];const E=s.add(t);if(m+k.direction=h)return T.projectionCache.offsets[m]=E,E;const A=re(m+k.direction,T,k),M=Ce(A.sub(s),w,k.direction),F=s.add(M),j=A.add(M);return T.projectionCache.offsets[m]=d.ak(f,E,F,j)||E,T.projectionCache.offsets[m]}function Le(m,t,s,u,h,f,w,T,k){const E=u?m-t:m+t;let A=E>0?1:-1,M=0;u&&(A*=-1,M=Math.PI),A<0&&(M+=Math.PI);let F,j=A>0?f+h:f+h+1;T.projectionCache.cachedAnchorPoint?F=T.projectionCache.cachedAnchorPoint:(F=be(T.tileAnchorPoint.x,T.tileAnchorPoint.y,T).point,T.projectionCache.cachedAnchorPoint=F);let Z,X,Q=F,te=F,ie=0,H=0;const le=Math.abs(E),ue=[];let me;for(;ie+H<=le;){if(j+=A,j=w)return null;ie+=H,te=Q,X=Z;const Ne={absOffsetX:le,direction:A,distanceFromAnchor:ie,previousVertex:te};if(Q=re(j,T,Ne),s===0)ue.push(te),me=Q.sub(te);else{let Ge;const De=Q.sub(te);Ge=De.mag()===0?Ce(re(j+A,T,Ne).sub(Q),s,A):Ce(De,s,A),X||(X=te.add(Ge)),Z=ye(j,Ge,Q,f,w,X,s,T,Ne),ue.push(X),me=Z.sub(X)}H=me.mag()}const Te=me._mult((le-ie)/H)._add(X||te),Ae=M+Math.atan2(Q.y-te.y,Q.x-te.x);return ue.push(Te),{point:Te,angle:k?Ae:0,path:ue}}const rt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function st(m,t){for(let s=0;s=1;wt--)je.push(_t.path[wt]);for(let wt=1;wtEt.signedDistanceFromCamera<=0)?[]:wt.map(Et=>Et.point)}let lr=[];if(je.length>0){const wt=je[0].clone(),Et=je[0].clone();for(let cr=1;cr=De.x&&Et.x<=Re.x&&wt.y>=De.y&&Et.y<=Re.y?[je]:Et.xRe.x||Et.yRe.y?[]:d.al([je],De.x,De.y,Re.x,Re.y)}for(const wt of lr){Je.reset(wt,.25*Ge);let Et=0;Et=Je.length<=.5*Ge?1:Math.ceil(Je.paddedLength/pt)+1;for(let cr=0;crY(h.x,h.y,u,s.getElevation))}queryRenderedSymbols(t){if(t.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const s=[];let u=1/0,h=1/0,f=-1/0,w=-1/0;for(const A of t){const M=new d.P(A.x+bt,A.y+bt);u=Math.min(u,M.x),h=Math.min(h,M.y),f=Math.max(f,M.x),w=Math.max(w,M.y),s.push(M)}const T=this.grid.query(u,h,f,w).concat(this.ignoredGrid.query(u,h,f,w)),k={},E={};for(const A of T){const M=A.key;if(k[M.bucketInstanceId]===void 0&&(k[M.bucketInstanceId]={}),k[M.bucketInstanceId][M.featureIndex])continue;const F=[new d.P(A.x1,A.y1),new d.P(A.x2,A.y1),new d.P(A.x2,A.y2),new d.P(A.x1,A.y2)];d.am(s,F)&&(k[M.bucketInstanceId][M.featureIndex]=!0,E[M.bucketInstanceId]===void 0&&(E[M.bucketInstanceId]=[]),E[M.bucketInstanceId].push(M.featureIndex))}return E}insertCollisionBox(t,s,u,h,f,w){(u?this.ignoredGrid:this.grid).insert({bucketInstanceId:h,featureIndex:f,collisionGroupID:w,overlapMode:s},t[0],t[1],t[2],t[3])}insertCollisionCircles(t,s,u,h,f,w){const T=u?this.ignoredGrid:this.grid,k={bucketInstanceId:h,featureIndex:f,collisionGroupID:w,overlapMode:s};for(let E=0;E=this.screenRightBoundary||hthis.screenBottomBoundary}isInsideGrid(t,s,u,h){return u>=0&&t=0&&sthis.projectAndGetPerspectiveRatio(u,Ge.x,Ge.y,h,E));Ae=Ne.some(Ge=>!Ge.isOccluded),Te=Ne.map(Ge=>Ge.point)}else Ae=!0;return{box:d.ao(Te),allPointsOccluded:!Ae}}}function It(m,t,s){return t*(d.X/(m.tileSize*Math.pow(2,s-m.tileID.overscaledZ)))}class Dr{constructor(t,s,u,h){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?s:-s))):h&&u?1:0,this.placed=u}isHidden(){return this.opacity===0&&!this.placed}}class yr{constructor(t,s,u,h,f){this.text=new Dr(t?t.text:null,s,u,f),this.icon=new Dr(t?t.icon:null,s,h,f)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tt{constructor(t,s,u){this.text=t,this.icon=s,this.skipFade=u}}class Gt{constructor(){this.invProjMatrix=d.H(),this.viewportMatrix=d.H(),this.circles=[]}}class fr{constructor(t,s,u,h,f){this.bucketInstanceId=t,this.featureIndex=s,this.sourceLayerIndex=u,this.bucketIndex=h,this.tileID=f}}class Kr{constructor(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}get(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){const s=++this.maxGroupID;this.collisionGroups[t]={ID:s,predicate:u=>u.collisionGroupID===s}}return this.collisionGroups[t]}}function nn(m,t,s,u,h){const{horizontalAlign:f,verticalAlign:w}=d.au(m);return new d.P(-(f-.5)*t+u[0]*h,-(w-.5)*s+u[1]*h)}class xn{constructor(t,s,u,h,f,w){this.transform=t.clone(),this.terrain=u,this.collisionIndex=new Rt(this.transform,s),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=h,this.retainedQueryData={},this.collisionGroups=new Kr(f),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=w,w&&(w.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(t){const s=this.terrain;return s?(u,h)=>s.getElevation(t,u,h):null}getBucketParts(t,s,u,h){const f=u.getBucket(s),w=u.latestFeatureIndex;if(!f||!w||s.id!==f.layerIds[0])return;const T=u.collisionBoxArray,k=f.layers[0].layout,E=f.layers[0].paint,A=Math.pow(2,this.transform.zoom-u.tileID.overscaledZ),M=u.tileSize/d.X,F=u.tileID.toUnwrapped(),j=this.transform.calculatePosMatrix(F),Z=k.get("text-pitch-alignment")==="map",X=k.get("text-rotation-alignment")==="map",Q=It(u,1,this.transform.zoom),te=this.collisionIndex.mapProjection.translatePosition(this.transform,u,E.get("text-translate"),E.get("text-translate-anchor")),ie=this.collisionIndex.mapProjection.translatePosition(this.transform,u,E.get("icon-translate"),E.get("icon-translate-anchor")),H=Vo(j,Z,X,this.transform,Q);let le=null;if(Z){const me=no(j,Z,X,this.transform,Q);le=d.L([],this.transform.labelPlaneMatrix,me)}this.retainedQueryData[f.bucketInstanceId]=new fr(f.bucketInstanceId,w,f.sourceLayerIndex,f.index,u.tileID);const ue={bucket:f,layout:k,translationText:te,translationIcon:ie,posMatrix:j,unwrappedTileID:F,textLabelPlaneMatrix:H,labelToScreenMatrix:le,scale:A,textPixelRatio:M,holdingForFade:u.holdingForFade(),collisionBoxArray:T,partiallyEvaluatedTextSize:d.ag(f.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(f.sourceID)};if(h)for(const me of f.sortKeyRanges){const{sortKey:Te,symbolInstanceStart:Ae,symbolInstanceEnd:Ne}=me;t.push({sortKey:Te,symbolInstanceStart:Ae,symbolInstanceEnd:Ne,parameters:ue})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:f.symbolInstances.length,parameters:ue})}attemptAnchorPlacement(t,s,u,h,f,w,T,k,E,A,M,F,j,Z,X,Q,te,ie,H){const le=d.aq[t.textAnchor],ue=[t.textOffset0,t.textOffset1],me=nn(le,u,h,ue,f),Te=this.collisionIndex.placeCollisionBox(s,F,k,E,A,T,w,Q,M.predicate,H,me);if((!ie||this.collisionIndex.placeCollisionBox(ie,F,k,E,A,T,w,te,M.predicate,H,me).placeable)&&Te.placeable){let Ae;if(this.prevPlacement&&this.prevPlacement.variableOffsets[j.crossTileID]&&this.prevPlacement.placements[j.crossTileID]&&this.prevPlacement.placements[j.crossTileID].text&&(Ae=this.prevPlacement.variableOffsets[j.crossTileID].anchor),j.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[j.crossTileID]={textOffset:ue,width:u,height:h,anchor:le,textBoxScale:f,prevAnchor:Ae},this.markUsedJustification(Z,le,j,X),Z.allowVerticalPlacement&&(this.markUsedOrientation(Z,X,j),this.placedOrientations[j.crossTileID]=X),{shift:me,placedGlyphBoxes:Te}}}placeLayerBucketPart(t,s,u){const{bucket:h,layout:f,translationText:w,translationIcon:T,posMatrix:k,unwrappedTileID:E,textLabelPlaneMatrix:A,labelToScreenMatrix:M,textPixelRatio:F,holdingForFade:j,collisionBoxArray:Z,partiallyEvaluatedTextSize:X,collisionGroup:Q}=t.parameters,te=f.get("text-optional"),ie=f.get("icon-optional"),H=d.ar(f,"text-overlap","text-allow-overlap"),le=H==="always",ue=d.ar(f,"icon-overlap","icon-allow-overlap"),me=ue==="always",Te=f.get("text-rotation-alignment")==="map",Ae=f.get("text-pitch-alignment")==="map",Ne=f.get("icon-text-fit")!=="none",Ge=f.get("symbol-z-order")==="viewport-y",De=le&&(me||!h.hasIconData()||ie),Re=me&&(le||!h.hasTextData()||te);!h.collisionArrays&&Z&&h.deserializeCollisionBoxes(Z);const Je=this._getTerrainElevationFunc(this.retainedQueryData[h.bucketInstanceId].tileID),_t=(Fe,je,pt)=>{var lr,wt;if(s[Fe.crossTileID])return;if(j)return void(this.placements[Fe.crossTileID]=new Tt(!1,!1,!1));let Et=!1,cr=!1,un=!0,Di=null,ur={box:null,placeable:!1,offscreen:null},Bn={box:null,placeable:!1,offscreen:null},bn=null,hn=null,wn=null,ao=0,ua=0,fc=0;je.textFeatureIndex?ao=je.textFeatureIndex:Fe.useRuntimeCollisionCircles&&(ao=Fe.featureIndex),je.verticalTextFeatureIndex&&(ua=je.verticalTextFeatureIndex);const ha=je.textBox;if(ha){const fi=on=>{let dn=d.ah.horizontal;if(h.allowVerticalPlacement&&!on&&this.prevPlacement){const ei=this.prevPlacement.placedOrientations[Fe.crossTileID];ei&&(this.placedOrientations[Fe.crossTileID]=ei,dn=ei,this.markUsedOrientation(h,dn,Fe))}return dn},mi=(on,dn)=>{if(h.allowVerticalPlacement&&Fe.numVerticalGlyphVertices>0&&je.verticalTextBox){for(const ei of h.writingModes)if(ei===d.ah.vertical?(ur=dn(),Bn=ur):ur=on(),ur&&ur.placeable)break}else ur=on()},Go=Fe.textAnchorOffsetStartIndex,Bi=Fe.textAnchorOffsetEndIndex;if(Bi===Go){const on=(dn,ei)=>{const Mt=this.collisionIndex.placeCollisionBox(dn,H,F,k,E,Ae,Te,w,Q.predicate,Je);return Mt&&Mt.placeable&&(this.markUsedOrientation(h,ei,Fe),this.placedOrientations[Fe.crossTileID]=ei),Mt};mi(()=>on(ha,d.ah.horizontal),()=>{const dn=je.verticalTextBox;return h.allowVerticalPlacement&&Fe.numVerticalGlyphVertices>0&&dn?on(dn,d.ah.vertical):{box:null,offscreen:null}}),fi(ur&&ur.placeable)}else{let on=d.aq[(wt=(lr=this.prevPlacement)===null||lr===void 0?void 0:lr.variableOffsets[Fe.crossTileID])===null||wt===void 0?void 0:wt.anchor];const dn=(Mt,Ts,da)=>{const pa=Mt.x2-Mt.x1,gp=Mt.y2-Mt.y1,Cg=Fe.textBoxScale,yp=Ne&&ue==="never"?Ts:null;let Ho=null,_p=H==="never"?1:2,gc="never";on&&_p++;for(let cl=0;cl<_p;cl++){for(let yc=Go;ycdn(ha,je.iconBox,d.ah.horizontal),()=>{const Mt=je.verticalTextBox;return h.allowVerticalPlacement&&(!ur||!ur.placeable)&&Fe.numVerticalGlyphVertices>0&&Mt?dn(Mt,je.verticalIconBox,d.ah.vertical):{box:null,occluded:!0,offscreen:null}}),ur&&(Et=ur.placeable,un=ur.offscreen);const ei=fi(ur&&ur.placeable);if(!Et&&this.prevPlacement){const Mt=this.prevPlacement.variableOffsets[Fe.crossTileID];Mt&&(this.variableOffsets[Fe.crossTileID]=Mt,this.markUsedJustification(h,Mt.anchor,Fe,ei))}}}if(bn=ur,Et=bn&&bn.placeable,un=bn&&bn.offscreen,Fe.useRuntimeCollisionCircles){const fi=h.text.placedSymbolArray.get(Fe.centerJustifiedTextSymbolIndex),mi=d.ai(h.textSizeData,X,fi),Go=f.get("text-padding");hn=this.collisionIndex.placeCollisionCircles(H,fi,h.lineVertexArray,h.glyphOffsetArray,mi,k,E,A,M,u,Ae,Q.predicate,Fe.collisionCircleDiameter,Go,w,Je),hn.circles.length&&hn.collisionDetected&&!u&&d.w("Collisions detected, but collision boxes are not shown"),Et=le||hn.circles.length>0&&!hn.collisionDetected,un=un&&hn.offscreen}if(je.iconFeatureIndex&&(fc=je.iconFeatureIndex),je.iconBox){const fi=mi=>this.collisionIndex.placeCollisionBox(mi,ue,F,k,E,Ae,Te,T,Q.predicate,Je,Ne&&Di?Di:void 0);Bn&&Bn.placeable&&je.verticalIconBox?(wn=fi(je.verticalIconBox),cr=wn.placeable):(wn=fi(je.iconBox),cr=wn.placeable),un=un&&wn.offscreen}const pi=te||Fe.numHorizontalGlyphVertices===0&&Fe.numVerticalGlyphVertices===0,mc=ie||Fe.numIconVertices===0;pi||mc?mc?pi||(cr=cr&&Et):Et=cr&&Et:cr=Et=cr&&Et;const dh=cr&&wn.placeable;if(Et&&bn.placeable&&this.collisionIndex.insertCollisionBox(bn.box,H,f.get("text-ignore-placement"),h.bucketInstanceId,Bn&&Bn.placeable&&ua?ua:ao,Q.ID),dh&&this.collisionIndex.insertCollisionBox(wn.box,ue,f.get("icon-ignore-placement"),h.bucketInstanceId,fc,Q.ID),hn&&Et&&this.collisionIndex.insertCollisionCircles(hn.circles,H,f.get("text-ignore-placement"),h.bucketInstanceId,ao,Q.ID),u&&this.storeCollisionData(h.bucketInstanceId,pt,je,bn,wn,hn),Fe.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(h.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Fe.crossTileID]=new Tt(Et||De,cr||Re,un||h.justReloaded),s[Fe.crossTileID]=!0};if(Ge){if(t.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Fe=h.getSortedSymbolIndexes(this.transform.angle);for(let je=Fe.length-1;je>=0;--je){const pt=Fe[je];_t(h.symbolInstances.get(pt),h.collisionArrays[pt],pt)}}else for(let Fe=t.symbolInstanceStart;Fe=0&&(t.text.placedSymbolArray.get(T).crossTileID=f>=0&&T!==f?0:u.crossTileID)}markUsedOrientation(t,s,u){const h=s===d.ah.horizontal||s===d.ah.horizontalOnly?s:0,f=s===d.ah.vertical?s:0,w=[u.leftJustifiedTextSymbolIndex,u.centerJustifiedTextSymbolIndex,u.rightJustifiedTextSymbolIndex];for(const T of w)t.text.placedSymbolArray.get(T).placedOrientation=h;u.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(u.verticalPlacedTextSymbolIndex).placedOrientation=f)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const s=this.prevPlacement;let u=!1;this.prevZoomAdjustment=s?s.zoomAdjustment(this.transform.zoom):0;const h=s?s.symbolFadeChange(t):1,f=s?s.opacities:{},w=s?s.variableOffsets:{},T=s?s.placedOrientations:{};for(const k in this.placements){const E=this.placements[k],A=f[k];A?(this.opacities[k]=new yr(A,h,E.text,E.icon),u=u||E.text!==A.text.placed||E.icon!==A.icon.placed):(this.opacities[k]=new yr(null,h,E.text,E.icon,E.skipFade),u=u||E.text||E.icon)}for(const k in f){const E=f[k];if(!this.opacities[k]){const A=new yr(E,h,!1,!1);A.isHidden()||(this.opacities[k]=A,u=u||E.text.placed||E.icon.placed)}}for(const k in w)this.variableOffsets[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.variableOffsets[k]=w[k]);for(const k in T)this.placedOrientations[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.placedOrientations[k]=T[k]);if(s&&s.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");u?this.lastPlacementChangeTime=t:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=s?s.lastPlacementChangeTime:t)}updateLayerOpacities(t,s){const u={};for(const h of s){const f=h.getBucket(t);f&&h.latestFeatureIndex&&t.id===f.layerIds[0]&&this.updateBucketOpacities(f,h.tileID,u,h.collisionBoxArray)}}updateBucketOpacities(t,s,u,h){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 f=t.layers[0],w=f.layout,T=new yr(null,0,!1,!1,!0),k=w.get("text-allow-overlap"),E=w.get("icon-allow-overlap"),A=f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"),M=w.get("text-rotation-alignment")==="map",F=w.get("text-pitch-alignment")==="map",j=w.get("icon-text-fit")!=="none",Z=new yr(null,0,k&&(E||!t.hasIconData()||w.get("icon-optional")),E&&(k||!t.hasTextData()||w.get("text-optional")),!0);!t.collisionArrays&&h&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(h);const X=(te,ie,H)=>{for(let le=0;le0,Ae=this.placedOrientations[ie.crossTileID],Ne=Ae===d.ah.vertical,Ge=Ae===d.ah.horizontal||Ae===d.ah.horizontalOnly;if(H>0||le>0){const Re=Yn(me.text);X(t.text,H,Ne?Vs:Re),X(t.text,le,Ge?Vs:Re);const Je=me.text.isHidden();[ie.rightJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.leftJustifiedTextSymbolIndex].forEach(je=>{je>=0&&(t.text.placedSymbolArray.get(je).hidden=Je||Ne?1:0)}),ie.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).hidden=Je||Ge?1:0);const _t=this.variableOffsets[ie.crossTileID];_t&&this.markUsedJustification(t,_t.anchor,ie,Ae);const Fe=this.placedOrientations[ie.crossTileID];Fe&&(this.markUsedJustification(t,"left",ie,Fe),this.markUsedOrientation(t,Fe,ie))}if(Te){const Re=Yn(me.icon),Je=!(j&&ie.verticalPlacedIconSymbolIndex&&Ne);ie.placedIconSymbolIndex>=0&&(X(t.icon,ie.numIconVertices,Je?Re:Vs),t.icon.placedSymbolArray.get(ie.placedIconSymbolIndex).hidden=me.icon.isHidden()),ie.verticalPlacedIconSymbolIndex>=0&&(X(t.icon,ie.numVerticalIconVertices,Je?Vs:Re),t.icon.placedSymbolArray.get(ie.verticalPlacedIconSymbolIndex).hidden=me.icon.isHidden())}const De=Q&&Q.has(te)?Q.get(te):{text:null,icon:null};if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const Re=t.collisionArrays[te];if(Re){let Je=new d.P(0,0);if(Re.textBox||Re.verticalTextBox){let _t=!0;if(A){const Fe=this.variableOffsets[ue];Fe?(Je=nn(Fe.anchor,Fe.width,Fe.height,Fe.textOffset,Fe.textBoxScale),M&&Je._rotate(F?this.transform.angle:-this.transform.angle)):_t=!1}if(Re.textBox||Re.verticalTextBox){let Fe;Re.textBox&&(Fe=Ne),Re.verticalTextBox&&(Fe=Ge),js(t.textCollisionBox.collisionVertexArray,me.text.placed,!_t||Fe,De.text,Je.x,Je.y)}}if(Re.iconBox||Re.verticalIconBox){const _t=!!(!Ge&&Re.verticalIconBox);let Fe;Re.iconBox&&(Fe=_t),Re.verticalIconBox&&(Fe=!_t),js(t.iconCollisionBox.collisionVertexArray,me.icon.placed,Fe,De.icon,j?Je.x:0,j?Je.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 te=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=te.invProjMatrix,t.placementViewportMatrix=te.viewportMatrix,t.collisionCircleArray=te.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 js(m,t,s,u,h,f){u&&u.length!==0||(u=[0,0,0,0]);const w=u[0]-bt,T=u[1]-bt,k=u[2]-bt,E=u[3]-bt;m.emplaceBack(t?1:0,s?1:0,h||0,f||0,w,T),m.emplaceBack(t?1:0,s?1:0,h||0,f||0,k,T),m.emplaceBack(t?1:0,s?1:0,h||0,f||0,k,E),m.emplaceBack(t?1:0,s?1:0,h||0,f||0,w,E)}const Ht=Math.pow(2,25),Su=Math.pow(2,24),Tu=Math.pow(2,17),Kn=Math.pow(2,16),Xn=Math.pow(2,9),eg=Math.pow(2,8),ci=Math.pow(2,1);function Yn(m){if(m.opacity===0&&!m.placed)return 0;if(m.opacity===1&&m.placed)return 4294967295;const t=m.placed?1:0,s=Math.floor(127*m.opacity);return s*Ht+t*Su+s*Tu+t*Kn+s*Xn+t*eg+s*ci+t}const Vs=0;function ds(){return{isOccluded:(m,t,s)=>!1,getPitchedTextCorrection:(m,t,s)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(m,t,s,u){throw new Error("Not implemented.")},translatePosition:(m,t,s,u)=>function(h,f,w,T,k=!1){if(!w[0]&&!w[1])return[0,0];const E=k?T==="map"?h.angle:0:T==="viewport"?-h.angle:0;if(E){const A=Math.sin(E),M=Math.cos(E);w=[w[0]*M-w[1]*A,w[0]*A+w[1]*M]}return[k?w[0]:It(f,w[0],h.zoom),k?w[1]:It(f,w[1],h.zoom)]}(m,t,s,u),getCircleRadiusCorrection:m=>1}}class Br{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,s,u,h,f){const w=this._bucketParts;for(;this._currentTileIndexT.sortKey-k.sortKey));this._currentPartIndex!this._forceFullPlacement&&q.now()-h>2;for(;this._currentPlacementIndex>=0;){const w=s[t[this._currentPlacementIndex]],T=this.placement.collisionIndex.transform.zoom;if(w.type==="symbol"&&(!w.minzoom||w.minzoom<=T)&&(!w.maxzoom||w.maxzoom>T)){if(this._inProgressLayer||(this._inProgressLayer=new Br(w)),this._inProgressLayer.continuePlacement(u[w.source],this.placement,this._showCollisionBoxes,w,f))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const Ai=512/d.X/2;class Er{constructor(t,s,u){this.tileID=t,this.bucketInstanceId=u,this._symbolsByKey={};const h=new Map;for(let f=0;f({x:Math.floor(k.anchorX*Ai),y:Math.floor(k.anchorY*Ai)})),crossTileIDs:w.map(k=>k.crossTileID)};if(T.positions.length>128){const k=new d.av(T.positions.length,16,Uint16Array);for(const{x:E,y:A}of T.positions)k.add(E,A);k.finish(),delete T.positions,T.index=k}this._symbolsByKey[f]=T}}getScaledCoordinates(t,s){const{x:u,y:h,z:f}=this.tileID.canonical,{x:w,y:T,z:k}=s.canonical,E=Ai/Math.pow(2,k-f),A=(T*d.X+t.anchorY)*E,M=h*d.X*Ai;return{x:Math.floor((w*d.X+t.anchorX)*E-u*d.X*Ai),y:Math.floor(A-M)}}findMatches(t,s,u){const h=this.tileID.canonical.zt)}}class Fl{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Mi{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const s=Math.round((t-this.lng)/360);if(s!==0)for(const u in this.indexes){const h=this.indexes[u],f={};for(const w in h){const T=h[w];T.tileID=T.tileID.unwrapTo(T.tileID.wrap+s),f[T.tileID.key]=T}this.indexes[u]=f}this.lng=t}addBucket(t,s,u){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===s.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let f=0;ft.overscaledZ)for(const T in w){const k=w[T];k.tileID.isChildOf(t)&&k.findMatches(s.symbolInstances,t,h)}else{const T=w[t.scaledTo(Number(f)).key];T&&T.findMatches(s.symbolInstances,t,h)}}for(let f=0;f{s[u]=!0});for(const u in this.layerIndexes)s[u]||delete this.layerIndexes[u]}}const zi=(m,t)=>d.t(m,t&&t.filter(s=>s.identifier!=="source.canvas")),tg=d.aw();class Ol extends d.E{constructor(t,s={}){super(),this._rtlPluginLoaded=()=>{for(const u in this.sourceCaches){const h=this.sourceCaches[u].getSource().type;h!=="vector"&&h!=="geojson"||this.sourceCaches[u].reload()}},this.map=t,this.dispatcher=new ko(rn(),t._getMapId()),this.dispatcher.registerMessageHandler("GG",(u,h)=>this.getGlyphs(u,h)),this.dispatcher.registerMessageHandler("GI",(u,h)=>this.getImages(u,h)),this.imageManager=new Ct,this.imageManager.setEventedParent(this),this.glyphManager=new Lr(t._requestManager,s.localIdeographFontFamily),this.lineAtlas=new Hn(256,512),this.crossTileSymbolIndex=new ku,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new d.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",d.ay()),li().on(Me,this._rtlPluginLoaded),this.on("data",u=>{if(u.dataType!=="source"||u.sourceDataType!=="metadata")return;const h=this.sourceCaches[u.sourceId];if(!h)return;const f=h.getSource();if(f&&f.vectorLayerIds)for(const w in this._layers){const T=this._layers[w];T.source===f.id&&this._validateLayer(T)}})}loadURL(t,s={},u){this.fire(new d.k("dataloading",{dataType:"style"})),s.validate=typeof s.validate!="boolean"||s.validate;const h=this.map._requestManager.transformRequest(t,"Style");this._loadStyleRequest=new AbortController;const f=this._loadStyleRequest;d.h(h,this._loadStyleRequest).then(w=>{this._loadStyleRequest=null,this._load(w.data,s,u)}).catch(w=>{this._loadStyleRequest=null,w&&!f.signal.aborted&&this.fire(new d.j(w))})}loadJSON(t,s={},u){this.fire(new d.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,q.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,s.validate=s.validate!==!1,this._load(t,s,u)}).catch(()=>{})}loadEmpty(){this.fire(new d.k("dataloading",{dataType:"style"})),this._load(tg,{validate:!1})}_load(t,s,u){var h;const f=s.transformStyle?s.transformStyle(u,t):t;if(!s.validate||!zi(this,d.u(f))){this._loaded=!0,this.stylesheet=f;for(const w in f.sources)this.addSource(w,f.sources[w],{validate:!1});f.sprite?this._loadSprite(f.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(f.glyphs),this._createLayers(),this.light=new gt(this.stylesheet.light),this.sky=new jt(this.stylesheet.sky),this.map.setTerrain((h=this.stylesheet.terrain)!==null&&h!==void 0?h:null),this.fire(new d.k("data",{dataType:"style"})),this.fire(new d.k("style.load"))}}_createLayers(){const t=d.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",t),this._order=t.map(s=>s.id),this._layers={},this._serializedLayers=null;for(const s of t){const u=d.aA(s);u.setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=u}}_loadSprite(t,s=!1,u=void 0){let h;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(f,w,T,k){return d._(this,void 0,void 0,function*(){const E=vt(f),A=T>1?"@2x":"",M={},F={};for(const{id:j,url:Z}of E){const X=w.transformRequest(it(Z,A,".json"),"SpriteJSON");M[j]=d.h(X,k);const Q=w.transformRequest(it(Z,A,".png"),"SpriteImage");F[j]=ae.getImage(Q,k)}return yield Promise.all([...Object.values(M),...Object.values(F)]),function(j,Z){return d._(this,void 0,void 0,function*(){const X={};for(const Q in j){X[Q]={};const te=q.getImageCanvasContext((yield Z[Q]).data),ie=(yield j[Q]).data;for(const H in ie){const{width:le,height:ue,x:me,y:Te,sdf:Ae,pixelRatio:Ne,stretchX:Ge,stretchY:De,content:Re,textFitWidth:Je,textFitHeight:_t}=ie[H];X[Q][H]={data:null,pixelRatio:Ne,sdf:Ae,stretchX:Ge,stretchY:De,content:Re,textFitWidth:Je,textFitHeight:_t,spriteData:{width:le,height:ue,x:me,y:Te,context:te}}}}return X})}(M,F)})}(t,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(f=>{if(this._spriteRequest=null,f)for(const w in f){this._spritesImagesIds[w]=[];const T=this._spritesImagesIds[w]?this._spritesImagesIds[w].filter(k=>!(k in f)):[];for(const k of T)this.imageManager.removeImage(k),this._changedImages[k]=!0;for(const k in f[w]){const E=w==="default"?k:`${w}:${k}`;this._spritesImagesIds[w].push(E),E in this.imageManager.images?this.imageManager.updateImage(E,f[w][k],!1):this.imageManager.addImage(E,f[w][k]),s&&(this._changedImages[E]=!0)}}}).catch(f=>{this._spriteRequest=null,h=f,this.fire(new d.j(h))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),s&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new d.k("data",{dataType:"style"})),u&&u(h)})}_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("SI",this._availableImages),this.fire(new d.k("data",{dataType:"style"}))}_validateLayer(t){const s=this.sourceCaches[t.source];if(!s)return;const u=t.sourceLayer;if(!u)return;const h=s.getSource();(h.type==="geojson"||h.vectorLayerIds&&h.vectorLayerIds.indexOf(u)===-1)&&this.fire(new d.j(new Error(`Source layer "${u}" does not exist on source "${h.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,s=!1){const u=this._serializedAllLayers();if(!t||t.length===0)return Object.values(s?d.aB(u):u);const h=[];for(const f of t)if(u[f]){const w=s?d.aB(u[f]):u[f];h.push(w)}return h}_serializedAllLayers(){let t=this._serializedLayers;if(t)return t;t=this._serializedLayers={};const s=Object.keys(this._layers);for(const u of s){const h=this._layers[u];h.type!=="custom"&&(t[u]=h.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.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 s=this._changed;if(s){const h=Object.keys(this._updatedLayers),f=Object.keys(this._removedLayers);(h.length||f.length)&&this._updateWorkerLayers(h,f);for(const w in this._updatedSources){const T=this._updatedSources[w];if(T==="reload")this._reloadSource(w);else{if(T!=="clear")throw new Error(`Invalid action ${T}`);this._clearSource(w)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const w in this._updatedPaintProps)this._layers[w].updateTransitions(t);this.light.updateTransitions(t),this.sky.updateTransitions(t),this._resetUpdates()}const u={};for(const h in this.sourceCaches){const f=this.sourceCaches[h];u[h]=f.used,f.used=!1}for(const h of this._order){const f=this._layers[h];f.recalculate(t,this._availableImages),!f.isHidden(t.zoom)&&f.source&&(this.sourceCaches[f.source].used=!0)}for(const h in u){const f=this.sourceCaches[h];!!u[h]!=!!f.used&&f.fire(new d.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:h}))}this.light.recalculate(t),this.sky.recalculate(t),this.z=t.zoom,s&&this.fire(new d.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=Object.keys(this._changedImages);if(t.length){for(const s in this.sourceCaches)this.sourceCaches[s].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,s){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(t,!1),removedIds:s})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(t,s={}){var u;this._checkLoaded();const h=this.serialize();if(t=s.transformStyle?s.transformStyle(h,t):t,((u=s.validate)===null||u===void 0||u)&&zi(this,d.u(t)))return!1;(t=d.aB(t)).layers=d.az(t.layers);const f=d.aC(h,t),w=this._getOperationsToPerform(f);if(w.unimplemented.length>0)throw new Error(`Unimplemented: ${w.unimplemented.join(", ")}.`);if(w.operations.length===0)return!1;for(const T of w.operations)T();return this.stylesheet=t,this._serializedLayers=null,!0}_getOperationsToPerform(t){const s=[],u=[];for(const h of t)switch(h.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":s.push(()=>this.addLayer.apply(this,h.args));break;case"removeLayer":s.push(()=>this.removeLayer.apply(this,h.args));break;case"setPaintProperty":s.push(()=>this.setPaintProperty.apply(this,h.args));break;case"setLayoutProperty":s.push(()=>this.setLayoutProperty.apply(this,h.args));break;case"setFilter":s.push(()=>this.setFilter.apply(this,h.args));break;case"addSource":s.push(()=>this.addSource.apply(this,h.args));break;case"removeSource":s.push(()=>this.removeSource.apply(this,h.args));break;case"setLayerZoomRange":s.push(()=>this.setLayerZoomRange.apply(this,h.args));break;case"setLight":s.push(()=>this.setLight.apply(this,h.args));break;case"setGeoJSONSourceData":s.push(()=>this.setGeoJSONSourceData.apply(this,h.args));break;case"setGlyphs":s.push(()=>this.setGlyphs.apply(this,h.args));break;case"setSprite":s.push(()=>this.setSprite.apply(this,h.args));break;case"setSky":s.push(()=>this.setSky.apply(this,h.args));break;case"setTerrain":s.push(()=>this.map.setTerrain.apply(this,h.args));break;case"setTransition":s.push(()=>{});break;default:u.push(h.command)}return{operations:s,unimplemented:u}}addImage(t,s){if(this.getImage(t))return this.fire(new d.j(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,s),this._afterImageUpdated(t)}updateImage(t,s){this.imageManager.updateImage(t,s)}getImage(t){return this.imageManager.getImage(t)}removeImage(t){if(!this.getImage(t))return this.fire(new d.j(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("SI",this._availableImages),this.fire(new d.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,s,u={}){if(this._checkLoaded(),this.sourceCaches[t]!==void 0)throw new Error(`Source "${t}" already exists.`);if(!s.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(s).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(s.type)>=0&&this._validate(d.u.source,`sources.${t}`,s,null,u))return;this.map&&this.map._collectResourceTiming&&(s.collectResourceTiming=!0);const h=this.sourceCaches[t]=new ht(t,s,this.dispatcher);h.style=this,h.setEventedParent(this,()=>({isSourceLoaded:h.loaded(),source:h.serialize(),sourceId:t})),h.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 u in this._layers)if(this._layers[u].source===t)return this.fire(new d.j(new Error(`Source "${t}" cannot be removed while layer "${u}" is using it.`)));const s=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],s.fire(new d.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),s.setEventedParent(null),s.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(t,s){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error(`There is no source with this ID=${t}`);const u=this.sourceCaches[t].getSource();if(u.type!=="geojson")throw new Error(`geojsonSource.type is ${u.type}, which is !== 'geojson`);u.setData(s),this._changed=!0}getSource(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()}addLayer(t,s,u={}){this._checkLoaded();const h=t.id;if(this.getLayer(h))return void this.fire(new d.j(new Error(`Layer "${h}" already exists on this map.`)));let f;if(t.type==="custom"){if(zi(this,d.aD(t)))return;f=d.aA(t)}else{if("source"in t&&typeof t.source=="object"&&(this.addSource(h,t.source),t=d.aB(t),t=d.e(t,{source:h})),this._validate(d.u.layer,`layers.${h}`,t,{arrayIndex:-1},u))return;f=d.aA(t),this._validateLayer(f),f.setEventedParent(this,{layer:{id:h}})}const w=s?this._order.indexOf(s):this._order.length;if(s&&w===-1)this.fire(new d.j(new Error(`Cannot add layer "${h}" before non-existing layer "${s}".`)));else{if(this._order.splice(w,0,h),this._layerOrderChanged=!0,this._layers[h]=f,this._removedLayers[h]&&f.source&&f.type!=="custom"){const T=this._removedLayers[h];delete this._removedLayers[h],T.type!==f.type?this._updatedSources[f.source]="clear":(this._updatedSources[f.source]="reload",this.sourceCaches[f.source].pause())}this._updateLayer(f),f.onAdd&&f.onAdd(this.map)}}moveLayer(t,s){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new d.j(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===s)return;const u=this._order.indexOf(t);this._order.splice(u,1);const h=s?this._order.indexOf(s):this._order.length;s&&h===-1?this.fire(new d.j(new Error(`Cannot move layer "${t}" before non-existing layer "${s}".`))):(this._order.splice(h,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();const s=this._layers[t];if(!s)return void this.fire(new d.j(new Error(`Cannot remove non-existing layer "${t}".`)));s.setEventedParent(null);const u=this._order.indexOf(t);this._order.splice(u,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=s,delete this._layers[t],this._serializedLayers&&delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],s.onRemove&&s.onRemove(this.map)}getLayer(t){return this._layers[t]}getLayersOrder(){return[...this._order]}hasLayer(t){return t in this._layers}setLayerZoomRange(t,s,u){this._checkLoaded();const h=this.getLayer(t);h?h.minzoom===s&&h.maxzoom===u||(s!=null&&(h.minzoom=s),u!=null&&(h.maxzoom=u),this._updateLayer(h)):this.fire(new d.j(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,s,u={}){this._checkLoaded();const h=this.getLayer(t);if(h){if(!d.aE(h.filter,s))return s==null?(h.filter=void 0,void this._updateLayer(h)):void(this._validate(d.u.filter,`layers.${h.id}.filter`,s,null,u)||(h.filter=d.aB(s),this._updateLayer(h)))}else this.fire(new d.j(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return d.aB(this.getLayer(t).filter)}setLayoutProperty(t,s,u,h={}){this._checkLoaded();const f=this.getLayer(t);f?d.aE(f.getLayoutProperty(s),u)||(f.setLayoutProperty(s,u,h),this._updateLayer(f)):this.fire(new d.j(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,s){const u=this.getLayer(t);if(u)return u.getLayoutProperty(s);this.fire(new d.j(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,s,u,h={}){this._checkLoaded();const f=this.getLayer(t);f?d.aE(f.getPaintProperty(s),u)||(f.setPaintProperty(s,u,h)&&this._updateLayer(f),this._changed=!0,this._updatedPaintProps[t]=!0,this._serializedLayers=null):this.fire(new d.j(new Error(`Cannot style non-existing layer "${t}".`)))}getPaintProperty(t,s){return this.getLayer(t).getPaintProperty(s)}setFeatureState(t,s){this._checkLoaded();const u=t.source,h=t.sourceLayer,f=this.sourceCaches[u];if(f===void 0)return void this.fire(new d.j(new Error(`The source '${u}' does not exist in the map's style.`)));const w=f.getSource().type;w==="geojson"&&h?this.fire(new d.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):w!=="vector"||h?(t.id===void 0&&this.fire(new d.j(new Error("The feature id parameter must be provided."))),f.setFeatureState(h,t.id,s)):this.fire(new d.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,s){this._checkLoaded();const u=t.source,h=this.sourceCaches[u];if(h===void 0)return void this.fire(new d.j(new Error(`The source '${u}' does not exist in the map's style.`)));const f=h.getSource().type,w=f==="vector"?t.sourceLayer:void 0;f!=="vector"||w?s&&typeof t.id!="string"&&typeof t.id!="number"?this.fire(new d.j(new Error("A feature id is required to remove its specific state property."))):h.removeFeatureState(w,t.id,s):this.fire(new d.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();const s=t.source,u=t.sourceLayer,h=this.sourceCaches[s];if(h!==void 0)return h.getSource().type!=="vector"||u?(t.id===void 0&&this.fire(new d.j(new Error("The feature id parameter must be provided."))),h.getFeatureState(u,t.id)):void this.fire(new d.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new d.j(new Error(`The source '${s}' does not exist in the map's style.`)))}getTransition(){return d.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const t=d.aF(this.sourceCaches,f=>f.serialize()),s=this._serializeByIds(this._order,!0),u=this.map.getTerrain()||void 0,h=this.stylesheet;return d.aG({version:h.version,name:h.name,metadata:h.metadata,light:h.light,sky:h.sky,center:h.center,zoom:h.zoom,bearing:h.bearing,pitch:h.pitch,sprite:h.sprite,glyphs:h.glyphs,transition:h.transition,sources:t,layers:s,terrain:u},f=>f!==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 s=w=>this._layers[w].type==="fill-extrusion",u={},h=[];for(let w=this._order.length-1;w>=0;w--){const T=this._order[w];if(s(T)){u[T]=w;for(const k of t){const E=k[T];if(E)for(const A of E)h.push(A)}}}h.sort((w,T)=>T.intersectionZ-w.intersectionZ);const f=[];for(let w=this._order.length-1;w>=0;w--){const T=this._order[w];if(s(T))for(let k=h.length-1;k>=0;k--){const E=h[k].feature;if(u[E.layer.id]{const Ae=te.featureSortOrder;if(Ae){const Ne=Ae.indexOf(me.featureIndex);return Ae.indexOf(Te.featureIndex)-Ne}return Te.featureIndex-me.featureIndex});for(const me of ue)le.push(me)}}for(const te in Z)Z[te].forEach(ie=>{const H=ie.feature,le=E[T[te].source].getFeatureState(H.layer["source-layer"],H.id);H.source=H.layer.source,H.layer["source-layer"]&&(H.sourceLayer=H.layer["source-layer"]),H.state=le});return Z}(this._layers,w,this.sourceCaches,t,s,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(f)}querySourceFeatures(t,s){s&&s.filter&&this._validate(d.u.filter,"querySourceFeatures.filter",s.filter,null,s);const u=this.sourceCaches[t];return u?function(h,f){const w=h.getRenderableIds().map(E=>h.getTileByID(E)),T=[],k={};for(let E=0;EF.getTileByID(j)).sort((j,Z)=>Z.tileID.overscaledZ-j.tileID.overscaledZ||(j.tileID.isLessThan(Z.tileID)?-1:1))}const M=this.crossTileSymbolIndex.addLayer(A,k[A.source],t.center.lng);w=w||M}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((f=f||this._layerOrderChanged||u===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(q.now(),t.zoom))&&(this.pauseablePlacement=new Za(t,this.map.terrain,this._order,f,s,u,h,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,k),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(q.now()),T=!0),w&&this.pauseablePlacement.placement.setStale()),T||w)for(const E of this._order){const A=this._layers[E];A.type==="symbol"&&this.placement.updateLayerOpacities(A,k[A.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(q.now())}_releaseSymbolFadeTiles(){for(const t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()}getImages(t,s){return d._(this,void 0,void 0,function*(){const u=yield this.imageManager.getImages(s.icons);this._updateTilesForChangedImages();const h=this.sourceCaches[s.source];return h&&h.setDependencies(s.tileID.key,s.type,s.icons),u})}getGlyphs(t,s){return d._(this,void 0,void 0,function*(){const u=yield this.glyphManager.getGlyphs(s.stacks),h=this.sourceCaches[s.source];return h&&h.setDependencies(s.tileID.key,s.type,[""]),u})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(t,s={}){this._checkLoaded(),t&&this._validate(d.u.glyphs,"glyphs",t,null,s)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}addSprite(t,s,u={},h){this._checkLoaded();const f=[{id:t,url:s}],w=[...vt(this.stylesheet.sprite),...f];this._validate(d.u.sprite,"sprite",w,null,u)||(this.stylesheet.sprite=w,this._loadSprite(f,!0,h))}removeSprite(t){this._checkLoaded();const s=vt(this.stylesheet.sprite);if(s.find(u=>u.id===t)){if(this._spritesImagesIds[t])for(const u of this._spritesImagesIds[t])this.imageManager.removeImage(u),this._changedImages[u]=!0;s.splice(s.findIndex(u=>u.id===t),1),this.stylesheet.sprite=s.length>0?s:void 0,delete this._spritesImagesIds[t],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new d.k("data",{dataType:"style"}))}else this.fire(new d.j(new Error(`Sprite "${t}" doesn't exists on this map.`)))}getSprite(){return vt(this.stylesheet.sprite)}setSprite(t,s={},u){this._checkLoaded(),t&&this._validate(d.u.sprite,"sprite",t,null,s)||(this.stylesheet.sprite=t,t?this._loadSprite(t,!0,u):(this._unloadSprite(),u&&u(null)))}}var ps=d.Y([{name:"a_pos",type:"Int16",components:2}]);const qo={prelude:$t(`#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:$t(`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:$t(`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:$t(`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:$t("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:$t(`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,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:$t(`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:$t("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_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:$t("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:$t("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:$t(`#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:$t(`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:$t(`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:$t(`#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:$t(`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:$t(`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:$t(`#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:$t(`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:$t(`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:$t(`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:$t(`#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:$t(`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:$t(`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:$t(`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 +}`,`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;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;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:$t(`#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 +}`,`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 bool u_is_along_line;uniform bool u_is_variable_anchor;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_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;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:$t(`#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 +}`,`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;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;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:$t("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:$t("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);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:$t("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);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:$t("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function $t(m,t){const s=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,u=t.match(/attribute ([\w]+) ([\w]+)/g),h=m.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),f=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),w=f?f.concat(h):h,T={};return{fragmentSource:m=m.replace(s,(k,E,A,M,F)=>(T[F]=!0,E==="define"?` +#ifndef HAS_UNIFORM_u_${F} +varying ${A} ${M} ${F}; +#else +uniform ${A} ${M} u_${F}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${F} + ${A} ${M} ${F} = u_${F}; +#endif +`)),vertexSource:t=t.replace(s,(k,E,A,M,F)=>{const j=M==="float"?"vec2":"vec4",Z=F.match(/color/)?"color":j;return T[F]?E==="define"?` +#ifndef HAS_UNIFORM_u_${F} +uniform lowp float u_${F}_t; +attribute ${A} ${j} a_${F}; +varying ${A} ${M} ${F}; +#else +uniform ${A} ${M} u_${F}; +#endif +`:Z==="vec4"?` +#ifndef HAS_UNIFORM_u_${F} + ${F} = a_${F}; +#else + ${A} ${M} ${F} = u_${F}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${F} + ${F} = unpack_mix_${Z}(a_${F}, u_${F}_t); +#else + ${A} ${M} ${F} = u_${F}; +#endif +`:E==="define"?` +#ifndef HAS_UNIFORM_u_${F} +uniform lowp float u_${F}_t; +attribute ${A} ${j} a_${F}; +#else +uniform ${A} ${M} u_${F}; +#endif +`:Z==="vec4"?` +#ifndef HAS_UNIFORM_u_${F} + ${A} ${M} ${F} = a_${F}; +#else + ${A} ${M} ${F} = u_${F}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${F} + ${A} ${M} ${F} = unpack_mix_${Z}(a_${F}, u_${F}_t); +#else + ${A} ${M} ${F} = u_${F}; +#endif +`}),staticAttributes:u,staticUniforms:w}}class Cu{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(t,s,u,h,f,w,T,k,E){this.context=t;let A=this.boundPaintVertexBuffers.length!==h.length;for(let M=0;!A&&M({u_matrix:m,u_texture:0,u_ele_delta:t,u_fog_matrix:s,u_fog_color:u?u.properties.get("fog-color"):d.aM.white,u_fog_ground_blend:u?u.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:u?u.calculateFogBlendOpacity(h):0,u_horizon_color:u?u.properties.get("horizon-color"):d.aM.white,u_horizon_fog_blend:u?u.properties.get("horizon-fog-blend"):1});function qs(m){const t=[];for(let s=0;s({u_depth:new d.aH(me,Te.u_depth),u_terrain:new d.aH(me,Te.u_terrain),u_terrain_dim:new d.aI(me,Te.u_terrain_dim),u_terrain_matrix:new d.aJ(me,Te.u_terrain_matrix),u_terrain_unpack:new d.aK(me,Te.u_terrain_unpack),u_terrain_exaggeration:new d.aI(me,Te.u_terrain_exaggeration)}))(t,ue),this.binderUniforms=u?u.getUniforms(t,ue):[]}draw(t,s,u,h,f,w,T,k,E,A,M,F,j,Z,X,Q,te,ie){const H=t.gl;if(this.failedToCreate)return;if(t.program.set(this.program),t.setDepthMode(u),t.setStencilMode(h),t.setColorMode(f),t.setCullFace(w),k){t.activeTexture.set(H.TEXTURE2),H.bindTexture(H.TEXTURE_2D,k.depthTexture),t.activeTexture.set(H.TEXTURE3),H.bindTexture(H.TEXTURE_2D,k.texture);for(const ue in this.terrainUniforms)this.terrainUniforms[ue].set(k[ue])}for(const ue in this.fixedUniforms)this.fixedUniforms[ue].set(T[ue]);X&&X.setUniforms(t,this.binderUniforms,j,{zoom:Z});let le=0;switch(s){case H.LINES:le=2;break;case H.TRIANGLES:le=3;break;case H.LINE_STRIP:le=1}for(const ue of F.get()){const me=ue.vaos||(ue.vaos={});(me[E]||(me[E]=new Cu)).bind(t,this,A,X?X.getPaintVertexBuffers():[],M,ue.vertexOffset,Q,te,ie),H.drawElements(s,ue.primitiveLength*le,H.UNSIGNED_SHORT,ue.primitiveOffset*le*2)}}}function Nl(m,t,s){const u=1/It(s,1,t.transform.tileZoom),h=Math.pow(2,s.tileID.overscaledZ),f=s.tileSize*Math.pow(2,t.transform.tileZoom)/h,w=f*(s.tileID.canonical.x+s.tileID.wrap*h),T=f*s.tileID.canonical.y;return{u_image:0,u_texsize:s.imageAtlasTexture.size,u_scale:[u,m.fromScale,m.toScale],u_fade:m.t,u_pixel_coord_upper:[w>>16,T>>16],u_pixel_coord_lower:[65535&w,65535&T]}}const Ga=(m,t,s,u)=>{const h=t.style.light,f=h.properties.get("position"),w=[f.x,f.y,f.z],T=function(){var E=new d.A(9);return d.A!=Float32Array&&(E[1]=0,E[2]=0,E[3]=0,E[5]=0,E[6]=0,E[7]=0),E[0]=1,E[4]=1,E[8]=1,E}();h.properties.get("anchor")==="viewport"&&function(E,A){var M=Math.sin(A),F=Math.cos(A);E[0]=F,E[1]=M,E[2]=0,E[3]=-M,E[4]=F,E[5]=0,E[6]=0,E[7]=0,E[8]=1}(T,-t.transform.angle),function(E,A,M){var F=A[0],j=A[1],Z=A[2];E[0]=F*M[0]+j*M[3]+Z*M[6],E[1]=F*M[1]+j*M[4]+Z*M[7],E[2]=F*M[2]+j*M[5]+Z*M[8]}(w,w,T);const k=h.properties.get("color");return{u_matrix:m,u_lightpos:w,u_lightintensity:h.properties.get("intensity"),u_lightcolor:[k.r,k.g,k.b],u_vertical_gradient:+s,u_opacity:u}},$l=(m,t,s,u,h,f,w)=>d.e(Ga(m,t,s,u),Nl(f,t,w),{u_height_factor:-Math.pow(2,h.overscaledZ)/w.tileSize/8}),Zs=m=>({u_matrix:m}),Fd=(m,t,s,u)=>d.e(Zs(m),Nl(s,t,u)),rg=(m,t)=>({u_matrix:m,u_world:t}),Od=(m,t,s,u,h)=>d.e(Fd(m,t,s,u),{u_world:h}),ng=(m,t,s,u)=>{const h=m.transform;let f,w;if(u.paint.get("circle-pitch-alignment")==="map"){const T=It(s,1,h.zoom);f=!0,w=[T,T]}else f=!1,w=h.pixelsToGLUnits;return{u_camera_to_center_distance:h.cameraToCenterDistance,u_scale_with_map:+(u.paint.get("circle-pitch-scale")==="map"),u_matrix:m.translatePosMatrix(t.posMatrix,s,u.paint.get("circle-translate"),u.paint.get("circle-translate-anchor")),u_pitch_with_map:+f,u_device_pixel_ratio:m.pixelRatio,u_extrude_scale:w}},fs=(m,t,s)=>({u_matrix:m,u_inv_matrix:t,u_camera_to_center_distance:s.cameraToCenterDistance,u_viewport_size:[s.width,s.height]}),Ha=(m,t,s=1)=>({u_matrix:m,u_color:t,u_overlay:0,u_overlay_scale:s}),Rn=m=>({u_matrix:m}),Dn=(m,t,s,u)=>({u_matrix:m,u_extrude_scale:It(t,1,s),u_intensity:u}),Ul=(m,t,s,u)=>{const h=d.H();d.aP(h,0,m.width,m.height,0,0,1);const f=m.context.gl;return{u_matrix:h,u_world:[f.drawingBufferWidth,f.drawingBufferHeight],u_image:s,u_color_ramp:u,u_opacity:t.paint.get("heatmap-opacity")}};function jl(m,t){const s=Math.pow(2,t.canonical.z),u=t.canonical.y;return[new d.Z(0,u/s).toLngLat().lat,new d.Z(0,(u+1)/s).toLngLat().lat]}const Vl=(m,t,s,u)=>{const h=m.transform;return{u_matrix:Ud(m,t,s,u),u_ratio:1/It(t,1,h.zoom),u_device_pixel_ratio:m.pixelRatio,u_units_to_pixels:[1/h.pixelsToGLUnits[0],1/h.pixelsToGLUnits[1]]}},Nd=(m,t,s,u,h)=>d.e(Vl(m,t,s,h),{u_image:0,u_image_height:u}),Gs=(m,t,s,u,h)=>{const f=m.transform,w=$d(t,f);return{u_matrix:Ud(m,t,s,h),u_texsize:t.imageAtlasTexture.size,u_ratio:1/It(t,1,f.zoom),u_device_pixel_ratio:m.pixelRatio,u_image:0,u_scale:[w,u.fromScale,u.toScale],u_fade:u.t,u_units_to_pixels:[1/f.pixelsToGLUnits[0],1/f.pixelsToGLUnits[1]]}},ig=(m,t,s,u,h,f)=>{const w=m.lineAtlas,T=$d(t,m.transform),k=s.layout.get("line-cap")==="round",E=w.getDash(u.from,k),A=w.getDash(u.to,k),M=E.width*h.fromScale,F=A.width*h.toScale;return d.e(Vl(m,t,s,f),{u_patternscale_a:[T/M,-E.height/2],u_patternscale_b:[T/F,-A.height/2],u_sdfgamma:w.width/(256*Math.min(M,F)*m.pixelRatio)/2,u_image:0,u_tex_y_a:E.y,u_tex_y_b:A.y,u_mix:h.t})};function $d(m,t){return 1/It(m,1,t.tileZoom)}function Ud(m,t,s,u){return m.translatePosMatrix(u?u.posMatrix:t.tileID.posMatrix,t,s.paint.get("line-translate"),s.paint.get("line-translate-anchor"))}const og=(m,t,s,u,h)=>{return{u_matrix:m,u_tl_parent:t,u_scale_parent:s,u_buffer_scale:1,u_fade_t:u.mix,u_opacity:u.opacity*h.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:h.paint.get("raster-brightness-min"),u_brightness_high:h.paint.get("raster-brightness-max"),u_saturation_factor:(w=h.paint.get("raster-saturation"),w>0?1-1/(1.001-w):-w),u_contrast_factor:(f=h.paint.get("raster-contrast"),f>0?1/(1-f):1+f),u_spin_weights:sg(h.paint.get("raster-hue-rotate"))};var f,w};function sg(m){m*=Math.PI/180;const t=Math.sin(m),s=Math.cos(m);return[(2*s+1)/3,(-Math.sqrt(3)*t-s+1)/3,(Math.sqrt(3)*t-s+1)/3]}const jd=(m,t,s,u,h,f,w,T,k,E,A,M,F,j)=>{const Z=w.transform;return{u_is_size_zoom_constant:+(m==="constant"||m==="source"),u_is_size_feature_constant:+(m==="constant"||m==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:Z.cameraToCenterDistance,u_pitch:Z.pitch/360*2*Math.PI,u_rotate_symbol:+s,u_aspect_ratio:Z.width/Z.height,u_fade_change:w.options.fadeDuration?w.symbolFadeChange:1,u_matrix:T,u_label_plane_matrix:k,u_coord_matrix:E,u_is_text:+M,u_pitch_with_map:+u,u_is_along_line:h,u_is_variable_anchor:f,u_texsize:F,u_texture:0,u_translation:A,u_pitched_scale:j}},Wa=(m,t,s,u,h,f,w,T,k,E,A,M,F,j,Z)=>{const X=w.transform;return d.e(jd(m,t,s,u,h,f,w,T,k,E,A,M,F,Z),{u_gamma_scale:u?Math.cos(X._pitch)*X.cameraToCenterDistance:1,u_device_pixel_ratio:w.pixelRatio,u_is_halo:+j})},Pu=(m,t,s,u,h,f,w,T,k,E,A,M,F,j)=>d.e(Wa(m,t,s,u,h,f,w,T,k,E,A,!0,M,!0,j),{u_texsize_icon:F,u_texture_icon:1}),ql=(m,t,s)=>({u_matrix:m,u_opacity:t,u_color:s}),Au=(m,t,s,u,h,f)=>d.e(function(w,T,k,E){const A=k.imageManager.getPattern(w.from.toString()),M=k.imageManager.getPattern(w.to.toString()),{width:F,height:j}=k.imageManager.getPixelSize(),Z=Math.pow(2,E.tileID.overscaledZ),X=E.tileSize*Math.pow(2,k.transform.tileZoom)/Z,Q=X*(E.tileID.canonical.x+E.tileID.wrap*Z),te=X*E.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:A.tl,u_pattern_br_a:A.br,u_pattern_tl_b:M.tl,u_pattern_br_b:M.br,u_texsize:[F,j],u_mix:T.t,u_pattern_size_a:A.displaySize,u_pattern_size_b:M.displaySize,u_scale_a:T.fromScale,u_scale_b:T.toScale,u_tile_units_to_pixels:1/It(E,1,k.transform.tileZoom),u_pixel_coord_upper:[Q>>16,te>>16],u_pixel_coord_lower:[65535&Q,65535&te]}}(u,f,s,h),{u_matrix:m,u_opacity:t}),Mu={fillExtrusion:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_lightpos:new d.aN(m,t.u_lightpos),u_lightintensity:new d.aI(m,t.u_lightintensity),u_lightcolor:new d.aN(m,t.u_lightcolor),u_vertical_gradient:new d.aI(m,t.u_vertical_gradient),u_opacity:new d.aI(m,t.u_opacity)}),fillExtrusionPattern:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_lightpos:new d.aN(m,t.u_lightpos),u_lightintensity:new d.aI(m,t.u_lightintensity),u_lightcolor:new d.aN(m,t.u_lightcolor),u_vertical_gradient:new d.aI(m,t.u_vertical_gradient),u_height_factor:new d.aI(m,t.u_height_factor),u_image:new d.aH(m,t.u_image),u_texsize:new d.aO(m,t.u_texsize),u_pixel_coord_upper:new d.aO(m,t.u_pixel_coord_upper),u_pixel_coord_lower:new d.aO(m,t.u_pixel_coord_lower),u_scale:new d.aN(m,t.u_scale),u_fade:new d.aI(m,t.u_fade),u_opacity:new d.aI(m,t.u_opacity)}),fill:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix)}),fillPattern:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_image:new d.aH(m,t.u_image),u_texsize:new d.aO(m,t.u_texsize),u_pixel_coord_upper:new d.aO(m,t.u_pixel_coord_upper),u_pixel_coord_lower:new d.aO(m,t.u_pixel_coord_lower),u_scale:new d.aN(m,t.u_scale),u_fade:new d.aI(m,t.u_fade)}),fillOutline:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_world:new d.aO(m,t.u_world)}),fillOutlinePattern:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_world:new d.aO(m,t.u_world),u_image:new d.aH(m,t.u_image),u_texsize:new d.aO(m,t.u_texsize),u_pixel_coord_upper:new d.aO(m,t.u_pixel_coord_upper),u_pixel_coord_lower:new d.aO(m,t.u_pixel_coord_lower),u_scale:new d.aN(m,t.u_scale),u_fade:new d.aI(m,t.u_fade)}),circle:(m,t)=>({u_camera_to_center_distance:new d.aI(m,t.u_camera_to_center_distance),u_scale_with_map:new d.aH(m,t.u_scale_with_map),u_pitch_with_map:new d.aH(m,t.u_pitch_with_map),u_extrude_scale:new d.aO(m,t.u_extrude_scale),u_device_pixel_ratio:new d.aI(m,t.u_device_pixel_ratio),u_matrix:new d.aJ(m,t.u_matrix)}),collisionBox:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_pixel_extrude_scale:new d.aO(m,t.u_pixel_extrude_scale)}),collisionCircle:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_inv_matrix:new d.aJ(m,t.u_inv_matrix),u_camera_to_center_distance:new d.aI(m,t.u_camera_to_center_distance),u_viewport_size:new d.aO(m,t.u_viewport_size)}),debug:(m,t)=>({u_color:new d.aL(m,t.u_color),u_matrix:new d.aJ(m,t.u_matrix),u_overlay:new d.aH(m,t.u_overlay),u_overlay_scale:new d.aI(m,t.u_overlay_scale)}),clippingMask:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix)}),heatmap:(m,t)=>({u_extrude_scale:new d.aI(m,t.u_extrude_scale),u_intensity:new d.aI(m,t.u_intensity),u_matrix:new d.aJ(m,t.u_matrix)}),heatmapTexture:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_world:new d.aO(m,t.u_world),u_image:new d.aH(m,t.u_image),u_color_ramp:new d.aH(m,t.u_color_ramp),u_opacity:new d.aI(m,t.u_opacity)}),hillshade:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_image:new d.aH(m,t.u_image),u_latrange:new d.aO(m,t.u_latrange),u_light:new d.aO(m,t.u_light),u_shadow:new d.aL(m,t.u_shadow),u_highlight:new d.aL(m,t.u_highlight),u_accent:new d.aL(m,t.u_accent)}),hillshadePrepare:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_image:new d.aH(m,t.u_image),u_dimension:new d.aO(m,t.u_dimension),u_zoom:new d.aI(m,t.u_zoom),u_unpack:new d.aK(m,t.u_unpack)}),line:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_ratio:new d.aI(m,t.u_ratio),u_device_pixel_ratio:new d.aI(m,t.u_device_pixel_ratio),u_units_to_pixels:new d.aO(m,t.u_units_to_pixels)}),lineGradient:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_ratio:new d.aI(m,t.u_ratio),u_device_pixel_ratio:new d.aI(m,t.u_device_pixel_ratio),u_units_to_pixels:new d.aO(m,t.u_units_to_pixels),u_image:new d.aH(m,t.u_image),u_image_height:new d.aI(m,t.u_image_height)}),linePattern:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_texsize:new d.aO(m,t.u_texsize),u_ratio:new d.aI(m,t.u_ratio),u_device_pixel_ratio:new d.aI(m,t.u_device_pixel_ratio),u_image:new d.aH(m,t.u_image),u_units_to_pixels:new d.aO(m,t.u_units_to_pixels),u_scale:new d.aN(m,t.u_scale),u_fade:new d.aI(m,t.u_fade)}),lineSDF:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_ratio:new d.aI(m,t.u_ratio),u_device_pixel_ratio:new d.aI(m,t.u_device_pixel_ratio),u_units_to_pixels:new d.aO(m,t.u_units_to_pixels),u_patternscale_a:new d.aO(m,t.u_patternscale_a),u_patternscale_b:new d.aO(m,t.u_patternscale_b),u_sdfgamma:new d.aI(m,t.u_sdfgamma),u_image:new d.aH(m,t.u_image),u_tex_y_a:new d.aI(m,t.u_tex_y_a),u_tex_y_b:new d.aI(m,t.u_tex_y_b),u_mix:new d.aI(m,t.u_mix)}),raster:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_tl_parent:new d.aO(m,t.u_tl_parent),u_scale_parent:new d.aI(m,t.u_scale_parent),u_buffer_scale:new d.aI(m,t.u_buffer_scale),u_fade_t:new d.aI(m,t.u_fade_t),u_opacity:new d.aI(m,t.u_opacity),u_image0:new d.aH(m,t.u_image0),u_image1:new d.aH(m,t.u_image1),u_brightness_low:new d.aI(m,t.u_brightness_low),u_brightness_high:new d.aI(m,t.u_brightness_high),u_saturation_factor:new d.aI(m,t.u_saturation_factor),u_contrast_factor:new d.aI(m,t.u_contrast_factor),u_spin_weights:new d.aN(m,t.u_spin_weights)}),symbolIcon:(m,t)=>({u_is_size_zoom_constant:new d.aH(m,t.u_is_size_zoom_constant),u_is_size_feature_constant:new d.aH(m,t.u_is_size_feature_constant),u_size_t:new d.aI(m,t.u_size_t),u_size:new d.aI(m,t.u_size),u_camera_to_center_distance:new d.aI(m,t.u_camera_to_center_distance),u_pitch:new d.aI(m,t.u_pitch),u_rotate_symbol:new d.aH(m,t.u_rotate_symbol),u_aspect_ratio:new d.aI(m,t.u_aspect_ratio),u_fade_change:new d.aI(m,t.u_fade_change),u_matrix:new d.aJ(m,t.u_matrix),u_label_plane_matrix:new d.aJ(m,t.u_label_plane_matrix),u_coord_matrix:new d.aJ(m,t.u_coord_matrix),u_is_text:new d.aH(m,t.u_is_text),u_pitch_with_map:new d.aH(m,t.u_pitch_with_map),u_is_along_line:new d.aH(m,t.u_is_along_line),u_is_variable_anchor:new d.aH(m,t.u_is_variable_anchor),u_texsize:new d.aO(m,t.u_texsize),u_texture:new d.aH(m,t.u_texture),u_translation:new d.aO(m,t.u_translation),u_pitched_scale:new d.aI(m,t.u_pitched_scale)}),symbolSDF:(m,t)=>({u_is_size_zoom_constant:new d.aH(m,t.u_is_size_zoom_constant),u_is_size_feature_constant:new d.aH(m,t.u_is_size_feature_constant),u_size_t:new d.aI(m,t.u_size_t),u_size:new d.aI(m,t.u_size),u_camera_to_center_distance:new d.aI(m,t.u_camera_to_center_distance),u_pitch:new d.aI(m,t.u_pitch),u_rotate_symbol:new d.aH(m,t.u_rotate_symbol),u_aspect_ratio:new d.aI(m,t.u_aspect_ratio),u_fade_change:new d.aI(m,t.u_fade_change),u_matrix:new d.aJ(m,t.u_matrix),u_label_plane_matrix:new d.aJ(m,t.u_label_plane_matrix),u_coord_matrix:new d.aJ(m,t.u_coord_matrix),u_is_text:new d.aH(m,t.u_is_text),u_pitch_with_map:new d.aH(m,t.u_pitch_with_map),u_is_along_line:new d.aH(m,t.u_is_along_line),u_is_variable_anchor:new d.aH(m,t.u_is_variable_anchor),u_texsize:new d.aO(m,t.u_texsize),u_texture:new d.aH(m,t.u_texture),u_gamma_scale:new d.aI(m,t.u_gamma_scale),u_device_pixel_ratio:new d.aI(m,t.u_device_pixel_ratio),u_is_halo:new d.aH(m,t.u_is_halo),u_translation:new d.aO(m,t.u_translation),u_pitched_scale:new d.aI(m,t.u_pitched_scale)}),symbolTextAndIcon:(m,t)=>({u_is_size_zoom_constant:new d.aH(m,t.u_is_size_zoom_constant),u_is_size_feature_constant:new d.aH(m,t.u_is_size_feature_constant),u_size_t:new d.aI(m,t.u_size_t),u_size:new d.aI(m,t.u_size),u_camera_to_center_distance:new d.aI(m,t.u_camera_to_center_distance),u_pitch:new d.aI(m,t.u_pitch),u_rotate_symbol:new d.aH(m,t.u_rotate_symbol),u_aspect_ratio:new d.aI(m,t.u_aspect_ratio),u_fade_change:new d.aI(m,t.u_fade_change),u_matrix:new d.aJ(m,t.u_matrix),u_label_plane_matrix:new d.aJ(m,t.u_label_plane_matrix),u_coord_matrix:new d.aJ(m,t.u_coord_matrix),u_is_text:new d.aH(m,t.u_is_text),u_pitch_with_map:new d.aH(m,t.u_pitch_with_map),u_is_along_line:new d.aH(m,t.u_is_along_line),u_is_variable_anchor:new d.aH(m,t.u_is_variable_anchor),u_texsize:new d.aO(m,t.u_texsize),u_texsize_icon:new d.aO(m,t.u_texsize_icon),u_texture:new d.aH(m,t.u_texture),u_texture_icon:new d.aH(m,t.u_texture_icon),u_gamma_scale:new d.aI(m,t.u_gamma_scale),u_device_pixel_ratio:new d.aI(m,t.u_device_pixel_ratio),u_is_halo:new d.aH(m,t.u_is_halo),u_translation:new d.aO(m,t.u_translation),u_pitched_scale:new d.aI(m,t.u_pitched_scale)}),background:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_opacity:new d.aI(m,t.u_opacity),u_color:new d.aL(m,t.u_color)}),backgroundPattern:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_opacity:new d.aI(m,t.u_opacity),u_image:new d.aH(m,t.u_image),u_pattern_tl_a:new d.aO(m,t.u_pattern_tl_a),u_pattern_br_a:new d.aO(m,t.u_pattern_br_a),u_pattern_tl_b:new d.aO(m,t.u_pattern_tl_b),u_pattern_br_b:new d.aO(m,t.u_pattern_br_b),u_texsize:new d.aO(m,t.u_texsize),u_mix:new d.aI(m,t.u_mix),u_pattern_size_a:new d.aO(m,t.u_pattern_size_a),u_pattern_size_b:new d.aO(m,t.u_pattern_size_b),u_scale_a:new d.aI(m,t.u_scale_a),u_scale_b:new d.aI(m,t.u_scale_b),u_pixel_coord_upper:new d.aO(m,t.u_pixel_coord_upper),u_pixel_coord_lower:new d.aO(m,t.u_pixel_coord_lower),u_tile_units_to_pixels:new d.aI(m,t.u_tile_units_to_pixels)}),terrain:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_texture:new d.aH(m,t.u_texture),u_ele_delta:new d.aI(m,t.u_ele_delta),u_fog_matrix:new d.aJ(m,t.u_fog_matrix),u_fog_color:new d.aL(m,t.u_fog_color),u_fog_ground_blend:new d.aI(m,t.u_fog_ground_blend),u_fog_ground_blend_opacity:new d.aI(m,t.u_fog_ground_blend_opacity),u_horizon_color:new d.aL(m,t.u_horizon_color),u_horizon_fog_blend:new d.aI(m,t.u_horizon_fog_blend)}),terrainDepth:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_ele_delta:new d.aI(m,t.u_ele_delta)}),terrainCoords:(m,t)=>({u_matrix:new d.aJ(m,t.u_matrix),u_texture:new d.aH(m,t.u_texture),u_terrain_coords_id:new d.aI(m,t.u_terrain_coords_id),u_ele_delta:new d.aI(m,t.u_ele_delta)}),sky:(m,t)=>({u_sky_color:new d.aL(m,t.u_sky_color),u_horizon_color:new d.aL(m,t.u_horizon_color),u_horizon:new d.aI(m,t.u_horizon),u_sky_horizon_blend:new d.aI(m,t.u_sky_horizon_blend)})};class io{constructor(t,s,u){this.context=t;const h=t.gl;this.buffer=h.createBuffer(),this.dynamicDraw=!!u,this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),h.bufferData(h.ELEMENT_ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?h.DYNAMIC_DRAW:h.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const s=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),s.bufferSubData(s.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const ag={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class zu{constructor(t,s,u,h){this.length=s.length,this.attributes=u,this.itemSize=s.bytesPerElement,this.dynamicDraw=h,this.context=t;const f=t.gl;this.buffer=f.createBuffer(),t.bindVertexBuffer.set(this.buffer),f.bufferData(f.ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?f.DYNAMIC_DRAW:f.STATIC_DRAW),this.dynamicDraw||delete s.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 s=this.context.gl;this.bind(),s.bufferSubData(s.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,s){for(let u=0;u0){const me=d.H();d.aQ(me,H.placementInvProjMatrix,m.transform.glCoordMatrix),d.aQ(me,me,H.placementViewportMatrix),k.push({circleArray:ue,circleOffset:A,transform:ie.posMatrix,invTransform:me,coord:ie}),E+=ue.length/4,A=E}le&&T.draw(f,w.LINES,kt.disabled,rr.disabled,m.colorModeForRenderPass(),Kt.disabled,{u_matrix:ie.posMatrix,u_pixel_extrude_scale:[1/(M=m.transform).width,1/M.height]},m.style.map.terrain&&m.style.map.terrain.getTerrainData(ie),s.id,le.layoutVertexBuffer,le.indexBuffer,le.segments,null,m.transform.zoom,null,null,le.collisionVertexBuffer)}var M;if(!h||!k.length)return;const F=m.useProgram("collisionCircle"),j=new d.aR;j.resize(4*E),j._trim();let Z=0;for(const te of k)for(let ie=0;ie=0&&(te[H.associatedIconIndex]={shiftedAnchor:pt,angle:lr})}else st(H.numGlyphs,X)}if(E){Q.clear();const ie=m.icon.placedSymbolArray;for(let H=0;Hm.style.map.terrain.getElevation(De,da,pa):null,Ts=s.layout.get("text-rotation-alignment")==="map";V(Je,De.posMatrix,m,h,ua,ha,te,E,Ts,X,De.toUnwrapped(),Z.width,Z.height,pi,Mt)}const fi=De.posMatrix,mi=h&&Ae||dh,Go=ie||mi?Ya:ua,Bi=fc,on=je&&s.paint.get(h?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let dn;dn=je?Je.iconsInText?Pu(pt.kind,Et,H,te,ie,mi,m,fi,Go,Bi,pi,un,bn,Ge):Wa(pt.kind,Et,H,te,ie,mi,m,fi,Go,Bi,pi,h,un,!0,Ge):jd(pt.kind,Et,H,te,ie,mi,m,fi,Go,Bi,pi,h,un,Ge);const ei={program:wt,buffers:_t,uniformValues:dn,atlasTexture:Di,atlasTextureIcon:hn,atlasInterpolation:ur,atlasInterpolationIcon:Bn,isSDF:je,hasHalo:on};if(ue&&Je.canOverlap){me=!0;const Mt=_t.segments.get();for(const Ts of Mt)Ne.push({segments:new d.a0([Ts]),sortKey:Ts.sortKey,state:ei,terrainData:cr})}else Ne.push({segments:_t.segments,sortKey:0,state:ei,terrainData:cr})}me&&Ne.sort((De,Re)=>De.sortKey-Re.sortKey);for(const De of Ne){const Re=De.state;if(F.activeTexture.set(j.TEXTURE0),Re.atlasTexture.bind(Re.atlasInterpolation,j.CLAMP_TO_EDGE),Re.atlasTextureIcon&&(F.activeTexture.set(j.TEXTURE1),Re.atlasTextureIcon&&Re.atlasTextureIcon.bind(Re.atlasInterpolationIcon,j.CLAMP_TO_EDGE)),Re.isSDF){const Je=Re.uniformValues;Re.hasHalo&&(Je.u_is_halo=1,ju(Re.buffers,De.segments,s,m,Re.program,Te,A,M,Je,De.terrainData)),Je.u_is_halo=0}ju(Re.buffers,De.segments,s,m,Re.program,Te,A,M,Re.uniformValues,De.terrainData)}}function ju(m,t,s,u,h,f,w,T,k,E){const A=u.context;h.draw(A,A.gl.TRIANGLES,f,w,T,Kt.disabled,k,E,s.id,m.layoutVertexBuffer,m.indexBuffer,t,s.paint,u.transform.zoom,m.programConfigurations.get(s.id),m.dynamicLayoutVertexBuffer,m.opacityVertexBuffer)}function Vu(m,t,s,u){const h=m.context,f=h.gl,w=rr.disabled,T=new wr([f.ONE,f.ONE],d.aM.transparent,[!0,!0,!0,!0]),k=t.getBucket(s);if(!k)return;const E=u.key;let A=s.heatmapFbos.get(E);A||(A=Ja(h,t.tileSize,t.tileSize),s.heatmapFbos.set(E,A)),h.bindFramebuffer.set(A.framebuffer),h.viewport.set([0,0,t.tileSize,t.tileSize]),h.clear({color:d.aM.transparent});const M=k.programConfigurations.get(s.id),F=m.useProgram("heatmap",M),j=m.style.map.terrain.getTerrainData(u);F.draw(h,f.TRIANGLES,kt.disabled,w,T,Kt.disabled,Dn(u.posMatrix,t,m.transform.zoom,s.paint.get("heatmap-intensity")),j,s.id,k.layoutVertexBuffer,k.indexBuffer,k.segments,s.paint,m.transform.zoom,M)}function xs(m,t,s){const u=m.context,h=u.gl;u.setColorMode(m.colorModeForRenderPass());const f=Qa(u,t),w=s.key,T=t.heatmapFbos.get(w);T&&(u.activeTexture.set(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,T.colorAttachment.get()),u.activeTexture.set(h.TEXTURE1),f.bind(h.LINEAR,h.CLAMP_TO_EDGE),m.useProgram("heatmapTexture").draw(u,h.TRIANGLES,kt.disabled,rr.disabled,m.colorModeForRenderPass(),Kt.disabled,Ul(m,t,0,1),null,t.id,m.rasterBoundsBuffer,m.quadTriangleIndexBuffer,m.rasterBoundsSegments,t.paint,m.transform.zoom),T.destroy(),t.heatmapFbos.delete(w))}function Ja(m,t,s){var u,h;const f=m.gl,w=f.createTexture();f.bindTexture(f.TEXTURE_2D,w),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.LINEAR);const T=(u=m.HALF_FLOAT)!==null&&u!==void 0?u:f.UNSIGNED_BYTE,k=(h=m.RGBA16F)!==null&&h!==void 0?h:f.RGBA;f.texImage2D(f.TEXTURE_2D,0,k,t,s,0,f.RGBA,T,null);const E=m.createFramebuffer(t,s,!1,!1);return E.colorAttachment.set(w),E}function Qa(m,t){return t.colorRampTexture||(t.colorRampTexture=new ot(m,t.colorRamp,m.gl.RGBA)),t.colorRampTexture}function Ks(m,t,s,u,h){if(!s||!u||!u.imageAtlas)return;const f=u.imageAtlas.patternPositions;let w=f[s.to.toString()],T=f[s.from.toString()];if(!w&&T&&(w=T),!T&&w&&(T=w),!w||!T){const k=h.getPaintProperty(t);w=f[k],T=f[k]}w&&T&&m.setConstantPatternPositions(w,T)}function el(m,t,s,u,h,f,w){const T=m.context.gl,k="fill-pattern",E=s.paint.get(k),A=E&&E.constantOr(1),M=s.getCrossfadeParameters();let F,j,Z,X,Q;w?(j=A&&!s.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",F=T.LINES):(j=A?"fillPattern":"fill",F=T.TRIANGLES);const te=E.constantOr(null);for(const ie of u){const H=t.getTile(ie);if(A&&!H.patternsLoaded())continue;const le=H.getBucket(s);if(!le)continue;const ue=le.programConfigurations.get(s.id),me=m.useProgram(j,ue),Te=m.style.map.terrain&&m.style.map.terrain.getTerrainData(ie);A&&(m.context.activeTexture.set(T.TEXTURE0),H.imageAtlasTexture.bind(T.LINEAR,T.CLAMP_TO_EDGE),ue.updatePaintBuffers(M)),Ks(ue,k,te,H,s);const Ae=Te?ie:null,Ne=m.translatePosMatrix(Ae?Ae.posMatrix:ie.posMatrix,H,s.paint.get("fill-translate"),s.paint.get("fill-translate-anchor"));if(w){X=le.indexBuffer2,Q=le.segments2;const Ge=[T.drawingBufferWidth,T.drawingBufferHeight];Z=j==="fillOutlinePattern"&&A?Od(Ne,m,M,H,Ge):rg(Ne,Ge)}else X=le.indexBuffer,Q=le.segments,Z=A?Fd(Ne,m,M,H):Zs(Ne);me.draw(m.context,F,h,m.stencilModeForClipping(ie),f,Kt.disabled,Z,Te,s.id,le.layoutVertexBuffer,X,Q,s.paint,m.transform.zoom,ue)}}function Xl(m,t,s,u,h,f,w){const T=m.context,k=T.gl,E="fill-extrusion-pattern",A=s.paint.get(E),M=A.constantOr(1),F=s.getCrossfadeParameters(),j=s.paint.get("fill-extrusion-opacity"),Z=A.constantOr(null);for(const X of u){const Q=t.getTile(X),te=Q.getBucket(s);if(!te)continue;const ie=m.style.map.terrain&&m.style.map.terrain.getTerrainData(X),H=te.programConfigurations.get(s.id),le=m.useProgram(M?"fillExtrusionPattern":"fillExtrusion",H);M&&(m.context.activeTexture.set(k.TEXTURE0),Q.imageAtlasTexture.bind(k.LINEAR,k.CLAMP_TO_EDGE),H.updatePaintBuffers(F)),Ks(H,E,Z,Q,s);const ue=m.translatePosMatrix(X.posMatrix,Q,s.paint.get("fill-extrusion-translate"),s.paint.get("fill-extrusion-translate-anchor")),me=s.paint.get("fill-extrusion-vertical-gradient"),Te=M?$l(ue,m,me,j,X,F,Q):Ga(ue,m,me,j);le.draw(T,T.gl.TRIANGLES,h,f,w,Kt.backCCW,Te,ie,s.id,te.layoutVertexBuffer,te.indexBuffer,te.segments,s.paint,m.transform.zoom,H,m.style.map.terrain&&te.centroidVertexBuffer)}}function Xs(m,t,s,u,h,f,w){const T=m.context,k=T.gl,E=s.fbo;if(!E)return;const A=m.useProgram("hillshade"),M=m.style.map.terrain&&m.style.map.terrain.getTerrainData(t);T.activeTexture.set(k.TEXTURE0),k.bindTexture(k.TEXTURE_2D,E.colorAttachment.get()),A.draw(T,k.TRIANGLES,h,f,w,Kt.disabled,((F,j,Z,X)=>{const Q=Z.paint.get("hillshade-shadow-color"),te=Z.paint.get("hillshade-highlight-color"),ie=Z.paint.get("hillshade-accent-color");let H=Z.paint.get("hillshade-illumination-direction")*(Math.PI/180);Z.paint.get("hillshade-illumination-anchor")==="viewport"&&(H-=F.transform.angle);const le=!F.options.moving;return{u_matrix:X?X.posMatrix:F.transform.calculatePosMatrix(j.tileID.toUnwrapped(),le),u_image:0,u_latrange:jl(0,j.tileID),u_light:[Z.paint.get("hillshade-exaggeration"),H],u_shadow:Q,u_highlight:te,u_accent:ie}})(m,s,u,M?t:null),M,u.id,m.rasterBoundsBuffer,m.quadTriangleIndexBuffer,m.rasterBoundsSegments)}function Ys(m,t,s,u,h,f){const w=m.context,T=w.gl,k=t.dem;if(k&&k.data){const E=k.dim,A=k.stride,M=k.getPixels();if(w.activeTexture.set(T.TEXTURE1),w.pixelStoreUnpackPremultiplyAlpha.set(!1),t.demTexture=t.demTexture||m.getTileTexture(A),t.demTexture){const j=t.demTexture;j.update(M,{premultiply:!1}),j.bind(T.NEAREST,T.CLAMP_TO_EDGE)}else t.demTexture=new ot(w,M,T.RGBA,{premultiply:!1}),t.demTexture.bind(T.NEAREST,T.CLAMP_TO_EDGE);w.activeTexture.set(T.TEXTURE0);let F=t.fbo;if(!F){const j=new ot(w,{width:E,height:E,data:null},T.RGBA);j.bind(T.LINEAR,T.CLAMP_TO_EDGE),F=t.fbo=w.createFramebuffer(E,E,!0,!1),F.colorAttachment.set(j.texture)}w.bindFramebuffer.set(F.framebuffer),w.viewport.set([0,0,E,E]),m.useProgram("hillshadePrepare").draw(w,T.TRIANGLES,u,h,f,Kt.disabled,((j,Z)=>{const X=Z.stride,Q=d.H();return d.aP(Q,0,d.X,-d.X,0,0,1),d.J(Q,Q,[0,-d.X,0]),{u_matrix:Q,u_image:1,u_dimension:[X,X],u_zoom:j.overscaledZ,u_unpack:Z.getUnpackVector()}})(t.tileID,k),null,s.id,m.rasterBoundsBuffer,m.quadTriangleIndexBuffer,m.rasterBoundsSegments),t.needsHillshadePrepare=!1}}function tp(m,t,s,u,h,f){const w=u.paint.get("raster-fade-duration");if(!f&&w>0){const T=q.now(),k=(T-m.timeAdded)/w,E=t?(T-t.timeAdded)/w:-1,A=s.getSource(),M=h.coveringZoomLevel({tileSize:A.tileSize,roundZoom:A.roundZoom}),F=!t||Math.abs(t.tileID.overscaledZ-M)>Math.abs(m.tileID.overscaledZ-M),j=F&&m.refreshedUponExpiration?1:d.ac(F?k:1-E,0,1);return m.refreshedUponExpiration&&k>=1&&(m.refreshedUponExpiration=!1),t?{opacity:1,mix:1-j}:{opacity:j,mix:0}}return{opacity:1,mix:0}}const qu=new d.aM(1,0,0,1),Ft=new d.aM(0,1,0,1),Yl=new d.aM(0,0,1,1),yg=new d.aM(1,0,1,1),rp=new d.aM(0,1,1,1);function Js(m,t,s,u){Jl(m,0,t+s/2,m.transform.width,s,u)}function np(m,t,s,u){Jl(m,t-s/2,0,s,m.transform.height,u)}function Jl(m,t,s,u,h,f){const w=m.context,T=w.gl;T.enable(T.SCISSOR_TEST),T.scissor(t*m.pixelRatio,s*m.pixelRatio,u*m.pixelRatio,h*m.pixelRatio),w.clear({color:f}),T.disable(T.SCISSOR_TEST)}function ip(m,t,s){const u=m.context,h=u.gl,f=s.posMatrix,w=m.useProgram("debug"),T=kt.disabled,k=rr.disabled,E=m.colorModeForRenderPass(),A="$debug",M=m.style.map.terrain&&m.style.map.terrain.getTerrainData(s);u.activeTexture.set(h.TEXTURE0);const F=t.getTileByID(s.key).latestRawTileData,j=Math.floor((F&&F.byteLength||0)/1024),Z=t.getTile(s).tileSize,X=512/Math.min(Z,512)*(s.overscaledZ/m.transform.zoom)*.5;let Q=s.canonical.toString();s.overscaledZ!==s.canonical.z&&(Q+=` => ${s.overscaledZ}`),function(te,ie){te.initDebugOverlayCanvas();const H=te.debugOverlayCanvas,le=te.context.gl,ue=te.debugOverlayCanvas.getContext("2d");ue.clearRect(0,0,H.width,H.height),ue.shadowColor="white",ue.shadowBlur=2,ue.lineWidth=1.5,ue.strokeStyle="white",ue.textBaseline="top",ue.font="bold 36px Open Sans, sans-serif",ue.fillText(ie,5,5),ue.strokeText(ie,5,5),te.debugOverlayTexture.update(H),te.debugOverlayTexture.bind(le.LINEAR,le.CLAMP_TO_EDGE)}(m,`${Q} ${j}kB`),w.draw(u,h.TRIANGLES,T,k,wr.alphaBlended,Kt.disabled,Ha(f,d.aM.transparent,X),null,A,m.debugBuffer,m.quadTriangleIndexBuffer,m.debugSegments),w.draw(u,h.LINE_STRIP,T,k,E,Kt.disabled,Ha(f,d.aM.red),M,A,m.debugBuffer,m.tileBorderIndexBuffer,m.debugSegments)}function op(m,t,s){const u=m.context,h=u.gl,f=m.colorModeForRenderPass(),w=new kt(h.LEQUAL,kt.ReadWrite,m.depthRangeFor3D),T=m.useProgram("terrain"),k=t.getTerrainMesh();u.bindFramebuffer.set(null),u.viewport.set([0,0,m.width,m.height]);for(const E of s){const A=m.renderToTexture.getTexture(E),M=t.getTerrainData(E.tileID);u.activeTexture.set(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,A.texture);const F=m.transform.calculatePosMatrix(E.tileID.toUnwrapped()),j=t.getMeshFrameDelta(m.transform.zoom),Z=m.transform.calculateFogMatrix(E.tileID.toUnwrapped()),X=Iu(F,j,Z,m.style.sky,m.transform.pitch);T.draw(u,h.TRIANGLES,w,rr.disabled,f,Kt.backCCW,X,M,"terrain",k.vertexBuffer,k.indexBuffer,k.segments)}}class Ql{constructor(t,s,u){this.vertexBuffer=t,this.indexBuffer=s,this.segments=u}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class ec{constructor(t,s){this.context=new gg(t),this.transform=s,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:d.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ht.maxUnderzooming+ht.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ku}resize(t,s,u){if(this.width=Math.floor(t*u),this.height=Math.floor(s*u),this.pixelRatio=u,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const h of this.style._order)this.style._layers[h].resize()}setup(){const t=this.context,s=new d.aX;s.emplaceBack(0,0),s.emplaceBack(d.X,0),s.emplaceBack(0,d.X),s.emplaceBack(d.X,d.X),this.tileExtentBuffer=t.createVertexBuffer(s,ps.members),this.tileExtentSegments=d.a0.simpleSegment(0,0,4,2);const u=new d.aX;u.emplaceBack(0,0),u.emplaceBack(d.X,0),u.emplaceBack(0,d.X),u.emplaceBack(d.X,d.X),this.debugBuffer=t.createVertexBuffer(u,ps.members),this.debugSegments=d.a0.simpleSegment(0,0,4,5);const h=new d.$;h.emplaceBack(0,0,0,0),h.emplaceBack(d.X,0,d.X,0),h.emplaceBack(0,d.X,0,d.X),h.emplaceBack(d.X,d.X,d.X,d.X),this.rasterBoundsBuffer=t.createVertexBuffer(h,to.members),this.rasterBoundsSegments=d.a0.simpleSegment(0,0,4,2);const f=new d.aX;f.emplaceBack(0,0),f.emplaceBack(1,0),f.emplaceBack(0,1),f.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(f,ps.members),this.viewportSegments=d.a0.simpleSegment(0,0,4,2);const w=new d.aZ;w.emplaceBack(0),w.emplaceBack(1),w.emplaceBack(3),w.emplaceBack(2),w.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(w);const T=new d.aY;T.emplaceBack(0,1,2),T.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(T);const k=this.context.gl;this.stencilClearMode=new rr({func:k.ALWAYS,mask:0},0,255,k.ZERO,k.ZERO,k.ZERO)}clearStencil(){const t=this.context,s=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const u=d.H();d.aP(u,0,this.width,this.height,0,0,1),d.K(u,u,[s.drawingBufferWidth,s.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,s.TRIANGLES,kt.disabled,this.stencilClearMode,wr.disabled,Kt.disabled,Rn(u),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(t,s){if(this.currentStencilSource===t.source||!t.isTileClipped()||!s||!s.length)return;this.currentStencilSource=t.source;const u=this.context,h=u.gl;this.nextStencilID+s.length>256&&this.clearStencil(),u.setColorMode(wr.disabled),u.setDepthMode(kt.disabled);const f=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const w of s){const T=this._tileClippingMaskIDs[w.key]=this.nextStencilID++,k=this.style.map.terrain&&this.style.map.terrain.getTerrainData(w);f.draw(u,h.TRIANGLES,kt.disabled,new rr({func:h.ALWAYS,mask:0},T,255,h.KEEP,h.KEEP,h.REPLACE),wr.disabled,Kt.disabled,Rn(w.posMatrix),k,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,s=this.context.gl;return new rr({func:s.NOTEQUAL,mask:255},t,255,s.KEEP,s.KEEP,s.REPLACE)}stencilModeForClipping(t){const s=this.context.gl;return new rr({func:s.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,s.KEEP,s.KEEP,s.REPLACE)}stencilConfigForOverlap(t){const s=this.context.gl,u=t.sort((w,T)=>T.overscaledZ-w.overscaledZ),h=u[u.length-1].overscaledZ,f=u[0].overscaledZ-h+1;if(f>1){this.currentStencilSource=void 0,this.nextStencilID+f>256&&this.clearStencil();const w={};for(let T=0;T({u_sky_color:te.properties.get("sky-color"),u_horizon_color:te.properties.get("horizon-color"),u_horizon:(ie.height/2+ie.getHorizon())*H,u_sky_horizon_blend:te.properties.get("sky-horizon-blend")*ie.height/2*H}))(E,k.style.map.transform,k.pixelRatio),j=new kt(M.LEQUAL,kt.ReadWrite,[0,1]),Z=rr.disabled,X=k.colorModeForRenderPass(),Q=k.useProgram("sky");if(!E.mesh){const te=new d.aX;te.emplaceBack(-1,-1),te.emplaceBack(1,-1),te.emplaceBack(1,1),te.emplaceBack(-1,1);const ie=new d.aY;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),E.mesh=new Ql(A.createVertexBuffer(te,ps.members),A.createIndexBuffer(ie),d.a0.simpleSegment(0,0,te.length,ie.length))}Q.draw(A,M.TRIANGLES,j,Z,X,Kt.disabled,F,void 0,"sky",E.mesh.vertexBuffer,E.mesh.indexBuffer,E.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=s.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=u.length-1;this.currentLayer>=0;this.currentLayer--){const k=this.style._layers[u[this.currentLayer]],E=h[k.source],A=f[k.source];this._renderTileClippingMasks(k,A),this.renderLayer(this,E,k,A)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerQ.source&&!Q.isHidden(A)?[E.sourceCaches[Q.source]]:[]),j=F.filter(Q=>Q.getSource().type==="vector"),Z=F.filter(Q=>Q.getSource().type!=="vector"),X=Q=>{(!M||M.getSource().maxzoomX(Q)),M||Z.forEach(Q=>X(Q)),M}(this.style,this.transform.zoom);k&&function(E,A,M){for(let F=0;F0),h&&(d.b0(s,u),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(f,w){const T=f.context,k=T.gl,E=wr.unblended,A=new kt(k.LEQUAL,kt.ReadWrite,[0,1]),M=w.getTerrainMesh(),F=w.sourceCache.getRenderableTiles(),j=f.useProgram("terrainDepth");T.bindFramebuffer.set(w.getFramebuffer("depth").framebuffer),T.viewport.set([0,0,f.width/devicePixelRatio,f.height/devicePixelRatio]),T.clear({color:d.aM.transparent,depth:1});for(const Z of F){const X=w.getTerrainData(Z.tileID),Q={u_matrix:f.transform.calculatePosMatrix(Z.tileID.toUnwrapped()),u_ele_delta:w.getMeshFrameDelta(f.transform.zoom)};j.draw(T,k.TRIANGLES,A,rr.disabled,E,Kt.backCCW,Q,X,"terrain",M.vertexBuffer,M.indexBuffer,M.segments)}T.bindFramebuffer.set(null),T.viewport.set([0,0,f.width,f.height])}(this,this.style.map.terrain),function(f,w){const T=f.context,k=T.gl,E=wr.unblended,A=new kt(k.LEQUAL,kt.ReadWrite,[0,1]),M=w.getTerrainMesh(),F=w.getCoordsTexture(),j=w.sourceCache.getRenderableTiles(),Z=f.useProgram("terrainCoords");T.bindFramebuffer.set(w.getFramebuffer("coords").framebuffer),T.viewport.set([0,0,f.width/devicePixelRatio,f.height/devicePixelRatio]),T.clear({color:d.aM.transparent,depth:1}),w.coordsIndex=[];for(const X of j){const Q=w.getTerrainData(X.tileID);T.activeTexture.set(k.TEXTURE0),k.bindTexture(k.TEXTURE_2D,F.texture);const te={u_matrix:f.transform.calculatePosMatrix(X.tileID.toUnwrapped()),u_terrain_coords_id:(255-w.coordsIndex.length)/255,u_texture:0,u_ele_delta:w.getMeshFrameDelta(f.transform.zoom)};Z.draw(T,k.TRIANGLES,A,rr.disabled,E,Kt.backCCW,te,Q,"terrain",M.vertexBuffer,M.indexBuffer,M.segments),w.coordsIndex.push(X.tileID.key)}T.bindFramebuffer.set(null),T.viewport.set([0,0,f.width,f.height])}(this,this.style.map.terrain))}renderLayer(t,s,u,h){if(!u.isHidden(this.transform.zoom)&&(u.type==="background"||u.type==="custom"||(h||[]).length))switch(this.id=u.id,u.type){case"symbol":(function(f,w,T,k,E){if(f.renderPass!=="translucent")return;const A=rr.disabled,M=f.colorModeForRenderPass();(T._unevaluatedLayout.hasValue("text-variable-anchor")||T._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(F,j,Z,X,Q,te,ie,H,le){const ue=j.transform,me=ds(),Te=Q==="map",Ae=te==="map";for(const Ne of F){const Ge=X.getTile(Ne),De=Ge.getBucket(Z);if(!De||!De.text||!De.text.segments.get().length)continue;const Re=d.ag(De.textSizeData,ue.zoom),Je=It(Ge,1,j.transform.zoom),_t=Vo(Ne.posMatrix,Ae,Te,j.transform,Je),Fe=Z.layout.get("icon-text-fit")!=="none"&&De.hasIconData();if(Re){const je=Math.pow(2,ue.zoom-Ge.tileID.overscaledZ),pt=j.style.map.terrain?(wt,Et)=>j.style.map.terrain.getElevation(Ne,wt,Et):null,lr=me.translatePosition(ue,Ge,ie,H);Ws(De,Te,Ae,le,ue,_t,Ne.posMatrix,je,Re,Fe,me,lr,Ne.toUnwrapped(),pt)}}}(k,f,T,w,T.layout.get("text-rotation-alignment"),T.layout.get("text-pitch-alignment"),T.paint.get("text-translate"),T.paint.get("text-translate-anchor"),E),T.paint.get("icon-opacity").constantOr(1)!==0&&Uu(f,w,T,k,!1,T.paint.get("icon-translate"),T.paint.get("icon-translate-anchor"),T.layout.get("icon-rotation-alignment"),T.layout.get("icon-pitch-alignment"),T.layout.get("icon-keep-upright"),A,M),T.paint.get("text-opacity").constantOr(1)!==0&&Uu(f,w,T,k,!0,T.paint.get("text-translate"),T.paint.get("text-translate-anchor"),T.layout.get("text-rotation-alignment"),T.layout.get("text-pitch-alignment"),T.layout.get("text-keep-upright"),A,M),w.map.showCollisionBoxes&&(Xa(f,w,T,k,!0),Xa(f,w,T,k,!1))})(t,s,u,h,this.style.placement.variableOffsets);break;case"circle":(function(f,w,T,k){if(f.renderPass!=="translucent")return;const E=T.paint.get("circle-opacity"),A=T.paint.get("circle-stroke-width"),M=T.paint.get("circle-stroke-opacity"),F=!T.layout.get("circle-sort-key").isConstant();if(E.constantOr(1)===0&&(A.constantOr(1)===0||M.constantOr(1)===0))return;const j=f.context,Z=j.gl,X=f.depthModeForSublayer(0,kt.ReadOnly),Q=rr.disabled,te=f.colorModeForRenderPass(),ie=[];for(let H=0;HH.sortKey-le.sortKey);for(const H of ie){const{programConfiguration:le,program:ue,layoutVertexBuffer:me,indexBuffer:Te,uniformValues:Ae,terrainData:Ne}=H.state;ue.draw(j,Z.TRIANGLES,X,Q,te,Kt.disabled,Ae,Ne,T.id,me,Te,H.segments,T.paint,f.transform.zoom,le)}})(t,s,u,h);break;case"heatmap":(function(f,w,T,k){if(T.paint.get("heatmap-opacity")===0)return;const E=f.context;if(f.style.map.terrain){for(const A of k){const M=w.getTile(A);w.hasRenderableParent(A)||(f.renderPass==="offscreen"?Vu(f,M,T,A):f.renderPass==="translucent"&&xs(f,T,A))}E.viewport.set([0,0,f.width,f.height])}else f.renderPass==="offscreen"?function(A,M,F,j){const Z=A.context,X=Z.gl,Q=rr.disabled,te=new wr([X.ONE,X.ONE],d.aM.transparent,[!0,!0,!0,!0]);(function(ie,H,le){const ue=ie.gl;ie.activeTexture.set(ue.TEXTURE1),ie.viewport.set([0,0,H.width/4,H.height/4]);let me=le.heatmapFbos.get(d.aU);me?(ue.bindTexture(ue.TEXTURE_2D,me.colorAttachment.get()),ie.bindFramebuffer.set(me.framebuffer)):(me=Ja(ie,H.width/4,H.height/4),le.heatmapFbos.set(d.aU,me))})(Z,A,F),Z.clear({color:d.aM.transparent});for(let ie=0;ie20&&A.texParameterf(A.TEXTURE_2D,E.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,E.extTextureFilterAnisotropicMax);const De=f.style.map.terrain&&f.style.map.terrain.getTerrainData(ie),Re=De?ie:null,Je=Re?Re.posMatrix:f.transform.calculatePosMatrix(ie.toUnwrapped(),te),_t=og(Je,Ne||[0,0],Ae||1,Te,T);M instanceof Ci?F.draw(E,A.TRIANGLES,H,rr.disabled,j,Kt.disabled,_t,De,T.id,M.boundsBuffer,f.quadTriangleIndexBuffer,M.boundsSegments):F.draw(E,A.TRIANGLES,H,Z[ie.overscaledZ],j,Kt.disabled,_t,De,T.id,f.rasterBoundsBuffer,f.quadTriangleIndexBuffer,f.rasterBoundsSegments)}})(t,s,u,h);break;case"background":(function(f,w,T,k){const E=T.paint.get("background-color"),A=T.paint.get("background-opacity");if(A===0)return;const M=f.context,F=M.gl,j=f.transform,Z=j.tileSize,X=T.paint.get("background-pattern");if(f.isPatternMissing(X))return;const Q=!X&&E.a===1&&A===1&&f.opaquePassEnabledForLayer()?"opaque":"translucent";if(f.renderPass!==Q)return;const te=rr.disabled,ie=f.depthModeForSublayer(0,Q==="opaque"?kt.ReadWrite:kt.ReadOnly),H=f.colorModeForRenderPass(),le=f.useProgram(X?"backgroundPattern":"background"),ue=k||j.coveringTiles({tileSize:Z,terrain:f.style.map.terrain});X&&(M.activeTexture.set(F.TEXTURE0),f.imageManager.bind(f.context));const me=T.getCrossfadeParameters();for(const Te of ue){const Ae=k?Te.posMatrix:f.transform.calculatePosMatrix(Te.toUnwrapped()),Ne=X?Au(Ae,A,f,X,{tileID:Te,tileSize:Z},me):ql(Ae,A,E),Ge=f.style.map.terrain&&f.style.map.terrain.getTerrainData(Te);le.draw(M,F.TRIANGLES,ie,te,H,Kt.disabled,Ne,Ge,T.id,f.tileExtentBuffer,f.quadTriangleIndexBuffer,f.tileExtentSegments)}})(t,0,u,h);break;case"custom":(function(f,w,T){const k=f.context,E=T.implementation;if(f.renderPass==="offscreen"){const A=E.prerender;A&&(f.setCustomLayerDefaults(),k.setColorMode(f.colorModeForRenderPass()),A.call(E,k.gl,f.transform.customLayerMatrix()),k.setDirty(),f.setBaseState())}else if(f.renderPass==="translucent"){f.setCustomLayerDefaults(),k.setColorMode(f.colorModeForRenderPass()),k.setStencilMode(rr.disabled);const A=E.renderingMode==="3d"?new kt(f.context.gl.LEQUAL,kt.ReadWrite,f.depthRangeFor3D):f.depthModeForSublayer(0,kt.ReadOnly);k.setDepthMode(A),E.render(k.gl,f.transform.customLayerMatrix(),{farZ:f.transform.farZ,nearZ:f.transform.nearZ,fov:f.transform._fov,modelViewProjectionMatrix:f.transform.modelViewProjectionMatrix,projectionMatrix:f.transform.projectionMatrix}),k.setDirty(),f.setBaseState(),k.bindFramebuffer.set(null)}})(t,0,u)}}translatePosMatrix(t,s,u,h,f){if(!u[0]&&!u[1])return t;const w=f?h==="map"?this.transform.angle:0:h==="viewport"?-this.transform.angle:0;if(w){const E=Math.sin(w),A=Math.cos(w);u=[u[0]*A-u[1]*E,u[0]*E+u[1]*A]}const T=[f?u[0]:It(s,u[0],this.transform.zoom),f?u[1]:It(s,u[1],this.transform.zoom),0],k=new Float32Array(16);return d.J(k,t,T),k}saveTileTexture(t){const s=this._tileTextures[t.size[0]];s?s.push(t):this._tileTextures[t.size[0]]=[t]}getTileTexture(t){const s=this._tileTextures[t];return s&&s.length>0?s.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;const s=this.imageManager.getPattern(t.from.toString()),u=this.imageManager.getPattern(t.to.toString());return!s||!u}useProgram(t,s){this.cache=this.cache||{};const u=t+(s?s.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[u]||(this.cache[u]=new Eu(this.context,qo[t],s,Mu[t],this._showOverdrawInspector,this.style.map.terrain)),this.cache[u]}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 ot(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:t,drawingBufferHeight:s}=this.context.gl;return this.width!==t||this.height!==s}}class Qs{constructor(t,s){this.points=t,this.planes=s}static fromInvProjectionMatrix(t,s,u){const h=Math.pow(2,u),f=[[-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(T=>{const k=1/(T=d.af([],T,t))[3]/s*h;return d.b1(T,T,[k,k,1/T[3],k])}),w=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(T=>{const k=function(F,j){var Z=j[0],X=j[1],Q=j[2],te=Z*Z+X*X+Q*Q;return te>0&&(te=1/Math.sqrt(te)),F[0]=j[0]*te,F[1]=j[1]*te,F[2]=j[2]*te,F}([],function(F,j,Z){var X=j[0],Q=j[1],te=j[2],ie=Z[0],H=Z[1],le=Z[2];return F[0]=Q*le-te*H,F[1]=te*ie-X*le,F[2]=X*H-Q*ie,F}([],Ie([],f[T[0]],f[T[1]]),Ie([],f[T[2]],f[T[1]]))),E=-((A=k)[0]*(M=f[T[1]])[0]+A[1]*M[1]+A[2]*M[2]);var A,M;return k.concat(E)});return new Qs(f,w)}}class ea{constructor(t,s){this.min=t,this.max=s,this.center=function(u,h,f){return u[0]=.5*h[0],u[1]=.5*h[1],u[2]=.5*h[2],u}([],function(u,h,f){return u[0]=h[0]+f[0],u[1]=h[1]+f[1],u[2]=h[2]+f[2],u}([],this.min,this.max))}quadrant(t){const s=[t%2==0,t<2],u=ke(this.min),h=ke(this.max);for(let f=0;f=0&&w++;if(w===0)return 0;w!==s.length&&(u=!1)}if(u)return 2;for(let h=0;h<3;h++){let f=Number.MAX_VALUE,w=-Number.MAX_VALUE;for(let T=0;Tthis.max[h]-this.min[h])return 0}return 1}}class ta{constructor(t=0,s=0,u=0,h=0){if(isNaN(t)||t<0||isNaN(s)||s<0||isNaN(u)||u<0||isNaN(h)||h<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=s,this.left=u,this.right=h}interpolate(t,s,u){return s.top!=null&&t.top!=null&&(this.top=d.y.number(t.top,s.top,u)),s.bottom!=null&&t.bottom!=null&&(this.bottom=d.y.number(t.bottom,s.bottom,u)),s.left!=null&&t.left!=null&&(this.left=d.y.number(t.left,s.left,u)),s.right!=null&&t.right!=null&&(this.right=d.y.number(t.right,s.right,u)),this}getCenter(t,s){const u=d.ac((this.left+t-this.right)/2,0,t),h=d.ac((this.top+s-this.bottom)/2,0,s);return new d.P(u,h)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new ta(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Zu=85.051129;class ra{constructor(t,s,u,h,f){this.tileSize=512,this._renderWorldCopies=f===void 0||!!f,this._minZoom=t||0,this._maxZoom=s||22,this._minPitch=u??0,this._maxPitch=h??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new d.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ta,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const t=new ra(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.lngRange=t.lngRange,this.width=t.width,this.height=t.height,this._center=t._center,this._elevation=t._elevation,this.minElevationForCurrentTile=t.minElevationForCurrentTile,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 d.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(t){const s=-d.b3(t,-180,180)*Math.PI/180;this.angle!==s&&(this._unmodified=!1,this.angle=s,this._calcMatrices(),this.rotationMatrix=function(){var u=new d.A(4);return d.A!=Float32Array&&(u[1]=0,u[2]=0),u[0]=1,u[3]=1,u}(),function(u,h,f){var w=h[0],T=h[1],k=h[2],E=h[3],A=Math.sin(f),M=Math.cos(f);u[0]=w*M+k*A,u[1]=T*M+E*A,u[2]=w*-A+k*M,u[3]=T*-A+E*M}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const s=d.ac(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==s&&(this._unmodified=!1,this._pitch=s,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 s=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==s&&(this._unmodified=!1,this._zoom=s,this.tileZoom=Math.max(0,Math.floor(s)),this.scale=this.zoomScale(s),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,s,u){this._unmodified=!1,this._edgeInsets.interpolate(t,s,u),this._constrain(),this._calcMatrices()}coveringZoomLevel(t){const s=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,s)}getVisibleUnwrappedCoordinates(t){const s=[new d.b4(0,t)];if(this._renderWorldCopies){const u=this.pointCoordinate(new d.P(0,0)),h=this.pointCoordinate(new d.P(this.width,0)),f=this.pointCoordinate(new d.P(this.width,this.height)),w=this.pointCoordinate(new d.P(0,this.height)),T=Math.floor(Math.min(u.x,h.x,f.x,w.x)),k=Math.floor(Math.max(u.x,h.x,f.x,w.x)),E=1;for(let A=T-E;A<=k+E;A++)A!==0&&s.push(new d.b4(A,t))}return s}coveringTiles(t){var s,u;let h=this.coveringZoomLevel(t);const f=h;if(t.minzoom!==void 0&&ht.maxzoom&&(h=t.maxzoom);const w=this.pointCoordinate(this.getCameraPoint()),T=d.Z.fromLngLat(this.center),k=Math.pow(2,h),E=[k*w.x,k*w.y,0],A=[k*T.x,k*T.y,0],M=Qs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,h);let F=t.minzoom||0;!t.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(F=h);const j=t.terrain?2/Math.min(this.tileSize,t.tileSize)*this.tileSize:3,Z=H=>({aabb:new ea([H*k,0,0],[(H+1)*k,k,0]),zoom:0,x:0,y:0,wrap:H,fullyVisible:!1}),X=[],Q=[],te=h,ie=t.reparseOverscaled?f:h;if(this._renderWorldCopies)for(let H=1;H<=3;H++)X.push(Z(-H)),X.push(Z(H));for(X.push(Z(0));X.length>0;){const H=X.pop(),le=H.x,ue=H.y;let me=H.fullyVisible;if(!me){const De=H.aabb.intersects(M);if(De===0)continue;me=De===2}const Te=t.terrain?E:A,Ae=H.aabb.distanceX(Te),Ne=H.aabb.distanceY(Te),Ge=Math.max(Math.abs(Ae),Math.abs(Ne));if(H.zoom===te||Ge>j+(1<=F){const De=te-H.zoom,Re=E[0]-.5-(le<>1),_t=H.zoom+1;let Fe=H.aabb.quadrant(De);if(t.terrain){const je=new d.S(_t,H.wrap,_t,Re,Je),pt=t.terrain.getMinMaxElevation(je),lr=(s=pt.minElevation)!==null&&s!==void 0?s:this.elevation,wt=(u=pt.maxElevation)!==null&&u!==void 0?u:this.elevation;Fe=new ea([Fe.min[0],Fe.min[1],lr],[Fe.max[0],Fe.max[1],wt])}X.push({aabb:Fe,zoom:_t,x:Re,y:Je,wrap:H.wrap,fullyVisible:me})}}return Q.sort((H,le)=>H.distanceSq-le.distanceSq).map(H=>H.tileID)}resize(t,s){this.width=t,this.height=s,this.pixelsToGLUnits=[2/t,-2/s],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 s=d.ac(t.lat,-85.051129,Zu);return new d.P(d.O(t.lng)*this.worldSize,d.Q(s)*this.worldSize)}unproject(t){return new d.Z(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 s=this.elevation,u=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,h=this.pointLocation(this.centerPoint,t),f=t.getElevationForLngLatZoom(h,this.tileZoom);if(!(this.elevation-f))return;const w=u+s-f,T=Math.cos(this._pitch)*this.cameraToCenterDistance/w/d.b5(1,h.lat),k=this.scaleZoom(T/this.tileSize);this._elevation=f,this._center=h,this.zoom=k}setLocationAtPoint(t,s){const u=this.pointCoordinate(s),h=this.pointCoordinate(this.centerPoint),f=this.locationCoordinate(t),w=new d.Z(f.x-(u.x-h.x),f.y-(u.y-h.y));this.center=this.coordinateLocation(w),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(t,s){return s?this.coordinatePoint(this.locationCoordinate(t),s.getElevationForLngLatZoom(t,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(t))}pointLocation(t,s){return this.coordinateLocation(this.pointCoordinate(t,s))}locationCoordinate(t){return d.Z.fromLngLat(t)}coordinateLocation(t){return t&&t.toLngLat()}pointCoordinate(t,s){if(s){const F=s.pointCoordinate(t);if(F!=null)return F}const u=[t.x,t.y,0,1],h=[t.x,t.y,1,1];d.af(u,u,this.pixelMatrixInverse),d.af(h,h,this.pixelMatrixInverse);const f=u[3],w=h[3],T=u[1]/f,k=h[1]/w,E=u[2]/f,A=h[2]/w,M=E===A?0:(0-E)/(A-E);return new d.Z(d.y.number(u[0]/f,h[0]/w,M)/this.worldSize,d.y.number(T,k,M)/this.worldSize)}coordinatePoint(t,s=0,u=this.pixelMatrix){const h=[t.x*this.worldSize,t.y*this.worldSize,s,1];return d.af(h,h,u),new d.P(h[0]/h[3],h[1]/h[3])}getBounds(){const t=Math.max(0,this.height/2-this.getHorizon());return new ve().extend(this.pointLocation(new d.P(0,t))).extend(this.pointLocation(new d.P(this.width,t))).extend(this.pointLocation(new d.P(this.width,this.height))).extend(this.pointLocation(new d.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ve([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=[-85.051129,Zu])}calculateTileMatrix(t){const s=t.canonical,u=this.worldSize/this.zoomScale(s.z),h=s.x+Math.pow(2,s.z)*t.wrap,f=d.an(new Float64Array(16));return d.J(f,f,[h*u,s.y*u,0]),d.K(f,f,[u/d.X,u/d.X,1]),f}calculatePosMatrix(t,s=!1){const u=t.key,h=s?this._alignedPosMatrixCache:this._posMatrixCache;if(h[u])return h[u];const f=this.calculateTileMatrix(t);return d.L(f,s?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,f),h[u]=new Float32Array(f),h[u]}calculateFogMatrix(t){const s=t.key,u=this._fogMatrixCache;if(u[s])return u[s];const h=this.calculateTileMatrix(t);return d.L(h,this.fogMatrix,h),u[s]=new Float32Array(h),u[s]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(t,s){s=d.ac(+s,this.minZoom,this.maxZoom);const u={center:new d.N(t.lng,t.lat),zoom:s};let h=this.lngRange;if(!this._renderWorldCopies&&h===null){const H=179.9999999999;h=[-H,H]}const f=this.tileSize*this.zoomScale(u.zoom);let w=0,T=f,k=0,E=f,A=0,M=0;const{x:F,y:j}=this.size;if(this.latRange){const H=this.latRange;w=d.Q(H[1])*f,T=d.Q(H[0])*f,T-wT&&(te=T-H)}if(h){const H=(k+E)/2;let le=Z;this._renderWorldCopies&&(le=d.b3(Z,H-f/2,H+f/2));const ue=F/2;le-ueE&&(Q=E-ue)}if(Q!==void 0||te!==void 0){const H=new d.P(Q??Z,te??X);u.center=this.unproject.call({worldSize:f},H).wrap()}return u}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const t=this._unmodified,{center:s,zoom:u}=this.getConstrained(this.center,this.zoom);this.center=s,this.zoom=u,this._unmodified=t,this._constraining=!1}_calcMatrices(){if(!this.height)return;const t=this.centerOffset,s=this.point.x,u=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=d.b5(1,this.center.lat)*this.worldSize;let h=d.an(new Float64Array(16));d.K(h,h,[this.width/2,-this.height/2,1]),d.J(h,h,[1,-1,0]),this.labelPlaneMatrix=h,h=d.an(new Float64Array(16)),d.K(h,h,[1,-1,1]),d.J(h,h,[-1,-1,0]),d.K(h,h,[2/this.width,2/this.height,1]),this.glCoordMatrix=h;const f=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),w=Math.min(this.elevation,this.minElevationForCurrentTile),T=f-w*this._pixelPerMeter/Math.cos(this._pitch),k=w<0?T:f,E=Math.PI/2+this._pitch,A=this._fov*(.5+t.y/this.height),M=Math.sin(A)*k/Math.sin(d.ac(Math.PI-E-A,.01,Math.PI-.01)),F=this.getHorizon(),j=2*Math.atan(F/this.cameraToCenterDistance)*(.5+t.y/(2*F)),Z=Math.sin(j)*k/Math.sin(d.ac(Math.PI-E-j,.01,Math.PI-.01)),X=Math.min(M,Z);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*X+k),this.nearZ=this.height/50,h=new Float64Array(16),d.b6(h,this._fov,this.width/this.height,this.nearZ,this.farZ),h[8]=2*-t.x/this.width,h[9]=2*t.y/this.height,this.projectionMatrix=d.ae(h),d.K(h,h,[1,-1,1]),d.J(h,h,[0,0,-this.cameraToCenterDistance]),d.b7(h,h,this._pitch),d.ad(h,h,this.angle),d.J(h,h,[-s,-u,0]),this.mercatorMatrix=d.K([],h,[this.worldSize,this.worldSize,this.worldSize]),d.K(h,h,[1,1,this._pixelPerMeter]),this.pixelMatrix=d.L(new Float64Array(16),this.labelPlaneMatrix,h),d.J(h,h,[0,0,-this.elevation]),this.modelViewProjectionMatrix=h,this.invModelViewProjectionMatrix=d.as([],h),this.fogMatrix=new Float64Array(16),d.b6(this.fogMatrix,this._fov,this.width/this.height,f,this.farZ),this.fogMatrix[8]=2*-t.x/this.width,this.fogMatrix[9]=2*t.y/this.height,d.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),d.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),d.b7(this.fogMatrix,this.fogMatrix,this._pitch),d.ad(this.fogMatrix,this.fogMatrix,this.angle),d.J(this.fogMatrix,this.fogMatrix,[-s,-u,0]),d.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),d.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=d.L(new Float64Array(16),this.labelPlaneMatrix,h);const Q=this.width%2/2,te=this.height%2/2,ie=Math.cos(this.angle),H=Math.sin(this.angle),le=s-Math.round(s)+ie*Q+H*te,ue=u-Math.round(u)+ie*te+H*Q,me=new Float64Array(h);if(d.J(me,me,[le>.5?le-1:le,ue>.5?ue-1:ue,0]),this.alignedModelViewProjectionMatrix=me,h=d.as(new Float64Array(16),this.pixelMatrix),!h)throw new Error("failed to invert matrix");this.pixelMatrixInverse=h,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const t=this.pointCoordinate(new d.P(0,0)),s=[t.x*this.worldSize,t.y*this.worldSize,0,1];return d.af(s,s,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new d.P(0,t))}getCameraQueryGeometry(t){const s=this.getCameraPoint();if(t.length===1)return[t[0],s];{let u=s.x,h=s.y,f=s.x,w=s.y;for(const T of t)u=Math.min(u,T.x),h=Math.min(h,T.y),f=Math.max(f,T.x),w=Math.max(w,T.y);return[new d.P(u,h),new d.P(f,h),new d.P(f,w),new d.P(u,w),new d.P(u,h)]}}lngLatToCameraDepth(t,s){const u=this.locationCoordinate(t),h=[u.x*this.worldSize,u.y*this.worldSize,s,1];return d.af(h,h,this.modelViewProjectionMatrix),h[2]/h[3]}}function tl(m,t){let s,u=!1,h=null,f=null;const w=()=>{h=null,u&&(m.apply(f,s),h=setTimeout(w,t),u=!1)};return(...T)=>(u=!0,f=this,s=T,h||w(),h)}class tc{constructor(t){this._getCurrentHash=()=>{const s=window.location.hash.replace("#","");if(this._hashName){let u;return s.split("&").map(h=>h.split("=")).forEach(h=>{h[0]===this._hashName&&(u=h)}),(u&&u[1]||"").split("/")}return s.split("/")},this._onHashChange=()=>{const s=this._getCurrentHash();if(s.length>=3&&!s.some(u=>isNaN(u))){const u=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(s[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+s[2],+s[1]],zoom:+s[0],bearing:u,pitch:+(s[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const s=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,s)},this._removeHash=()=>{const s=this._getCurrentHash();if(s.length===0)return;const u=s.join("/");let h=u;h.split("&").length>0&&(h=h.split("&")[0]),this._hashName&&(h=`${this._hashName}=${u}`);let f=window.location.hash.replace(h,"");f.startsWith("#&")?f=f.slice(0,1)+f.slice(2):f==="#"&&(f="");let w=window.location.href.replace(/(#.+)?$/,f);w=w.replace("&&","&"),window.history.replaceState(window.history.state,null,w)},this._updateHash=tl(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()),this._removeHash(),delete this._map,this}getHashString(t){const s=this._map.getCenter(),u=Math.round(100*this._map.getZoom())/100,h=Math.ceil((u*Math.LN2+Math.log(512/360/.5))/Math.LN10),f=Math.pow(10,h),w=Math.round(s.lng*f)/f,T=Math.round(s.lat*f)/f,k=this._map.getBearing(),E=this._map.getPitch();let A="";if(A+=t?`/${w}/${T}/${u}`:`${u}/${T}/${w}`,(k||E)&&(A+="/"+Math.round(10*k)/10),E&&(A+=`/${Math.round(E)}`),this._hashName){const M=this._hashName;let F=!1;const j=window.location.hash.slice(1).split("&").map(Z=>{const X=Z.split("=")[0];return X===M?(F=!0,`${X}=${A}`):Z}).filter(Z=>Z);return F||j.push(`${M}=${A}`),`#${j.join("&")}`}return`#${A}`}}const rc={linearity:.3,easing:d.b8(0,0,.3,1)},Gu=d.e({deceleration:2500,maxSpeed:1400},rc),_g=d.e({deceleration:20,maxSpeed:1400},rc),sp=d.e({deceleration:1e3,maxSpeed:360},rc),nc=d.e({deceleration:1e3,maxSpeed:90},rc);class Hu{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:q.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,s=q.now();for(;t.length>0&&s-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const s={zoom:0,bearing:0,pitch:0,pan:new d.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:f}of this._inertiaBuffer)s.zoom+=f.zoomDelta||0,s.bearing+=f.bearingDelta||0,s.pitch+=f.pitchDelta||0,f.panDelta&&s.pan._add(f.panDelta),f.around&&(s.around=f.around),f.pinchAround&&(s.pinchAround=f.pinchAround);const u=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,h={};if(s.pan.mag()){const f=nl(s.pan.mag(),u,d.e({},Gu,t||{}));h.offset=s.pan.mult(f.amount/s.pan.mag()),h.center=this._map.transform.center,rl(h,f)}if(s.zoom){const f=nl(s.zoom,u,_g);h.zoom=this._map.transform.zoom+f.amount,rl(h,f)}if(s.bearing){const f=nl(s.bearing,u,sp);h.bearing=this._map.transform.bearing+d.ac(f.amount,-179,179),rl(h,f)}if(s.pitch){const f=nl(s.pitch,u,nc);h.pitch=this._map.transform.pitch+f.amount,rl(h,f)}if(h.zoom||h.bearing){const f=s.pinchAround===void 0?s.around:s.pinchAround;h.around=f?this._map.unproject(f):this._map.getCenter()}return this.clear(),d.e(h,{noMoveStart:!0})}}function rl(m,t){(!m.duration||m.durations.unproject(k)),T=f.reduce((k,E,A,M)=>k.add(E.div(M.length)),new d.P(0,0));super(t,{points:f,point:T,lngLats:w,lngLat:s.unproject(T),originalEvent:u}),this._defaultPrevented=!1}}class ap extends d.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,s,u){super(t,{originalEvent:u}),this._defaultPrevented=!1}}class lp{constructor(t,s){this._map=t,this._clickTolerance=s.clickTolerance}reset(){delete this._mousedownPos}wheel(t){return this._firePreventable(new ap(t.type,this._map,t))}mousedown(t,s){return this._mousedownPos=s,this._firePreventable(new cn(t.type,this._map,t))}mouseup(t){this._map.fire(new cn(t.type,this._map,t))}click(t,s){this._mousedownPos&&this._mousedownPos.dist(s)>=this._clickTolerance||this._map.fire(new cn(t.type,this._map,t))}dblclick(t){return this._firePreventable(new cn(t.type,this._map,t))}mouseover(t){this._map.fire(new cn(t.type,this._map,t))}mouseout(t){this._map.fire(new cn(t.type,this._map,t))}touchstart(t){return this._firePreventable(new bs(t.type,this._map,t))}touchmove(t){this._map.fire(new bs(t.type,this._map,t))}touchend(t){this._map.fire(new bs(t.type,this._map,t))}touchcancel(t){this._map.fire(new bs(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Sr{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(t){this._map.fire(new cn(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new cn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._ignoreContextMenu||this._map.fire(new cn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Li{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(d.P.convert(t),this._map.terrain)}}class Jn{constructor(t,s){this._map=t,this._tr=new Li(t),this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=s.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,s){this.isEnabled()&&t.shiftKey&&t.button===0&&($.disableDrag(),this._startPos=this._lastPos=s,this._active=!0)}mousemoveWindow(t,s){if(!this._active)return;const u=s;if(this._lastPos.equals(u)||!this._box&&u.dist(this._startPos)f.fitScreenCoordinates(u,h,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&&($.remove(this._box),this._box=null),$.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,s){return this._map.fire(new d.k(t,{originalEvent:s}))}}function il(m,t){if(m.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${m.length}, points ${t.length}`);const s={};for(let u=0;uthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=t.timeStamp),u.length===this.numTouches&&(this.centroid=function(h){const f=new d.P(0,0);for(const w of h)f._add(w);return f.div(h.length)}(s),this.touches=il(u,s)))}touchmove(t,s,u){if(this.aborted||!this.centroid)return;const h=il(u,s);for(const f in this.touches){const w=h[f];(!w||w.dist(this.touches[f])>30)&&(this.aborted=!0)}}touchend(t,s,u){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),u.length===0){const h=!this.aborted&&this.centroid;if(this.reset(),h)return h}}}class ic{constructor(t){this.singleTap=new Wu(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(t,s,u){this.singleTap.touchstart(t,s,u)}touchmove(t,s,u){this.singleTap.touchmove(t,s,u)}touchend(t,s,u){const h=this.singleTap.touchend(t,s,u);if(h){const f=t.timeStamp-this.lastTime<500,w=!this.lastTap||this.lastTap.dist(h)<30;if(f&&w||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=h,this.count===this.numTaps)return this.reset(),h}}}class na{constructor(t){this._tr=new Li(t),this._zoomIn=new ic({numTouches:1,numTaps:2}),this._zoomOut=new ic({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,s,u){this._zoomIn.touchstart(t,s,u),this._zoomOut.touchstart(t,s,u)}touchmove(t,s,u){this._zoomIn.touchmove(t,s,u),this._zoomOut.touchmove(t,s,u)}touchend(t,s,u){const h=this._zoomIn.touchend(t,s,u),f=this._zoomOut.touchend(t,s,u),w=this._tr;return h?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:T=>T.easeTo({duration:300,zoom:w.zoom+1,around:w.unproject(h)},{originalEvent:t})}):f?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:T=>T.easeTo({duration:300,zoom:w.zoom-1,around:w.unproject(f)},{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 Ao{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 s=this._moveFunction(...t);if(s.bearingDelta||s.pitchDelta||s.around||s.panDelta)return this._active=!0,s}dragStart(t,s){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(t)&&(this._moveStateManager.startMove(t),this._lastPoint=s.length?s[0]:s,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(t,s){if(!this.isEnabled())return;const u=this._lastPoint;if(!u)return;if(t.preventDefault(),!this._moveStateManager.isValidMoveEvent(t))return void this.reset(t);const h=s.length?s[0]:s;return!this._moved&&h.dist(u){m.mousedown=m.dragStart,m.mousemoveWindow=m.dragMove,m.mouseup=m.dragEnd,m.contextmenu=t=>{t.preventDefault()}},Yu=({enable:m,clickTolerance:t,bearingDegreesPerPixelMoved:s=.8})=>{const u=new oc({checkCorrectEvent:h=>$.mouseButton(h)===0&&h.ctrlKey||$.mouseButton(h)===2});return new Ao({clickTolerance:t,move:(h,f)=>({bearingDelta:(f.x-h.x)*s}),moveStateManager:u,enable:m,assignEvents:sc})},Ju=({enable:m,clickTolerance:t,pitchDegreesPerPixelMoved:s=-.5})=>{const u=new oc({checkCorrectEvent:h=>$.mouseButton(h)===0&&h.ctrlKey||$.mouseButton(h)===2});return new Ao({clickTolerance:t,move:(h,f)=>({pitchDelta:(f.y-h.y)*s}),moveStateManager:u,enable:m,assignEvents:sc})};class ws{constructor(t,s){this._clickTolerance=t.clickTolerance||1,this._map=s,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new d.P(0,0)}_shouldBePrevented(t){return t<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(t,s,u){return this._calculateTransform(t,s,u)}touchmove(t,s,u){if(this._active){if(!this._shouldBePrevented(u.length))return t.preventDefault(),this._calculateTransform(t,s,u);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",t)}}touchend(t,s,u){this._calculateTransform(t,s,u),this._active&&this._shouldBePrevented(u.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(t,s,u){u.length>0&&(this._active=!0);const h=il(u,s),f=new d.P(0,0),w=new d.P(0,0);let T=0;for(const E in h){const A=h[E],M=this._touches[E];M&&(f._add(A),w._add(A.sub(M)),T++,h[E]=A)}if(this._touches=h,this._shouldBePrevented(T)||!w.mag())return;const k=w.div(T);return this._sum._add(k),this._sum.mag()Math.abs(m.x)}class ia extends ac{constructor(t){super(),this._currentTouchCount=0,this._map=t}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(t,s,u){super.touchstart(t,s,u),this._currentTouchCount=u.length}_start(t){this._lastPoints=t,lc(t[0].sub(t[1]))&&(this._valid=!1)}_move(t,s,u){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const h=t[0].sub(this._lastPoints[0]),f=t[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(h,f,u.timeStamp),this._valid?(this._lastPoints=t,this._active=!0,{pitchDelta:(h.y+f.y)/2*-.5}):void 0}gestureBeginsVertically(t,s,u){if(this._valid!==void 0)return this._valid;const h=t.mag()>=2,f=s.mag()>=2;if(!h&&!f)return;if(!h||!f)return this._firstMove===void 0&&(this._firstMove=u),u-this._firstMove<100&&void 0;const w=t.y>0==s.y>0;return lc(t)&&lc(s)&&w}}const cp={panStep:100,bearingStep:15,pitchStep:10};class hi{constructor(t){this._tr=new Li(t);const s=cp;this._panStep=s.panStep,this._bearingStep=s.bearingStep,this._pitchStep=s.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let s=0,u=0,h=0,f=0,w=0;switch(t.keyCode){case 61:case 107:case 171:case 187:s=1;break;case 189:case 109:case 173:s=-1;break;case 37:t.shiftKey?u=-1:(t.preventDefault(),f=-1);break;case 39:t.shiftKey?u=1:(t.preventDefault(),f=1);break;case 38:t.shiftKey?h=1:(t.preventDefault(),w=-1);break;case 40:t.shiftKey?h=-1:(t.preventDefault(),w=1);break;default:return}return this._rotationDisabled&&(u=0,h=0),{cameraAnimation:T=>{const k=this._tr;T.easeTo({duration:300,easeId:"keyboardHandler",easing:oo,zoom:s?Math.round(k.zoom)+s*(t.shiftKey?2:1):k.zoom,bearing:k.bearing+u*this._bearingStep,pitch:k.pitch+h*this._pitchStep,offset:[-f*this._panStep,-w*this._panStep],center:k.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 oo(m){return m*(2-m)}const nh=4.000244140625;class Ri{constructor(t,s){this._onTimeout=u=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(u)},this._map=t,this._tr=new Li(t),this._triggerRenderFrame=s,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)}_shouldBePrevented(t){return!!this._map.cooperativeGestures.isEnabled()&&!(t.ctrlKey||this._map.cooperativeGestures.isBypassed(t))}wheel(t){if(!this.isEnabled())return;if(this._shouldBePrevented(t))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",t);let s=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const u=q.now(),h=u-(this._lastWheelEventTime||0);this._lastWheelEventTime=u,s!==0&&s%nh==0?this._type="wheel":s!==0&&Math.abs(s)<4?this._type="trackpad":h>400?(this._type=null,this._lastValue=s,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(h*s)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,s+=this._lastValue)),t.shiftKey&&s&&(s/=4),this._type&&(this._lastWheelEvent=t,this._delta-=s,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 s=$.mousePos(this._map.getCanvas(),t),u=this._tr;this._around=s.y>u.transform.height/2-u.transform.getHorizon()?d.N.convert(this._aroundCenter?u.center:u.unproject(s)):d.N.convert(u.center),this._aroundPoint=u.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 k=this._type==="wheel"&&Math.abs(this._delta)>nh?this._wheelZoomRate:this._defaultZoomRate;let E=2/(1+Math.exp(-Math.abs(this._delta*k)));this._delta<0&&E!==0&&(E=1/E);const A=typeof this._targetZoom=="number"?t.zoomScale(this._targetZoom):t.scale;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(A*E))),this._type==="wheel"&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const s=typeof this._targetZoom=="number"?this._targetZoom:t.zoom,u=this._startZoom,h=this._easing;let f,w=!1;const T=q.now()-this._lastWheelEventTime;if(this._type==="wheel"&&u&&h&&T){const k=Math.min(T/200,1),E=h(k);f=d.y.number(u,s,E),k<1?this._frameId||(this._frameId=!0):w=!0}else f=s,w=!0;return this._active=!0,w&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!w,zoomDelta:f-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let s=d.b9;if(this._prevEase){const u=this._prevEase,h=(q.now()-u.start)/u.duration,f=u.easing(h+.01)-u.easing(h),w=.27/Math.sqrt(f*f+1e-4)*.01,T=Math.sqrt(.0729-w*w);s=d.b8(w,T,.25,1)}return this._prevEase={start:q.now(),duration:t,easing:s},s}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ss{constructor(t,s){this._clickZoom=t,this._tapZoom=s}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 vg{constructor(t){this._tr=new Li(t),this.reset()}reset(){this._active=!1}dblclick(t,s){return t.preventDefault(),{cameraAnimation:u=>{u.easeTo({duration:300,zoom:this._tr.zoom+(t.shiftKey?-1:1),around:this._tr.unproject(s)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xg{constructor(){this._tap=new ic({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,s,u){if(!this._swipePoint)if(this._tapTime){const h=s[0],f=t.timeStamp-this._tapTime<500,w=this._tapPoint.dist(h)<30;f&&w?u.length>0&&(this._swipePoint=h,this._swipeTouch=u[0].identifier):this.reset()}else this._tap.touchstart(t,s,u)}touchmove(t,s,u){if(this._tapTime){if(this._swipePoint){if(u[0].identifier!==this._swipeTouch)return;const h=s[0],f=h.y-this._swipePoint.y;return this._swipePoint=h,t.preventDefault(),this._active=!0,{zoomDelta:f/128}}}else this._tap.touchmove(t,s,u)}touchend(t,s,u){if(this._tapTime)this._swipePoint&&u.length===0&&this.reset();else{const h=this._tap.touchend(t,s,u);h&&(this._tapTime=t.timeStamp,this._tapPoint=h)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class up{constructor(t,s,u){this._el=t,this._mousePan=s,this._touchPan=u}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 hp{constructor(t,s,u){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=s,this._mousePitch=u}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 ih{constructor(t,s,u,h){this._el=t,this._touchZoom=s,this._touchRotate=u,this._tapDragZoom=h,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()}}class oa{constructor(t,s){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=t,this._options=s,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const t=this._map.getCanvasContainer();t.classList.add("maplibregl-cooperative-gestures"),this._container=$.create("div","maplibregl-cooperative-gesture-screen",t);let s=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(s=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const u=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),h=document.createElement("div");h.className="maplibregl-desktop-message",h.textContent=s,this._container.appendChild(h);const f=document.createElement("div");f.className="maplibregl-mobile-message",f.textContent=u,this._container.appendChild(f),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&($.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(t){return t[this._bypassKey]}notifyGestureBlocked(t,s){this._enabled&&(this._map.fire(new d.k("cooperativegestureprevented",{gestureType:t,originalEvent:s})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const di=m=>m.zoom||m.drag||m.pitch||m.rotate;class Ke extends d.k{}function cc(m){return m.panDelta&&m.panDelta.mag()||m.zoomDelta||m.bearingDelta||m.pitchDelta}class oh{constructor(t,s){this.handleWindowEvent=h=>{this.handleEvent(h,`${h.type}Window`)},this.handleEvent=(h,f)=>{if(h.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const w=h.type==="renderFrame"?void 0:h,T={needsRenderFrame:!1},k={},E={},A=h.touches,M=A?this._getMapTouches(A):void 0,F=M?$.touchPos(this._map.getCanvas(),M):$.mousePos(this._map.getCanvas(),h);for(const{handlerName:X,handler:Q,allowed:te}of this._handlers){if(!Q.isEnabled())continue;let ie;this._blockedByActive(E,te,X)?Q.reset():Q[f||h.type]&&(ie=Q[f||h.type](h,F,M),this.mergeHandlerResult(T,k,ie,X,w),ie&&ie.needsRenderFrame&&this._triggerRenderFrame()),(ie||Q.isActive())&&(E[X]=Q)}const j={};for(const X in this._previousActiveHandlers)E[X]||(j[X]=w);this._previousActiveHandlers=E,(Object.keys(j).length||cc(T))&&(this._changes.push([T,k,j]),this._triggerRenderFrame()),(Object.keys(E).length||cc(T))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:Z}=T;Z&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Z(this._map))},this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Hu(t),this._bearingSnap=s.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(s);const u=this._el;this._listeners=[[u,"touchstart",{passive:!0}],[u,"touchmove",{passive:!1}],[u,"touchend",void 0],[u,"touchcancel",void 0],[u,"mousedown",void 0],[u,"mousemove",void 0],[u,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[u,"mouseover",void 0],[u,"mouseout",void 0],[u,"dblclick",void 0],[u,"click",void 0],[u,"keydown",{capture:!1}],[u,"keyup",void 0],[u,"wheel",{passive:!1}],[u,"contextmenu",void 0],[window,"blur",void 0]];for(const[h,f,w]of this._listeners)$.addEventListener(h,f,h===document?this.handleWindowEvent:this.handleEvent,w)}destroy(){for(const[t,s,u]of this._listeners)$.removeEventListener(t,s,t===document?this.handleWindowEvent:this.handleEvent,u)}_addDefaultHandlers(t){const s=this._map,u=s.getCanvasContainer();this._add("mapEvent",new lp(s,t));const h=s.boxZoom=new Jn(s,t);this._add("boxZoom",h),t.interactive&&t.boxZoom&&h.enable();const f=s.cooperativeGestures=new oa(s,t.cooperativeGestures);this._add("cooperativeGestures",f),t.cooperativeGestures&&f.enable();const w=new na(s),T=new vg(s);s.doubleClickZoom=new Ss(T,w),this._add("tapZoom",w),this._add("clickZoom",T),t.interactive&&t.doubleClickZoom&&s.doubleClickZoom.enable();const k=new xg;this._add("tapDragZoom",k);const E=s.touchPitch=new ia(s);this._add("touchPitch",E),t.interactive&&t.touchPitch&&s.touchPitch.enable(t.touchPitch);const A=Yu(t),M=Ju(t);s.dragRotate=new hp(t,A,M),this._add("mouseRotate",A,["mousePitch"]),this._add("mousePitch",M,["mouseRotate"]),t.interactive&&t.dragRotate&&s.dragRotate.enable();const F=(({enable:ie,clickTolerance:H})=>{const le=new oc({checkCorrectEvent:ue=>$.mouseButton(ue)===0&&!ue.ctrlKey});return new Ao({clickTolerance:H,move:(ue,me)=>({around:me,panDelta:me.sub(ue)}),activateOnStart:!0,moveStateManager:le,enable:ie,assignEvents:sc})})(t),j=new ws(t,s);s.dragPan=new up(u,F,j),this._add("mousePan",F),this._add("touchPan",j,["touchZoom","touchRotate"]),t.interactive&&t.dragPan&&s.dragPan.enable(t.dragPan);const Z=new rh,X=new eh;s.touchZoomRotate=new ih(u,X,Z,k),this._add("touchRotate",Z,["touchPan","touchZoom"]),this._add("touchZoom",X,["touchPan","touchRotate"]),t.interactive&&t.touchZoomRotate&&s.touchZoomRotate.enable(t.touchZoomRotate);const Q=s.scrollZoom=new Ri(s,()=>this._triggerRenderFrame());this._add("scrollZoom",Q,["mousePan"]),t.interactive&&t.scrollZoom&&s.scrollZoom.enable(t.scrollZoom);const te=s.keyboard=new hi(s);this._add("keyboard",te),t.interactive&&t.keyboard&&s.keyboard.enable(),this._add("blockableMapEvent",new Sr(s))}_add(t,s,u){this._handlers.push({handlerName:t,handler:s,allowed:u}),this._handlersById[t]=s}stop(t){if(!this._updatingCamera){for(const{handler:s}of this._handlers)s.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!!di(this._eventsInProgress)||this.isZooming()}_blockedByActive(t,s,u){for(const h in t)if(h!==u&&(!s||s.indexOf(h)<0))return!0;return!1}_getMapTouches(t){const s=[];for(const u of t)this._el.contains(u.target)&&s.push(u);return s}mergeHandlerResult(t,s,u,h,f){if(!u)return;d.e(t,u);const w={handlerName:h,originalEvent:u.originalEvent||f};u.zoomDelta!==void 0&&(s.zoom=w),u.panDelta!==void 0&&(s.drag=w),u.pitchDelta!==void 0&&(s.pitch=w),u.bearingDelta!==void 0&&(s.rotate=w)}_applyChanges(){const t={},s={},u={};for(const[h,f,w]of this._changes)h.panDelta&&(t.panDelta=(t.panDelta||new d.P(0,0))._add(h.panDelta)),h.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+h.zoomDelta),h.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+h.bearingDelta),h.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+h.pitchDelta),h.around!==void 0&&(t.around=h.around),h.pinchAround!==void 0&&(t.pinchAround=h.pinchAround),h.noInertia&&(t.noInertia=h.noInertia),d.e(s,f),d.e(u,w);this._updateMapTransform(t,s,u),this._changes=[]}_updateMapTransform(t,s,u){const h=this._map,f=h._getTransformForUpdate(),w=h.terrain;if(!(cc(t)||w&&this._terrainMovement))return this._fireEvents(s,u,!0);let{panDelta:T,zoomDelta:k,bearingDelta:E,pitchDelta:A,around:M,pinchAround:F}=t;F!==void 0&&(M=F),h._stop(!0),M=M||h.transform.centerPoint;const j=f.pointLocation(T?M.sub(T):M);E&&(f.bearing+=E),A&&(f.pitch+=A),k&&(f.zoom+=k),w?this._terrainMovement||!s.drag&&!s.zoom?s.drag&&this._terrainMovement?f.center=f.pointLocation(f.centerPoint.sub(T)):f.setLocationAtPoint(j,M):(this._terrainMovement=!0,this._map._elevationFreeze=!0,f.setLocationAtPoint(j,M)):f.setLocationAtPoint(j,M),h._applyUpdatedTransform(f),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(s,u,!0)}_fireEvents(t,s,u){const h=di(this._eventsInProgress),f=di(t),w={};for(const M in t){const{originalEvent:F}=t[M];this._eventsInProgress[M]||(w[`${M}start`]=F),this._eventsInProgress[M]=t[M]}!h&&f&&this._fireEvent("movestart",f.originalEvent);for(const M in w)this._fireEvent(M,w[M]);f&&this._fireEvent("move",f.originalEvent);for(const M in t){const{originalEvent:F}=t[M];this._fireEvent(M,F)}const T={};let k;for(const M in this._eventsInProgress){const{handlerName:F,originalEvent:j}=this._eventsInProgress[M];this._handlersById[F].isActive()||(delete this._eventsInProgress[M],k=s[F]||j,T[`${M}end`]=k)}for(const M in T)this._fireEvent(M,T[M]);const E=di(this._eventsInProgress),A=(h||f)&&!E;if(A&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const M=this._map._getTransformForUpdate();M.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(M)}if(u&&A){this._updatingCamera=!0;const M=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),F=j=>j!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Ke("renderFrame",{timeStamp:t})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class dp extends d.E{constructor(t,s){super(),this._renderFrameCallback=()=>{const u=Math.min((q.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=s.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new d.N(this.transform.center.lng,this.transform.center.lat)}setCenter(t,s){return this.jumpTo({center:t},s)}panBy(t,s,u){return t=d.P.convert(t).mult(-1),this.panTo(this.transform.center,d.e({offset:t},s),u)}panTo(t,s,u){return this.easeTo(d.e({center:t},s),u)}getZoom(){return this.transform.zoom}setZoom(t,s){return this.jumpTo({zoom:t},s),this}zoomTo(t,s,u){return this.easeTo(d.e({zoom:t},s),u)}zoomIn(t,s){return this.zoomTo(this.getZoom()+1,t,s),this}zoomOut(t,s){return this.zoomTo(this.getZoom()-1,t,s),this}getBearing(){return this.transform.bearing}setBearing(t,s){return this.jumpTo({bearing:t},s),this}getPadding(){return this.transform.padding}setPadding(t,s){return this.jumpTo({padding:t},s),this}rotateTo(t,s,u){return this.easeTo(d.e({bearing:t},s),u)}resetNorth(t,s){return this.rotateTo(0,d.e({duration:1e3},t),s),this}resetNorthPitch(t,s){return this.easeTo(d.e({bearing:0,pitch:0,duration:1e3},t),s),this}snapToNorth(t,s){return Math.abs(this.getBearing()){if(this._zooming&&(h.zoom=d.y.number(f,Q,Te)),this._rotating&&(h.bearing=d.y.number(w,E,Te)),this._pitching&&(h.pitch=d.y.number(T,A,Te)),this._padding&&(h.interpolatePadding(k,M,Te),j=h.centerPoint.add(F)),this.terrain&&!t.freezeElevation&&this._updateElevation(Te),le)h.setLocationAtPoint(le,ue);else{const Ae=h.zoomScale(h.zoom-f),Ne=Q>f?Math.min(2,H):Math.max(.5,H),Ge=Math.pow(Ne,1-Te),De=h.unproject(te.add(ie.mult(Te*Ge)).mult(Ae));h.setLocationAtPoint(h.renderWorldCopies?De.wrap():De,j)}this._applyUpdatedTransform(h),this._fireMoveEvents(s)},Te=>{this.terrain&&t.freezeElevation&&this._finalizeElevation(),this._afterEase(s,Te)},t),this}_prepareEase(t,s,u={}){this._moving=!0,s||u.moving||this.fire(new d.k("movestart",t)),this._zooming&&!u.zooming&&this.fire(new d.k("zoomstart",t)),this._rotating&&!u.rotating&&this.fire(new d.k("rotatestart",t)),this._pitching&&!u.pitching&&this.fire(new d.k("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.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const s=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(t<1&&s!==this._elevationTarget){const u=this._elevationTarget-this._elevationStart;this._elevationStart+=t*(u-(s-(u*t+this._elevationStart))/(1-t)),this._elevationTarget=s}this.transform.elevation=d.y.number(this._elevationStart,this._elevationTarget,t)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(t){const s=t.getCameraPosition(),u=this.terrain.getElevationForLngLatZoom(s.lngLat,t.zoom);if(s.altitudethis._elevateCameraIfInsideTerrain(h)),this.transformCameraUpdate&&s.push(h=>this.transformCameraUpdate(h)),!s.length)return;const u=t.clone();for(const h of s){const f=u.clone(),{center:w,zoom:T,pitch:k,bearing:E,elevation:A}=h(f);w&&(f.center=w),T!==void 0&&(f.zoom=T),k!==void 0&&(f.pitch=k),E!==void 0&&(f.bearing=E),A!==void 0&&(f.elevation=A),u.apply(f)}this.transform.apply(u)}_fireMoveEvents(t){this.fire(new d.k("move",t)),this._zooming&&this.fire(new d.k("zoom",t)),this._rotating&&this.fire(new d.k("rotate",t)),this._pitching&&this.fire(new d.k("pitch",t))}_afterEase(t,s){if(this._easeId&&s&&this._easeId===s)return;delete this._easeId;const u=this._zooming,h=this._rotating,f=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,u&&this.fire(new d.k("zoomend",t)),h&&this.fire(new d.k("rotateend",t)),f&&this.fire(new d.k("pitchend",t)),this.fire(new d.k("moveend",t))}flyTo(t,s){var u;if(!t.essential&&q.prefersReducedMotion){const je=d.M(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(je,s)}this.stop(),t=d.e({offset:[0,0],speed:1.2,curve:1.42,easing:d.b9},t);const h=this._getTransformForUpdate(),f=h.zoom,w=h.bearing,T=h.pitch,k=h.padding,E="bearing"in t?this._normalizeBearing(t.bearing,w):w,A="pitch"in t?+t.pitch:T,M="padding"in t?t.padding:h.padding,F=d.P.convert(t.offset);let j=h.centerPoint.add(F);const Z=h.pointLocation(j),{center:X,zoom:Q}=h.getConstrained(d.N.convert(t.center||Z),(u=t.zoom)!==null&&u!==void 0?u:f);this._normalizeCenter(X,h);const te=h.zoomScale(Q-f),ie=h.project(Z),H=h.project(X).sub(ie);let le=t.curve;const ue=Math.max(h.width,h.height),me=ue/te,Te=H.mag();if("minZoom"in t){const je=d.ac(Math.min(t.minZoom,f,Q),h.minZoom,h.maxZoom),pt=ue/h.zoomScale(je-f);le=Math.sqrt(pt/Te*2)}const Ae=le*le;function Ne(je){const pt=(me*me-ue*ue+(je?-1:1)*Ae*Ae*Te*Te)/(2*(je?me:ue)*Ae*Te);return Math.log(Math.sqrt(pt*pt+1)-pt)}function Ge(je){return(Math.exp(je)-Math.exp(-je))/2}function De(je){return(Math.exp(je)+Math.exp(-je))/2}const Re=Ne(!1);let Je=function(je){return De(Re)/De(Re+le*je)},_t=function(je){return ue*((De(Re)*(Ge(pt=Re+le*je)/De(pt))-Ge(Re))/Ae)/Te;var pt},Fe=(Ne(!0)-Re)/le;if(Math.abs(Te)<1e-6||!isFinite(Fe)){if(Math.abs(ue-me)<1e-6)return this.easeTo(t,s);const je=me0,Je=pt=>Math.exp(je*le*pt)}return t.duration="duration"in t?+t.duration:1e3*Fe/("screenSpeed"in t?+t.screenSpeed/le:+t.speed),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=w!==E,this._pitching=A!==T,this._padding=!h.isPaddingEqual(M),this._prepareEase(s,!1),this.terrain&&this._prepareElevation(X),this._ease(je=>{const pt=je*Fe,lr=1/Je(pt);h.zoom=je===1?Q:f+h.scaleZoom(lr),this._rotating&&(h.bearing=d.y.number(w,E,je)),this._pitching&&(h.pitch=d.y.number(T,A,je)),this._padding&&(h.interpolatePadding(k,M,je),j=h.centerPoint.add(F)),this.terrain&&!t.freezeElevation&&this._updateElevation(je);const wt=je===1?X:h.unproject(ie.add(H.mult(_t(pt))).mult(lr));h.setLocationAtPoint(h.renderWorldCopies?wt.wrap():wt,j),this._applyUpdatedTransform(h),this._fireMoveEvents(s)},()=>{this.terrain&&t.freezeElevation&&this._finalizeElevation(),this._afterEase(s)},t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,s){var u;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const h=this._onEaseEnd;delete this._onEaseEnd,h.call(this,s)}return t||(u=this.handlers)===null||u===void 0||u.stop(!1),this}_ease(t,s,u){u.animate===!1||u.duration===0?(t(1),s()):(this._easeStart=q.now(),this._easeOptions=u,this._onEaseFrame=t,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(t,s){t=d.b3(t,-180,180);const u=Math.abs(t-s);return Math.abs(t-360-s)180?-360:u<-180?360:0}queryTerrainElevation(t){return this.terrain?this.terrain.getElevationForLngLatZoom(d.N.convert(t),this.transform.tileZoom)-this.transform.elevation:null}}const sa={compact:!0,customAttribution:'MapLibre'};class aa{constructor(t=sa){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=s=>{!s||s.sourceDataType!=="metadata"&&s.sourceDataType!=="visibility"&&s.dataType!=="style"&&s.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.compact,this._container=$.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=$.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=$.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(){$.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,s){const u=this._map._getUIString(`AttributionControl.${s}`);t.title=u,t.setAttribute("aria-label",u)}_updateAttributions(){if(!this._map.style)return;let t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(h=>typeof h!="string"?"":h)):typeof this.options.customAttribution=="string"&&t.push(this.options.customAttribution)),this._map.style.stylesheet){const h=this._map.style.stylesheet;this.styleOwner=h.owner,this.styleId=h.id}const s=this._map.style.sourceCaches;for(const h in s){const f=s[h];if(f.used||f.usedForTerrain){const w=f.getSource();w.attribution&&t.indexOf(w.attribution)<0&&t.push(w.attribution)}}t=t.filter(h=>String(h).trim()),t.sort((h,f)=>h.length-f.length),t=t.filter((h,f)=>{for(let w=f+1;w=0)return!1;return!0});const u=t.join(" | ");u!==this._attribHTML&&(this._attribHTML=u,t.length?(this._innerContainer.innerHTML=u,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class sh{constructor(t={}){this._updateCompact=()=>{const s=this._container.children;if(s.length){const u=s[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&u.classList.add("maplibregl-compact"):u.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=$.create("div","maplibregl-ctrl");const s=$.create("a","maplibregl-ctrl-logo");return s.target="_blank",s.rel="noopener nofollow",s.href="https://maplibre.org/",s.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),s.setAttribute("rel","noopener nofollow"),this._container.appendChild(s),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){$.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class At{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const s=++this._id;return this._queue.push({callback:t,id:s,cancelled:!1}),s}remove(t){const s=this._currentlyRunning,u=s?this._queue.concat(s):this._queue;for(const h of u)if(h.id===t)return void(h.cancelled=!0)}run(t=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const s=this._currentlyRunning=this._queue;this._queue=[];for(const u of s)if(!u.cancelled&&(u.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ah=d.Y([{name:"a_pos3d",type:"Int16",components:3}]);class bg extends d.E{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,s){this.sourceCache.update(t,s),this._renderableTilesKeys=[];const u={};for(const h of t.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:s}))u[h.key]=!0,this._renderableTilesKeys.push(h.key),this._tiles[h.key]||(h.posMatrix=new Float64Array(16),d.aP(h.posMatrix,0,d.X,0,d.X,0,1),this._tiles[h.key]=new Ei(h,this.tileSize));for(const h in this._tiles)u[h]||delete this._tiles[h]}freeRtt(t){for(const s in this._tiles){const u=this._tiles[s];(!t||u.tileID.equals(t)||u.tileID.isChildOf(t)||t.isChildOf(u.tileID))&&(u.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(t=>this.getTileByID(t))}getTileByID(t){return this._tiles[t]}getTerrainCoords(t){const s={};for(const u of this._renderableTilesKeys){const h=this._tiles[u].tileID;if(h.canonical.equals(t.canonical)){const f=t.clone();f.posMatrix=new Float64Array(16),d.aP(f.posMatrix,0,d.X,0,d.X,0,1),s[u]=f}else if(h.canonical.isChildOf(t.canonical)){const f=t.clone();f.posMatrix=new Float64Array(16);const w=h.canonical.z-t.canonical.z,T=h.canonical.x-(h.canonical.x>>w<>w<>w;d.aP(f.posMatrix,0,E,0,E,0,1),d.J(f.posMatrix,f.posMatrix,[-T*E,-k*E,0]),s[u]=f}else if(t.canonical.isChildOf(h.canonical)){const f=t.clone();f.posMatrix=new Float64Array(16);const w=t.canonical.z-h.canonical.z,T=t.canonical.x-(t.canonical.x>>w<>w<>w;d.aP(f.posMatrix,0,d.X,0,d.X,0,1),d.J(f.posMatrix,f.posMatrix,[T*E,k*E,0]),d.K(f.posMatrix,f.posMatrix,[1/2**w,1/2**w,0]),s[u]=f}}return s}getSourceTile(t,s){const u=this.sourceCache._source;let h=t.overscaledZ-this.deltaZoom;if(h>u.maxzoom&&(h=u.maxzoom),h=u.minzoom&&(!f||!f.dem);)f=this.sourceCache.getTileByID(t.scaledTo(h--).key);return f}tilesAfterTime(t=Date.now()){return Object.values(this._tiles).filter(s=>s.timeAdded>=t)}}class lh{constructor(t,s,u){this.painter=t,this.sourceCache=new bg(s),this.options=u,this.exaggeration=typeof u.exaggeration=="number"?u.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(t,s,u,h=d.X){var f;if(!(s>=0&&s=0&&ut.canonical.z&&(t.canonical.z>=h?f=t.canonical.z-h:d.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const w=t.canonical.x-(t.canonical.x>>f<>f<>8<<4|f>>8,s[w+3]=0;const u=new d.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(s.buffer)),h=new ot(t,u,t.gl.RGBA,{premultiply:!1});return h.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=h,h}pointCoordinate(t){this.painter.maybeDrawDepthAndCoords(!0);const s=new Uint8Array(4),u=this.painter.context,h=u.gl,f=Math.round(t.x*this.painter.pixelRatio/devicePixelRatio),w=Math.round(t.y*this.painter.pixelRatio/devicePixelRatio),T=Math.round(this.painter.height/devicePixelRatio);u.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),h.readPixels(f,T-w-1,1,1,h.RGBA,h.UNSIGNED_BYTE,s),u.bindFramebuffer.set(null);const k=s[0]+(s[2]>>4<<8),E=s[1]+((15&s[2])<<8),A=this.coordsIndex[255-s[3]],M=A&&this.sourceCache.getTileByID(A);if(!M)return null;const F=this._coordsTextureSize,j=(1<t.id!==s),this._recentlyUsed.push(t.id)}stampObject(t){t.stamp=++this._stamp}getOrCreateFreeObject(){for(const s of this._recentlyUsed)if(!this._objects[s].inUse)return this._objects[s];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 la={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class pp{constructor(t,s){this.painter=t,this.terrain=s,this.pool=new wg(t.context,30,s.sourceCache.tileSize*s.qualityFactor)}destruct(){this.pool.destruct()}getTexture(t){return this.pool.getObjectForId(t.rtt[this._stacks.length-1].id).texture}prepareForRender(t,s){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=t._order.filter(u=>!t._layers[u].isHidden(s)),this._coordsDescendingInv={};for(const u in t.sourceCaches){this._coordsDescendingInv[u]={};const h=t.sourceCaches[u].getVisibleCoordinates();for(const f of h){const w=this.terrain.sourceCache.getTerrainCoords(f);for(const T in w)this._coordsDescendingInv[u][T]||(this._coordsDescendingInv[u][T]=[]),this._coordsDescendingInv[u][T].push(w[T])}}this._coordsDescendingInvStr={};for(const u of t._order){const h=t._layers[u],f=h.source;if(la[h.type]&&!this._coordsDescendingInvStr[f]){this._coordsDescendingInvStr[f]={};for(const w in this._coordsDescendingInv[f])this._coordsDescendingInvStr[f][w]=this._coordsDescendingInv[f][w].map(T=>T.key).sort().join()}}for(const u of this._renderableTiles)for(const h in this._coordsDescendingInvStr){const f=this._coordsDescendingInvStr[h][u.tileID.key];f&&f!==u.rttCoords[h]&&(u.rtt=[])}}renderLayer(t){if(t.isHidden(this.painter.transform.zoom))return!1;const s=t.type,u=this.painter,h=this._renderableLayerIds[this._renderableLayerIds.length-1]===t.id;if(la[s]&&(this._prevType&&la[this._prevType]||this._stacks.push([]),this._prevType=s,this._stacks[this._stacks.length-1].push(t.id),!h))return!0;if(la[this._prevType]||la[s]&&h){this._prevType=s;const f=this._stacks.length-1,w=this._stacks[f]||[];for(const T of this._renderableTiles){if(this.pool.isFull()&&(op(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(T),T.rtt[f]){const E=this.pool.getObjectForId(T.rtt[f].id);if(E.stamp===T.rtt[f].stamp){this.pool.useObject(E);continue}}const k=this.pool.getOrCreateFreeObject();this.pool.useObject(k),this.pool.stampObject(k),T.rtt[f]={id:k.id,stamp:k.stamp},u.context.bindFramebuffer.set(k.fbo.framebuffer),u.context.clear({color:d.aM.transparent,stencil:0}),u.currentStencilSource=void 0;for(let E=0;E{m.touchstart=m.dragStart,m.touchmoveWindow=m.dragMove,m.touchend=m.dragEnd},Tg={showCompass:!0,showZoom:!0,visualizePitch:!1};class kg{constructor(t,s,u=!1){this.mousedown=w=>{this.startMouse(d.e({},w,{ctrlKey:!0,preventDefault:()=>w.preventDefault()}),$.mousePos(this.element,w)),$.addEventListener(window,"mousemove",this.mousemove),$.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=w=>{this.moveMouse(w,$.mousePos(this.element,w))},this.mouseup=w=>{this.mouseRotate.dragEnd(w),this.mousePitch&&this.mousePitch.dragEnd(w),this.offTemp()},this.touchstart=w=>{w.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=$.touchPos(this.element,w.targetTouches)[0],this.startTouch(w,this._startPos),$.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),$.addEventListener(window,"touchend",this.touchend))},this.touchmove=w=>{w.targetTouches.length!==1?this.reset():(this._lastPos=$.touchPos(this.element,w.targetTouches)[0],this.moveTouch(w,this._lastPos))},this.touchend=w=>{w.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 h=t.dragRotate._mouseRotate.getClickTolerance(),f=t.dragRotate._mousePitch.getClickTolerance();this.element=s,this.mouseRotate=Yu({clickTolerance:h,enable:!0}),this.touchRotate=(({enable:w,clickTolerance:T,bearingDegreesPerPixelMoved:k=.8})=>{const E=new Xu;return new Ao({clickTolerance:T,move:(A,M)=>({bearingDelta:(M.x-A.x)*k}),moveStateManager:E,enable:w,assignEvents:uh})})({clickTolerance:h,enable:!0}),this.map=t,u&&(this.mousePitch=Ju({clickTolerance:f,enable:!0}),this.touchPitch=(({enable:w,clickTolerance:T,pitchDegreesPerPixelMoved:k=-.5})=>{const E=new Xu;return new Ao({clickTolerance:T,move:(A,M)=>({pitchDelta:(M.y-A.y)*k}),moveStateManager:E,enable:w,assignEvents:uh})})({clickTolerance:f,enable:!0})),$.addEventListener(s,"mousedown",this.mousedown),$.addEventListener(s,"touchstart",this.touchstart,{passive:!1}),$.addEventListener(s,"touchcancel",this.reset)}startMouse(t,s){this.mouseRotate.dragStart(t,s),this.mousePitch&&this.mousePitch.dragStart(t,s),$.disableDrag()}startTouch(t,s){this.touchRotate.dragStart(t,s),this.touchPitch&&this.touchPitch.dragStart(t,s),$.disableDrag()}moveMouse(t,s){const u=this.map,{bearingDelta:h}=this.mouseRotate.dragMove(t,s)||{};if(h&&u.setBearing(u.getBearing()+h),this.mousePitch){const{pitchDelta:f}=this.mousePitch.dragMove(t,s)||{};f&&u.setPitch(u.getPitch()+f)}}moveTouch(t,s){const u=this.map,{bearingDelta:h}=this.touchRotate.dragMove(t,s)||{};if(h&&u.setBearing(u.getBearing()+h),this.touchPitch){const{pitchDelta:f}=this.touchPitch.dragMove(t,s)||{};f&&u.setPitch(u.getPitch()+f)}}off(){const t=this.element;$.removeEventListener(t,"mousedown",this.mousedown),$.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),$.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),$.removeEventListener(window,"touchend",this.touchend),$.removeEventListener(t,"touchcancel",this.reset),this.offTemp()}offTemp(){$.enableDrag(),$.removeEventListener(window,"mousemove",this.mousemove),$.removeEventListener(window,"mouseup",this.mouseup),$.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),$.removeEventListener(window,"touchend",this.touchend)}}let Qn;function ar(m,t,s){const u=new d.N(m.lng,m.lat);if(m=new d.N(m.lng,m.lat),t){const h=new d.N(m.lng-360,m.lat),f=new d.N(m.lng+360,m.lat),w=s.locationPoint(m).distSqr(t);s.locationPoint(h).distSqr(t)180;){const h=s.locationPoint(m);if(h.x>=0&&h.y>=0&&h.x<=s.width&&h.y<=s.height)break;m.lng>s.center.lng?m.lng-=360:m.lng+=360}return m.lng!==u.lng&&s.locationPoint(m).y>s.height/2-s.getHorizon()?m:u}const ca={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 uc(m,t,s){const u=m.classList;for(const h in ca)u.remove(`maplibregl-${s}-anchor-${h}`);u.add(`maplibregl-${s}-anchor-${t}`)}class hc extends d.E{constructor(t){if(super(),this._onKeyPress=s=>{const u=s.code,h=s.charCode||s.keyCode;u!=="Space"&&u!=="Enter"&&h!==32&&h!==13||this.togglePopup()},this._onMapClick=s=>{const u=s.originalEvent.target,h=this._element;this._popup&&(u===h||h.contains(u))&&this.togglePopup()},this._update=s=>{var u;if(!this._map)return;const h=this._map.loaded()&&!this._map.isMoving();((s==null?void 0:s.type)==="terrain"||(s==null?void 0:s.type)==="render"&&!h)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?ar(this._lngLat,this._flatPos,this._map.transform):(u=this._lngLat)===null||u===void 0?void 0:u.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let f="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?f=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(f=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let w="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?w="rotateX(0deg)":this._pitchAlignment==="map"&&(w=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||s&&s.type!=="moveend"||(this._pos=this._pos.round()),$.setTransform(this._element,`${ca[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${w} ${f}`),q.frameAsync(new AbortController).then(()=>{this._updateOpacity(s&&s.type==="moveend")}).catch(()=>{})},this._onMove=s=>{if(!this._isDragging){const u=this._clickTolerance||this._map._clickTolerance;this._isDragging=s.point.dist(this._pointerdownPos)>=u}this._isDragging&&(this._pos=s.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 d.k("dragstart"))),this.fire(new d.k("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 d.k("dragend")),this._state="inactive"},this._addDragHandler=s=>{this._element.contains(s.originalEvent.target)&&(s.preventDefault(),this._positionDelta=s.point.sub(this._pos).add(this._offset),this._pointerdownPos=s.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._subpixelPositioning=t&&t.subpixelPositioning||!1,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,this.setOpacity(),this.setOpacity(t==null?void 0:t.opacity,t==null?void 0:t.opacityWhenCovered),t&&t.element)this._element=t.element,this._offset=d.P.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=$.create("div");const s=$.createNS("http://www.w3.org/2000/svg","svg"),u=41,h=27;s.setAttributeNS(null,"display","block"),s.setAttributeNS(null,"height",`${u}px`),s.setAttributeNS(null,"width",`${h}px`),s.setAttributeNS(null,"viewBox",`0 0 ${h} ${u}`);const f=$.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"stroke","none"),f.setAttributeNS(null,"stroke-width","1"),f.setAttributeNS(null,"fill","none"),f.setAttributeNS(null,"fill-rule","evenodd");const w=$.createNS("http://www.w3.org/2000/svg","g");w.setAttributeNS(null,"fill-rule","nonzero");const T=$.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"transform","translate(3.0, 29.0)"),T.setAttributeNS(null,"fill","#000000");const k=[{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 te of k){const ie=$.createNS("http://www.w3.org/2000/svg","ellipse");ie.setAttributeNS(null,"opacity","0.04"),ie.setAttributeNS(null,"cx","10.5"),ie.setAttributeNS(null,"cy","5.80029008"),ie.setAttributeNS(null,"rx",te.rx),ie.setAttributeNS(null,"ry",te.ry),T.appendChild(ie)}const E=$.createNS("http://www.w3.org/2000/svg","g");E.setAttributeNS(null,"fill",this._color);const A=$.createNS("http://www.w3.org/2000/svg","path");A.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"),E.appendChild(A);const M=$.createNS("http://www.w3.org/2000/svg","g");M.setAttributeNS(null,"opacity","0.25"),M.setAttributeNS(null,"fill","#000000");const F=$.createNS("http://www.w3.org/2000/svg","path");F.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(F);const j=$.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"transform","translate(6.0, 7.0)"),j.setAttributeNS(null,"fill","#FFFFFF");const Z=$.createNS("http://www.w3.org/2000/svg","g");Z.setAttributeNS(null,"transform","translate(8.0, 8.0)");const X=$.createNS("http://www.w3.org/2000/svg","circle");X.setAttributeNS(null,"fill","#000000"),X.setAttributeNS(null,"opacity","0.25"),X.setAttributeNS(null,"cx","5.5"),X.setAttributeNS(null,"cy","5.5"),X.setAttributeNS(null,"r","5.4999962");const Q=$.createNS("http://www.w3.org/2000/svg","circle");Q.setAttributeNS(null,"fill","#FFFFFF"),Q.setAttributeNS(null,"cx","5.5"),Q.setAttributeNS(null,"cy","5.5"),Q.setAttributeNS(null,"r","5.4999962"),Z.appendChild(X),Z.appendChild(Q),w.appendChild(T),w.appendChild(E),w.appendChild(M),w.appendChild(j),w.appendChild(Z),s.appendChild(w),s.setAttributeNS(null,"height",u*this._scale+"px"),s.setAttributeNS(null,"width",h*this._scale+"px"),this._element.appendChild(s),this._offset=d.P.convert(t&&t.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",s=>{s.preventDefault()}),this._element.addEventListener("mousedown",s=>{s.preventDefault()}),uc(this._element,this._anchor,"marker"),t&&t.className)for(const s of t.className.split(" "))this._element.classList.add(s);this._popup=null}addTo(t){return this.remove(),this._map=t,this._element.setAttribute("aria-label",t._getUIString("Marker.Title")),t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),t.on("terrain",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("terrain",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),$.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=d.N.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 h=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":[h,-1*(38.1-13.5+h)],"bottom-right":[-h,-1*(38.1-13.5+h)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=t,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(t){return this._subpixelPositioning=t,this}getPopup(){return this._popup}togglePopup(){const t=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:t?(t.isOpen()?t.remove():(t.setLngLat(this._lngLat),t.addTo(this._map)),this):this}_updateOpacity(t=!1){var s,u;if(!(!((s=this._map)===null||s===void 0)&&s.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(t)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const h=this._map,f=h.terrain.depthAtPoint(this._pos),w=h.terrain.getElevationForLngLatZoom(this._lngLat,h.transform.tileZoom);if(h.transform.lngLatToCameraDepth(this._lngLat,w)-f<.006)return void(this._element.style.opacity=this._opacity);const T=-this._offset.y/h.transform._pixelPerMeter,k=Math.sin(h.getPitch()*Math.PI/180)*T,E=h.terrain.depthAtPoint(new d.P(this._pos.x,this._pos.y-this._offset.y)),A=h.transform.lngLatToCameraDepth(this._lngLat,w+k)-E>.006;!((u=this._popup)===null||u===void 0)&&u.isOpen()&&A&&this._popup.remove(),this._element.style.opacity=A?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(t){return this._offset=d.P.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}setOpacity(t,s){return t===void 0&&s===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),t!==void 0&&(this._opacity=t),s!==void 0&&(this._opacityWhenCovered=s),this._map&&this._updateOpacity(!0),this}}const mp={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let sl=0,al=!1;const so={maxWidth:100,unit:"metric"};function ll(m,t,s){const u=s&&s.maxWidth||100,h=m._container.clientHeight/2,f=m.unproject([0,h]),w=m.unproject([u,h]),T=f.distanceTo(w);if(s&&s.unit==="imperial"){const k=3.2808*T;k>5280?Ye(t,u,k/5280,m._getUIString("ScaleControl.Miles")):Ye(t,u,k,m._getUIString("ScaleControl.Feet"))}else s&&s.unit==="nautical"?Ye(t,u,T/1852,m._getUIString("ScaleControl.NauticalMiles")):T>=1e3?Ye(t,u,T/1e3,m._getUIString("ScaleControl.Kilometers")):Ye(t,u,T,m._getUIString("ScaleControl.Meters"))}function Ye(m,t,s,u){const h=function(f){const w=Math.pow(10,`${Math.floor(f)}`.length-1);let T=f/w;return T=T>=10?10:T>=5?5:T>=3?3:T>=2?2:T>=1?1:function(k){const E=Math.pow(10,Math.ceil(-Math.log(k)/Math.LN10));return Math.round(k*E)/E}(T),w*T}(s);m.style.width=t*(h/s)+"px",m.innerHTML=`${h} ${u}`}const ct={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},dc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function pc(m){if(m){if(typeof m=="number"){const t=Math.round(Math.abs(m)/Math.SQRT2);return{center:new d.P(0,0),top:new d.P(0,m),"top-left":new d.P(t,t),"top-right":new d.P(-t,t),bottom:new d.P(0,-m),"bottom-left":new d.P(t,-t),"bottom-right":new d.P(-t,-t),left:new d.P(m,0),right:new d.P(-m,0)}}if(m instanceof d.P||Array.isArray(m)){const t=d.P.convert(m);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:d.P.convert(m.center||[0,0]),top:d.P.convert(m.top||[0,0]),"top-left":d.P.convert(m["top-left"]||[0,0]),"top-right":d.P.convert(m["top-right"]||[0,0]),bottom:d.P.convert(m.bottom||[0,0]),"bottom-left":d.P.convert(m["bottom-left"]||[0,0]),"bottom-right":d.P.convert(m["bottom-right"]||[0,0]),left:d.P.convert(m.left||[0,0]),right:d.P.convert(m.right||[0,0])}}return pc(new d.P(0,0))}const hh=L;v.AJAXError=d.bh,v.Evented=d.E,v.LngLat=d.N,v.MercatorCoordinate=d.Z,v.Point=d.P,v.addProtocol=d.bi,v.config=d.a,v.removeProtocol=d.bj,v.AttributionControl=aa,v.BoxZoomHandler=Jn,v.CanvasSource=Hr,v.CooperativeGesturesHandler=oa,v.DoubleClickZoomHandler=Ss,v.DragPanHandler=up,v.DragRotateHandler=hp,v.EdgeInsets=ta,v.FullscreenControl=class extends d.E{constructor(m={}){super(),this._onFullscreenChange=()=>{var t;let s=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((t=s==null?void 0:s.shadowRoot)===null||t===void 0)&&t.fullscreenElement;)s=s.shadowRoot.fullscreenElement;s===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,m&&m.container&&(m.container instanceof HTMLElement?this._container=m.container:d.w("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(m){return this._map=m,this._container||(this._container=this._map.getContainer()),this._controlContainer=$.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){$.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const m=this._fullscreenButton=$.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);$.create("span","maplibregl-ctrl-icon",m).setAttribute("aria-hidden","true"),m.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const m=this._getTitle();this._fullscreenButton.setAttribute("aria-label",m),this._fullscreenButton.title=m}_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 d.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new d.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_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()}},v.GeoJSONSource=Io,v.GeolocateControl=class extends d.E{constructor(m){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new d.k("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 d.k("geolocate",t)),this._finish()}},this._updateCamera=t=>{const s=new d.N(t.coords.longitude,t.coords.latitude),u=t.coords.accuracy,h=this._map.getBearing(),f=d.e({bearing:h},this.options.fitBoundsOptions),w=ve.fromLngLat(s,u);this._map.fitBounds(w,f,{geolocateSource:!0})},this._updateMarker=t=>{if(t){const s=new d.N(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(s).addTo(this._map),this._userLocationDotMarker.setLngLat(s).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 s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&al)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new d.k("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",t=>t.preventDefault()),this._geolocateButton=$.create("button","maplibregl-ctrl-geolocate",this._container),$.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=t=>{if(this._map){if(t===!1){d.w("Geolocation support is not available so the GeolocateControl will be disabled.");const s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}else{const s=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=$.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new hc({element:this._dotElement}),this._circleElement=$.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new hc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",s=>{s.geolocateSource||this._watchState!=="ACTIVE_LOCK"||s.originalEvent&&s.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 d.k("trackuserlocationend")),this.fire(new d.k("userlocationlostfocus")))})}},this.options=d.e({},mp,m)}onAdd(m){return this._map=m,this._container=$.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return d._(this,arguments,void 0,function*(t=!1){if(Qn!==void 0&&!t)return Qn;if(window.navigator.permissions===void 0)return Qn=!!window.navigator.geolocation,Qn;try{Qn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Qn=!!window.navigator.geolocation}return Qn})}().then(t=>this._finishSetupUI(t)),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(),$.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,sl=0,al=!1}_isOutOfMapMaxBounds(m){const t=this._map.getMaxBounds(),s=m.coords;return t&&(s.longitudet.getEast()||s.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 m=this._map.getBounds(),t=m.getSouthEast(),s=m.getNorthEast(),u=t.distanceTo(s),h=Math.ceil(this._accuracy/(u/this._map._container.clientHeight)*2);this._circleElement.style.width=`${h}px`,this._circleElement.style.height=`${h}px`}trigger(){if(!this._setup)return d.w("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 d.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":sl--,al=!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 d.k("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 d.k("trackuserlocationstart")),this.fire(new d.k("userlocationfocus"));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 m;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),sl++,sl>1?(m={maximumAge:6e5,timeout:0},al=!0):(m=this.options.positionOptions,al=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,m)}}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)}},v.Hash=tc,v.ImageSource=Ci,v.KeyboardHandler=hi,v.LngLatBounds=ve,v.LogoControl=sh,v.Map=class extends dp{constructor(m){d.bf.mark(d.bg.create);const t=Object.assign(Object.assign({},Sg),m);if(t.minZoom!=null&&t.maxZoom!=null&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(t.minPitch!=null&&t.maxPitch!=null&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(t.minPitch!=null&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(t.maxPitch!=null&&t.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new ra(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies),{bearingSnap:t.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new At,this._controls=[],this._mapId=d.a4(),this._contextLost=s=>{s.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new d.k("webglcontextlost",{originalEvent:s}))},this._contextRestored=s=>{this._setupPainter(),this.resize(),this._update(),this.fire(new d.k("webglcontextrestored",{originalEvent:s}))},this._onMapScroll=s=>{if(s.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._maxTileCacheZoomLevels=t.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=t.preserveDrawingBuffer===!0,this._antialias=t.antialias===!0,this._trackResize=t.trackResize===!0,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles===!0,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions===!0,this._collectResourceTiming=t.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ch),t.locale),this._clickTolerance=t.clickTolerance,this._overridePixelRatio=t.pixelRatio,this._maxCanvasSize=t.maxCanvasSize,this.transformCameraUpdate=t.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=t.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=ae.addThrottleControl(()=>this.isMoving()),this._requestManager=new we(t.transformRequest),typeof t.container=="string"){if(this._container=document.getElementById(t.container),!this._container)throw new Error(`Container '${t.container}' not found.`)}else{if(!(t.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let s=!1;const u=tl(h=>{this._trackResize&&!this._removed&&(this.resize(h),this.redraw())},50);this._resizeObserver=new ResizeObserver(h=>{s?u(h):s=!0}),this._resizeObserver.observe(this._container)}this.handlers=new oh(this,t),this._hash=t.hash&&new tc(typeof t.hash=="string"&&t.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,d.e({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,this._validateStyle=t.validateStyle,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new aa(typeof t.attributionControl=="boolean"?void 0:t.attributionControl)),t.maplibreLogo&&this.addControl(new sh,t.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",s=>{this._update(s.dataType==="style"),this.fire(new d.k(`${s.dataType}data`,s))}),this.on("dataloading",s=>{this.fire(new d.k(`${s.dataType}dataloading`,s))}),this.on("dataabort",s=>{this.fire(new d.k("sourcedataabort",s))})}_getMapId(){return this._mapId}addControl(m,t){if(t===void 0&&(t=m.getDefaultPosition?m.getDefaultPosition():"top-right"),!m||!m.onAdd)return this.fire(new d.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const s=m.onAdd(this);this._controls.push(m);const u=this._controlPositions[t];return t.indexOf("bottom")!==-1?u.insertBefore(s,u.firstChild):u.appendChild(s),this}removeControl(m){if(!m||!m.onRemove)return this.fire(new d.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const t=this._controls.indexOf(m);return t>-1&&this._controls.splice(t,1),m.onRemove(this),this}hasControl(m){return this._controls.indexOf(m)>-1}calculateCameraOptionsFromTo(m,t,s,u){return u==null&&this.terrain&&(u=this.terrain.getElevationForLngLatZoom(s,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(m,t,s,u)}resize(m){var t;const s=this._containerDimensions(),u=s[0],h=s[1],f=this._getClampedPixelRatio(u,h);if(this._resizeCanvas(u,h,f),this.painter.resize(u,h,f),this.painter.overLimit()){const T=this.painter.context.gl;this._maxCanvasSize=[T.drawingBufferWidth,T.drawingBufferHeight];const k=this._getClampedPixelRatio(u,h);this._resizeCanvas(u,h,k),this.painter.resize(u,h,k)}this.transform.resize(u,h),(t=this._requestedCameraState)===null||t===void 0||t.resize(u,h);const w=!this._moving;return w&&(this.stop(),this.fire(new d.k("movestart",m)).fire(new d.k("move",m))),this.fire(new d.k("resize",m)),w&&this.fire(new d.k("moveend",m)),this}_getClampedPixelRatio(m,t){const{0:s,1:u}=this._maxCanvasSize,h=this.getPixelRatio(),f=m*h,w=t*h;return Math.min(f>s?s/f:1,w>u?u/w:1)*h}getPixelRatio(){var m;return(m=this._overridePixelRatio)!==null&&m!==void 0?m:devicePixelRatio}setPixelRatio(m){this._overridePixelRatio=m,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(m){return this.transform.setMaxBounds(ve.convert(m)),this._update()}setMinZoom(m){if((m=m??-2)>=-2&&m<=this.transform.maxZoom)return this.transform.minZoom=m,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=m,this._update(),this.getZoom()>m&&this.setZoom(m),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(m){if((m=m??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(m>=0&&m<=this.transform.maxPitch)return this.transform.minPitch=m,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(m>=this.transform.minPitch)return this.transform.maxPitch=m,this._update(),this.getPitch()>m&&this.setPitch(m),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(m){return this.transform.renderWorldCopies=m,this._update()}project(m){return this.transform.locationPoint(d.N.convert(m),this.style&&this.terrain)}unproject(m){return this.transform.pointLocation(d.P.convert(m),this.terrain)}isMoving(){var m;return this._moving||((m=this.handlers)===null||m===void 0?void 0:m.isMoving())}isZooming(){var m;return this._zooming||((m=this.handlers)===null||m===void 0?void 0:m.isZooming())}isRotating(){var m;return this._rotating||((m=this.handlers)===null||m===void 0?void 0:m.isRotating())}_createDelegatedListener(m,t,s){if(m==="mouseenter"||m==="mouseover"){let u=!1;return{layers:t,listener:s,delegates:{mousemove:f=>{const w=t.filter(k=>this.getLayer(k)),T=w.length!==0?this.queryRenderedFeatures(f.point,{layers:w}):[];T.length?u||(u=!0,s.call(this,new cn(m,this,f.originalEvent,{features:T}))):u=!1},mouseout:()=>{u=!1}}}}if(m==="mouseleave"||m==="mouseout"){let u=!1;return{layers:t,listener:s,delegates:{mousemove:w=>{const T=t.filter(k=>this.getLayer(k));(T.length!==0?this.queryRenderedFeatures(w.point,{layers:T}):[]).length?u=!0:u&&(u=!1,s.call(this,new cn(m,this,w.originalEvent)))},mouseout:w=>{u&&(u=!1,s.call(this,new cn(m,this,w.originalEvent)))}}}}{const u=h=>{const f=t.filter(T=>this.getLayer(T)),w=f.length!==0?this.queryRenderedFeatures(h.point,{layers:f}):[];w.length&&(h.features=w,s.call(this,h),delete h.features)};return{layers:t,listener:s,delegates:{[m]:u}}}}_saveDelegatedListener(m,t){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[m]=this._delegatedListeners[m]||[],this._delegatedListeners[m].push(t)}_removeDelegatedListener(m,t,s){if(!this._delegatedListeners||!this._delegatedListeners[m])return;const u=this._delegatedListeners[m];for(let h=0;ht.includes(w))){for(const w in f.delegates)this.off(w,f.delegates[w]);return void u.splice(h,1)}}}on(m,t,s){if(s===void 0)return super.on(m,t);const u=this._createDelegatedListener(m,typeof t=="string"?[t]:t,s);this._saveDelegatedListener(m,u);for(const h in u.delegates)this.on(h,u.delegates[h]);return this}once(m,t,s){if(s===void 0)return super.once(m,t);const u=typeof t=="string"?[t]:t,h=this._createDelegatedListener(m,u,s);for(const f in h.delegates){const w=h.delegates[f];h.delegates[f]=(...T)=>{this._removeDelegatedListener(m,u,s),w(...T)}}this._saveDelegatedListener(m,h);for(const f in h.delegates)this.once(f,h.delegates[f]);return this}off(m,t,s){return s===void 0?super.off(m,t):(this._removeDelegatedListener(m,typeof t=="string"?[t]:t,s),this)}queryRenderedFeatures(m,t){if(!this.style)return[];let s;const u=m instanceof d.P||Array.isArray(m),h=u?m:[[0,0],[this.transform.width,this.transform.height]];if(t=t||(u?{}:m)||{},h instanceof d.P||typeof h[0]=="number")s=[d.P.convert(h)];else{const f=d.P.convert(h[0]),w=d.P.convert(h[1]);s=[f,new d.P(w.x,f.y),w,new d.P(f.x,w.y),f]}return this.style.queryRenderedFeatures(s,t,this.transform)}querySourceFeatures(m,t){return this.style.querySourceFeatures(m,t)}setStyle(m,t){return(t=d.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},t)).diff!==!1&&t.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&m?(this._diffStyle(m,t),this):(this._localIdeographFontFamily=t.localIdeographFontFamily,this._updateStyle(m,t))}setTransformRequest(m){return this._requestManager.setTransformRequest(m),this}_getUIString(m){const t=this._locale[m];if(t==null)throw new Error(`Missing UI string '${m}'`);return t}_updateStyle(m,t){if(t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(m,t));const s=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!m)),m?(this.style=new Ol(this,t||{}),this.style.setEventedParent(this,{style:this.style}),typeof m=="string"?this.style.loadURL(m,t,s):this.style.loadJSON(m,t,s),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ol(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(m,t){if(typeof m=="string"){const s=this._requestManager.transformRequest(m,"Style");d.h(s,new AbortController).then(u=>{this._updateDiff(u.data,t)}).catch(u=>{u&&this.fire(new d.j(u))})}else typeof m=="object"&&this._updateDiff(m,t)}_updateDiff(m,t){try{this.style.setState(m,t)&&this._update(!0)}catch(s){d.w(`Unable to perform style diff: ${s.message||s.error||s}. Rebuilding the style from scratch.`),this._updateStyle(m,t)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():d.w("There is no style added to the map.")}addSource(m,t){return this._lazyInitEmptyStyle(),this.style.addSource(m,t),this._update(!0)}isSourceLoaded(m){const t=this.style&&this.style.sourceCaches[m];if(t!==void 0)return t.loaded();this.fire(new d.j(new Error(`There is no source with ID '${m}'`)))}setTerrain(m){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),m){const t=this.style.sourceCaches[m.source];if(!t)throw new Error(`cannot load terrain, because there exists no source with ID: ${m.source}`);this.terrain===null&&t.reload();for(const s in this.style._layers){const u=this.style._layers[s];u.type==="hillshade"&&u.source===m.source&&d.w("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 lh(this.painter,t,m),this.painter.renderToTexture=new pp(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=s=>{s.dataType==="style"?this.terrain.sourceCache.freeRtt():s.dataType==="source"&&s.tile&&(s.sourceId!==m.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=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(s.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.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new d.k("terrain",{terrain:m})),this}getTerrain(){var m,t;return(t=(m=this.terrain)===null||m===void 0?void 0:m.options)!==null&&t!==void 0?t:null}areTilesLoaded(){const m=this.style&&this.style.sourceCaches;for(const t in m){const s=m[t]._tiles;for(const u in s){const h=s[u];if(h.state!=="loaded"&&h.state!=="errored")return!1}}return!0}removeSource(m){return this.style.removeSource(m),this._update(!0)}getSource(m){return this.style.getSource(m)}addImage(m,t,s={}){const{pixelRatio:u=1,sdf:h=!1,stretchX:f,stretchY:w,content:T,textFitWidth:k,textFitHeight:E}=s;if(this._lazyInitEmptyStyle(),!(t instanceof HTMLImageElement||d.b(t))){if(t.width===void 0||t.height===void 0)return this.fire(new d.j(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:A,height:M,data:F}=t,j=t;return this.style.addImage(m,{data:new d.R({width:A,height:M},new Uint8Array(F)),pixelRatio:u,stretchX:f,stretchY:w,content:T,textFitWidth:k,textFitHeight:E,sdf:h,version:0,userImage:j}),j.onAdd&&j.onAdd(this,m),this}}{const{width:A,height:M,data:F}=q.getImageData(t);this.style.addImage(m,{data:new d.R({width:A,height:M},F),pixelRatio:u,stretchX:f,stretchY:w,content:T,textFitWidth:k,textFitHeight:E,sdf:h,version:0})}}updateImage(m,t){const s=this.style.getImage(m);if(!s)return this.fire(new d.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const u=t instanceof HTMLImageElement||d.b(t)?q.getImageData(t):t,{width:h,height:f,data:w}=u;if(h===void 0||f===void 0)return this.fire(new d.j(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(h!==s.data.width||f!==s.data.height)return this.fire(new d.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const T=!(t instanceof HTMLImageElement||d.b(t));return s.data.replace(w,T),this.style.updateImage(m,s),this}getImage(m){return this.style.getImage(m)}hasImage(m){return m?!!this.style.getImage(m):(this.fire(new d.j(new Error("Missing required image id"))),!1)}removeImage(m){this.style.removeImage(m)}loadImage(m){return ae.getImage(this._requestManager.transformRequest(m,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(m,t){return this._lazyInitEmptyStyle(),this.style.addLayer(m,t),this._update(!0)}moveLayer(m,t){return this.style.moveLayer(m,t),this._update(!0)}removeLayer(m){return this.style.removeLayer(m),this._update(!0)}getLayer(m){return this.style.getLayer(m)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(m,t,s){return this.style.setLayerZoomRange(m,t,s),this._update(!0)}setFilter(m,t,s={}){return this.style.setFilter(m,t,s),this._update(!0)}getFilter(m){return this.style.getFilter(m)}setPaintProperty(m,t,s,u={}){return this.style.setPaintProperty(m,t,s,u),this._update(!0)}getPaintProperty(m,t){return this.style.getPaintProperty(m,t)}setLayoutProperty(m,t,s,u={}){return this.style.setLayoutProperty(m,t,s,u),this._update(!0)}getLayoutProperty(m,t){return this.style.getLayoutProperty(m,t)}setGlyphs(m,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(m,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(m,t,s={}){return this._lazyInitEmptyStyle(),this.style.addSprite(m,t,s,u=>{u||this._update(!0)}),this}removeSprite(m){return this._lazyInitEmptyStyle(),this.style.removeSprite(m),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(m,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(m,t,s=>{s||this._update(!0)}),this}setLight(m,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(m,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(m){return this._lazyInitEmptyStyle(),this.style.setSky(m),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(m,t){return this.style.setFeatureState(m,t),this._update()}removeFeatureState(m,t){return this.style.removeFeatureState(m,t),this._update()}getFeatureState(m){return this.style.getFeatureState(m)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let m=0,t=0;return this._container&&(m=this._container.clientWidth||400,t=this._container.clientHeight||300),[m,t]}_setupContainer(){const m=this._container;m.classList.add("maplibregl-map");const t=this._canvasContainer=$.create("div","maplibregl-canvas-container",m);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=$.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const s=this._containerDimensions(),u=this._getClampedPixelRatio(s[0],s[1]);this._resizeCanvas(s[0],s[1],u);const h=this._controlContainer=$.create("div","maplibregl-control-container",m),f=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(w=>{f[w]=$.create("div",`maplibregl-ctrl-${w} `,h)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(m,t,s){this._canvas.width=Math.floor(s*m),this._canvas.height=Math.floor(s*t),this._canvas.style.width=`${m}px`,this._canvas.style.height=`${t}px`}_setupPainter(){const m={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let t=null;this._canvas.addEventListener("webglcontextcreationerror",u=>{t={requestedAttributes:m},u&&(t.statusMessage=u.statusMessage,t.type=u.type)},{once:!0});const s=this._canvas.getContext("webgl2",m)||this._canvas.getContext("webgl",m);if(!s){const u="Failed to initialize WebGL";throw t?(t.message=u,new Error(JSON.stringify(t))):new Error(u)}this.painter=new ec(s,this.transform),_e.testSupport(s)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(m){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||m,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(m){return this._update(),this._renderTaskQueue.add(m)}_cancelRenderFrame(m){this._renderTaskQueue.remove(m)}_render(m){const t=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(m),this._removed)return;let s=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const h=this.transform.zoom,f=q.now();this.style.zoomHistory.update(h,f);const w=new d.z(h,{now:f,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),T=w.crossFadingFactor();T===1&&T===this._crossFadingFactor||(s=!0,this._crossFadingFactor=T),this.style.update(w)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=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.minElevationForCurrentTile=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 d.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,d.bf.mark(d.bg.load),this.fire(new d.k("load"))),this.style&&(this.style.hasTransitions()||s)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const u=this._sourcesDirty||this._styleDirty||this._placementDirty;return u||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new d.k("idle")),!this._loaded||this._fullyLoaded||u||(this._fullyLoaded=!0,d.bf.mark(d.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var m;this._hash&&this._hash.remove();for(const s of this._controls)s.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),ae.removeThrottleControl(this._imageQueueHandle),(m=this._resizeObserver)===null||m===void 0||m.disconnect();const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t!=null&&t.loseContext&&t.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),$.remove(this._canvasContainer),$.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),d.bf.clearMetrics(),this._removed=!0,this.fire(new d.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,q.frameAsync(this._frameRequest).then(m=>{d.bf.frame(m),this._frameRequest=null,this._render(m)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(m){this._showTileBoundaries!==m&&(this._showTileBoundaries=m,this._update())}get showPadding(){return!!this._showPadding}set showPadding(m){this._showPadding!==m&&(this._showPadding=m,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(m){this._showCollisionBoxes!==m&&(this._showCollisionBoxes=m,m?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(m){this._showOverdrawInspector!==m&&(this._showOverdrawInspector=m,this._update())}get repaint(){return!!this._repaint}set repaint(m){this._repaint!==m&&(this._repaint=m,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(m){this._vertices=m,this._update()}get version(){return fp}getCameraTargetElevation(){return this.transform.elevation}},v.MapMouseEvent=cn,v.MapTouchEvent=bs,v.MapWheelEvent=ap,v.Marker=hc,v.NavigationControl=class{constructor(m){this._updateZoomButtons=()=>{const t=this._map.getZoom(),s=t===this._map.getMaxZoom(),u=t===this._map.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=u,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",u.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,s)=>{const u=this._map._getUIString(`NavigationControl.${s}`);t.title=u,t.setAttribute("aria-label",u)},this.options=d.e({},Tg,m),this._container=$.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})),$.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})),$.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=$.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(m){return this._map=m,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 kg(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){$.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(m,t){const s=$.create("button",m,this._container);return s.type="button",s.addEventListener("click",t),s}},v.Popup=class extends d.E{constructor(m){super(),this.remove=()=>(this._content&&$.remove(this._content),this._container&&($.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),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new d.k("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=>{var s;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=$.create("div","maplibregl-popup",this._map.getContainer()),this._tip=$.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const T of this.options.className.split(" "))this._container.classList.add(T);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),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._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?ar(this._lngLat,this._flatPos,this._map.transform):(s=this._lngLat)===null||s===void 0?void 0:s.wrap(),this._trackPointer&&!t)return;const u=this._flatPos=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&t?t:this._map.transform.locationPoint(this._lngLat));let h=this.options.anchor;const f=pc(this.options.offset);if(!h){const T=this._container.offsetWidth,k=this._container.offsetHeight;let E;E=u.y+f.bottom.ythis._map.transform.height-k?["bottom"]:[],u.xthis._map.transform.width-T/2&&E.push("right"),h=E.length===0?"bottom":E.join("-")}let w=u.add(f[h]);this.options.subpixelPositioning||(w=w.round()),$.setTransform(this._container,`${ca[h]} translate(${w.x}px,${w.y}px)`),uc(this._container,h,"popup")},this._onClose=()=>{this.remove()},this.options=d.e(Object.create(ct),m)}addTo(m){return this._map&&this.remove(),this._map=m,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 d.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(m){return this._lngLat=d.N.convert(m),this._pos=null,this._flatPos=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._flatPos=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(m){return this.setDOMContent(document.createTextNode(m))}setHTML(m){const t=document.createDocumentFragment(),s=document.createElement("body");let u;for(s.innerHTML=m;u=s.firstChild,u;)t.appendChild(u);return this.setDOMContent(t)}getMaxWidth(){var m;return(m=this._container)===null||m===void 0?void 0:m.style.maxWidth}setMaxWidth(m){return this.options.maxWidth=m,this._update(),this}setDOMContent(m){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=$.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(m),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(m){return this._container&&this._container.classList.add(m),this}removeClassName(m){return this._container&&this._container.classList.remove(m),this}setOffset(m){return this.options.offset=m,this._update(),this}toggleClassName(m){if(this._container)return this._container.classList.toggle(m)}setSubpixelPositioning(m){this.options.subpixelPositioning=m}_createCloseButton(){this.options.closeButton&&(this._closeButton=$.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const m=this._container.querySelector(dc);m&&m.focus()}},v.RasterDEMTileSource=tr,v.RasterTileSource=zt,v.ScaleControl=class{constructor(m){this._onMove=()=>{ll(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,ll(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},so),m)}getDefaultPosition(){return"bottom-left"}onAdd(m){return this._map=m,this._container=$.create("div","maplibregl-ctrl maplibregl-ctrl-scale",m.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){$.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},v.ScrollZoomHandler=Ri,v.Style=Ol,v.TerrainControl=class{constructor(m){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.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=m}onAdd(m){return this._map=m,this._container=$.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=$.create("button","maplibregl-ctrl-terrain",this._container),$.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(){$.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},v.TwoFingersTouchPitchHandler=ia,v.TwoFingersTouchRotateHandler=rh,v.TwoFingersTouchZoomHandler=eh,v.TwoFingersTouchZoomRotateHandler=ih,v.VectorTileSource=us,v.VideoSource=Ii,v.addSourceType=(m,t)=>d._(void 0,void 0,void 0,function*(){if(jo(m))throw new Error(`A source type called "${m}" already exists.`);((s,u)=>{hs[s]=u})(m,t)}),v.clearPrewarmedResources=function(){const m=Rr;m&&(m.isPreloaded()&&m.numActive()===1?(m.release(mr),Rr=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()"))},v.getMaxParallelImageRequests=function(){return d.a.MAX_PARALLEL_IMAGE_REQUESTS},v.getRTLTextPluginStatus=function(){return li().getRTLTextPluginStatus()},v.getVersion=function(){return hh},v.getWorkerCount=function(){return Ur.workerCount},v.getWorkerUrl=function(){return d.a.WORKER_URL},v.importScriptInWorkers=function(m){return cs().broadcast("IS",m)},v.prewarm=function(){rn().acquire(mr)},v.setMaxParallelImageRequests=function(m){d.a.MAX_PARALLEL_IMAGE_REQUESTS=m},v.setRTLTextPlugin=function(m,t){return li().setRTLTextPlugin(m,t)},v.setWorkerCount=function(m){Ur.workerCount=m},v.setWorkerUrl=function(m){d.a.WORKER_URL=m}});var x=a;return x})})(IT);var OL=IT.exports;const lt=l0(OL);function NL(){return typeof self<"u"?fetch.bind(self):typeof global<"u"&&global.fetch?global.fetch:null}class $L{constructor(){this._apiKey="",this._fetch=NL(),this.tileCacheSize=200}set apiKey(n){this._apiKey=n}get apiKey(){return this._apiKey}set fetch(n){this._fetch=n}get fetch(){return this._fetch}}const iu=new $L,Bd={AUTO:{code:null,flag:"auto",name:"Auto",latin:!1,isMode:!0,geocoding:!0},LATIN:{code:"latin",flag:"name:latin",name:"Latin",latin:!0,isMode:!1,geocoding:!1},NON_LATIN:{code:"nonlatin",flag:"name:nonlatin",name:"Non Latin",latin:!1,isMode:!1,geocoding:!1},LOCAL:{code:null,flag:"name",name:"Local",latin:!0,isMode:!1,geocoding:!1},AMHARIC:{code:"am",flag:"name:am",name:"Amharic",latin:!1,isMode:!1,geocoding:!1},ARABIC:{code:"ar",flag:"name:ar",name:"Arabic",latin:!1,isMode:!1,geocoding:!0},AZERBAIJANI:{code:"az",flag:"name:az",name:"Azerbaijani",latin:!0,isMode:!1,geocoding:!0},BELARUSIAN:{code:"be",flag:"name:be",name:"Belarusian",latin:!1,isMode:!1,geocoding:!0},BULGARIAN:{code:"bg",flag:"bg",name:"Bulgarian",latin:!1,isMode:!1,geocoding:!0},BENGALI:{code:"bn",flag:"name:bn",name:"Bengali",latin:!0,isMode:!1,geocoding:!1},BRETON:{code:"br",flag:"name:br",name:"Breton",latin:!0,isMode:!1,geocoding:!0},BOSNIAN:{code:"bs",flag:"name:bs",name:"Bosnian",latin:!0,isMode:!1,geocoding:!0},CATALAN:{code:"ca",flag:"name:ca",name:"Catalan",latin:!0,isMode:!1,geocoding:!0},CHINESE:{code:"zh",flag:"name:zh",name:"Chinese",latin:!1,isMode:!1,geocoding:!0},TRADITIONAL_CHINESE:{code:"zh-Hant",flag:"name:zh-Hant",name:"Chinese (traditional)",latin:!1,isMode:!1,geocoding:!1},SIMPLIFIED_CHINESE:{code:"zh-Hans",flag:"name:zh-Hans",name:"Chinese (simplified)",latin:!1,isMode:!1,geocoding:!1},CORSICAN:{code:"co",flag:"name:co",name:"Corsican",latin:!0,isMode:!1,geocoding:!1},CZECH:{code:"cs",flag:"name:cs",name:"Czech",latin:!0,isMode:!1,geocoding:!1},WELSH:{code:"cy",flag:"name:cy",name:"WELSH",latin:!0,isMode:!1,geocoding:!0},DANISH:{code:"da",flag:"name:da",name:"Danish",latin:!0,isMode:!1,geocoding:!0},GERMAN:{code:"de",flag:"name:de",name:"German",latin:!0,isMode:!1,geocoding:!0},GREEK:{code:"el",flag:"name:el",name:"Greek",latin:!1,isMode:!1,geocoding:!0},ENGLISH:{code:"en",flag:"name:en",name:"English",latin:!0,isMode:!1,geocoding:!0},ESPERANTO:{code:"eo",flag:"name:eo",name:"Esperanto",latin:!0,isMode:!1,geocoding:!0},SPANISH:{code:"es",flag:"name:es",name:"Spanish",latin:!0,isMode:!1,geocoding:!0},ESTONIAN:{code:"et",flag:"name:et",name:"Estonian",latin:!0,isMode:!1,geocoding:!0},BASQUE:{code:"eu",flag:"name:eu",name:"Basque",latin:!0,isMode:!1,geocoding:!1},FINNISH:{code:"fi",flag:"name:fi",name:"Finnish",latin:!0,isMode:!1,geocoding:!0},FRENCH:{code:"fr",flag:"name:fr",name:"French",latin:!0,isMode:!1,geocoding:!0},FRISIAN:{code:"fy",flag:"name:fy",name:"Frisian (West)",latin:!0,isMode:!1,geocoding:!0},IRISH:{code:"ga",flag:"name:ga",name:"Irish",latin:!0,isMode:!1,geocoding:!0},SCOTTISH_GAELIC:{code:"gd",flag:"name:gd",name:"Scottish Gaelic",latin:!0,isMode:!1,geocoding:!0},HEBREW:{code:"he",flag:"name:he",name:"Hebrew",latin:!1,isMode:!1,geocoding:!0},HINDI:{code:"hi",flag:"name:hi",name:"Hindi",latin:!1,isMode:!1,geocoding:!1},CROATIAN:{code:"hr",flag:"name:hr",name:"Croatian",latin:!0,isMode:!1,geocoding:!0},HUNGARIAN:{code:"hu",flag:"name:hu",name:"Hungarian",latin:!0,isMode:!1,geocoding:!0},ARMENIAN:{code:"hy",flag:"name:hy",name:"Armenian",latin:!1,isMode:!1,geocoding:!0},INDONESIAN:{code:"id",flag:"name:id",name:"Indonesian",latin:!0,isMode:!1,geocoding:!1},ICELANDIC:{code:"is",flag:"name:is",name:"Icelandic",latin:!0,isMode:!1,geocoding:!0},ITALIAN:{code:"it",flag:"name:it",name:"Italian",latin:!0,isMode:!1,geocoding:!0},JAPANESE:{code:"ja",flag:"name:ja",name:"Japanese",latin:!1,isMode:!1,geocoding:!0},JAPANESE_HIRAGANA:{code:"ja-Hira",flag:"name:ja-Hira",name:"Japanese Hiragana form",latin:!1,isMode:!1,geocoding:!1},JAPANESE_2018:{code:"ja-Latn",flag:"name:ja-Latn",name:"Japanese (Latin 2018)",latin:!0,isMode:!1,geocoding:!1},JAPANESE_KANA:{code:"ja_kana",flag:"name:ja_kana",name:"Japanese (Kana)",latin:!1,isMode:!1,geocoding:!1},JAPANESE_LATIN:{code:"ja_rm",flag:"name:ja_rm",name:"Japanese (Latin script)",latin:!0,isMode:!1,geocoding:!1},GEORGIAN:{code:"ka",flag:"name:ka",name:"Georgian",latin:!1,isMode:!1,geocoding:!0},KAZAKH:{code:"kk",flag:"name:kk",name:"Kazakh",latin:!1,isMode:!1,geocoding:!0},KANNADA:{code:"kn",flag:"name:kn",name:"Kannada",latin:!0,isMode:!1,geocoding:!0},KOREAN:{code:"ko",flag:"name:ko",name:"Korean",latin:!1,isMode:!1,geocoding:!0},KOREAN_LATIN:{code:"ko-Latn",flag:"name:ko-Latn",name:"Korean (Latin script)",latin:!0,isMode:!1,geocoding:!1},KURDISH:{code:"ku",flag:"name:ku",name:"Kurdish",latin:!0,isMode:!1,geocoding:!1},CLASSICAL_LATIN:{code:"la",flag:"name:la",name:"Latin",latin:!0,isMode:!1,geocoding:!0},LUXEMBOURGISH:{code:"lb",flag:"name:lb",name:"Luxembourgish",latin:!0,isMode:!1,geocoding:!0},LITHUANIAN:{code:"lt",flag:"name:lt",name:"Lithuanian",latin:!0,isMode:!1,geocoding:!0},LATVIAN:{code:"lv",flag:"name:lv",name:"Latvian",latin:!0,isMode:!1,geocoding:!0},MACEDONIAN:{code:"mk",flag:"name:mk",name:"Macedonian",latin:!1,isMode:!1,geocoding:!0},MALAYALAM:{code:"ml",flag:"name:ml",name:"Malayalam",latin:!1,isMode:!1,geocoding:!1},MALTESE:{code:"mt",flag:"name:mt",name:"Maltese",latin:!0,isMode:!1,geocoding:!0},DUTCH:{code:"nl",flag:"name:nl",name:"Dutch",latin:!0,isMode:!1,geocoding:!0},NORWEGIAN:{code:"no",flag:"name:no",name:"Norwegian",latin:!0,isMode:!1,geocoding:!0},OCCITAN:{code:"oc",flag:"name:oc",name:"Occitan",latin:!0,isMode:!1,geocoding:!1},POLISH:{code:"pl",flag:"name:pl",name:"Polish",latin:!0,isMode:!1,geocoding:!0},PERSIAN:{code:"fa",flag:"name:fa",name:"Persian",latin:!1,isMode:!1,geocoding:!1},PUNJABI:{code:"pa",flag:"name:pa",name:"Punjabi",latin:!1,isMode:!1,geocoding:!1},WESTERN_PUNJABI:{code:"pnb",flag:"name:pnb",name:"Western Punjabi",latin:!1,isMode:!1,geocoding:!1},PORTUGUESE:{code:"pt",flag:"name:pt",name:"Portuguese",latin:!0,isMode:!1,geocoding:!0},ROMANSH:{code:"rm",flag:"name:rm",name:"Romansh",latin:!0,isMode:!1,geocoding:!0},ROMANIAN:{code:"ro",flag:"name:ro",name:"Romanian",latin:!0,isMode:!1,geocoding:!0},RUSSIAN:{code:"ru",flag:"name:ru",name:"Russian",latin:!1,isMode:!1,geocoding:!0},SLOVAK:{code:"sk",flag:"name:sk",name:"Slovak",latin:!0,isMode:!1,geocoding:!0},SLOVENE:{code:"sl",flag:"name:sl",name:"Slovene",latin:!0,isMode:!1,geocoding:!0},ALBANIAN:{code:"sq",flag:"name:sq",name:"Albanian",latin:!0,isMode:!1,geocoding:!0},SERBIAN_CYRILLIC:{code:"sr",flag:"name:sr",name:"Serbian (Cyrillic script)",latin:!1,isMode:!1,geocoding:!0},SERBIAN_LATIN:{code:"sr-Latn",flag:"name:sr-Latn",name:"Serbian (Latin script)",latin:!0,isMode:!1,geocoding:!1},SWEDISH:{code:"sv",flag:"name:sv",name:"Swedish",latin:!0,isMode:!1,geocoding:!0},TAMIL:{code:"ta",flag:"name:ta",name:"Tamil",latin:!1,isMode:!1,geocoding:!1},TELUGU:{code:"te",flag:"name:te",name:"Telugu",latin:!1,isMode:!1,geocoding:!1},THAI:{code:"th",flag:"name:th",name:"Thai",latin:!1,isMode:!1,geocoding:!0},TURKISH:{code:"tr",flag:"name:tr",name:"Turkish",latin:!0,isMode:!1,geocoding:!0},UKRAINIAN:{code:"uk",flag:"name:uk",name:"Ukrainian",latin:!1,isMode:!1,geocoding:!0},VIETNAMESE:{code:"vi",flag:"name:vi",name:"Vietnamese (Latin script)",latin:!0,isMode:!1,geocoding:!1}};function UL(e,n=Bd){return e in n?e[e]:null}function e0(e,n=Bd){for(const a of Object.values(n))if(a.code===e)return a;return null}function t0(e,n=Bd){for(const a of Object.values(n))if(a.flag===e)return a;return null}function jL(e){return e!==null&&typeof e=="object"&&"code"in e&&"flag"in e&&"name"in e&&"latin"in e&&"isMode"in e&&"geocoding"in e&&(typeof e.code=="string"||e.code===null)&&typeof e.flag=="string"&&typeof e.name=="string"&&typeof e.latin=="boolean"&&typeof e.isMode=="boolean"&&typeof e.geocoding=="boolean"}function VL(e,n=Bd){return jL(e)?t0(e.flag,n):typeof e!="string"?null:UL(e,n)||e0(e,n)||t0(e,n)||null}async function qL(e,n={}){if(iu.fetch===null)throw new Error("The fetch function was not found. If on NodeJS < 18 please specify the fetch function with config.fetch");if(new URL(e).searchParams.get("key").trim()==="")throw new Error("The MapTiler Cloud API key is missing. Set it in `config.apiKey` or get one for free at https://maptiler.com");return iu.fetch(e,n)}const PT={maptilerApiURL:"https://api.maptiler.com/",mapStyle:"streets-v2"};Object.freeze(PT);class ZL extends Error{constructor(n,a=""){super(`Call to enpoint ${n.url} failed with the status code ${n.status}. ${a}`),this.res=n}}const rw={403:"Key is missing, invalid or restricted"};async function GL(e={}){const n=new URL("geolocation/ip.json",PT.maptilerApiURL);n.searchParams.set("key",e.apiKey??iu.apiKey);const a=n.toString(),c=await qL(a);if(!c.ok)throw new ZL(c,c.status in rw?rw[c.status]:"");return await c.json()}const nw={info:GL};function AT(e){const n=/^maptiler:\/\/(.*)/;let a;const c=e.trim();let g;return c.startsWith("http://")||c.startsWith("https://")?g=c:(a=n.exec(c))!==null?g=`https://api.maptiler.com/maps/${a[1]}/style.json`:g=`https://api.maptiler.com/maps/${c}/style.json`,g}class MT{constructor(n,a,c,g,x,v){this.name=n,this.variantType=a,this.id=c,this.referenceStyle=g,this.description=x,this.imageURL=v}getName(){return this.name}getFullName(){return`${this.referenceStyle.getName()} ${this.name}`}getType(){return this.variantType}getId(){return this.id}getDescription(){return this.description}getReferenceStyle(){return this.referenceStyle}hasVariant(n){return this.referenceStyle.hasVariant(n)}getVariant(n){return this.referenceStyle.getVariant(n)}getVariants(){return this.referenceStyle.getVariants().filter(n=>n!==this)}getImageURL(){return this.imageURL}getExpandedStyleURL(){return AT(this.getId())}}class zT{constructor(n,a){this.name=n,this.id=a,this.variants={},this.orderedVariants=[]}getName(){return this.name}getId(){return this.id}addVariant(n){this.variants[n.getType()]=n,this.orderedVariants.push(n)}hasVariant(n){return n in this.variants}getVariant(n){return n in this.variants?this.variants[n]:this.orderedVariants[0]}getVariants(){return Object.values(this.variants)}getDefaultVariant(){return this.orderedVariants[0]}}const r0=[{referenceStyleID:"STREETS",name:"Streets",description:"",variants:[{id:"streets-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"streets-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"streets-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""},{id:"streets-v2-night",name:"Night",variantType:"NIGHT",description:"",imageURL:""},{id:"streets-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""}]},{referenceStyleID:"OUTDOOR",name:"Outdoor",description:"",variants:[{id:"outdoor-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"outdoor-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"WINTER",name:"Winter",description:"",variants:[{id:"winter-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"winter-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"SATELLITE",name:"Satellite",description:"",variants:[{id:"satellite",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]},{referenceStyleID:"HYBRID",name:"Hybrid",description:"",variants:[{id:"hybrid",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]},{referenceStyleID:"BASIC",name:"Basic",description:"",variants:[{id:"basic-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"basic-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"basic-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""}]},{referenceStyleID:"BRIGHT",name:"Bright",description:"",variants:[{id:"bright-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"bright-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"bright-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""},{id:"bright-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""}]},{referenceStyleID:"OPENSTREETMAP",name:"OpenStreetMap",description:"",variants:[{id:"openstreetmap",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]},{referenceStyleID:"TOPO",name:"Topo",description:"",variants:[{id:"topo-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"topo-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"topo-v2-shiny",name:"Shiny",variantType:"SHINY",description:"",imageURL:""},{id:"topo-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""},{id:"topo-v2-topographique",name:"Topographique",variantType:"TOPOGRAPHIQUE",description:"",imageURL:""}]},{referenceStyleID:"VOYAGER",name:"Voyager",description:"",variants:[{id:"voyager-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"voyager-v2-darkmatter",name:"Darkmatter",variantType:"DARK",description:"",imageURL:""},{id:"voyager-v2-positron",name:"Positron",variantType:"LIGHT",description:"",imageURL:""},{id:"voyager-v2-vintage",name:"Vintage",variantType:"VINTAGE",description:"",imageURL:""}]},{referenceStyleID:"TONER",name:"Toner",description:"",variants:[{id:"toner-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"toner-v2-background",name:"Background",variantType:"BACKGROUND",description:"",imageURL:""},{id:"toner-v2-lite",name:"Lite",variantType:"LITE",description:"",imageURL:""},{id:"toner-v2-lines",name:"Lines",variantType:"LINES",description:"",imageURL:""}]},{referenceStyleID:"DATAVIZ",name:"Dataviz",description:"",variants:[{id:"dataviz",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"dataviz-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"dataviz-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""}]},{referenceStyleID:"BACKDROP",name:"Backdrop",description:"",variants:[{id:"backdrop",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"backdrop-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"backdrop-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""}]},{referenceStyleID:"OCEAN",name:"Ocean",description:"",variants:[{id:"ocean",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]}];function HL(e){return new Proxy(e,{get(n,a,c){return n.hasVariant(a)?n.getVariant(a):a.toString().toUpperCase()===a?e.getDefaultVariant():Reflect.get(n,a,c)}})}function WL(){const e={};for(let n=0;n0&&(v=a[0]),v instanceof Error)throw v;var d=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw d.context=v,d}var L=x[n];if(L===void 0)return!1;if(typeof L=="function")iw(L,this,a);else for(var O=L.length,G=$T(L,O),c=0;c0&&v.length>g&&!v.warned){v.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+v.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=n,d.count=v.length,KL(d)}return e}pr.prototype.addListener=function(n,a){return BT(this,n,a,!1)};pr.prototype.on=pr.prototype.addListener;pr.prototype.prependListener=function(n,a){return BT(this,n,a,!0)};function XL(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function FT(e,n,a){var c={fired:!1,wrapFn:void 0,target:e,type:n,listener:a},g=XL.bind(c);return g.listener=a,c.wrapFn=g,g}pr.prototype.once=function(n,a){return Qm(a),this.on(n,FT(this,n,a)),this};pr.prototype.prependOnceListener=function(n,a){return Qm(a),this.prependListener(n,FT(this,n,a)),this};pr.prototype.removeListener=function(n,a){var c,g,x,v,d;if(Qm(a),g=this._events,g===void 0)return this;if(c=g[n],c===void 0)return this;if(c===a||c.listener===a)--this._eventsCount===0?this._events=Object.create(null):(delete g[n],g.removeListener&&this.emit("removeListener",n,c.listener||a));else if(typeof c!="function"){for(x=-1,v=c.length-1;v>=0;v--)if(c[v]===a||c[v].listener===a){d=c[v].listener,x=v;break}if(x<0)return this;x===0?c.shift():YL(c,x),c.length===1&&(g[n]=c[0]),g.removeListener!==void 0&&this.emit("removeListener",n,d||a)}return this};pr.prototype.off=pr.prototype.removeListener;pr.prototype.removeAllListeners=function(n){var a,c,g;if(c=this._events,c===void 0)return this;if(c.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):c[n]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete c[n]),this;if(arguments.length===0){var x=Object.keys(c),v;for(g=0;g=0;g--)this.removeListener(n,a[g]);return this};function OT(e,n,a){var c=e._events;if(c===void 0)return[];var g=c[n];return g===void 0?[]:typeof g=="function"?a?[g.listener||g]:[g]:a?JL(g):$T(g,g.length)}pr.prototype.listeners=function(n){return OT(this,n,!0)};pr.prototype.rawListeners=function(n){return OT(this,n,!1)};pr.listenerCount=function(e,n){return typeof e.listenerCount=="function"?e.listenerCount(n):NT.call(e,n)};pr.prototype.listenerCount=NT;function NT(e){var n=this._events;if(n!==void 0){var a=n[e];if(typeof a=="function")return 1;if(a!==void 0)return a.length}return 0}pr.prototype.eventNames=function(){return this._eventsCount>0?Cf(this._events):[]};function $T(e,n){for(var a=new Array(n),c=0;c{let n={};return e.forEach((a,c)=>n[a]=c),n})(Gh),u3=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,In=String.fromCharCode.bind(String),cw=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),VT=e=>e.replace(/=/g,"").replace(/[+\/]/g,n=>n=="+"?"-":"_"),qT=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),ZT=e=>{let n,a,c,g,x="";const v=e.length%3;for(let d=0;d255||(c=e.charCodeAt(d++))>255||(g=e.charCodeAt(d++))>255)throw new TypeError("invalid character found");n=a<<16|c<<8|g,x+=Gh[n>>18&63]+Gh[n>>12&63]+Gh[n>>6&63]+Gh[n&63]}return v?x.slice(0,v-3)+"===".substring(v):x},Iv=typeof btoa=="function"?e=>btoa(e):wu?e=>Buffer.from(e,"binary").toString("base64"):ZT,n0=wu?e=>Buffer.from(e).toString("base64"):e=>{let a=[];for(let c=0,g=e.length;cn?VT(n0(e)):n0(e),h3=e=>{if(e.length<2){var n=e.charCodeAt(0);return n<128?e:n<2048?In(192|n>>>6)+In(128|n&63):In(224|n>>>12&15)+In(128|n>>>6&63)+In(128|n&63)}else{var n=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return In(240|n>>>18&7)+In(128|n>>>12&63)+In(128|n>>>6&63)+In(128|n&63)}},d3=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,GT=e=>e.replace(d3,h3),uw=wu?e=>Buffer.from(e,"utf8").toString("base64"):lw?e=>n0(lw.encode(e)):e=>Iv(GT(e)),su=(e,n=!1)=>n?VT(uw(e)):uw(e),hw=e=>su(e,!0),p3=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,f3=e=>{switch(e.length){case 4:var n=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),a=n-65536;return In((a>>>10)+55296)+In((a&1023)+56320);case 3:return In((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return In((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},HT=e=>e.replace(p3,f3),WT=e=>{if(e=e.replace(/\s+/g,""),!u3.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let n,a="",c,g;for(let x=0;x>16&255):g===64?In(n>>16&255,n>>8&255):In(n>>16&255,n>>8&255,n&255);return a},Ev=typeof atob=="function"?e=>atob(qT(e)):wu?e=>Buffer.from(e,"base64").toString("binary"):WT,KT=wu?e=>cw(Buffer.from(e,"base64")):e=>cw(Ev(e).split("").map(n=>n.charCodeAt(0))),XT=e=>KT(YT(e)),m3=wu?e=>Buffer.from(e,"base64").toString("utf8"):aw?e=>aw.decode(KT(e)):e=>HT(Ev(e)),YT=e=>qT(e.replace(/[-_]/g,n=>n=="-"?"+":"/")),i0=e=>m3(YT(e)),g3=e=>{if(typeof e!="string")return!1;const n=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(n)||!/[^\s0-9a-zA-Z\-_]/.test(n)},JT=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),QT=function(){const e=(n,a)=>Object.defineProperty(String.prototype,n,JT(a));e("fromBase64",function(){return i0(this)}),e("toBase64",function(n){return su(this,n)}),e("toBase64URI",function(){return su(this,!0)}),e("toBase64URL",function(){return su(this,!0)}),e("toUint8Array",function(){return XT(this)})},ek=function(){const e=(n,a)=>Object.defineProperty(Uint8Array.prototype,n,JT(a));e("toBase64",function(n){return If(this,n)}),e("toBase64URI",function(){return If(this,!0)}),e("toBase64URL",function(){return If(this,!0)})},y3=()=>{QT(),ek()},_3={version:jT,VERSION:l3,atob:Ev,atobPolyfill:WT,btoa:Iv,btoaPolyfill:ZT,fromBase64:i0,toBase64:su,encode:su,encodeURI:hw,encodeURL:hw,utob:GT,btou:HT,decode:i0,isValid:g3,fromUint8Array:If,toUint8Array:XT,extendString:QT,extendUint8Array:ek,extendBuiltins:y3};var v3=Object.defineProperty,tk=e=>{throw TypeError(e)},x3=(e,n,a)=>n in e?v3(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,dr=(e,n,a)=>x3(e,typeof n!="symbol"?n+"":n,a),Pv=(e,n,a)=>n.has(e)||tk("Cannot "+a),Ut=(e,n,a)=>(Pv(e,n,"read from private field"),a?a.call(e):n.get(e)),yl=(e,n,a)=>n.has(e)?tk("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),Fc=(e,n,a,c)=>(Pv(e,n,"write to private field"),n.set(e,a),a),ji=(e,n,a)=>(Pv(e,n,"access private method"),a);const qt={VISITOR:{code:null,flag:"visitor",name:"Visitor",latin:!0,isMode:!0,geocoding:!1},VISITOR_ENGLISH:{code:null,flag:"visitor_en",name:"Visitor English",latin:!0,isMode:!0,geocoding:!1},STYLE:{code:null,flag:"style",name:"Style",latin:!1,isMode:!0,geocoding:!1},STYLE_LOCK:{code:null,flag:"style_lock",name:"Style Lock",latin:!1,isMode:!0,geocoding:!1},...Bd};function dw(){if(typeof navigator>"u"){const e=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0];return e0(e)||qt.ENGLISH}return Array.from(new Set(navigator.languages.map(e=>e.split("-")[0]))).map(e=>e0(e)).filter(e=>e)[0]??qt.LOCAL}const _i={maptilerLogoURL:"https://api.maptiler.com/resources/logo.svg",maptilerURL:"https://www.maptiler.com/",maptilerApiHost:"api.maptiler.com",rtlPluginURL:"https://cdn.maptiler.com/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.min.js",primaryLanguage:qt.STYLE,secondaryLanguage:qt.LOCAL,terrainSourceURL:"https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",terrainSourceId:"maptiler-terrain"};Object.freeze(_i);const rk=a3();class b3 extends r3{constructor(){super(...arguments),dr(this,"primaryLanguage",_i.primaryLanguage),dr(this,"secondaryLanguage"),dr(this,"session",!0),dr(this,"caching",!0),dr(this,"_unit","metric"),dr(this,"_apiKey","")}set unit(n){this._unit=n,this.emit("unit",n)}get unit(){return this._unit}set apiKey(n){this._apiKey=n,iu.apiKey=n,this.emit("apiKey",n)}get apiKey(){return this._apiKey}set fetch(n){iu.fetch=n}get fetch(){return iu.fetch}}const yi=new b3,{addProtocol:pw}=lt,o0="localcache_source",s0="localcache",w3="maptiler_sdk",S3=1e3,T3=100,a0=typeof caches<"u";function k3(e,n){if(a0&&yi.caching&&yi.session&&e.host===_i.maptilerApiHost){if(n==="Source"&&e.href.includes("tiles.json"))return e.href.replace("https://",`${o0}://`);if(n==="Tile"||n==="Glyphs")return e.href.replace("https://",`${s0}://`)}return e.href}let Hy;async function nk(){return Hy||(Hy=await caches.open(w3)),Hy}let fw=0;async function C3(){const e=await nk(),n=await e.keys(),a=n.slice(0,Math.max(n.length-S3,0));for(const c of a)e.delete(c)}function I3(){pw(o0,async(e,n)=>{if(!e.url)throw new Error("");e.url=e.url.replace(`${o0}://`,"https://");const a=e;a.signal=n.signal;const c=await fetch(e.url,a),g=await c.json();return g.tiles&&g.tiles.length>0&&(g.tiles[0]+=`&last-modified=${c.headers.get("Last-Modified")}`),{data:g,cacheControl:c.headers.get("Cache-Control"),expires:c.headers.get("Expires")}}),pw(s0,async(e,n)=>{if(!e.url)throw new Error("");e.url=e.url.replace(`${s0}://`,"https://");const a=new URL(e.url),c=new URL(a);c.searchParams.delete("mtsid"),c.searchParams.delete("key");const g=c.toString(),x=new URL(a);x.searchParams.delete("last-modified");const v=x.toString(),d=async $=>({data:await $.arrayBuffer(),cacheControl:$.headers.get("Cache-Control"),expires:$.headers.get("Expires")}),L=await nk(),O=await L.match(g);if(O)return d(O);const G=e;G.signal=n.signal;const q=await fetch(v,G);return q.status>=200&&q.status<300&&(L.put(g,q.clone()).catch(()=>{}),++fw>T3&&(C3(),fw=0)),d(q)})}function E3(){if(typeof window>"u")return;const e=lt.getRTLTextPluginStatus();if(e==="unavailable"||e==="requested")try{lt.setRTLTextPlugin(_i.rtlPluginURL,!0)}catch{}}function P3(e,n){for(const a of e)typeof n[a]=="function"&&(n[a]=n[a].bind(n))}function au(e,n,a){const c=window.document.createElement(e);return n!==void 0&&(c.className=n),a&&a.appendChild(c),c}function ik(e){e.parentNode&&e.parentNode.removeChild(e)}function mw(e,n){let a=null;try{a=new URL(e)}catch{return{url:e}}return a.host===_i.maptilerApiHost&&(a.searchParams.has("key")||a.searchParams.append("key",yi.apiKey),yi.session&&a.searchParams.append("mtsid",rk)),{url:k3(a,n)}}function gw(e){return(n,a)=>{if(e!=null){const c=e(n,a),g=mw((c==null?void 0:c.url)??"",a);return{...c,...g}}return mw(n,a)}}function A3(){return document.createElement("canvas").getContext("webgl2")?null:typeof WebGL2RenderingContext<"u"?"Graphic rendering with WebGL2 has been disabled or is not supported by your graphic card. The map cannot be displayed.":"Your browser does not support graphic rendering with WebGL2. The map cannot be displayed."}function M3(e){const n=A3();if(!n)return;let a=null;if(typeof e=="string"?a=document.getElementById(e):e instanceof HTMLElement&&(a=e),!a)throw new Error("The Map container must be provided.");const c=document.createElement("div");throw c.innerHTML=n,c.classList.add("no-webgl-support-div"),a.appendChild(c),new Error(n)}let z3=class extends lt.Marker{addTo(e){return super.addTo(e)}};class X3 extends lt.Popup{addTo(n){return super.addTo(n)}}class Y3 extends lt.Style{constructor(n,a={}){super(n,a)}}class J3 extends lt.CanvasSource{onAdd(n){super.onAdd(n)}}class Q3 extends lt.GeoJSONSource{onAdd(n){super.onAdd(n)}}class eR extends lt.ImageSource{onAdd(n){super.onAdd(n)}}class tR extends lt.RasterTileSource{onAdd(n){super.onAdd(n)}}class rR extends lt.RasterDEMTileSource{onAdd(n){super.onAdd(n)}}class nR extends lt.VectorTileSource{onAdd(n){super.onAdd(n)}}class iR extends lt.VideoSource{onAdd(n){super.onAdd(n)}}class L3 extends lt.NavigationControl{onAdd(n){return super.onAdd(n)}}class R3 extends lt.GeolocateControl{onAdd(n){return super.onAdd(n)}}class oR extends lt.AttributionControl{onAdd(n){return super.onAdd(n)}}class D3 extends lt.LogoControl{onAdd(n){return super.onAdd(n)}}class B3 extends lt.ScaleControl{onAdd(n){return super.onAdd(n)}}class F3 extends lt.FullscreenControl{onAdd(n){return super.onAdd(n)}}class sR extends lt.TerrainControl{onAdd(n){return super.onAdd(n)}}class aR extends lt.BoxZoomHandler{constructor(n,a){super(n,a)}}class lR extends lt.ScrollZoomHandler{constructor(n,a){super(n,a)}}class cR extends lt.CooperativeGesturesHandler{constructor(n,a){super(n,a)}}class uR extends lt.KeyboardHandler{constructor(n){super(n)}}class hR extends lt.TwoFingersTouchPitchHandler{constructor(n){super(n)}}class dR extends lt.MapWheelEvent{constructor(n,a,c){super(n,a,c)}}class pR extends lt.MapTouchEvent{constructor(n,a,c){super(n,a,c)}}class fR extends lt.MapMouseEvent{constructor(n,a,c,g={}){super(n,a,c,g)}}class yw extends D3{constructor(n={}){super(n),dr(this,"logoURL",""),dr(this,"linkURL",""),this.logoURL=n.logoURL??_i.maptilerLogoURL,this.linkURL=n.linkURL??_i.maptilerURL}onAdd(n){this._map=n,this._compact=this.options.compact??!1,this._container=window.document.createElement("div"),this._container.className="maplibregl-ctrl";const a=window.document.createElement("a");return a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",a.style.display="block",a.style.height="23px",a.style.margin="0 0 -4px -4px",a.style.overflow="hidden",a.style.width="88px",a.style.backgroundImage=`url(${this.logoURL})`,a.style.backgroundSize="100px 30px",a.style.width="100px",a.style.height="30px",a.target="_blank",a.rel="noopener",a.href=this.linkURL,a.setAttribute("aria-label","MapTiler logo"),a.setAttribute("rel","noopener"),this._container.appendChild(a),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}}function _w(e){return e?typeof e=="string"||e instanceof String?!e.startsWith("http")&&e.toLowerCase().includes(".json")?e:AT(e):e instanceof MT?e.getExpandedStyleURL():e instanceof zT?e.getDefaultVariant().getExpandedStyleURL():e:LT[r0[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL()}class O3{constructor(){dr(this,"_map"),dr(this,"_container"),dr(this,"_terrainButton"),P3(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(n){return this._map=n,this._container=au("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=au("button","maplibregl-ctrl-terrain",this._container),au("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(){ik(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.hasTerrain()?this._map.disableTerrain():this._map.enableTerrain(),this._updateTerrainIcon()}_updateTerrainIcon(){this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.hasTerrain()?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))}}class N3 extends L3{constructor(n={}){super({showCompass:n.showCompass??!0,showZoom:n.showZoom??!0,visualizePitch:n.visualizePitch??!0}),dr(this,"_rotateCompassArrow",()=>{const a=this.options.visualizePitch?`scale(${Math.min(1.5,1/Math.cos(this._map.transform.pitch*(Math.PI/180))**.5)}) rotateX(${Math.min(70,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=a}),this._compass&&(this._compass.removeEventListener("click",this._compass.clickFunction),this._compass.addEventListener("click",a=>{this._map.getPitch()===0?this._map.easeTo({pitch:Math.min(this._map.getMaxPitch(),80)}):this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:a}):this._map.resetNorth({},{originalEvent:a})}))}_createButton(n,a){const c=super._createButton(n,a);return c.clickFunction=a,c}}const vw=lt.Marker,xw=lt.LngLat,$3=lt.LngLatBounds;class U3 extends R3{constructor(){super(...arguments),dr(this,"lastUpdatedCenter",new xw(0,0)),dr(this,"_updateCamera",n=>{var a,c;const g=new xw(n.coords.longitude,n.coords.latitude),x=n.coords.accuracy,v={bearing:this._map.getBearing(),...this.options.fitBoundsOptions,linear:!0},d=this._map.getZoom();d>(((c=(a=this.options)==null?void 0:a.fitBoundsOptions)==null?void 0:c.maxZoom)??30)&&(v.zoom=d),this._map.fitBounds($3.fromLngLat(g,x),v,{geolocateSource:!0});let L=!1;const O=()=>{L=!0};this._map.once("click",O),this._map.once("dblclick",O),this._map.once("dragstart",O),this._map.once("mousedown",O),this._map.once("touchstart",O),this._map.once("wheel",O),this._map.once("moveend",()=>{this._map.off("click",O),this._map.off("dblclick",O),this._map.off("dragstart",O),this._map.off("mousedown",O),this._map.off("touchstart",O),this._map.off("wheel",O),!L&&(this.lastUpdatedCenter=this._map.getCenter())})}),dr(this,"_finishSetupUI",n=>{if(this._map){if(n===!1){const a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}else{const a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=au("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new vw({element:this._dotElement}),this._circleElement=au("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new vw({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("move",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("moveend",a=>{const c=a.originalEvent&&a.originalEvent.type==="resize",g=this.lastUpdatedCenter.distanceTo(this._map.getCenter());!a.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!c&&g>1&&(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new Event("trackuserlocationend")))})}}),dr(this,"_onZoom",()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()})}_updateCircleRadius(){if(this._watchState!=="BACKGROUND"&&this._watchState!=="ACTIVE_LOCK")return;const n=[this._lastKnownPosition.coords.longitude,this._lastKnownPosition.coords.latitude],a=this._map.project(n),c=this._map.unproject([a.x,a.y]),g=this._map.unproject([a.x+20,a.y]),x=c.distanceTo(g)/20,v=Math.ceil(2*this._accuracy/x);this._circleElement.style.width=`${v}px`,this._circleElement.style.height=`${v}px`}}var Vi,es,xl,bl,uo,Ef,ni,ok,ho,sk;class Wy{constructor(n,a){yl(this,ni),yl(this,Vi),dr(this,"map"),yl(this,es),yl(this,xl),yl(this,bl),yl(this,uo,!1),yl(this,Ef),n.style!==void 0&&Fc(this,uo,!0),Fc(this,Vi,{zoomAdjust:-4,position:"top-right",...a,forceNoAttributionControl:!0,attributionControl:!1,navigationControl:!1,geolocateControl:!1,maptilerLogo:!1,minimap:!1,hash:!1,pitchAdjust:!1,...n,containerStyle:{border:"1px solid #000",width:"400px",height:"300px",...n.containerStyle??{}}}),n.lockZoom!==void 0&&(Ut(this,Vi).minZoom=n.lockZoom,Ut(this,Vi).maxZoom=n.lockZoom)}setStyle(n,a){Ut(this,uo)||this.map.setStyle(n,a),ji(this,ni,ho).call(this)}addLayer(n,a){return Ut(this,uo)||this.map.addLayer(n,a),ji(this,ni,ho).call(this),this.map}moveLayer(n,a){return Ut(this,uo)||this.map.moveLayer(n,a),ji(this,ni,ho).call(this),this.map}removeLayer(n){return Ut(this,uo)||this.map.removeLayer(n),ji(this,ni,ho).call(this),this}setLayerZoomRange(n,a,c){return Ut(this,uo)||this.map.setLayerZoomRange(n,a,c),ji(this,ni,ho).call(this),this}setFilter(n,a,c){return Ut(this,uo)||this.map.setFilter(n,a,c),ji(this,ni,ho).call(this),this}setPaintProperty(n,a,c,g){return Ut(this,uo)||this.map.setPaintProperty(n,a,c,g),ji(this,ni,ho).call(this),this}setLayoutProperty(n,a,c,g){return Ut(this,uo)||this.map.setLayoutProperty(n,a,c,g),ji(this,ni,ho).call(this),this}setGlyphs(n,a){return Ut(this,uo)||this.map.setGlyphs(n,a),ji(this,ni,ho).call(this),this}onAdd(n){Fc(this,es,n),Fc(this,xl,au("div","maplibregl-ctrl maplibregl-ctrl-group"));for(const[a,c]of Object.entries(Ut(this,Vi).containerStyle))Ut(this,xl).style.setProperty(a,c);return Ut(this,Vi).container=Ut(this,xl),Ut(this,Vi).zoom=n.getZoom()+Ut(this,Vi).zoomAdjust,this.map=new ak(Ut(this,Vi)),this.map.once("style.load",()=>{this.map.resize()}),this.map.once("load",()=>{ji(this,ni,ok).call(this,Ut(this,Vi).parentRect),Fc(this,Ef,ji(this,ni,sk).call(this))}),Ut(this,xl)}onRemove(){var n;(n=Ut(this,Ef))==null||n.call(this),ik(Ut(this,xl))}}Vi=new WeakMap,es=new WeakMap,xl=new WeakMap,bl=new WeakMap,uo=new WeakMap,Ef=new WeakMap,ni=new WeakSet,ok=function(e){e===void 0||e.linePaint===void 0&&e.fillPaint===void 0||(Fc(this,bl,{type:"Feature",properties:{name:"parentRect"},geometry:{type:"Polygon",coordinates:[[[],[],[],[],[]]]}}),this.map.addSource("parentRect",{type:"geojson",data:Ut(this,bl)}),(e.lineLayout!==void 0||e.linePaint!==void 0)&&this.map.addLayer({id:"parentRectOutline",type:"line",source:"parentRect",layout:{...e.lineLayout},paint:{"line-color":"#FFF","line-width":1,"line-opacity":.85,...e.linePaint}}),e.fillPaint!==void 0&&this.map.addLayer({id:"parentRectFill",type:"fill",source:"parentRect",layout:{},paint:{"fill-color":"#08F","fill-opacity":.135,...e.fillPaint}}),ji(this,ni,ho).call(this))},ho=function(){if(Ut(this,bl)===void 0)return;const{devicePixelRatio:e}=window,n=Ut(this,es).getCanvas(),a=n.width/e,c=n.height/e,g=Ut(this,es).unproject.bind(Ut(this,es)),x=g([0,0]),v=g([a,0]),d=g([0,c]),L=g([a,c]);Ut(this,bl).geometry.coordinates=[[d.toArray(),L.toArray(),v.toArray(),x.toArray(),d.toArray()]],this.map.getSource("parentRect").setData(Ut(this,bl))},sk=function(){const{pitchAdjust:e}=Ut(this,Vi),n=()=>{x("parent")},a=()=>{x("minimap")},c=()=>{Ut(this,es).on("move",n),this.map.on("move",a)},g=()=>{Ut(this,es).off("move",n),this.map.off("move",a)},x=v=>{g();const d=v==="parent"?Ut(this,es):this.map,L=v==="parent"?this.map:Ut(this,es),O=d.getCenter(),G=d.getZoom()+Ut(this,Vi).zoomAdjust*(v==="parent"?1:-1),q=d.getBearing(),$=d.getPitch();L.jumpTo({center:O,zoom:G,bearing:q,pitch:e?$:0}),ji(this,ni,ho).call(this),c()};return c(),()=>{g()}};const j3={POINT:"POINT",COUNTRY:"COUNTRY"};class ak extends lt.Map{constructor(n){M3(n.container),n.apiKey&&(yi.apiKey=n.apiKey);const a=_w(n.style),c=location.hash;yi.apiKey||console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");let g={compact:!1};n.customAttribution?g.customAttribution=n.customAttribution:n.attributionControl&&typeof n.attributionControl=="object"&&(g={...g,...n.attributionControl}),super({...n,style:a,maplibreLogo:!1,transformRequest:gw(n.transformRequest),attributionControl:n.forceNoAttributionControl===!0?!1:g}),dr(this,"isTerrainEnabled",!1),dr(this,"terrainExaggeration",1),dr(this,"primaryLanguage"),dr(this,"terrainGrowing",!1),dr(this,"terrainFlattening",!1),dr(this,"minimap"),dr(this,"forceLanguageUpdate"),dr(this,"languageAlwaysBeenStyle"),dr(this,"isReady",!1),yi.caching&&!a0&&console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"),yi.caching&&a0&&I3(),this.primaryLanguage=n.language??yi.primaryLanguage,this.forceLanguageUpdate=!(this.primaryLanguage===qt.STYLE||this.primaryLanguage===qt.STYLE_LOCK),this.languageAlwaysBeenStyle=this.primaryLanguage===qt.STYLE,this.terrainExaggeration=n.terrainExaggeration??this.terrainExaggeration,this.once("styledata",async()=>{if(!n.geolocate||n.center||n.hash&&c)return;try{if(n.geolocate===j3.COUNTRY){await this.fitToIpBounds();return}}catch(G){console.warn(G.message)}let O;try{await this.centerOnIpPoint(n.zoom),O=this.getCameraHash()}catch(G){console.warn(G.message)}(await navigator.permissions.query({name:"geolocation"})).state==="granted"&&navigator.geolocation.getCurrentPosition(G=>{O===this.getCameraHash()&&(this.terrain?this.easeTo({center:[G.coords.longitude,G.coords.latitude],zoom:n.zoom||12,duration:2e3}):this.once("terrain",()=>{this.easeTo({center:[G.coords.longitude,G.coords.latitude],zoom:n.zoom||12,duration:2e3})}))},null,{maximumAge:24*3600*1e3,timeout:5e3,enableHighAccuracy:!1})}),this.on("styledata",()=>{this.setPrimaryLanguage(this.primaryLanguage)}),this.on("styledata",()=>{this.getTerrain()===null&&this.isTerrainEnabled&&this.enableTerrain(this.terrainExaggeration)}),this.once("load",async()=>{let O={logo:null};try{const G=Object.keys(this.style.sourceCaches).map($=>this.getSource($)).filter($=>$&&"url"in $&&typeof $.url=="string"&&($==null?void 0:$.url.includes("tiles.json"))),q=new URL(G[0].url);q.searchParams.has("key")||q.searchParams.append("key",yi.apiKey),O=await(await fetch(q.href)).json()}catch{}if(n.forceNoAttributionControl!==!0)if("logo"in O&&O.logo){const G=O.logo;this.addControl(new yw({logoURL:G}),n.logoPosition)}else n.maptilerLogo&&this.addControl(new yw,n.logoPosition);if(n.scaleControl){const G=n.scaleControl===!0||n.scaleControl===void 0?"bottom-right":n.scaleControl,q=new B3({unit:yi.unit});this.addControl(q,G),yi.on("unit",$=>{q.setUnit($)})}if(n.navigationControl!==!1){const G=n.navigationControl===!0||n.navigationControl===void 0?"top-right":n.navigationControl;this.addControl(new N3,G)}if(n.geolocateControl!==!1){const G=n.geolocateControl===!0||n.geolocateControl===void 0?"top-right":n.geolocateControl;this.addControl(new U3({positionOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!0,showAccuracyCircle:!0,showUserLocation:!0}),G)}if(n.terrainControl){const G=n.terrainControl===!0||n.terrainControl===void 0?"top-right":n.terrainControl;this.addControl(new O3,G)}if(n.fullscreenControl){const G=n.fullscreenControl===!0||n.fullscreenControl===void 0?"top-right":n.fullscreenControl;this.addControl(new F3({}),G)}this.isReady=!0,this.fire("ready",{target:this})});let x=!1,v=!1,d;this.once("ready",()=>{x=!0,v&&this.fire("loadWithTerrain",d)}),this.once("style.load",()=>{const{minimap:O}=n;if(typeof O=="object"){const{zoom:G,center:q,style:$,language:_e,apiKey:ge,maptilerLogo:pe,antialias:Ue,refreshExpiredTiles:ne,maxBounds:ee,scrollZoom:ae,minZoom:we,maxZoom:ke,boxZoom:Pe,locale:Ie,fadeDuration:We,crossSourceCollisions:vt,clickTolerance:it,bounds:ot,fitBoundsOptions:Nt,pixelRatio:Ct,validateStyle:Bt}=n;this.minimap=new Wy(O,{zoom:G,center:q,style:$,language:_e,apiKey:ge,container:"null",maptilerLogo:pe,antialias:Ue,refreshExpiredTiles:ne,maxBounds:ee,scrollZoom:ae,minZoom:we,maxZoom:ke,boxZoom:Pe,locale:Ie,fadeDuration:We,crossSourceCollisions:vt,clickTolerance:it,bounds:ot,fitBoundsOptions:Nt,pixelRatio:Ct,validateStyle:Bt}),this.addControl(this.minimap,O.position??"bottom-left")}else O===!0?(this.minimap=new Wy({},n),this.addControl(this.minimap,"bottom-left")):O!==void 0&&O!==!1&&(this.minimap=new Wy({},n),this.addControl(this.minimap,O))});const L=O=>{O.terrain&&(v=!0,d={type:"loadWithTerrain",target:this,terrain:O.terrain},this.off("terrain",L),x&&this.fire("loadWithTerrain",d))};this.on("terrain",L),n.terrain&&this.enableTerrain(n.terrainExaggeration??this.terrainExaggeration)}async onLoadAsync(){return new Promise(n=>{if(this.loaded())return n(this);this.once("load",()=>{n(this)})})}async onReadyAsync(){return new Promise(n=>{if(this.isReady)return n(this);this.once("ready",()=>{n(this)})})}async onLoadWithTerrainAsync(){return new Promise(n=>{if(this.isReady&&this.terrain)return n(this);this.once("loadWithTerrain",()=>{n(this)})})}setStyle(n,a){var c;return(c=this.minimap)==null||c.setStyle(n),this.forceLanguageUpdate=!0,this.once("idle",()=>{this.forceLanguageUpdate=!1}),super.setStyle(_w(n),a)}addLayer(n,a){var c;return(c=this.minimap)==null||c.addLayer(n,a),super.addLayer(n,a)}moveLayer(n,a){var c;return(c=this.minimap)==null||c.moveLayer(n,a),super.moveLayer(n,a)}removeLayer(n){var a;return(a=this.minimap)==null||a.removeLayer(n),super.removeLayer(n)}setLayerZoomRange(n,a,c){var g;return(g=this.minimap)==null||g.setLayerZoomRange(n,a,c),super.setLayerZoomRange(n,a,c)}setFilter(n,a,c){var g;return(g=this.minimap)==null||g.setFilter(n,a,c),super.setFilter(n,a,c)}setPaintProperty(n,a,c,g){var x;return(x=this.minimap)==null||x.setPaintProperty(n,a,c,g),super.setPaintProperty(n,a,c,g)}setLayoutProperty(n,a,c,g){var x;return(x=this.minimap)==null||x.setLayoutProperty(n,a,c,g),super.setLayoutProperty(n,a,c,g)}setGlyphs(n,a){var c;return(c=this.minimap)==null||c.setGlyphs(n,a),super.setGlyphs(n,a)}getStyleLanguage(){return!this.style.stylesheet.metadata||typeof this.style.stylesheet.metadata!="object"?null:"maptiler:language"in this.style.stylesheet.metadata&&typeof this.style.stylesheet.metadata["maptiler:language"]=="string"?t0(this.style.stylesheet.metadata["maptiler:language"]):null}setLanguage(n){var a,c;(c=(a=this.minimap)==null?void 0:a.map)==null||c.setLanguage(n),this.onStyleReady(()=>{this.setPrimaryLanguage(n)})}setPrimaryLanguage(n){const a=this.getStyleLanguage(),c=VL(n,qt);if(!c){console.warn(`The language "${c}" is not supported.`);return}if(!(c.flag===qt.STYLE.flag&&a&&(a.flag===qt.AUTO.flag||a.flag===qt.VISITOR.flag))&&(c.flag!==qt.STYLE.flag&&(this.languageAlwaysBeenStyle=!1),this.languageAlwaysBeenStyle||this.primaryLanguage===c&&!this.forceLanguageUpdate))return;if(this.primaryLanguage.flag===qt.STYLE_LOCK.flag){console.warn("The language cannot be changed because this map has been instantiated with the STYLE_LOCK language flag.");return}this.primaryLanguage=c;let g=c;if(c.flag===qt.STYLE.flag){if(!a){console.warn("The style has no default languages or has an invalid one.");return}g=a}let x=qt.LOCAL.flag,v=`{${x}}`;g.flag===qt.VISITOR.flag?(x=dw().flag,v=["case",["all",["has",x],["has",qt.LOCAL.flag]],["case",["==",["get",x],["get",qt.LOCAL.flag]],["get",qt.LOCAL.flag],["format",["get",x],{"font-scale":.8},` +`,["get",qt.LOCAL.flag],{"font-scale":1.1}]],["get",qt.LOCAL.flag]]):g.flag===qt.VISITOR_ENGLISH.flag?(x=qt.ENGLISH.flag,v=["case",["all",["has",x],["has",qt.LOCAL.flag]],["case",["==",["get",x],["get",qt.LOCAL.flag]],["get",qt.LOCAL.flag],["format",["get",x],{"font-scale":.8},` +`,["get",qt.LOCAL.flag],{"font-scale":1.1}]],["get",qt.LOCAL.flag]]):g.flag===qt.AUTO.flag?(x=dw().flag,v=["case",["has",x],["get",x],["get",qt.LOCAL.flag]]):g===qt.LOCAL?(x=qt.LOCAL.flag,v=`{${x}}`):(x=g.flag,v=["case",["has",x],["get",x],["get",qt.LOCAL.flag]]);const{layers:d}=this.getStyle();for(const L of d){if(L.type!=="symbol")continue;const O=L,G=this.getSource(O.source);if(!G||!("url"in G&&typeof G.url=="string")||new URL(G.url).host!==_i.maptilerApiHost)continue;const{id:q,layout:$}=O;if(!$||!("text-field"in $))continue;const _e=this.getLayoutProperty(q,"text-field");typeof _e=="string"&&(_e.toLowerCase().includes("ref")||_e.toLowerCase().includes("housenumber"))||this.setLayoutProperty(q,"text-field",v)}}getPrimaryLanguage(){return this.primaryLanguage}getTerrainExaggeration(){return this.terrainExaggeration}hasTerrain(){return this.isTerrainEnabled}growTerrain(n,a=1e3){if(!this.terrain)return;const c=performance.now(),g=this.terrain.exaggeration,x=n-g,v=()=>{if(!this.terrain||this.terrainFlattening)return;const d=(performance.now()-c)/a;if(d<.99){const L=1-(1-d)**4,O=g+L*x;this.terrain.exaggeration=O,requestAnimationFrame(v)}else this.terrainGrowing=!1,this.terrainFlattening=!1,this.terrain.exaggeration=n;this._elevationFreeze=!1,this.triggerRepaint()};this.terrainGrowing=!0,this.terrainFlattening=!1,requestAnimationFrame(v)}enableTerrain(n=this.terrainExaggeration){if(n<0){console.warn("Terrain exaggeration cannot be negative.");return}const a=async g=>{!this.terrain||g.type!=="data"||g.dataType!=="source"||!("source"in g)||g.sourceId!=="maptiler-terrain"||g.source.type!=="raster-dem"||g.isSourceLoaded&&(this.off("data",a),this.growTerrain(n))},c=()=>{this.isTerrainEnabled=!0,this.terrainExaggeration=n,this.on("data",a),this.addSource(_i.terrainSourceId,{type:"raster-dem",url:_i.terrainSourceURL}),this.setTerrain({source:_i.terrainSourceId,exaggeration:0})};if(this.getTerrain()){this.isTerrainEnabled=!0,this.growTerrain(n);return}this.loaded()||this.isTerrainEnabled?c():this.once("load",()=>{this.getTerrain()&&this.getSource(_i.terrainSourceId)||c()})}disableTerrain(){if(!this.terrain)return;this.isTerrainEnabled=!1;const n=1*1e3,a=performance.now(),c=this.terrain.exaggeration,g=()=>{if(!this.terrain||this.terrainGrowing)return;const x=(performance.now()-a)/n;if(this._elevationFreeze=!1,x<.99){const v=(1-x)**4,d=c*v;this.terrain.exaggeration=d,requestAnimationFrame(g)}else this.terrain.exaggeration=0,this.terrainGrowing=!1,this.terrainFlattening=!1,this.setTerrain(),this.getSource(_i.terrainSourceId)&&this.removeSource(_i.terrainSourceId);this.triggerRepaint()};this.terrainGrowing=!1,this.terrainFlattening=!0,requestAnimationFrame(g)}setTerrainExaggeration(n,a=!0){!a&&this.terrain?(this.terrainExaggeration=n,this.terrain.exaggeration=n,this.triggerRepaint()):this.enableTerrain(n)}onStyleReady(n){this.isStyleLoaded()?n():this.once("styledata",()=>{n()})}async fitToIpBounds(){const n=await nw.info();this.fitBounds(n.country_bounds,{duration:0,padding:100})}async centerOnIpPoint(n){const a=await nw.info();this.jumpTo({center:[(a==null?void 0:a.longitude)??0,(a==null?void 0:a.latitude)??0],zoom:n||11})}getCameraHash(){const n=new Float32Array(5),a=this.getCenter();return n[0]=a.lng,n[1]=a.lat,n[2]=this.getZoom(),n[3]=this.getPitch(),n[4]=this.getBearing(),_3.fromUint8Array(new Uint8Array(n.buffer))}getSdkConfig(){return yi}getMaptilerSessionId(){return rk}setTransformRequest(n){return super.setTransformRequest(gw(n)),this}}function lf(e){const n=e.toString(16);return n.length===1?`0${n}`:n}function V3(e){return`#${lf(e[0])}${lf(e[1])}${lf(e[2])}${e.length===4?lf(e[3]):""}`}class dt extends Array{constructor(n={}){super(),dr(this,"min",0),dr(this,"max",1),"min"in n&&(this.min=n.min),"max"in n&&(this.max=n.max),"stops"in n&&this.setStops(n.stops,{clone:!1})}static fromArrayDefinition(n){return new dt({stops:n.map(a=>({value:a[0],color:a[1]}))})}setStops(n,a={clone:!0}){const c=a.clone?this.clone():this;c.length=0;let g=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(let v=0;vv.value=this.at(-1).value)return this.at(-1).color;for(let c=0;cthis[c+1].value)continue;const g=this[c].color;if(!a.smooth)return g.slice();const x=this[c].value,v=this[c+1].value,d=this[c+1].color,L=(v-n)/(v-x);return g.map((O,G)=>Math.round(O*L+d[G]*(1-L)))}return[0,0,0]}getColorHex(n,a={smooth:!0,withAlpha:!1}){return V3(this.getColor(n,a))}getColorRelative(n,a={smooth:!0}){const c=this.getBounds();return this.getColor(c.min+n*(c.max-c.min),a)}getCanvasStrip(n={horizontal:!0,size:512,smooth:!0}){const a=document.createElement("canvas");a.width=n.horizontal?n.size:1,a.height=n.horizontal?1:n.size;const c=a.getContext("2d");if(!c)throw new Error("Canvs context is missing");const g=c.getImageData(0,0,a.width,a.height),x=g.data,v=n.size,d=this[0].value,L=(this.at(-1).value-d)/v;for(let O=0;O3?G[3]:255}return c.putImageData(g,0,0),a}resample(n,a=15){const c=this.getBounds(),g=this.scale(0,1),x=1/(a-1);let v;if(n==="ease-in-square")v=Array.from({length:a},(d,L)=>{const O=L*x,G=O**2,q=g.getColor(G);return{value:O,color:q}});else if(n==="ease-out-square")v=Array.from({length:a},(d,L)=>{const O=L*x,G=1-(1-O)**2,q=g.getColor(G);return{value:O,color:q}});else if(n==="ease-out-sqrt")v=Array.from({length:a},(d,L)=>{const O=L*x,G=O**.5,q=g.getColor(G);return{value:O,color:q}});else if(n==="ease-in-sqrt")v=Array.from({length:a},(d,L)=>{const O=L*x,G=1-(1-O)**.5,q=g.getColor(G);return{value:O,color:q}});else if(n==="ease-out-exp")v=Array.from({length:a},(d,L)=>{const O=L*x,G=1-2**(-10*O),q=g.getColor(G);return{value:O,color:q}});else if(n==="ease-in-exp")v=Array.from({length:a},(d,L)=>{const O=L*x,G=2**(10*O-10),q=g.getColor(G);return{value:O,color:q}});else throw new Error("Invalid ressampling method.");return new dt({stops:v}).scale(c.min,c.max)}transparentStart(){const n=this.getRawColorStops();n.unshift({value:n[0].value,color:n[0].color.slice()}),n[1].value+=.001;for(const a of n)a.color.length===3&&a.color.push(255);return n[0].color[3]=0,new dt({stops:n})}hasTransparentStart(){return this[0].color.length===4&&this[0].color[3]===0}}new dt({stops:[{value:0,color:[0,0,0,0]},{value:1,color:[0,0,0,0]}]}),new dt({stops:[{value:0,color:[0,0,0]},{value:1,color:[255,255,255]}]}),new dt({stops:[{value:0,color:[0,0,131]},{value:.125,color:[0,60,170]},{value:.375,color:[5,255,255]},{value:.625,color:[255,255,0]},{value:.875,color:[250,0,0]},{value:1,color:[128,0,0]}]}),new dt({stops:[{value:0,color:[255,0,0]},{value:.169,color:[253,255,2]},{value:.173,color:[247,255,2]},{value:.337,color:[0,252,4]},{value:.341,color:[0,252,10]},{value:.506,color:[1,249,255]},{value:.671,color:[2,0,253]},{value:.675,color:[8,0,253]},{value:.839,color:[255,0,251]},{value:.843,color:[255,0,245]},{value:1,color:[255,0,6]}]}),new dt({stops:[{value:0,color:[0,0,0]},{value:.3,color:[230,0,0]},{value:.6,color:[255,210,0]},{value:1,color:[255,255,255]}]}),new dt({stops:[{value:0,color:[255,0,255]},{value:1,color:[255,255,0]}]}),new dt({stops:[{value:0,color:[0,128,102]},{value:1,color:[255,255,102]}]}),new dt({stops:[{value:0,color:[255,0,0]},{value:1,color:[255,255,0]}]}),new dt({stops:[{value:0,color:[0,0,255]},{value:1,color:[0,255,128]}]}),new dt({stops:[{value:0,color:[0,0,0]},{value:.376,color:[84,84,116]},{value:.753,color:[169,200,200]},{value:1,color:[255,255,255]}]}),new dt({stops:[{value:0,color:[0,0,0]},{value:.804,color:[255,160,102]},{value:1,color:[255,199,127]}]}),new dt({stops:[{value:0,color:[0,0,0]},{value:1,color:[255,255,255]}]}),new dt({stops:[{value:0,color:[8,29,88]},{value:.125,color:[37,52,148]},{value:.25,color:[34,94,168]},{value:.375,color:[29,145,192]},{value:.5,color:[65,182,196]},{value:.625,color:[127,205,187]},{value:.75,color:[199,233,180]},{value:.875,color:[237,248,217]},{value:1,color:[255,255,217]}]}),new dt({stops:[{value:0,color:[0,68,27]},{value:.125,color:[0,109,44]},{value:.25,color:[35,139,69]},{value:.375,color:[65,171,93]},{value:.5,color:[116,196,118]},{value:.625,color:[161,217,155]},{value:.75,color:[199,233,192]},{value:.875,color:[229,245,224]},{value:1,color:[247,252,245]}]}),new dt({stops:[{value:0,color:[128,0,38]},{value:.125,color:[189,0,38]},{value:.25,color:[227,26,28]},{value:.375,color:[252,78,42]},{value:.5,color:[253,141,60]},{value:.625,color:[254,178,76]},{value:.75,color:[254,217,118]},{value:.875,color:[255,237,160]},{value:1,color:[255,255,204]}]}),new dt({stops:[{value:0,color:[0,0,255]},{value:1,color:[255,0,0]}]}),new dt({stops:[{value:0,color:[5,10,172]},{value:.35,color:[106,137,247]},{value:.5,color:[190,190,190]},{value:.6,color:[220,170,132]},{value:.7,color:[230,145,90]},{value:1,color:[178,10,28]}]}),new dt({stops:[{value:0,color:[0,0,255]},{value:.1,color:[51,153,255]},{value:.2,color:[102,204,255]},{value:.3,color:[153,204,255]},{value:.4,color:[204,204,255]},{value:.5,color:[255,255,255]},{value:.6,color:[255,204,255]},{value:.7,color:[255,153,255]},{value:.8,color:[255,102,204]},{value:.9,color:[255,102,102]},{value:1,color:[255,0,0]}]}),new dt({stops:[{value:0,color:[150,0,90]},{value:.125,color:[0,0,200]},{value:.25,color:[0,25,255]},{value:.375,color:[0,152,255]},{value:.5,color:[44,255,150]},{value:.625,color:[151,255,0]},{value:.75,color:[255,234,0]},{value:.875,color:[255,111,0]},{value:1,color:[255,0,0]}]}),new dt({stops:[{value:0,color:[12,51,131]},{value:.25,color:[10,136,186]},{value:.5,color:[242,211,56]},{value:.75,color:[242,143,56]},{value:1,color:[217,30,30]}]}),new dt({stops:[{value:0,color:[0,0,0]},{value:.2,color:[230,0,0]},{value:.4,color:[230,210,0]},{value:.7,color:[255,255,255]},{value:1,color:[160,200,255]}]}),new dt({stops:[{value:0,color:[0,0,130]},{value:.1,color:[0,180,180]},{value:.2,color:[40,210,40]},{value:.4,color:[230,230,50]},{value:.6,color:[120,70,20]},{value:1,color:[255,255,255]}]}),new dt({stops:[{value:0,color:[0,0,0]},{value:.15,color:[30,0,100]},{value:.4,color:[120,0,100]},{value:.6,color:[160,90,0]},{value:.8,color:[230,200,0]},{value:1,color:[255,250,220]}]}),new dt({stops:[{value:0,color:[68,1,84]},{value:.13,color:[71,44,122]},{value:.25,color:[59,81,139]},{value:.38,color:[44,113,142]},{value:.5,color:[33,144,141]},{value:.63,color:[39,173,129]},{value:.75,color:[92,200,99]},{value:.88,color:[170,220,50]},{value:1,color:[253,231,37]}]}),new dt({stops:[{value:0,color:[0,0,4]},{value:.13,color:[31,12,72]},{value:.25,color:[85,15,109]},{value:.38,color:[136,34,106]},{value:.5,color:[186,54,85]},{value:.63,color:[227,89,51]},{value:.75,color:[249,140,10]},{value:.88,color:[249,201,50]},{value:1,color:[252,255,164]}]}),new dt({stops:[{value:0,color:[0,0,4]},{value:.13,color:[28,16,68]},{value:.25,color:[79,18,123]},{value:.38,color:[129,37,129]},{value:.5,color:[181,54,122]},{value:.63,color:[229,80,100]},{value:.75,color:[251,135,97]},{value:.88,color:[254,194,135]},{value:1,color:[252,253,191]}]}),new dt({stops:[{value:0,color:[13,8,135]},{value:.13,color:[75,3,161]},{value:.25,color:[125,3,168]},{value:.38,color:[168,34,150]},{value:.5,color:[203,70,121]},{value:.63,color:[229,107,93]},{value:.75,color:[248,148,65]},{value:.88,color:[253,195,40]},{value:1,color:[240,249,33]}]}),new dt({stops:[{value:0,color:[125,0,179]},{value:.13,color:[172,0,187]},{value:.25,color:[219,0,170]},{value:.38,color:[255,0,130]},{value:.5,color:[255,63,74]},{value:.63,color:[255,123,0]},{value:.75,color:[234,176,0]},{value:.88,color:[190,228,0]},{value:1,color:[147,255,0]}]}),new dt({stops:[{value:0,color:[125,0,179]},{value:.13,color:[116,0,218]},{value:.25,color:[98,74,237]},{value:.38,color:[68,146,231]},{value:.5,color:[0,204,197]},{value:.63,color:[0,247,146]},{value:.75,color:[0,255,88]},{value:.88,color:[40,255,8]},{value:1,color:[147,255,0]}]}),new dt({stops:[{value:0,color:[125,0,179]},{value:.1,color:[199,0,180]},{value:.2,color:[255,0,121]},{value:.3,color:[255,108,0]},{value:.4,color:[222,194,0]},{value:.5,color:[150,255,0]},{value:.6,color:[0,255,55]},{value:.7,color:[0,246,150]},{value:.8,color:[50,167,222]},{value:.9,color:[103,51,235]},{value:1,color:[124,0,186]}]}),new dt({stops:[{value:0,color:[40,26,44]},{value:.13,color:[59,49,90]},{value:.25,color:[64,76,139]},{value:.38,color:[63,110,151]},{value:.5,color:[72,142,158]},{value:.63,color:[85,174,163]},{value:.75,color:[120,206,163]},{value:.88,color:[187,230,172]},{value:1,color:[253,254,204]}]}),new dt({stops:[{value:0,color:[47,15,62]},{value:.13,color:[87,23,86]},{value:.25,color:[130,28,99]},{value:.38,color:[171,41,96]},{value:.5,color:[206,67,86]},{value:.63,color:[230,106,84]},{value:.75,color:[242,149,103]},{value:.88,color:[249,193,135]},{value:1,color:[254,237,176]}]}),new dt({stops:[{value:0,color:[18,36,20]},{value:.13,color:[25,63,41]},{value:.25,color:[24,91,59]},{value:.38,color:[13,119,72]},{value:.5,color:[18,148,80]},{value:.63,color:[80,173,89]},{value:.75,color:[132,196,122]},{value:.88,color:[175,221,162]},{value:1,color:[215,249,208]}]}),new dt({stops:[{value:0,color:[54,14,36]},{value:.13,color:[89,23,80]},{value:.25,color:[110,45,132]},{value:.38,color:[120,77,178]},{value:.5,color:[120,113,213]},{value:.63,color:[115,151,228]},{value:.75,color:[134,185,227]},{value:.88,color:[177,214,227]},{value:1,color:[230,241,241]}]}),new dt({stops:[{value:0,color:[30,4,110]},{value:.13,color:[47,14,176]},{value:.25,color:[41,45,236]},{value:.38,color:[25,99,212]},{value:.5,color:[68,131,200]},{value:.63,color:[114,156,197]},{value:.75,color:[157,181,203]},{value:.88,color:[200,208,216]},{value:1,color:[241,237,236]}]}),new dt({stops:[{value:0,color:[60,9,18]},{value:.13,color:[100,17,27]},{value:.25,color:[142,20,29]},{value:.38,color:[177,43,27]},{value:.5,color:[192,87,63]},{value:.63,color:[205,125,105]},{value:.75,color:[216,162,148]},{value:.88,color:[227,199,193]},{value:1,color:[241,237,236]}]}),new dt({stops:[{value:0,color:[64,5,5]},{value:.13,color:[106,6,15]},{value:.25,color:[144,26,7]},{value:.38,color:[168,64,3]},{value:.5,color:[188,100,4]},{value:.63,color:[206,136,11]},{value:.75,color:[220,174,25]},{value:.88,color:[231,215,44]},{value:1,color:[248,254,105]}]}),new dt({stops:[{value:0,color:[51,20,24]},{value:.13,color:[90,32,35]},{value:.25,color:[129,44,34]},{value:.38,color:[159,68,25]},{value:.5,color:[182,99,19]},{value:.63,color:[199,134,22]},{value:.75,color:[212,171,35]},{value:.88,color:[221,210,54]},{value:1,color:[225,253,75]}]}),new dt({stops:[{value:0,color:[145,105,18]},{value:.13,color:[184,71,38]},{value:.25,color:[186,58,115]},{value:.38,color:[160,71,185]},{value:.5,color:[110,97,218]},{value:.63,color:[50,123,164]},{value:.75,color:[31,131,110]},{value:.88,color:[77,129,34]},{value:1,color:[145,105,18]}]}),new dt({stops:[{value:0,color:[42,24,108]},{value:.13,color:[33,50,162]},{value:.25,color:[15,90,145]},{value:.38,color:[40,118,137]},{value:.5,color:[59,146,135]},{value:.63,color:[79,175,126]},{value:.75,color:[120,203,104]},{value:.88,color:[193,221,100]},{value:1,color:[253,239,154]}]}),new dt({stops:[{value:0,color:[4,35,51]},{value:.13,color:[23,51,122]},{value:.25,color:[85,59,157]},{value:.38,color:[129,79,143]},{value:.5,color:[175,95,130]},{value:.63,color:[222,112,101]},{value:.75,color:[249,146,66]},{value:.88,color:[249,196,65]},{value:1,color:[232,250,91]}]}),new dt({stops:[{value:0,color:[34,31,27]},{value:.13,color:[65,50,41]},{value:.25,color:[98,69,52]},{value:.38,color:[131,89,57]},{value:.5,color:[161,112,59]},{value:.63,color:[185,140,66]},{value:.75,color:[202,174,88]},{value:.88,color:[216,209,126]},{value:1,color:[233,246,171]}]}),new dt({stops:[{value:0,color:[17,32,64]},{value:.13,color:[35,52,116]},{value:.25,color:[29,81,156]},{value:.38,color:[31,113,162]},{value:.5,color:[50,144,169]},{value:.63,color:[87,173,176]},{value:.75,color:[149,196,189]},{value:.88,color:[203,221,211]},{value:1,color:[254,251,230]}]}),new dt({stops:[{value:0,color:[23,35,19]},{value:.13,color:[24,64,38]},{value:.25,color:[11,95,45]},{value:.38,color:[39,123,35]},{value:.5,color:[95,146,12]},{value:.63,color:[152,165,18]},{value:.75,color:[201,186,69]},{value:.88,color:[233,216,137]},{value:1,color:[255,253,205]}]}),new dt({stops:[{value:0,color:[0,0,0]},{value:.07,color:[22,5,59]},{value:.13,color:[60,4,105]},{value:.2,color:[109,1,135]},{value:.27,color:[161,0,147]},{value:.33,color:[210,2,142]},{value:.4,color:[251,11,123]},{value:.47,color:[255,29,97]},{value:.53,color:[255,54,69]},{value:.6,color:[255,85,46]},{value:.67,color:[255,120,34]},{value:.73,color:[255,157,37]},{value:.8,color:[241,191,57]},{value:.87,color:[224,220,93]},{value:.93,color:[218,241,142]},{value:1,color:[227,253,198]}]}),new dt({stops:[{value:0,color:[0,32,77,255]},{value:.125,color:[5,54,110,255]},{value:.25,color:[65,77,108,255]},{value:.375,color:[97,100,111,255]},{value:.5,color:[125,124,121,255]},{value:.625,color:[156,149,120,255]},{value:.75,color:[190,175,111,255]},{value:.875,color:[225,204,94,255]},{value:1,color:[255,235,70,255]}]}),new dt({stops:[{value:0,color:[48,18,59,255]},{value:.125,color:[70,107,227,255]},{value:.25,color:[40,187,236,255]},{value:.375,color:[49,242,153,255]},{value:.5,color:[162,252,60,255]},{value:.625,color:[237,208,58,255]},{value:.75,color:[251,128,34,255]},{value:.875,color:[210,49,5,255]},{value:1,color:[122,4,3,255]}]}),new dt({stops:[{value:0,color:[250,235,221,0]},{value:.133,color:[250,235,221,255]},{value:.266,color:[246,170,130,255]},{value:.4,color:[240,96,67,255]},{value:.533,color:[203,27,79,255]},{value:.666,color:[132,30,90,255]},{value:.8,color:[63,27,68,255]},{value:1,color:[3,5,26,255]}]}),new dt({stops:[{value:0,color:[11,4,5,255]},{value:.125,color:[43,28,53,255]},{value:.25,color:[62,53,107,255]},{value:.375,color:[59,86,152,255]},{value:.5,color:[53,123,162,255]},{value:.625,color:[53,158,170,255]},{value:.75,color:[73,193,173,255]},{value:.875,color:[150,221,181,255]},{value:1,color:[222,245,229,255]}]});E3();lt.Map;lt.Marker;lt.Popup;lt.Style;lt.CanvasSource;lt.GeoJSONSource;lt.ImageSource;lt.RasterTileSource;lt.RasterDEMTileSource;lt.VectorTileSource;lt.VideoSource;lt.NavigationControl;lt.GeolocateControl;lt.AttributionControl;lt.LogoControl;lt.ScaleControl;lt.FullscreenControl;lt.TerrainControl;lt.BoxZoomHandler;lt.ScrollZoomHandler;lt.CooperativeGesturesHandler;lt.KeyboardHandler;lt.TwoFingersTouchPitchHandler;lt.MapWheelEvent;lt.MapTouchEvent;lt.MapMouseEvent;lt.config;lt.getVersion;const q3={MAPTILER_API_KEY:"kf8ePBTXLGCU7i6Ij3Bs"},Z3=Us("MuiBox",["root"]),G3=xT(),H3=Fz({themeId:bT,defaultTheme:G3,defaultClassName:Z3.root,generateClassName:vv.generate});function W3(){const e=Ze.useRef(null),n=Ze.useRef(null),a={lng:139.753,lat:35.6844},[c]=Ze.useState(14);return yi.apiKey=q3.MAPTILER_API_KEY,Ze.useEffect(()=>{n.current||(n.current=new ak({container:e.current,style:LT.STREETS,center:[a.lng,a.lat],zoom:c}),new z3({color:"#FF0000"}).setLngLat([139.7525,35.6846]).addTo(n.current))},[a.lng,a.lat,c]),Wt.jsxs(H3,{sx:{display:"flex"},children:[Wt.jsx(FL,{}),Wt.jsx("div",{className:"container",children:Wt.jsx("div",{ref:e,id:"map",className:"map"})})]})}function K3(){return Wt.jsx("div",{className:"App",children:Wt.jsx(W3,{})})}Xy.createRoot(document.getElementById("root")).render(Wt.jsx(wl.StrictMode,{children:Wt.jsx(K3,{})})); diff --git a/MagdalenaKuch-patch-1/index.html b/MagdalenaKuch-patch-1/index.html new file mode 100644 index 0000000..b396aeb --- /dev/null +++ b/MagdalenaKuch-patch-1/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite + React + + + + +
+ + diff --git a/MagdalenaKuch-patch-1/vite.svg b/MagdalenaKuch-patch-1/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/MagdalenaKuch-patch-1/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file