PageSourceSearch

https://www.eenetzwerk.de/assets/mapkick--bundle-6463b74e.js

js eenetzwerk.de collected 2026-10-08 12:00:59 UTC 856,983 bytes, 4 lines download raw bytes

1// mapkick/[email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/mapkick.bundle.js
2
3(function(tt,et){"object"===typeof exports&&"undefined"!==typeof module?module.exports=et():"function"===typeof define&&define.amd?define(et):(tt="undefined"!==typeof globalThis?globalThis:tt||self,tt.Mapkick=et())})(void 0,(function(){function styleInject(tt,et){void 0===et&&(et={});var rt=et.insertAt;if(tt&&"undefined"!==typeof document){var it=document.head||document.getElementsByTagName("head")[0];var nt=document.createElement("style");nt.type="text/css";"top"===rt&&it.firstChild?it.insertBefore(nt,it.firstChild):it.appendChild(nt);nt.styleSheet?nt.styleSheet.cssText=tt:nt.appendChild(document.createTextNode(tt))}}var tt=".mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-canvas{position:absolute;left:0;top:0}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;background:#fff}.mapboxgl-ctrl-group:not(:empty){-moz-box-shadow:0 0 2px rgba(0,0,0,.1);-webkit-box-shadow:0 0 2px rgba(0,0,0,.1);box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:focus:only-child{border-radius:inherit}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E\")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E\")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E\")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E\")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3
3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3
3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{-webkit-animation:mapboxgl-spin 2s linear infinite;-moz-animation:mapboxgl-spin 2s infinite linear;-o-animation:mapboxgl-spin 2s infinite linear;-ms-animation:mapboxgl-spin 2s infinite linear;animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3
3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3
3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3
3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E\")}}@-webkit-keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@-moz-keyframes mapboxgl-spin{0%{-moz-transform:rotate(0deg)}to{-moz-transform:rotate(1turn)}}@-o-keyframes mapboxgl-spin{0%{-o-transform:rotate(0deg)}to{-o-transform:rotate(1turn)}}@-ms-keyframes mapboxgl-spin{0%{-ms-transform:rotate(0deg)}to{-ms-transform:rotate(1turn)}}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg opacity='.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg opacity='.9' fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3
3E%3C/g%3E%3C/svg%3E\")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.
312.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/svg%3E\")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E\");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner,.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E\")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E\")}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{-webkit-flex-direction:column;flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.mapboxgl-popup-anchor-left{-webkit-flex-direction:row;flex-direction:row}.mapboxgl-popup-anchor-right{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:\"\";position:absolute;-webkit-animation:mapboxgl-user-location-dot-pulse 2s infinite;-moz-animation:mapboxgl-user-location-dot-pulse 2s infinite;-ms-animation:mapboxgl-user-location-dot-pulse 2s infinite;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px rgba(0,0,0,.35)}@-webkit-keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);opacity:0}
3to{-webkit-transform:scale(1);opacity:0}}@-ms-keyframes mapboxgl-user-location-dot-pulse{0%{-ms-transform:scale(1);opacity:1}70%{-ms-transform:scale(3);opacity:0}to{-ms-transform:scale(1);opacity:0}}@keyframes mapboxgl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,.2);width:1px;height:1px;border-radius:100%}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}}";styleInject(tt);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self&&self;var et={};var rt={get exports(){return et},set exports(tt){et=tt}};(function(tt,et){(function(et,rt){tt.exports=rt()})(0,(function(){var tt,et,rt;function define(it,nt){if(tt)if(et){var ot="var sharedChunk = {}; ("+tt+")(sharedChunk); ("+et+")(sharedChunk);";var at={};tt(at);rt=nt(at);"undefined"!==typeof window&&(rt.workerUrl=window.URL.createObjectURL(new Blob([ot],{type:"text/javascript"})))}else et=nt;else tt=nt}define(["exports"],(function(tt){function e(tt,et){return tt(et={exports:{}},et.exports),et.exports}var et=n;function n(tt,et,rt,it){this.cx=3*tt,this.bx=3*(rt-tt)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*et,this.by=3*(it-et)-this.cy,this.ay=1-this.cy-this.by,this.p1x=tt,this.p1y=it,this.p2x=rt,this.p2y=it}n.prototype.sampleCurveX=function(tt){return((this.ax*tt+this.bx)*tt+this.cx)*tt},n.prototype.sampleCurveY=function(tt){return((this.ay*tt+this.by)*tt+this.cy)*tt},n.prototype.sampleCurveDerivativeX=function(tt){return(3*this.ax*tt+2*this.bx)*tt+this.cx},n.prototype.solveCurveX=function(tt,et){var rt,it,nt,ot,at;for(void 0===et&&(et=1e-6),nt=tt,at=0;at<8;at++){if(ot=this.sampleCurveX(nt)-tt,Math.abs(ot)<et)return nt;var st=this.sampleCurveDerivativeX(nt);if(Math.abs(st)<1e-6)break;nt-=ot/st}if((nt=tt)<(rt=0))return rt;if(nt>(it=1))return it;for(;rt<it;){if(ot=this.sampleCurveX(nt),Math.abs(ot-tt)<et)return nt;tt>ot?rt=nt:it=nt,nt=.5*(it-rt)+rt}return nt},n.prototype.solve=function(tt,et){return this.sampleCurveY(this.solveCurveX(tt,et))};var rt=a;function a(tt,et){this.x=tt,this.y=et}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(tt){return this.clone()._add(tt)},sub:function(tt){return this.clone()._sub(tt)},multByPoint:function(tt){return this.clone()._multByPoint(tt)},divByPoint:function(tt){return this.clone()._divByPoint(tt)},mult:function(tt){return this.clone()._mult(tt)},div:function(tt){return this.clone()._div(tt)},rotate:function(tt){return this.clone()._rotate(tt)},rotateAround:function(tt,et){return this.clone()._rotateAround(tt,et)},matMult:function(tt){return this.clone()._matMult(tt)},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(tt){return this.x===tt.x&&this.y===tt.y},dist:function(tt){return Math.sqrt(this.distSqr(tt))},distSqr:function(tt){var et=tt.x-this.x,rt=tt.y-this.y;return et*et+rt*rt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(tt){return Math.atan2(this.y-tt.y,this.x-tt.x)},angleWith:function(tt){return this.angleWithSep(tt.x,tt.y)},angleWithSep:function(tt,et){return Math.atan2(this.x*et-this.y*tt,this.x*tt+this.y*et)},_matMult:function(tt){var et=tt[2]*this.x+tt[3]*this.y;return this.x=tt[0]*this.x+tt[1]*this.y,this.y=et,this},_add:function(tt){return this.x+=tt.x,this.y+=tt.y,this},_sub:function(tt){return this.x-=tt.x,this.y-=tt.y,this},_mult:function(tt){return this.x*=tt,this.y*=tt,this},_div:function(tt){return this.x/=tt,this.y/=tt,this},_multByPoint:function(tt){return this.x*=tt.x,this.y*=tt.y,this},_divByPoint:function(tt){return this.x/=tt.x,this.y/=tt.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var tt=this.y;return this.y=this.x,this.x=-tt,this},_rotate:function(tt){var et=Math.cos(tt),rt=Math.sin(tt),it=rt*this.x+et*this.y;return this.x=et*this.x-rt*this.y,this.y=it,this}
vendor: 19,905 bytes, line 3
3,_rotateAround:function(tt,et){var rt=Math.cos(tt),it=Math.sin(tt),nt=et.y+it*(this.x-et.x)+rt*(this.y-et.y);return this.x=et.x+rt*(this.x-et.x)-it*(this.y-et.y),this.y=nt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(tt){return tt instanceof a?tt:Array.isArray(tt)?new a(tt[0],tt[1]):tt};var it="undefined"!=typeof self?self:{},nt=Math.pow(2,53)-1;function u(tt,rt,it,nt){var ot=new et(tt,rt,it,nt);return function(tt){return ot.solve(tt)}}var ot=u(.25,.1,.25,1);function p(tt,et,rt){return Math.min(rt,Math.max(et,tt))}function c(tt,et,rt){var it=rt-et,nt=((tt-et)%it+it)%it+et;return nt===et?rt:nt}function h(tt){var et=arguments;for(var rt=[],it=arguments.length-1;it-- >0;)rt[it]=et[it+1];for(var nt=0,ot=rt;nt<ot.length;nt+=1){var at=ot[nt];for(var st in at)tt[st]=at[st]}return tt}var at=1;function y(){return at++}function d(){return function t(tt){return tt?(tt^16*Math.random()>>tt/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function m(tt){return!!tt&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(tt)}function v(tt,et){tt.forEach((function(tt){et[tt]&&(et[tt]=et[tt].bind(et))}))}function g(tt,et){return-1!==tt.indexOf(et,tt.length-et.length)}function x(tt,et,rt){var it={};for(var nt in tt)it[nt]=et.call(rt||this,tt[nt],nt,tt);return it}function b(tt,et,rt){var it={};for(var nt in tt)et.call(rt||this,tt[nt],nt,tt)&&(it[nt]=tt[nt]);return it}function w(tt){return Array.isArray(tt)?tt.map(w):"object"==typeof tt&&tt?x(tt,w):tt}var st={};function A(tt){st[tt]||("undefined"!=typeof console&&console.warn(tt),st[tt]=!0)}function S(tt,et,rt){return(rt.y-tt.y)*(et.x-tt.x)>(et.y-tt.y)*(rt.x-tt.x)}function k(tt){for(var et=0,rt=0,it=tt.length,nt=it-1,ot=void 0,at=void 0;rt<it;nt=rt++)et+=((at=tt[nt]).x-(ot=tt[rt]).x)*(ot.y+at.y);return et}function I(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function z(tt){var et={};if(tt.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(tt,rt,it,nt){var ot=it||nt;return et[rt]=!ot||ot.toLowerCase(),""})),et["max-age"]){var rt=parseInt(et["max-age"],10);isNaN(rt)?delete et["max-age"]:et["max-age"]=rt}return et}var ct=null;function E(tt){if(null==ct){var et=tt.navigator?tt.navigator.userAgent:null;ct=!!tt.safari||!(!et||!(/\b(iPad|iPhone|iPod)\b/.test(et)||et.match("Safari")&&!et.match("Chrome")))}return ct}function P(tt){try{var et=it[tt];return et.setItem("_mapbox_test_",1),et.removeItem("_mapbox_test_"),!0}catch(tt){return!1}}var ht,dt,mt,yt,gt=it.performance&&it.performance.now?it.performance.now.bind(it.performance):Date.now.bind(Date),vt=it.requestAnimationFrame||it.mozRequestAnimationFrame||it.webkitRequestAnimationFrame||it.msRequestAnimationFrame,_t=it.cancelAnimationFrame||it.mozCancelAnimationFrame||it.webkitCancelAnimationFrame||it.msCancelAnimationFrame,Rt={now:gt,frame:function(tt){var et=vt(tt);return{cancel:function(){return _t(et)}}},getImageData:function(tt,et){void 0===et&&(et=0);var rt=it.document.createElement("canvas"),nt=rt.getContext("2d");if(!nt)throw new Error("failed to create canvas 2d context");return rt.width=tt.width,rt.height=tt.height,nt.drawImage(tt,0,0,tt.width,tt.height),nt.getImageData(-et,-et,tt.width+2*et,tt.height+2*et)},resolveURL:function(tt){return ht||(ht=it.document.createElement("a")),ht.href=tt,ht.href},hardwareConcurrency:it.navigator&&it.navigator.hardwareConcurrency||4,get devicePixelRatio(){return it.devicePixelRatio},get prefersReducedMotion(){return!!it.matchMedia&&(null==dt&&(dt=it.matchMedia("(prefers-reduced-motion: reduce)")),dt.matches)}},Ot={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Zt={supported:!1,testSupport:function(tt){!Ze&&yt&&(Ge?N(tt):mt=tt)}},Ze=!1,Ge=!1;function N(tt){var et=tt.createTexture();tt.bindTexture(tt.TEXTURE_2D,et);try{if(tt.texImage2D(tt.TEXTURE_2D,0,tt.RGBA,tt.RGBA,tt.UNSIGNED_BYTE,yt),tt.isContextLost())return;Zt.supported=!0}catch(tt){}tt.deleteTexture(et),Ze=!0}it.document&&((yt=it.document.createElement("img")).onload=function(){mt&&N(mt),mt=null,Ge=!0},yt.onerror=function(){Ze=!0,mt=null},yt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Xe="01",G=function(tt,et){this._transformRequestFn=tt,this._customAccessToken=et,this._createSkuToken()};function Z(tt){return 0===tt.indexOf("mapbox:")}G.prototype._createSkuToken=function(){var tt=function(){for(var tt="",et=0;et<10;et++)tt+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Xe,tt].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=tt.token,this._skuTokenExpiresAt=tt.tokenExpiresAt},G.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},G.prototype.transformRequest=function(tt,et){return this._transformRequestFn&&this._transformRequestFn(tt,et)||{url:tt}},G.prototype.normalizeStyleURL=function(tt,et){if(!Z(tt))return tt;var rt=Y(tt);return rt.path="/styles/v1"+rt.path,this._makeAPIURL(rt,this._customAccessToken||et)},G.prototype.normalizeGlyphsURL=function(tt,et){if(!Z(tt))return tt;var rt=Y(tt);return rt.path="/fonts/v1"+rt.path,this._makeAPIURL(rt,this._customAccessToken||et)},G.prototype.normalizeSourceURL=function(tt,et){if(!Z(tt))return tt;var rt=Y(tt);return rt.path="/v4/"+rt.authority+".json",rt.params.push("secure"),this._makeAPIURL(rt,this._customAccessToken||et)},G.prototype.normalizeSpriteURL=function(tt,et,rt,it){var nt=Y(tt);return Z(tt)?(nt.path="/styles/v1"+nt.path+"/sprite"+et+rt,this._makeAPIURL(nt,this._customAccessToken||it)):(nt.path+=""+et+rt,$(nt))},G.prototype.normalizeTileURL=function(tt,et){if(this._isSkuTokenExpired()&&this._createSkuToken(),tt&&!Z(tt))return tt;var rt=Y(tt);rt.path=rt.path.replace(/(\.(png|jpg)\d*)(?=$)/,(Rt.devicePixelRatio>=2||512===et?"@2x":"")+(Zt.supported?".webp":"$1")),rt.path=rt.path.replace(/^.+\/v4\//,"/"),rt.path="/v4"+rt.path;var it=this._customAccessToken||function(tt){for(var et=0,rt=tt;et<rt.length;et+=1){var it=rt[et].match(/^access_token=(.*)$/);if(it)return it[1]}return null}(rt.params)||Ot.ACCESS_TOKEN;return Ot.REQUIRE_ACCESS_TOKEN&&it&&this._skuToken&&rt.params.push("sku="+this._skuToken),this._makeAPIURL(rt,it)},G.prototype.canonicalizeTileURL=function(tt,et){var rt=Y(tt);if(!rt.path.match(/(^\/v4\/)/)||!rt.path.match(/\.[\w]+$/))return tt;var it="mapbox://tiles/";it+=rt.path.replace("/v4/","");var nt=rt.params;return et&&(nt=nt.filter((function(tt){return!tt.match(/^access_token=/)}))),nt.length&&(it+="?"+nt.join("&")),it},G.prototype.canonicalizeTileset=function(tt,et){for(var rt=!!et&&Z(et),it=[],nt=0,ot=tt.tiles||[];nt<ot.length;nt+=1){var at=ot[nt];J(at)?it.push(this.canonicalizeTileURL(at,rt)):it.push(at)}return it},G.prototype._makeAPIURL=function(tt,et){var rt="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",it=Y(Ot.API_URL);if(tt.protocol=it.protocol,tt.authority=it.authority,"http"===tt.protocol){var nt=tt.params.indexOf("secure");nt>=0&&tt.params.splice(nt,1)}if("/"!==it.path&&(tt.path=""+it.path+tt.path),!Ot.REQUIRE_ACCESS_TOKEN)return $(tt);if(!(et=et||Ot.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+rt);if("s"===et[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+rt);return tt.params=tt.params.filter((function(tt){return-1===tt.indexOf("access_token")})),tt.params.push("access_token="+et),$(tt)};var Je=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function J(tt){return Je.test(tt)}var rr=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Y(tt){var et=tt.match(rr);if(!et)throw new Error("Unable to parse URL object");return{protocol:et[1],authority:et[2],path:et[3]||"/",params:et[4]?et[4].split("&"):[]}}function $(tt){var et=tt.params.length?"?"+tt.params.join("&"):"";return tt.protocol+"://"+tt.authority+tt.path+et}function W(tt){if(!tt)return null;var et=tt.split(".");if(!et||3!==et.length)return null;try{return JSON.parse(decodeURIComponent(it.atob(et[1]).split("").map((function(tt){return"%"+("00"+tt.charCodeAt(0).toString(16)).slice(-2)})).join("")))}catch(tt){return null}}var Q=function(tt){this.type=tt,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Q.prototype.getStorageKey=function(tt){var et,rt=W(Ot.ACCESS_TOKEN);return et=rt&&rt.u?it.btoa(encodeURIComponent(rt.u).replace(/%([0-9A-F]{2})/g,(function(tt,et){return String.fromCharCode(Number("0x"+et))}))):Ot.ACCESS_TOKEN||"",tt?"mapbox.eventData."+tt+":"+et:"mapbox.eventData:"+et},Q.prototype.fetchEventData=function(){var tt=P("localStorage"),et=this.getStorageKey(),rt=this.getStorageKey("uuid");if(tt)try{var nt=it.localStorage.getItem(et);nt&&(this.eventData=JSON.parse(nt));var ot=it.localStorage.getItem(rt);ot&&(this.anonId=ot)}catch(tt){A("Unable to read from LocalStorage")}},Q.prototype.saveEventData=function(){var tt=P("localStorage"),et=this.getStorageKey(),rt=this.getStorageKey("uuid");if(tt)try{it.localStorage.setItem(rt,this.anonId),Object.keys(this.eventData).length>=1&&it.localStorage.setItem(et,JSON.stringify(this.eventData))}catch(tt){A("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(tt){},Q.prototype.postEvent=function(tt,et,rt,it){var nt=this;if(Ot.EVENTS_URL){var ot=Y(Ot.EVENTS_URL);ot.params.push("access_token="+(it||Ot.ACCESS_TOKEN||""));var at={event:this.type,created:new Date(tt).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:Xe,userId:this.anonId},st=et?h(at,et):at,ct={url:$(ot),headers:{"Content-Type":"text/plain"},body:JSON.stringify([st])};this.pendingRequest=wt(ct,(function(tt){nt.pendingRequest=null,rt(tt),nt.saveEventData(),nt.processRequests(it)}))}},Q.prototype.queueRequest=function(tt,et){this.queue.push(tt),this.processRequests(et)};var wr,Ir,ti=function(tt){function e(){tt.call(this,"map.load"),this.success={},this.skuToken=""}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.postMapLoadEvent=function(tt,et,rt,it){this.skuToken=rt;var nt=!(!it&&!Ot.ACCESS_TOKEN),ot=Array.isArray(tt)&&tt.some((function(tt){return Z(tt)||J(tt)}));Ot.EVENTS_URL&&nt&&ot&&this.queueRequest({id:et,timestamp:Date.now()},it)},e.prototype.processRequests=function(tt){var et=this;if(!this.pendingRequest&&0!==this.queue.length){var rt=this.queue.shift(),it=rt.id,nt=rt.timestamp;it&&this.success[it]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=d()),this.postEvent(nt,{skuToken:this.skuToken},(function(tt){tt||it&&(et.success[it]=!0)}),tt))}},e}(Q),ni=new(function(tt){function e(et){tt.call(this,"appUserTurnstile"),this._customAccessToken=et}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.postTurnstileEvent=function(tt,et){Ot.EVENTS_URL&&Ot.ACCESS_TOKEN&&Array.isArray(tt)&&tt.some((function(tt){return Z(tt)||J(tt)}))&&this.queueRequest(Date.now(),et)},e.prototype.processRequests=function(tt){var et=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var rt=W(Ot.ACCESS_TOKEN),it=rt?rt.u:Ot.ACCESS_TOKEN,nt=it!==this.eventData.tokenU;m(this.anonId)||(this.anonId=d(),nt=!0);var ot=this.queue.shift();if(this.eventData.lastSuccess){var at=new Date(this.eventData.lastSuccess),st=new Date(ot),ct=(ot-this.eventData.lastSuccess)/864e5;nt=nt||ct>=1||ct<-1||at.getDate()!==st.getDate()}else nt=!0;if(!nt)return this.processRequests();this.postEvent(ot,{"enabled.telemetry":!1},(function(tt){tt||(et.eventData.lastSuccess=ot,et.eventData.tokenU=it)}),tt)}},e}(Q)),oi=ni.postTurnstileEvent.bind(ni),_i=new ti,ji=_i.postMapLoadEvent.bind(_i),Ki=500,Ji=50;function lt(){it.caches&&!wr&&(wr=it.caches.open("mapbox-tiles"))}function pt(tt){var et=tt.indexOf("?");return et<0?tt:tt.slice(0,et)}var an,_n=1/0;function ft(){return null==an&&(an=it.OffscreenCanvas&&new it.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof it.createImageBitmap),an}var xn={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(xn);var En=function(tt){function e(et,rt,it){401===rt&&J(it)&&(et+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),tt.call(this,et),this.status=rt,this.url=it,this.name=this.constructor.name,this.message=et}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),Tn=I()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===it.location.protocol?it.parent:it).location.href};var Cn,Pn,xt=function(tt,et){if(!(/^file:/.test(rt=tt.url)||/^file:/.test(Tn())&&!/^\w+:/.test(rt))){if(it.fetch&&it.Request&&it.AbortController&&it.Request.prototype.hasOwnProperty("signal"))return function(tt,et){var rt,nt=new it.AbortController,ot=new it.Request(tt.url,{method:tt.method||"GET",body:tt.body,credentials:tt.credentials,headers:tt.headers,referrer:Tn(),signal:nt.signal}),at=!1,st=!1,ct=(rt=ot.url).indexOf("sku=")>0&&J(rt);"json"===tt.type&&ot.headers.set("Accept","application/json");var l=function(rt,nt,at){if(!st){if(rt&&"SecurityError"!==rt.message&&A(rt),nt&&at)return p(nt);var ht=Date.now();it.fetch(ot).then((function(rt){if(rt.ok){var it=ct?rt.clone():null;return p(rt,it,ht)}return et(new En(rt.statusText,rt.status,tt.url))})).catch((function(tt){20!==tt.code&&et(new Error(tt.message))}))}},p=function(rt,nt,ct){("arrayBuffer"===tt.type?rt.arrayBuffer():"json"===tt.type?rt.json():rt.text()).then((function(tt){st||(nt&&ct&&function(tt,et,rt){if(lt(),wr){var nt={status:et.status,statusText:et.statusText,headers:new it.Headers};et.headers.forEach((function(tt,et){return nt.headers.set(et,tt)}));var ot=z(et.headers.get("Cache-Control")||"");ot["no-store"]||(ot["max-age"]&&nt.headers.set("Expires",new Date(rt+1e3*ot["max-age"]).toUTCString()),new Date(nt.headers.get("Expires")).getTime()-rt<42e4||function(tt,et){if(void 0===Ir)try{new Response(new ReadableStream),Ir=!0}catch(tt){Ir=!1}Ir?et(tt.body):tt.blob().then(et)}(et,(function(et){var rt=new it.Response(et,nt);lt(),wr&&wr.then((function(et){return et.put(pt(tt.url),rt)})).catch((function(tt){return A(tt.message)}))})))}}(ot,nt,ct),at=!0,et(null,tt,rt.headers.get("Cache-Control"),rt.headers.get("Expires")))})).catch((function(tt){st||et(new Error(tt.message))}))};return ct?function(tt,et){if(lt(),!wr)return et(null);var rt=pt(tt.url);wr.then((function(tt){tt.match(rt).then((function(it){var nt=function(tt){if(!tt)return!1;var et=new Date(tt.headers.get("Expires")||0),rt=z(tt.headers.get("Cache-Control")||"");return et>Date.now()&&!rt["no-cache"]}(it);tt.delete(rt),nt&&tt.put(rt,it.clone()),et(null,it,nt)})).catch(et)})).catch(et)}(ot,l):l(null,null),{cancel:function(){st=!0,at||nt.abort()}}}(tt,et);if(I()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",tt,et,void 0,!0)}var rt;return function(tt,et){var rt=new it.XMLHttpRequest;for(var nt in rt.open(tt.method||"GET",tt.url,!0),"arrayBuffer"===tt.type&&(rt.responseType="arraybuffer"),tt.headers)rt.setRequestHeader(nt,tt.headers[nt]);return"json"===tt.type&&(rt.responseType="text",rt.setRequestHeader("Accept","application/json")),rt.withCredentials="include"===tt.credentials,rt.onerror=function(){et(new Error(rt.statusText))},rt.onload=function(){if((rt.status>=200&&rt.status<300||0===rt.status)&&null!==rt.response){var it=rt.response;if("json"===tt.type)try{it=JSON.parse(rt.response)}catch(tt){return et(tt)}et(null,it,rt.getResponseHeader("Cache-Control"),rt.getResponseHeader("Expires"))}else et(new En(rt.statusText,rt.status,tt.url))},rt.send(tt.body),{cancel:function(){return rt.abort()}}}(tt,et)},bt=function(tt,et){return xt(h(tt,{type:"arrayBuffer"}),et)},wt=function(tt,et){return xt(h(tt,{method:"POST"}),et)},Mn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";Cn=[],Pn=0;var At=function(tt,et){if(Zt.supported&&(tt.headers||(tt.headers={}),tt.headers.accept="image/webp,*/*"),Pn>=Ot.MAX_PARALLEL_IMAGE_REQUESTS){var rt={requestParameters:tt,callback:et,cancelled:!1,cancel:function(){this.cancelled=!0}};return Cn.push(rt),rt}Pn++;var nt=!1,i=function(){if(!nt)for(nt=!0,Pn--;Cn.length&&Pn<Ot.MAX_PARALLEL_IMAGE_REQUESTS;){var tt=Cn.shift();tt.cancelled||(tt.cancel=At(tt.requestParameters,tt.callback).cancel)}},ot=bt(tt,(function(tt,rt,nt,ot){i(),tt?et(tt):rt&&(ft()?function(tt,et){var rt=new it.Blob([new Uint8Array(tt)],{type:"image/png"});it.createImageBitmap(rt).then((function(tt){et(null,tt)})).catch((function(tt){et(new Error("Could not load image because of "+tt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}(rt,et):function(tt,et,rt,nt){var ot=new it.Image,at=it.URL;ot.onload=function(){et(null,ot),at.revokeObjectURL(ot.src),ot.onload=null,it.requestAnimationFrame((function(){ot.src=Mn}))},ot.onerror=function(){return et(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."))};var st=new it.Blob([new Uint8Array(tt)],{type:"image/png"});ot.cacheControl=rt,ot.expires=nt,ot.src=tt.byteLength?at.createObjectURL(st):Mn}(rt,et,nt,ot))}));return{cancel:function(){ot.cancel(),i()}}};function St(tt,et,rt){rt[tt]&&-1!==rt[tt].indexOf(et)||(rt[tt]=rt[tt]||[],rt[tt].push(et))}function kt(tt,et,rt){if(rt&&rt[tt]){var it=rt[tt].indexOf(et);-1!==it&&rt[tt].splice(it,1)}}var It=function(tt,et){void 0===et&&(et={}),h(this,et),this.type=tt},Dn=function(tt){function e(et,rt){void 0===rt&&(rt={}),tt.call(this,"error",h({error:et},rt))}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e}(It),Ct=function(){};Ct.prototype.on=function(tt,et){return this._listeners=this._listeners||{},St(tt,et,this._listeners),this},Ct.prototype.off=function(tt,et){return kt(tt,et,this._listeners),kt(tt,et,this._oneTimeListeners),this},Ct.prototype.once=function(tt,et){return this._oneTimeListeners=this._oneTimeListeners||{},St(tt,et,this._oneTimeListeners),this},Ct.prototype.fire=function(tt,et){"string"==typeof tt&&(tt=new It(tt,et||{}));var rt=tt.type;if(this.listens(rt)){tt.target=this;for(var it=0,nt=this._listeners&&this._listeners[rt]?this._listeners[rt].slice():[];it<nt.length;it+=1)nt[it].call(this,tt);for(var ot=0,at=this._oneTimeListeners&&this._oneTimeListeners[rt]?this._oneTimeListeners[rt].slice():[];ot<at.length;ot+=1){var st=at[ot];kt(rt,st,this._oneTimeListeners),st.call(this,tt)}var ct=this._eventedParent;ct&&(h(tt,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),ct.fire(tt))}else tt instanceof Dn&&console.error(tt.error);return this},Ct.prototype.listens=function(tt){return this._listeners&&this._listeners[tt]&&this._listeners[tt].length>0||this._oneTimeListeners&&this._oneTimeListeners[tt]&&this._oneTimeListeners[tt].length>0||this._eventedParent&&this._eventedParent.listens(tt)},Ct.prototype.setEventedParent=function(tt,et){return this._eventedParent=tt,this._eventedParentData=et,this};var Ln
vendor: 19,005 bytes, line 3
3={$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"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{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"],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:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},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"}
vendor: 9,823 bytes, line 3
3,"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"}}}
vendor: 31,961 bytes, line 3
3,Pt=function(tt,et,rt,it){this.message=(tt?tt+": ":"")+rt,it&&(this.identifier=it),null!=et&&et.__line__&&(this.line=et.__line__)};function Mt(tt){var et=tt.value;return et?[new Pt(tt.key,et,"constants have been deprecated as of v8")]:[]}function Bt(tt){var et=arguments;for(var rt=[],it=arguments.length-1;it-- >0;)rt[it]=et[it+1];for(var nt=0,ot=rt;nt<ot.length;nt+=1){var at=ot[nt];for(var st in at)tt[st]=at[st]}return tt}function Tt(tt){return tt instanceof Number||tt instanceof String||tt instanceof Boolean?tt.valueOf():tt}function Vt(tt){if(Array.isArray(tt))return tt.map(Vt);if(tt instanceof Object&&!(tt instanceof Number||tt instanceof String||tt instanceof Boolean)){var et={};for(var rt in tt)et[rt]=Vt(tt[rt]);return et}return Tt(tt)}var Rn=function(tt){function e(et,rt){tt.call(this,rt),this.message=rt,this.key=et}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e}(Error),Dt=function(tt,et){void 0===et&&(et=[]),this.parent=tt,this.bindings={};for(var rt=0,it=et;rt<it.length;rt+=1){var nt=it[rt];this.bindings[nt[0]]=nt[1]}};Dt.prototype.concat=function(tt){return new Dt(this,tt)},Dt.prototype.get=function(tt){if(this.bindings[tt])return this.bindings[tt];if(this.parent)return this.parent.get(tt);throw new Error(tt+" not found in scope.")},Dt.prototype.has=function(tt){return!!this.bindings[tt]||!!this.parent&&this.parent.has(tt)};var Fn={kind:"null"},Gn={kind:"number"},Wn={kind:"string"},Qn={kind:"boolean"},lo={kind:"color"},uo={kind:"object"},co={kind:"value"},So={kind:"collator"},zo={kind:"formatted"},ko={kind:"resolvedImage"};function Xt(tt,et){return{kind:"array",itemType:tt,N:et}}function Jt(tt){if("array"===tt.kind){var et=Jt(tt.itemType);return"number"==typeof tt.N?"array<"+et+", "+tt.N+">":"value"===tt.itemType.kind?"array":"array<"+et+">"}return tt.kind}var ta=[Fn,Gn,Wn,Qn,lo,zo,uo,Xt(co),ko];function Yt(tt,et){if("error"===et.kind)return null;if("array"===tt.kind){if("array"===et.kind&&(0===et.N&&"value"===et.itemType.kind||!Yt(tt.itemType,et.itemType))&&("number"!=typeof tt.N||tt.N===et.N))return null}else{if(tt.kind===et.kind)return null;if("value"===tt.kind)for(var rt=0,it=ta;rt<it.length;rt+=1)if(!Yt(it[rt],et))return null}return"Expected "+Jt(tt)+" but found "+Jt(et)+" instead."}function $t(tt,et){return et.some((function(et){return et.kind===tt.kind}))}function Wt(tt,et){return et.some((function(et){return"null"===et?null===tt:"array"===et?Array.isArray(tt):"object"===et?tt&&!Array.isArray(tt)&&"object"==typeof tt:et===typeof tt}))}var ea=e((function(tt,et){var rt={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(tt){return(tt=Math.round(tt))<0?0:tt>255?255:tt}function i(tt){return n("%"===tt[tt.length-1]?parseFloat(tt)/100*255:parseInt(tt))}function a(tt){return(et="%"===tt[tt.length-1]?parseFloat(tt)/100:parseFloat(tt))<0?0:et>1?1:et;var et}function o(tt,et,rt){return rt<0?rt+=1:rt>1&&(rt-=1),6*rt<1?tt+(et-tt)*rt*6:2*rt<1?et:3*rt<2?tt+(et-tt)*(2/3-rt)*6:tt}try{et.parseCSSColor=function(tt){var et,it=tt.replace(/ /g,"").toLowerCase();if(it in rt)return rt[it].slice();if("#"===it[0])return 4===it.length?(et=parseInt(it.substr(1),16))>=0&&et<=4095?[(3840&et)>>4|(3840&et)>>8,240&et|(240&et)>>4,15&et|(15&et)<<4,1]:null:7===it.length&&(et=parseInt(it.substr(1),16))>=0&&et<=16777215?[(16711680&et)>>16,(65280&et)>>8,255&et,1]:null;var nt=it.indexOf("("),ot=it.indexOf(")");if(-1!==nt&&ot+1===it.length){var at=it.substr(0,nt),st=it.substr(nt+1,ot-(nt+1)).split(","),ct=1;switch(at){case"rgba":if(4!==st.length)return null;ct=a(st.pop());case"rgb":return 3!==st.length?null:[i(st[0]),i(st[1]),i(st[2]),ct];case"hsla":if(4!==st.length)return null;ct=a(st.pop());case"hsl":if(3!==st.length)return null;var ht=(parseFloat(st[0])%360+360)%360/360,dt=a(st[1]),mt=a(st[2]),yt=mt<=.5?mt*(dt+1):mt+dt-mt*dt,gt=2*mt-yt;return[n(255*o(gt,yt,ht+1/3)),n(255*o(gt,yt,ht)),n(255*o(gt,yt,ht-1/3)),ct];default:return null}}return null}}catch(tt){}})).parseCSSColor,te=function(tt,et,rt,it){void 0===it&&(it=1),this.r=tt,this.g=et,this.b=rt,this.a=it};te.parse=function(tt){if(tt){if(tt instanceof te)return tt;if("string"==typeof tt){var et=ea(tt);if(et)return new te(et[0]/255*et[3],et[1]/255*et[3],et[2]/255*et[3],et[3])}}},te.prototype.toString=function(){var tt=this.toArray(),et=tt[1],rt=tt[2],it=tt[3];return"rgba("+Math.round(tt[0])+","+Math.round(et)+","+Math.round(rt)+","+it+")"},te.prototype.toArray=function(){var tt=this.a;return 0===tt?[0,0,0,0]:[255*this.r/tt,255*this.g/tt,255*this.b/tt,tt]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=function(tt,et,rt){this.sensitivity=tt?et?"variant":"case":et?"accent":"base",this.locale=rt,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ee.prototype.compare=function(tt,et){return this.collator.compare(tt,et)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(tt,et,rt,it,nt){this.text=tt,this.image=et,this.scale=rt,this.fontStack=it,this.textColor=nt},ne=function(tt){this.sections=tt};ne.fromString=function(tt){return new ne([new re(tt,null,null,null,null)])},ne.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(tt){return 0!==tt.text.length||tt.image&&0!==tt.image.name.length}))},ne.factory=function(tt){return tt instanceof ne?tt:ne.fromString(tt)},ne.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(tt){return tt.text})).join("")},ne.prototype.serialize=function(){for(var tt=["format"],et=0,rt=this.sections;et<rt.length;et+=1){var it=rt[et];if(it.image)tt.push(["image",it.image.name]);else{tt.push(it.text);var nt={};it.fontStack&&(nt["text-font"]=["literal",it.fontStack.split(",")]),it.scale&&(nt["font-scale"]=it.scale),it.textColor&&(nt["text-color"]=["rgba"].concat(it.textColor.toArray())),tt.push(nt)}}return tt};var ie=function(tt){this.name=tt.name,this.available=tt.available};function ae(tt,et,rt,it){return"number"==typeof tt&&tt>=0&&tt<=255&&"number"==typeof et&&et>=0&&et<=255&&"number"==typeof rt&&rt>=0&&rt<=255?void 0===it||"number"==typeof it&&it>=0&&it<=1?null:"Invalid rgba value ["+[tt,et,rt,it].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof it?[tt,et,rt,it]:[tt,et,rt]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function oe(tt){if(null===tt)return!0;if("string"==typeof tt)return!0;if("boolean"==typeof tt)return!0;if("number"==typeof tt)return!0;if(tt instanceof te)return!0;if(tt instanceof ee)return!0;if(tt instanceof ne)return!0;if(tt instanceof ie)return!0;if(Array.isArray(tt)){for(var et=0,rt=tt;et<rt.length;et+=1)if(!oe(rt[et]))return!1;return!0}if("object"==typeof tt){for(var it in tt)if(!oe(tt[it]))return!1;return!0}return!1}function se(tt){if(null===tt)return Fn;if("string"==typeof tt)return Wn;if("boolean"==typeof tt)return Qn;if("number"==typeof tt)return Gn;if(tt instanceof te)return lo;if(tt instanceof ee)return So;if(tt instanceof ne)return zo;if(tt instanceof ie)return ko;if(Array.isArray(tt)){for(var et,rt=tt.length,it=0,nt=tt;it<nt.length;it+=1){var ot=se(nt[it]);if(et){if(et===ot)continue;et=co;break}et=ot}return Xt(et||co,rt)}return uo}function ue(tt){var et=typeof tt;return null===tt?"":"string"===et||"number"===et||"boolean"===et?String(tt):tt instanceof te||tt instanceof ne||tt instanceof ie?tt.toString():JSON.stringify(tt)}ie.prototype.toString=function(){return this.name},ie.fromString=function(tt){return tt?new ie({name:tt,available:!1}):null},ie.prototype.serialize=function(){return["image",this.name]};var le=function(tt,et){this.type=tt,this.value=et};le.parse=function(tt,et){if(2!==tt.length)return et.error("'literal' expression requires exactly one argument, but found "+(tt.length-1)+" instead.");if(!oe(tt[1]))return et.error("invalid value");var rt=tt[1],it=se(rt),nt=et.expectedType;return"array"!==it.kind||0!==it.N||!nt||"array"!==nt.kind||"number"==typeof nt.N&&0!==nt.N||(it=nt),new le(it,rt)},le.prototype.evaluate=function(){return this.value},le.prototype.eachChild=function(){},le.prototype.outputDefined=function(){return!0},le.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof te?["rgba"].concat(this.value.toArray()):this.value instanceof ne?this.value.serialize():this.value};var pe=function(tt){this.name="ExpressionEvaluationError",this.message=tt};pe.prototype.toJSON=function(){return this.message};var ra={string:Wn,number:Gn,boolean:Qn,object:uo},he=function(tt,et){this.type=tt,this.args=et};he.parse=function(tt,et){if(tt.length<2)return et.error("Expected at least one argument.");var rt,it=1,nt=tt[0];if("array"===nt){var ot,at;if(tt.length>2){var st=tt[1];if("string"!=typeof st||!(st in ra)||"object"===st)return et.error('The item type argument of "array" must be one of string, number, boolean',1);ot=ra[st],it++}else ot=co;if(tt.length>3){if(null!==tt[2]&&("number"!=typeof tt[2]||tt[2]<0||tt[2]!==Math.floor(tt[2])))return et.error('The length argument to "array" must be a positive integer literal',2);at=tt[2],it++}rt=Xt(ot,at)}else rt=ra[nt];for(var ct=[];it<tt.length;it++){var ht=et.parse(tt[it],it,co);if(!ht)return null;ct.push(ht)}return new he(rt,ct)},he.prototype.evaluate=function(tt){for(var et=0;et<this.args.length;et++){var rt=this.args[et].evaluate(tt);if(!Yt(this.type,se(rt)))return rt;if(et===this.args.length-1)throw new pe("Expected value to be of type "+Jt(this.type)+", but found "+Jt(se(rt))+" instead.")}return null},he.prototype.eachChild=function(tt){this.args.forEach(tt)},he.prototype.outputDefined=function(){return this.args.every((function(tt){return tt.outputDefined()}))},he.prototype.serialize=function(){var tt=this.type,et=[tt.kind];if("array"===tt.kind){var rt=tt.itemType;if("string"===rt.kind||"number"===rt.kind||"boolean"===rt.kind){et.push(rt.kind);var it=tt.N;("number"==typeof it||this.args.length>1)&&et.push(it)}}return et.concat(this.args.map((function(tt){return tt.serialize()})))};var fe=function(tt){this.type=zo,this.sections=tt};fe.parse=function(tt,et){if(tt.length<2)return et.error("Expected at least one argument.");var rt=tt[1];if(!Array.isArray(rt)&&"object"==typeof rt)return et.error("First argument must be an image or text section.");for(var it=[],nt=!1,ot=1;ot<=tt.length-1;++ot){var at=tt[ot];if(nt&&"object"==typeof at&&!Array.isArray(at)){nt=!1;var st=null;if(at["font-scale"]&&!(st=et.parse(at["font-scale"],1,Gn)))return null;var ct=null;if(at["text-font"]&&!(ct=et.parse(at["text-font"],1,Xt(Wn))))return null;var ht=null;if(at["text-color"]&&!(ht=et.parse(at["text-color"],1,lo)))return null;var dt=it[it.length-1];dt.scale=st,dt.font=ct,dt.textColor=ht}else{var mt=et.parse(tt[ot],1,co);if(!mt)return null;var yt=mt.type.kind;if("string"!==yt&&"value"!==yt&&"null"!==yt&&"resolvedImage"!==yt)return et.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");nt=!0,it.push({content:mt,scale:null,font:null,textColor:null})}}return new fe(it)},fe.prototype.evaluate=function(tt){return new ne(this.sections.map((function(et){var rt=et.content.evaluate(tt);return se(rt)===ko?new re("",rt,null,null,null):new re(ue(rt),null,et.scale?et.scale.evaluate(tt):null,et.font?et.font.evaluate(tt).join(","):null,et.textColor?et.textColor.evaluate(tt):null)})))},fe.prototype.eachChild=function(tt){for(var et=0,rt=this.sections;et<rt.length;et+=1){var it=rt[et];tt(it.content),it.scale&&tt(it.scale),it.font&&tt(it.font),it.textColor&&tt(it.textColor)}},fe.prototype.outputDefined=function(){return!1},fe.prototype.serialize=function(){for(var tt=["format"],et=0,rt=this.sections;et<rt.length;et+=1){var it=rt[et];tt.push(it.content.serialize());var nt={};it.scale&&(nt["font-scale"]=it.scale.serialize()),it.font&&(nt["text-font"]=it.font.serialize()),it.textColor&&(nt["text-color"]=it.textColor.serialize()),tt.push(nt)}return tt};var ye=function(tt){this.type=ko,this.input=tt};ye.parse=function(tt,et){if(2!==tt.length)return et.error("Expected two arguments.");var rt=et.parse(tt[1],1,Wn);return rt?new ye(rt):et.error("No image name provided.")},ye.prototype.evaluate=function(tt){var et=this.input.evaluate(tt),rt=ie.fromString(et);return rt&&tt.availableImages&&(rt.available=tt.availableImages.indexOf(et)>-1),rt},ye.prototype.eachChild=function(tt){tt(this.input)},ye.prototype.outputDefined=function(){return!1},ye.prototype.serialize=function(){return["image",this.input.serialize()]};var ia={"to-boolean":Qn,"to-color":lo,"to-number":Gn,"to-string":Wn},me=function(tt,et){this.type=tt,this.args=et};me.parse=function(tt,et){if(tt.length<2)return et.error("Expected at least one argument.");var rt=tt[0];if(("to-boolean"===rt||"to-string"===rt)&&2!==tt.length)return et.error("Expected one argument.");for(var it=ia[rt],nt=[],ot=1;ot<tt.length;ot++){var at=et.parse(tt[ot],ot,co);if(!at)return null;nt.push(at)}return new me(it,nt)},me.prototype.evaluate=function(tt){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(tt));if("color"===this.type.kind){for(var et,rt,it=0,nt=this.args;it<nt.length;it+=1){if(rt=null,(et=nt[it].evaluate(tt))instanceof te)return et;if("string"==typeof et){var ot=tt.parseColor(et);if(ot)return ot}else if(Array.isArray(et)&&!(rt=et.length<3||et.length>4?"Invalid rbga value "+JSON.stringify(et)+": expected an array containing either three or four numeric values.":ae(et[0],et[1],et[2],et[3])))return new te(et[0]/255,et[1]/255,et[2]/255,et[3])}throw new pe(rt||"Could not parse color from value '"+("string"==typeof et?et:String(JSON.stringify(et)))+"'")}if("number"===this.type.kind){for(var at=null,st=0,ct=this.args;st<ct.length;st+=1){if(null===(at=ct[st].evaluate(tt)))return 0;var ht=Number(at);if(!isNaN(ht))return ht}throw new pe("Could not convert "+JSON.stringify(at)+" to number.")}return"formatted"===this.type.kind?ne.fromString(ue(this.args[0].evaluate(tt))):"resolvedImage"===this.type.kind?ie.fromString(ue(this.args[0].evaluate(tt))):ue(this.args[0].evaluate(tt))},me.prototype.eachChild=function(tt){this.args.forEach(tt)},me.prototype.outputDefined=function(){return this.args.every((function(tt){return tt.outputDefined()}))},me.prototype.serialize=function(){if("formatted"===this.type.kind)return new fe([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ye(this.args[0]).serialize();var tt=["to-"+this.type.kind];return this.eachChild((function(et){tt.push(et.serialize())})),tt};var na=["Unknown","Point","LineString","Polygon"],ge=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};ge.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},ge.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?na[this.feature.type]:this.feature.type:null},ge.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},ge.prototype.canonicalID=function(){return this.canonical},ge.prototype.properties=function(){return this.feature&&this.feature.properties||{}},ge.prototype.parseColor=function(tt){var et=this._parseColorCache[tt];return et||(et=this._parseColorCache[tt]=te.parse(tt)),et};var xe=function(tt,et,rt,it){this.name=tt,this.type=et,this._evaluate=rt,this.args=it};xe.prototype.evaluate=function(tt){return this._evaluate(tt,this.args)},xe.prototype.eachChild=function(tt){this.args.forEach(tt)},xe.prototype.outputDefined=function(){return!1},xe.prototype.serialize=function(){return[this.name].concat(this.args.map((function(tt){return tt.serialize()})))},xe.parse=function(tt,et){var rt,it=tt[0],nt=xe.definitions[it];if(!nt)return et.error('Unknown expression "'+it+'". If you wanted a literal array, use ["literal", [...]].',0);for(var ot=Array.isArray(nt)?nt[0]:nt.type,at=Array.isArray(nt)?[[nt[1],nt[2]]]:nt.overloads,st=at.filter((function(et){var rt=et[0];return!Array.isArray(rt)||rt.length===tt.length-1})),ct=null,ht=0,dt=st;ht<dt.length;ht+=1){var mt=dt[ht],yt=mt[0],gt=mt[1];ct=new je(et.registry,et.path,null,et.scope);for(var vt=[],_t=!1,Rt=1;Rt<tt.length;Rt++){var Ot=tt[Rt],Zt=Array.isArray(yt)?yt[Rt-1]:yt.type,Ze=ct.parse(Ot,1+vt.length,Zt);if(!Ze){_t=!0;break}vt.push(Ze)}if(!_t)if(Array.isArray(yt)&&yt.length!==vt.length)ct.error("Expected "+yt.length+" arguments, but found "+vt.length+" instead.");else{for(var Ge=0;Ge<vt.length;Ge++){var Xe=Array.isArray(yt)?yt[Ge]:yt.type,Je=vt[Ge];ct.concat(Ge+1).checkSubtype(Xe,Je.type)}if(0===ct.errors.length)return new xe(it,ot,gt,vt)}}if(1===st.length)(rt=et.errors).push.apply(rt,ct.errors);else{for(var rr=(st.length?st:at).map((function(tt){var et;return et=tt[0],Array.isArray(et)?"("+et.map(Jt).join(", ")+")":"("+Jt(et.type)+"...)"})).join(" | "),wr=[],Ir=1;Ir<tt.length;Ir++){var ti=et.parse(tt[Ir],1+wr.length);if(!ti)return null;wr.push(Jt(ti.type))}et.error("Expected arguments of type "+rr+", but found ("+wr.join(", ")+") instead.")}return null},xe.register=function(tt,et){for(var rt in xe.definitions=et,et)tt[rt]=xe};var be=function(tt,et,rt){this.type=So,this.locale=rt,this.caseSensitive=tt,this.diacriticSensitive=et};function we(tt,et){tt[0]=Math.min(tt[0],et[0]),tt[1]=Math.min(tt[1],et[1]),tt[2]=Math.max(tt[2],et[0]),tt[3]=Math.max(tt[3],et[1])}function _e(tt,et){return!(tt[0]<=et[0]||tt[2]>=et[2]||tt[1]<=et[1]||tt[3]>=et[3])}function Ae(tt,et){var rt=(180+tt[0])/360,it=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+tt[1]*Math.PI/360)))/360,nt=Math.pow(2,et.z);return[Math.round(rt*nt*8192),Math.round(it*nt*8192)]}function Se(tt,et,rt){return et[1]>tt[1]!=rt[1]>tt[1]&&tt[0]<(rt[0]-et[0])*(tt[1]-et[1])/(rt[1]-et[1])+et[0]}function ke(tt,et){for(var rt,it,nt,ot,at,st,ct,ht=!1,dt=0,mt=et.length;dt<mt;dt++)for(var yt=et[dt],gt=0,vt=yt.length;gt<vt-1;gt++){if((ot=(rt=tt)[0]-(it=yt[gt])[0])*(ct=rt[1]-(nt=yt[gt+1])[1])-(st=rt[0]-nt[0])*(at=rt[1]-it[1])==0&&ot*st<=0&&at*ct<=0)return!1;Se(tt,yt[gt],yt[gt+1])&&(ht=!ht)}return ht}function Ie(tt,et){for(var rt=0;rt<et.length;rt++)if(ke(tt,et[rt]))return!0;return!1}function ze(tt,et,rt,it){var nt=it[0]-rt[0],ot=it[1]-rt[1],at=(tt[0]-rt[0])*ot-nt*(tt[1]-rt[1]),st=(et[0]-rt[0])*ot-nt*(et[1]-rt[1]);return at>0&&st<0||at<0&&st>0}function Ce(tt,et,rt){for(var it=0,nt=rt;it<nt.length;it+=1)for(var ot=nt[it],at=0;at<ot.length-1;++at)if(0!=(mt=[(dt=ot[at+1])[0]-(ht=ot[at])[0],dt[1]-ht[1]])[0]*(yt=[(ct=et)[0]-(st=tt)[0],ct[1]-st[1]])[1]-mt[1]*yt[0]&&ze(st,ct,ht,dt)&&ze(ht,dt,st,ct))return!0;var st,ct,ht,dt,mt,yt;return!1}function Ee(tt,et){for(var rt=0;rt<tt.length;++rt)if(!ke(tt[rt],et))return!1;for(var it=0;it<tt.length-1;++it)if(Ce(tt[it],tt[it+1],et))return!1;return!0}function Pe(tt,et){for(var rt=0;rt<et.length;rt++)if(Ee(tt,et[rt]))return!0;return!1}function Me(tt,et,rt){for(var it=[],nt=0;nt<tt.length;nt++){for(var ot=[],at=0;at<tt[nt].length;at++){var st=Ae(tt[nt][at],rt);we(et,st),ot.push(st)}it.push(ot)}return it}function Be(tt,et,rt){for(var it=[],nt=0;nt<tt.length;nt++){var ot=Me(tt[nt],et,rt);it.push(ot)}return it}function Te(tt,et,rt,it){if(tt[0]<rt[0]||tt[0]>rt[2]){var nt=.5*it,ot=tt[0]-rt[0]>nt?-it:rt[0]-tt[0]>nt?it:0;0===ot&&(ot=tt[0]-rt[2]>nt?-it:rt[2]-tt[0]>nt?it:0),tt[0]+=ot}we(et,tt)}function Ve(tt,et,rt,it){for(var nt=8192*Math.pow(2,it.z),ot=[8192*it.x,8192*it.y],at=[],st=0,ct=tt;st<ct.length;st+=1)for(var ht=0,dt=ct[st];ht<dt.length;ht+=1){var mt=dt[ht],yt=[mt.x+ot[0],mt.y+ot[1]];Te(yt,et,rt,nt),at.push(yt)}return at}function Fe(tt,et,rt,it){for(var nt,ot=8192*Math.pow(2,it.z),at=[8192*it.x,8192*it.y],st=[],ct=0,ht=tt;ct<ht.length;ct+=1){for(var dt=[],mt=0,yt=ht[ct];mt<yt.length;mt+=1){var gt=yt[mt],vt=[gt.x+at[0],gt.y+at[1]];we(et,vt),dt.push(vt)}st.push(dt)}if(et[2]-et[0]<=ot/2){(nt=et)[0]=nt[1]=1/0,nt[2]=nt[3]=-1/0;for(var _t=0,Rt=st;_t<Rt.length;_t+=1)for(var Ot=0,Zt=Rt[_t];Ot<Zt.length;Ot+=1)Te(Zt[Ot],et,rt,ot)}return st}be.parse=function(tt,et){if(2!==tt.length)return et.error("Expected one argument.");var rt=tt[1];if("object"!=typeof rt||Array.isArray(rt))return et.error("Collator options argument must be an object.");var it=et.parse(void 0!==rt["case-sensitive"]&&rt["case-sensitive"],1,Qn);if(!it)return null;var nt=et.parse(void 0!==rt["diacritic-sensitive"]&&rt["diacritic-sensitive"],1,Qn);if(!nt)return null;var ot=null;return rt.locale&&!(ot=et.parse(rt.locale,1,Wn))?null:new be(it,nt,ot)},be.prototype.evaluate=function(tt){return new ee(this.caseSensitive.evaluate(tt),this.diacriticSensitive.evaluate(tt),this.locale?this.locale.evaluate(tt):null)},be.prototype.eachChild=function(tt){tt(this.caseSensitive),tt(this.diacriticSensitive),this.locale&&tt(this.locale)},be.prototype.outputDefined=function(){return!1},be.prototype.serialize=function(){var tt={};return tt["case-sensitive"]=this.caseSensitive.serialize(),tt["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(tt.locale=this.locale.serialize()),["collator",tt]};var De=function(tt,et){this.type=Qn,this.geojson=tt,this.geometries=et};function Le(tt){if(tt instanceof xe){if("get"===tt.name&&1===tt.args.length)return!1;if("feature-state"===tt.name)return!1;if("has"===tt.name&&1===tt.args.length)return!1;if("properties"===tt.name||"geometry-type"===tt.name||"id"===tt.name)return!1;if(/^filter-/.test(tt.name))return!1}if(tt instanceof De)return!1;var et=!0;return tt.eachChild((function(tt){et&&!Le(tt)&&(et=!1)})),et}function Oe(tt){if(tt instanceof xe&&"feature-state"===tt.name)return!1;var et=!0;return tt.eachChild((function(tt){et&&!Oe(tt)&&(et=!1)})),et}function Re(tt,et){if(tt instanceof xe&&et.indexOf(tt.name)>=0)return!1;var rt=!0;return tt.eachChild((function(tt){rt&&!Re(tt,et)&&(rt=!1)})),rt}De.parse=function(tt,et){if(2!==tt.length)return et.error("'within' expression requires exactly one argument, but found "+(tt.length-1)+" instead.");if(oe(tt[1])){var rt=tt[1];if("FeatureCollection"===rt.type)for(var it=0;it<rt.features.length;++it){var nt=rt.features[it].geometry.type;if("Polygon"===nt||"MultiPolygon"===nt)return new De(rt,rt.features[it].geometry)}else if("Feature"===rt.type){var ot=rt.geometry.type;if("Polygon"===ot||"MultiPolygon"===ot)return new De(rt,rt.geometry)}else if("Polygon"===rt.type||"MultiPolygon"===rt.type)return new De(rt,rt)}return et.error("'within' expression requires valid geojson object that contains polygon geometry type.")},De.prototype.evaluate=function(tt){if(null!=tt.geometry()&&null!=tt.canonicalID()){if("Point"===tt.geometryType())return function(tt,et){var rt=[1/0,1/0,-1/0,-1/0],it=[1/0,1/0,-1/0,-1/0],nt=tt.canonicalID();if("Polygon"===et.type){var ot=Me(et.coordinates,it,nt),at=Ve(tt.geometry(),rt,it,nt);if(!_e(rt,it))return!1;for(var st=0,ct=at;st<ct.length;st+=1)if(!ke(ct[st],ot))return!1}if("MultiPolygon"===et.type){var ht=Be(et.coordinates,it,nt),dt=Ve(tt.geometry(),rt,it,nt);if(!_e(rt,it))return!1;for(var mt=0,yt=dt;mt<yt.length;mt+=1)if(!Ie(yt[mt],ht))return!1}return!0}(tt,this.geometries);if("LineString"===tt.geometryType())return function(tt,et){var rt=[1/0,1/0,-1/0,-1/0],it=[1/0,1/0,-1/0,-1/0],nt=tt.canonicalID();if("Polygon"===et.type){var ot=Me(et.coordinates,it,nt),at=Fe(tt.geometry(),rt,it,nt);if(!_e(rt,it))return!1;for(var st=0,ct=at;st<ct.length;st+=1)if(!Ee(ct[st],ot))return!1}if("MultiPolygon"===et.type){var ht=Be(et.coordinates,it,nt),dt=Fe(tt.geometry(),rt,it,nt);if(!_e(rt,it))return!1;for(var mt=0,yt=dt;mt<yt.length;mt+=1)if(!Pe(yt[mt],ht))return!1}return!0}(tt,this.geometries)}return!1},De.prototype.eachChild=function(){},De.prototype.outputDefined=function(){return!0},De.prototype.serialize=function(){return["within",this.geojson]};var Ue=function(tt,et){this.type=et.type,this.name=tt,this.boundExpression=et};Ue.parse=function(tt,et){if(2!==tt.length||"string"!=typeof tt[1])return et.error("'var' expression requires exactly one string literal argument.");var rt=tt[1];return et.scope.has(rt)?new Ue(rt,et.scope.get(rt)):et.error('Unknown variable "'+rt+'". Make sure "'+rt+'" has been bound in an enclosing "let" expression before using it.',1)},Ue.prototype.evaluate=function(tt){return this.boundExpression.evaluate(tt)},Ue.prototype.eachChild=function(){},Ue.prototype.outputDefined=function(){return!1},Ue.prototype.serialize=function(){return["var",this.name]};var je=function(tt,et,rt,it,nt){void 0===et&&(et=[]),void 0===it&&(it=new Dt),void 0===nt&&(nt=[]),this.registry=tt,this.path=et,this.key=et.map((function(tt){return"["+tt+"]"})).join(""),this.scope=it,this.errors=nt,this.expectedType=rt};function qe(tt,et){for(var rt,it=tt.length-1,nt=0,ot=it,at=0;nt<=ot;)if((rt=tt[at=Math.floor((nt+ot)/2)])<=et){if(at===it||et<tt[at+1])return at;nt=at+1}else{if(!(rt>et))throw new pe("Input is not a number.");ot=at-1}return 0}je.prototype.parse=function(tt,et,rt,it,nt){return void 0===nt&&(nt={}),et?this.concat(et,rt,it)._parse(tt,nt):this._parse(tt,nt)},je.prototype._parse=function(tt,et){function r(tt,et,rt){return"assert"===rt?new he(et,[tt]):"coerce"===rt?new me(et,[tt]):tt}if(null!==tt&&"string"!=typeof tt&&"boolean"!=typeof tt&&"number"!=typeof tt||(tt=["literal",tt]),Array.isArray(tt)){if(0===tt.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var rt=tt[0];if("string"!=typeof rt)return this.error("Expression name must be a string, but found "+typeof rt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var it=this.registry[rt];if(it){var nt=it.parse(tt,this);if(!nt)return null;if(this.expectedType){var ot=this.expectedType,at=nt.type;if("string"!==ot.kind&&"number"!==ot.kind&&"boolean"!==ot.kind&&"object"!==ot.kind&&"array"!==ot.kind||"value"!==at.kind)if("color"!==ot.kind&&"formatted"!==ot.kind&&"resolvedImage"!==ot.kind||"value"!==at.kind&&"string"!==at.kind){if(this.checkSubtype(ot,at))return null}else nt=r(nt,ot,et.typeAnnotation||"coerce");else nt=r(nt,ot,et.typeAnnotation||"assert")}if(!(nt instanceof le)&&"resolvedImage"!==nt.type.kind&&function t(tt){if(tt instanceof Ue)return t(tt.boundExpression);if(tt instanceof xe&&"error"===tt.name)return!1;if(tt instanceof be)return!1;if(tt instanceof De)return!1;var et=tt instanceof me||tt instanceof he,rt=!0;return tt.eachChild((function(tt){rt=et?rt&&t(tt):rt&&tt instanceof le})),!!rt&&Le(tt)&&Re(tt,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(nt)){var st=new ge;try{nt=new le(nt.type,nt.evaluate(st))}catch(tt){return this.error(tt.message),null}}return nt}return this.error('Unknown expression "'+rt+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===tt?"'undefined' value invalid. Use null instead.":"object"==typeof tt?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof tt+" instead.")},je.prototype.concat=function(tt,et,rt){var it="number"==typeof tt?this.path.concat(tt):this.path,nt=rt?this.scope.concat(rt):this.scope;return new je(this.registry,it,et||null,nt,this.errors)},je.prototype.error=function(tt){var et=arguments;for(var rt=[],it=arguments.length-1;it-- >0;)rt[it]=et[it+1];var nt=""+this.key+rt.map((function(tt){return"["+tt+"]"})).join("");this.errors.push(new Rn(nt,tt))},je.prototype.checkSubtype=function(tt,et){var rt=Yt(tt,et);return rt&&this.error(rt),rt};var Ne=function(tt,et,rt){this.type=tt,this.input=et,this.labels=[],this.outputs=[];for(var it=0,nt=rt;it<nt.length;it+=1){var ot=nt[it],at=ot[1];this.labels.push(ot[0]),this.outputs.push(at)}};function Ke(tt,et,rt){return tt*(1-rt)+et*rt}Ne.parse=function(tt,et){if(tt.length-1<4)return et.error("Expected at least 4 arguments, but found only "+(tt.length-1)+".");if((tt.length-1)%2!=0)return et.error("Expected an even number of arguments.");var rt=et.parse(tt[1],1,Gn);if(!rt)return null;var it=[],nt=null;et.expectedType&&"value"!==et.expectedType.kind&&(nt=et.expectedType);for(var ot=1;ot<tt.length;ot+=2){var at=1===ot?-1/0:tt[ot],st=tt[ot+1],ct=ot,ht=ot+1;if("number"!=typeof at)return et.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not c
3omputed expressions) for the input values.',ct);if(it.length&&it[it.length-1][0]>=at)return et.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ct);var dt=et.parse(st,ht,nt);if(!dt)return null;nt=nt||dt.type,it.push([at,dt])}return new Ne(nt,rt,it)},Ne.prototype.evaluate=function(tt){var et=this.labels,rt=this.outputs;if(1===et.length)return rt[0].evaluate(tt);var it=this.input.evaluate(tt);if(it<=et[0])return rt[0].evaluate(tt);var nt=et.length;return it>=et[nt-1]?rt[nt-1].evaluate(tt):rt[qe(et,it)].evaluate(tt)},Ne.prototype.eachChild=function(tt){tt(this.input);for(var et=0,rt=this.outputs;et<rt.length;et+=1)tt(rt[et])},Ne.prototype.outputDefined=function(){return this.outputs.every((function(tt){return tt.outputDefined()}))},Ne.prototype.serialize=function(){for(var tt=["step",this.input.serialize()],et=0;et<this.labels.length;et++)et>0&&tt.push(this.labels[et]),tt.push(this.outputs[et].serialize());return tt};var oa=Object.freeze({__proto__:null,number:Ke,color:function(tt,et,rt){return new te(Ke(tt.r,et.r,rt),Ke(tt.g,et.g,rt),Ke(tt.b,et.b,rt),Ke(tt.a,et.a,rt))},array:function(tt,et,rt){return tt.map((function(tt,it){return Ke(tt,et[it],rt)}))}}),aa=6/29*3*(6/29),la=Math.PI/180,ca=180/Math.PI;function He(tt){return tt>.008856451679035631?Math.pow(tt,1/3):tt/aa+4/29}function Ye(tt){return tt>6/29?tt*tt*tt:aa*(tt-4/29)}function $e(tt){return 255*(tt<=.0031308?12.92*tt:1.055*Math.pow(tt,1/2.4)-.055)}function We(tt){return(tt/=255)<=.04045?tt/12.92:Math.pow((tt+.055)/1.055,2.4)}function Qe(tt){var et=We(tt.r),rt=We(tt.g),it=We(tt.b),nt=He((.4124564*et+.3575761*rt+.1804375*it)/.95047),ot=He((.2126729*et+.7151522*rt+.072175*it)/1);return{l:116*ot-16,a:500*(nt-ot),b:200*(ot-He((.0193339*et+.119192*rt+.9503041*it)/1.08883)),alpha:tt.a}}function tr(tt){var et=(tt.l+16)/116,rt=isNaN(tt.a)?et:et+tt.a/500,it=isNaN(tt.b)?et:et-tt.b/200;return et=1*Ye(et),rt=.95047*Ye(rt),it=1.08883*Ye(it),new te($e(3.2404542*rt-1.5371385*et-.4985314*it),$e(-.969266*rt+1.8760108*et+.041556*it),$e(.0556434*rt-.2040259*et+1.0572252*it),tt.alpha)}function er(tt,et,rt){var it=et-tt;return tt+rt*(it>180||it<-180?it-360*Math.round(it/360):it)}var pa={forward:Qe,reverse:tr,interpolate:function(tt,et,rt){return{l:Ke(tt.l,et.l,rt),a:Ke(tt.a,et.a,rt),b:Ke(tt.b,et.b,rt),alpha:Ke(tt.alpha,et.alpha,rt)}}},ha={forward:function(tt){var et=Qe(tt),rt=et.l,it=et.a,nt=et.b,ot=Math.atan2(nt,it)*ca;return{h:ot<0?ot+360:ot,c:Math.sqrt(it*it+nt*nt),l:rt,alpha:tt.a}},reverse:function(tt){var et=tt.h*la,rt=tt.c;return tr({l:tt.l,a:Math.cos(et)*rt,b:Math.sin(et)*rt,alpha:tt.alpha})},interpolate:function(tt,et,rt){return{h:er(tt.h,et.h,rt),c:Ke(tt.c,et.c,rt),l:Ke(tt.l,et.l,rt),alpha:Ke(tt.alpha,et.alpha,rt)}}},fa=Object.freeze({__proto__:null,lab:pa,hcl:ha}),ar=function(tt,et,rt,it,nt){this.type=tt,this.operator=et,this.interpolation=rt,this.input=it,this.labels=[],this.outputs=[];for(var ot=0,at=nt;ot<at.length;ot+=1){var st=at[ot],ct=st[1];this.labels.push(st[0]),this.outputs.push(ct)}};function or(tt,et,rt,it){var nt=it-rt,ot=tt-rt;return 0===nt?0:1===et?ot/nt:(Math.pow(et,ot)-1)/(Math.pow(et,nt)-1)}ar.interpolationFactor=function(tt,rt,it,nt){var ot=0;if("exponential"===tt.name)ot=or(rt,tt.base,it,nt);else if("linear"===tt.name)ot=or(rt,1,it,nt);else if("cubic-bezier"===tt.name){var at=tt.controlPoints;ot=new et(at[0],at[1],at[2],at[3]).solve(or(rt,1,it,nt))}return ot},ar.parse=function(tt,et){var rt=tt[0],it=tt[1],nt=tt[2],ot=tt.slice(3);if(!Array.isArray(it)||0===it.length)return et.error("Expected an interpolation type expression.",1);if("linear"===it[0])it={name:"linear"};else if("exponential"===it[0]){var at=it[1];if("number"!=typeof at)return et.error("Exponential interpolation requires a numeric base.",1,1);it={name:"exponential",base:at}}else{if("cubic-bezier"!==it[0])return et.error("Unknown interpolation type "+String(it[0]),1,0);var st=it.slice(1);if(4!==st.length||st.some((function(tt){return"number"!=typeof tt||tt<0||tt>1})))return et.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);it={name:"cubic-bezier",controlPoints:st}}if(tt.length-1<4)return et.error("Expected at least 4 arguments, but found only "+(tt.length-1)+".");if((tt.length-1)%2!=0)return et.error("Expected an even number of arguments.");if(!(nt=et.parse(nt,2,Gn)))return null;var ct=[],ht=null;"interpolate-hcl"===rt||"interpolate-lab"===rt?ht=lo:et.expectedType&&"value"!==et.expectedType.kind&&(ht=et.expectedType);for(var dt=0;dt<ot.length;dt+=2){var mt=ot[dt],yt=ot[dt+1],gt=dt+3,vt=dt+4;if("number"!=typeof mt)return et.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not c
3omputed expressions) for the input values.',gt);if(ct.length&&ct[ct.length-1][0]>=mt)return et.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',gt);var _t=et.parse(yt,vt,ht);if(!_t)return null;ht=ht||_t.type,ct.push([mt,_t])}return"number"===ht.kind||"color"===ht.kind||"array"===ht.kind&&"number"===ht.itemType.kind&&"number"==typeof ht.N?new ar(ht,rt,it,nt,ct):et.error("Type "+Jt(ht)+" is not interpolatable.")},ar.prototype.evaluate=function(tt){var et=this.labels,rt=this.outputs;if(1===et.length)return rt[0].evaluate(tt);var it=this.input.evaluate(tt);if(it<=et[0])return rt[0].evaluate(tt);var nt=et.length;if(it>=et[nt-1])return rt[nt-1].evaluate(tt);var ot=qe(et,it),at=ar.interpolationFactor(this.interpolation,it,et[ot],et[ot+1]),st=rt[ot].evaluate(tt),ct=rt[ot+1].evaluate(tt);return"interpolate"===this.operator?oa[this.type.kind.toLowerCase()](st,ct,at):"interpolate-hcl"===this.operator?ha.reverse(ha.interpolate(ha.forward(st),ha.forward(ct),at)):pa.reverse(pa.interpolate(pa.forward(st),pa.forward(ct),at))},ar.prototype.eachChild=function(tt){tt(this.input);for(var et=0,rt=this.outputs;et<rt.length;et+=1)tt(rt[et])},ar.prototype.outputDefined=function(){return this.outputs.every((function(tt){return tt.outputDefined()}))},ar.prototype.serialize=function(){var tt;tt="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var et=[this.operator,tt,this.input.serialize()],rt=0;rt<this.labels.length;rt++)et.push(this.labels[rt],this.outputs[rt].serialize());return et};var sr=function(tt,et){this.type=tt,this.args=et};sr.parse=function(tt,et){if(tt.length<2)return et.error("Expectected at least one argument.");var rt=null,it=et.expectedType;it&&"value"!==it.kind&&(rt=it);for(var nt=[],ot=0,at=tt.slice(1);ot<at.length;ot+=1){var st=et.parse(at[ot],1+nt.length,rt,void 0,{typeAnnotation:"omit"});if(!st)return null;rt=rt||st.type,nt.push(st)}var ct=it&&nt.some((function(tt){return Yt(it,tt.type)}));return new sr(ct?co:rt,nt)},sr.prototype.evaluate=function(tt){for(var et,rt=null,it=0,nt=0,ot=this.args;nt<ot.length&&(it++,(rt=ot[nt].evaluate(tt))&&rt instanceof ie&&!rt.available&&(et||(et=rt.name),rt=null,it===this.args.length&&(rt=et)),null===rt);nt+=1);return rt},sr.prototype.eachChild=function(tt){this.args.forEach(tt)},sr.prototype.outputDefined=function(){return this.args.every((function(tt){return tt.outputDefined()}))},sr.prototype.serialize=function(){var tt=["coalesce"];return this.eachChild((function(et){tt.push(et.serialize())})),tt};var ur=function(tt,et){this.type=et.type,this.bindings=[].concat(tt),this.result=et};ur.prototype.evaluate=function(tt){return this.result.evaluate(tt)},ur.prototype.eachChild=function(tt){for(var et=0,rt=this.bindings;et<rt.length;et+=1)tt(rt[et][1]);tt(this.result)},ur.parse=function(tt,et){if(tt.length<4)return et.error("Expected at least 3 arguments, but found "+(tt.length-1)+" instead.");for(var rt=[],it=1;it<tt.length-1;it+=2){var nt=tt[it];if("string"!=typeof nt)return et.error("Expected string, but found "+typeof nt+" instead.",it);if(/[^a-zA-Z0-9_]/.test(nt))return et.error("Variable names must contain only alphanumeric characters or '_'.",it);var ot=et.parse(tt[it+1],it+1);if(!ot)return null;rt.push([nt,ot])}var at=et.parse(tt[tt.length-1],tt.length-1,et.expectedType,rt);return at?new ur(rt,at):null},ur.prototype.outputDefined=function(){return this.result.outputDefined()},ur.prototype.serialize=function(){for(var tt=["let"],et=0,rt=this.bindings;et<rt.length;et+=1){var it=rt[et];tt.push(it[0],it[1].serialize())}return tt.push(this.result.serialize()),tt};var lr=function(tt,et,rt){this.type=tt,this.index=et,this.input=rt};lr.parse=function(tt,et){if(3!==tt.length)return et.error("Expected 2 arguments, but found "+(tt.length-1)+" instead.");var rt=et.parse(tt[1],1,Gn),it=et.parse(tt[2],2,Xt(et.expectedType||co));return rt&&it?new lr(it.type.itemType,rt,it):null},lr.prototype.evaluate=function(tt){var et=this.index.evaluate(tt),rt=this.input.evaluate(tt);if(et<0)throw new pe("Array index out of bounds: "+et+" < 0.");if(et>=rt.length)throw new pe("Array index out of bounds: "+et+" > "+(rt.length-1)+".");if(et!==Math.floor(et))throw new pe("Array index must be an integer, but found "+et+" instead.");return rt[et]},lr.prototype.eachChild=function(tt){tt(this.index),tt(this.input)},lr.prototype.outputDefined=function(){return!1},lr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var pr=function(tt,et){this.type=Qn,this.needle=tt,this.haystack=et};pr.parse=function(tt,et){if(3!==tt.length)return et.error("Expected 2 arguments, but found "+(tt.length-1)+" instead.");var rt=et.parse(tt[1],1,co),it=et.parse(tt[2],2,co);return rt&&it?$t(rt.type,[Qn,Wn,Gn,Fn,co])?new pr(rt,it):et.error("Expected first argument to be of type boolean, string, number or null, but found "+Jt(rt.type)+" instead"):null},pr.prototype.evaluate=function(tt){var et=this.needle.evaluate(tt),rt=this.haystack.evaluate(tt);if(!rt)return!1;if(!Wt(et,["boolean","string","number","null"]))throw new pe("Expected first argument to be of type boolean, string, number or null, but found "+Jt(se(et))+" instead.");if(!Wt(rt,["string","array"]))throw new pe("Expected second argument to be of type array or string, but found "+Jt(se(rt))+" instead.");return rt.indexOf(et)>=0},pr.prototype.eachChild=function(tt){tt(this.needle),tt(this.haystack)},pr.prototype.outputDefined=function(){return!0},pr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var cr=function(tt,et,rt){this.type=Gn,this.needle=tt,this.haystack=et,this.fromIndex=rt};cr.parse=function(tt,et){if(tt.length<=2||tt.length>=5)return et.error("Expected 3 or 4 arguments, but found "+(tt.length-1)+" instead.");var rt=et.parse(tt[1],1,co),it=et.parse(tt[2],2,co);if(!rt||!it)return null;if(!$t(rt.type,[Qn,Wn,Gn,Fn,co]))return et.error("Expected first argument to be of type boolean, string, number or null, but found "+Jt(rt.type)+" instead");if(4===tt.length){var nt=et.parse(tt[3],3,Gn);return nt?new cr(rt,it,nt):null}return new cr(rt,it)},cr.prototype.evaluate=function(tt){var et=this.needle.evaluate(tt),rt=this.haystack.evaluate(tt);if(!Wt(et,["boolean","string","number","null"]))throw new pe("Expected first argument to be of type boolean, string, number or null, but found "+Jt(se(et))+" instead.");if(!Wt(rt,["string","array"]))throw new pe("Expected second argument to be of type array or string, but found "+Jt(se(rt))+" instead.");if(this.fromIndex){var it=this.fromIndex.evaluate(tt);return rt.indexOf(et,it)}return rt.indexOf(et)},cr.prototype.eachChild=function(tt){tt(this.needle),tt(this.haystack),this.fromIndex&&tt(this.fromIndex)},cr.prototype.outputDefined=function(){return!1},cr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var tt=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),tt]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var hr=function(tt,et,rt,it,nt,ot){this.inputType=tt,this.type=et,this.input=rt,this.cases=it,this.outputs=nt,this.otherwise=ot};hr.parse=function(tt,et){if(tt.length<5)return et.error("Expected at least 4 arguments, but found only "+(tt.length-1)+".");if(tt.length%2!=1)return et.error("Expected an even number of arguments.");var rt,it;et.expectedType&&"value"!==et.expectedType.kind&&(it=et.expectedType);for(var nt={},ot=[],at=2;at<tt.length-1;at+=2){var st=tt[at],ct=tt[at+1];Array.isArray(st)||(st=[st]);var ht=et.concat(at);if(0===st.length)return ht.error("Expected at least one branch label.");for(var dt=0,mt=st;dt<mt.length;dt+=1){var yt=mt[dt];if("number"!=typeof yt&&"string"!=typeof yt)return ht.error("Branch labels must be numbers or strings.");if("number"==typeof yt&&Math.abs(yt)>Number.MAX_SAFE_INTEGER)return ht.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof yt&&Math.floor(yt)!==yt)return ht.error("Numeric branch labels must be integer values.");if(rt){if(ht.checkSubtype(rt,se(yt)))return null}else rt=se(yt);
vendor: 191,599 bytes, line 3
3if(void 0!==nt[String(yt)])return ht.error("Branch labels must be unique.");nt[String(yt)]=ot.length}var gt=et.parse(ct,at,it);if(!gt)return null;it=it||gt.type,ot.push(gt)}var vt=et.parse(tt[1],1,co);if(!vt)return null;var _t=et.parse(tt[tt.length-1],tt.length-1,it);return _t?"value"!==vt.type.kind&&et.concat(1).checkSubtype(rt,vt.type)?null:new hr(rt,it,vt,nt,ot,_t):null},hr.prototype.evaluate=function(tt){var et=this.input.evaluate(tt);return(se(et)===this.inputType&&this.outputs[this.cases[et]]||this.otherwise).evaluate(tt)},hr.prototype.eachChild=function(tt){tt(this.input),this.outputs.forEach(tt),tt(this.otherwise)},hr.prototype.outputDefined=function(){return this.outputs.every((function(tt){return tt.outputDefined()}))&&this.otherwise.outputDefined()},hr.prototype.serialize=function(){for(var tt=this,et=["match",this.input.serialize()],rt=[],it={},nt=0,ot=Object.keys(this.cases).sort();nt<ot.length;nt+=1){var at=ot[nt];void 0===(dt=it[this.cases[at]])?(it[this.cases[at]]=rt.length,rt.push([this.cases[at],[at]])):rt[dt][1].push(at)}for(var s=function(et){return"number"===tt.inputType.kind?Number(et):et},st=0,ct=rt;st<ct.length;st+=1){var ht=ct[st],dt=ht[0],mt=ht[1];et.push(1===mt.length?s(mt[0]):mt.map(s)),et.push(this.outputs[outputIndex$1].serialize())}return et.push(this.otherwise.serialize()),et};var fr=function(tt,et,rt){this.type=tt,this.branches=et,this.otherwise=rt};fr.parse=function(tt,et){if(tt.length<4)return et.error("Expected at least 3 arguments, but found only "+(tt.length-1)+".");if(tt.length%2!=0)return et.error("Expected an odd number of arguments.");var rt;et.expectedType&&"value"!==et.expectedType.kind&&(rt=et.expectedType);for(var it=[],nt=1;nt<tt.length-1;nt+=2){var ot=et.parse(tt[nt],nt,Qn);if(!ot)return null;var at=et.parse(tt[nt+1],nt+1,rt);if(!at)return null;it.push([ot,at]),rt=rt||at.type}var st=et.parse(tt[tt.length-1],tt.length-1,rt);return st?new fr(rt,it,st):null},fr.prototype.evaluate=function(tt){for(var et=0,rt=this.branches;et<rt.length;et+=1){var it=rt[et],nt=it[1];if(it[0].evaluate(tt))return nt.evaluate(tt)}return this.otherwise.evaluate(tt)},fr.prototype.eachChild=function(tt){for(var et=0,rt=this.branches;et<rt.length;et+=1){var it=rt[et],nt=it[1];tt(it[0]),tt(nt)}tt(this.otherwise)},fr.prototype.outputDefined=function(){return this.branches.every((function(tt){return tt[1].outputDefined()}))&&this.otherwise.outputDefined()},fr.prototype.serialize=function(){var tt=["case"];return this.eachChild((function(et){tt.push(et.serialize())})),tt};var yr=function(tt,et,rt,it){this.type=tt,this.input=et,this.beginIndex=rt,this.endIndex=it};function dr(tt,et){return"=="===tt||"!="===tt?"boolean"===et.kind||"string"===et.kind||"number"===et.kind||"null"===et.kind||"value"===et.kind:"string"===et.kind||"number"===et.kind||"value"===et.kind}function mr(tt,et,rt,it){return 0===it.compare(et,rt)}function vr(tt,et,rt){var it="=="!==tt&&"!="!==tt;return function(){function i(tt,et,rt){this.type=Qn,this.lhs=tt,this.rhs=et,this.collator=rt,this.hasUntypedArgument="value"===tt.type.kind||"value"===et.type.kind}return i.parse=function(tt,et){if(3!==tt.length&&4!==tt.length)return et.error("Expected two or three arguments.");var rt=tt[0],nt=et.parse(tt[1],1,co);if(!nt)return null;if(!dr(rt,nt.type))return et.concat(1).error('"'+rt+"\" comparisons are not supported for type '"+Jt(nt.type)+"'.");var ot=et.parse(tt[2],2,co);if(!ot)return null;if(!dr(rt,ot.type))return et.concat(2).error('"'+rt+"\" comparisons are not supported for type '"+Jt(ot.type)+"'.");if(nt.type.kind!==ot.type.kind&&"value"!==nt.type.kind&&"value"!==ot.type.kind)return et.error("Cannot compare types '"+Jt(nt.type)+"' and '"+Jt(ot.type)+"'.");it&&("value"===nt.type.kind&&"value"!==ot.type.kind?nt=new he(ot.type,[nt]):"value"!==nt.type.kind&&"value"===ot.type.kind&&(ot=new he(nt.type,[ot])));var at=null;if(4===tt.length){if("string"!==nt.type.kind&&"string"!==ot.type.kind&&"value"!==nt.type.kind&&"value"!==ot.type.kind)return et.error("Cannot use collator to compare non-string types.");if(!(at=et.parse(tt[3],3,So)))return null}return new i(nt,ot,at)},i.prototype.evaluate=function(nt){var ot=this.lhs.evaluate(nt),at=this.rhs.evaluate(nt);if(it&&this.hasUntypedArgument){var st=se(ot),ct=se(at);if(st.kind!==ct.kind||"string"!==st.kind&&"number"!==st.kind)throw new pe('Expected arguments for "'+tt+'" to be (string, string) or (number, number), but found ('+st.kind+", "+ct.kind+") instead.")}if(this.collator&&!it&&this.hasUntypedArgument){var ht=se(ot),dt=se(at);if("string"!==ht.kind||"string"!==dt.kind)return et(nt,ot,at)}return this.collator?rt(nt,ot,at,this.collator.evaluate(nt)):et(nt,ot,at)},i.prototype.eachChild=function(tt){tt(this.lhs),tt(this.rhs),this.collator&&tt(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var et=[tt];return this.eachChild((function(tt){et.push(tt.serialize())})),et},i}()}yr.parse=function(tt,et){if(tt.length<=2||tt.length>=5)return et.error("Expected 3 or 4 arguments, but found "+(tt.length-1)+" instead.");var rt=et.parse(tt[1],1,co),it=et.parse(tt[2],2,Gn);if(!rt||!it)return null;if(!$t(rt.type,[Xt(co),Wn,co]))return et.error("Expected first argument to be of type array or string, but found "+Jt(rt.type)+" instead");if(4===tt.length){var nt=et.parse(tt[3],3,Gn);return nt?new yr(rt.type,rt,it,nt):null}return new yr(rt.type,rt,it)},yr.prototype.evaluate=function(tt){var et=this.input.evaluate(tt),rt=this.beginIndex.evaluate(tt);if(!Wt(et,["string","array"]))throw new pe("Expected first argument to be of type array or string, but found "+Jt(se(et))+" instead.");if(this.endIndex){var it=this.endIndex.evaluate(tt);return et.slice(rt,it)}return et.slice(rt)},yr.prototype.eachChild=function(tt){tt(this.input),tt(this.beginIndex),this.endIndex&&tt(this.endIndex)},yr.prototype.outputDefined=function(){return!1},yr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var tt=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),tt]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var da=vr("==",(function(tt,et,rt){return et===rt}),mr),_a=vr("!=",(function(tt,et,rt){return et!==rt}),(function(tt,et,rt,it){return!mr(0,et,rt,it)})),xa=vr("<",(function(tt,et,rt){return et<rt}),(function(tt,et,rt,it){return it.compare(et,rt)<0})),ba=vr(">",(function(tt,et,rt){return et>rt}),(function(tt,et,rt,it){return it.compare(et,rt)>0})),wa=vr("<=",(function(tt,et,rt){return et<=rt}),(function(tt,et,rt,it){return it.compare(et,rt)<=0})),Sa=vr(">=",(function(tt,et,rt){return et>=rt}),(function(tt,et,rt,it){return it.compare(et,rt)>=0})),Sr=function(tt,et,rt,it,nt){this.type=Wn,this.number=tt,this.locale=et,this.currency=rt,this.minFractionDigits=it,this.maxFractionDigits=nt};Sr.parse=function(tt,et){if(3!==tt.length)return et.error("Expected two arguments.");var rt=et.parse(tt[1],1,Gn);if(!rt)return null;var it=tt[2];if("object"!=typeof it||Array.isArray(it))return et.error("NumberFormat options argument must be an object.");var nt=null;if(it.locale&&!(nt=et.parse(it.locale,1,Wn)))return null;var ot=null;if(it.currency&&!(ot=et.parse(it.currency,1,Wn)))return null;var at=null;if(it["min-fraction-digits"]&&!(at=et.parse(it["min-fraction-digits"],1,Gn)))return null;var st=null;return it["max-fraction-digits"]&&!(st=et.parse(it["max-fraction-digits"],1,Gn))?null:new Sr(rt,nt,ot,at,st)},Sr.prototype.evaluate=function(tt){return new Intl.NumberFormat(this.locale?this.locale.evaluate(tt):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(tt):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(tt):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(tt):void 0}).format(this.number.evaluate(tt))},Sr.prototype.eachChild=function(tt){tt(this.number),this.locale&&tt(this.locale),this.currency&&tt(this.currency),this.minFractionDigits&&tt(this.minFractionDigits),this.maxFractionDigits&&tt(this.maxFractionDigits)},Sr.prototype.outputDefined=function(){return!1},Sr.prototype.serialize=function(){var tt={};return this.locale&&(tt.locale=this.locale.serialize()),this.currency&&(tt.currency=this.currency.serialize()),this.minFractionDigits&&(tt["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(tt["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),tt]};var kr=function(tt){this.type=Gn,this.input=tt};kr.parse=function(tt,et){if(2!==tt.length)return et.error("Expected 1 argument, but found "+(tt.length-1)+" instead.");var rt=et.parse(tt[1],1);return rt?"array"!==rt.type.kind&&"string"!==rt.type.kind&&"value"!==rt.type.kind?et.error("Expected argument of type string or array, but found "+Jt(rt.type)+" instead."):new kr(rt):null},kr.prototype.evaluate=function(tt){var et=this.input.evaluate(tt);if("string"==typeof et)return et.length;if(Array.isArray(et))return et.length;throw new pe("Expected value to be of type string or array, but found "+Jt(se(et))+" instead.")},kr.prototype.eachChild=function(tt){tt(this.input)},kr.prototype.outputDefined=function(){return!1},kr.prototype.serialize=function(){var tt=["length"];return this.eachChild((function(et){tt.push(et.serialize())})),tt};var Ia={"==":da,"!=":_a,">":ba,"<":xa,">=":Sa,"<=":wa,array:he,at:lr,boolean:he,case:fr,coalesce:sr,collator:be,format:fe,image:ye,in:pr,"index-of":cr,interpolate:ar,"interpolate-hcl":ar,"interpolate-lab":ar,length:kr,let:ur,literal:le,match:hr,number:he,"number-format":Sr,object:he,slice:yr,step:Ne,string:he,"to-boolean":me,"to-color":me,"to-number":me,"to-string":me,var:Ue,within:De};function zr(tt,et){var rt=et[0],it=et[1],nt=et[2],ot=et[3];rt=rt.evaluate(tt),it=it.evaluate(tt),nt=nt.evaluate(tt);var at=ot?ot.evaluate(tt):1,st=ae(rt,it,nt,at);if(st)throw new pe(st);return new te(rt/255*at,it/255*at,nt/255*at,at)}function Cr(tt,et){return tt in et}function Er(tt,et){var rt=et[tt];return void 0===rt?null:rt}function Pr(tt){return{type:tt}}function Mr(tt){return{result:"success",value:tt}}function Br(tt){return{result:"error",value:tt}}function Tr(tt){return"data-driven"===tt["property-type"]||"cross-faded-data-driven"===tt["property-type"]}function Vr(tt){return!!tt.expression&&tt.expression.parameters.indexOf("zoom")>-1}function Fr(tt){return!!tt.expression&&tt.expression.interpolated}function Dr(tt){return tt instanceof Number?"number":tt instanceof String?"string":tt instanceof Boolean?"boolean":Array.isArray(tt)?"array":null===tt?"null":typeof tt}function Lr(tt){return"object"==typeof tt&&null!==tt&&!Array.isArray(tt)}function Or(tt){return tt}function Rr(tt,et,rt){return void 0!==tt?tt:void 0!==et?et:void 0!==rt?rt:void 0}function Ur(tt,et,rt,it,nt){return Rr(typeof rt===nt?it[rt]:void 0,tt.default,et.default)}function jr(tt,et,rt){if("number"!==Dr(rt))return Rr(tt.default,et.default);var it=tt.stops.length;if(1===it)return tt.stops[0][1];if(rt<=tt.stops[0][0])return tt.stops[0][1];if(rt>=tt.stops[it-1][0])return tt.stops[it-1][1];var nt=qe(tt.stops.map((function(tt){return tt[0]})),rt);return tt.stops[nt][1]}function qr(tt,et,rt){var it=void 0!==tt.base?tt.base:1;if("number"!==Dr(rt))return Rr(tt.default,et.default);var nt=tt.stops.length;if(1===nt)return tt.stops[0][1];if(rt<=tt.stops[0][0])return tt.stops[0][1];if(rt>=tt.stops[nt-1][0])return tt.stops[nt-1][1];var ot=qe(tt.stops.map((function(tt){return tt[0]})),rt),at=function(tt,et,rt,it){var nt=it-rt,ot=tt-rt;return 0===nt?0:1===et?ot/nt:(Math.pow(et,ot)-1)/(Math.pow(et,nt)-1)}(rt,it,tt.stops[ot][0],tt.stops[ot+1][0]),st=tt.stops[ot][1],ct=tt.stops[ot+1][1],ht=oa[et.type]||Or;if(tt.colorSpace&&"rgb"!==tt.colorSpace){var dt=fa[tt.colorSpace];ht=function(tt,et){return dt.reverse(dt.interpolate(dt.forward(tt),dt.forward(et),at))}}return"function"==typeof st.evaluate?{evaluate:function(){var tt=arguments;for(var et=[],rt=arguments.length;rt--;)et[rt]=tt[rt];var it=st.evaluate.apply(void 0,et),nt=ct.evaluate.apply(void 0,et);if(void 0!==it&&void 0!==nt)return ht(it,nt,at)}}:ht(st,ct,at)}function Nr(tt,et,rt){return"color"===et.type?rt=te.parse(rt):"formatted"===et.type?rt=ne.fromString(rt.toString()):"resolvedImage"===et.type?rt=ie.fromString(rt.toString()):Dr(rt)===et.type||"enum"===et.type&&et.values[rt]||(rt=void 0),Rr(rt,tt.default,et.default)}xe.register(Ia,{error:[{kind:"error"},[Wn],function(tt,et){throw new pe(et[0].evaluate(tt))}],typeof:[Wn,[co],function(tt,et){return Jt(se(et[0].evaluate(tt)))}],"to-rgba":[Xt(Gn,4),[lo],function(tt,et){return et[0].evaluate(tt).toArray()}],rgb:[lo,[Gn,Gn,Gn],zr],rgba:[lo,[Gn,Gn,Gn,Gn],zr],has:{type:Qn,overloads:[[[Wn],function(tt,et){return Cr(et[0].evaluate(tt),tt.properties())}],[[Wn,uo],function(tt,et){var rt=et[1];return Cr(et[0].evaluate(tt),rt.evaluate(tt))}]]},get:{type:co,overloads:[[[Wn],function(tt,et){return Er(et[0].evaluate(tt),tt.properties())}],[[Wn,uo],function(tt,et){var rt=et[1];return Er(et[0].evaluate(tt),rt.evaluate(tt))}]]},"feature-state":[co,[Wn],function(tt,et){return Er(et[0].evaluate(tt),tt.featureState||{})}],properties:[uo,[],function(tt){return tt.properties()}],"geometry-type":[Wn,[],function(tt){return tt.geometryType()}],id:[co,[],function(tt){return tt.id()}],zoom:[Gn,[],function(tt){return tt.globals.zoom}],"heatmap-density":[Gn,[],function(tt){return tt.globals.heatmapDensity||0}],"line-progress":[Gn,[],function(tt){return tt.globals.lineProgress||0}],accumulated:[co,[],function(tt){return void 0===tt.globals.accumulated?null:tt.globals.accumulated}],"+":[Gn,Pr(Gn),function(tt,et){for(var rt=0,it=0,nt=et;it<nt.length;it+=1)rt+=nt[it].evaluate(tt);return rt}],"*":[Gn,Pr(Gn),function(tt,et){for(var rt=1,it=0,nt=et;it<nt.length;it+=1)rt*=nt[it].evaluate(tt);return rt}],"-":{type:Gn,overloads:[[[Gn,Gn],function(tt,et){var rt=et[1];return et[0].evaluate(tt)-rt.evaluate(tt)}],[[Gn],function(tt,et){return-et[0].evaluate(tt)}]]},"/":[Gn,[Gn,Gn],function(tt,et){var rt=et[1];return et[0].evaluate(tt)/rt.evaluate(tt)}],"%":[Gn,[Gn,Gn],function(tt,et){var rt=et[1];return et[0].evaluate(tt)%rt.evaluate(tt)}],ln2:[Gn,[],function(){return Math.LN2}],pi:[Gn,[],function(){return Math.PI}],e:[Gn,[],function(){return Math.E}],"^":[Gn,[Gn,Gn],function(tt,et){var rt=et[1];return Math.pow(et[0].evaluate(tt),rt.evaluate(tt))}],sqrt:[Gn,[Gn],function(tt,et){return Math.sqrt(et[0].evaluate(tt))}],log10:[Gn,[Gn],function(tt,et){return Math.log(et[0].evaluate(tt))/Math.LN10}],ln:[Gn,[Gn],function(tt,et){return Math.log(et[0].evaluate(tt))}],log2:[Gn,[Gn],function(tt,et){return Math.log(et[0].evaluate(tt))/Math.LN2}],sin:[Gn,[Gn],function(tt,et){return Math.sin(et[0].evaluate(tt))}],cos:[Gn,[Gn],function(tt,et){return Math.cos(et[0].evaluate(tt))}],tan:[Gn,[Gn],function(tt,et){return Math.tan(et[0].evaluate(tt))}],asin:[Gn,[Gn],function(tt,et){return Math.asin(et[0].evaluate(tt))}],acos:[Gn,[Gn],function(tt,et){return Math.acos(et[0].evaluate(tt))}],atan:[Gn,[Gn],function(tt,et){return Math.atan(et[0].evaluate(tt))}],min:[Gn,Pr(Gn),function(tt,et){return Math.min.apply(Math,et.map((function(et){return et.evaluate(tt)})))}],max:[Gn,Pr(Gn),function(tt,et){return Math.max.apply(Math,et.map((function(et){return et.evaluate(tt)})))}],abs:[Gn,[Gn],function(tt,et){return Math.abs(et[0].evaluate(tt))}],round:[Gn,[Gn],function(tt,et){var rt=et[0].evaluate(tt);return rt<0?-Math.round(-rt):Math.round(rt)}],floor:[Gn,[Gn],function(tt,et){return Math.floor(et[0].evaluate(tt))}],ceil:[Gn,[Gn],function(tt,et){return Math.ceil(et[0].evaluate(tt))}],"filter-==":[Qn,[Wn,co],function(tt,et){var rt=et[0],it=et[1];return tt.properties()[rt.value]===it.value}],"filter-id-==":[Qn,[co],function(tt,et){var rt=et[0];return tt.id()===rt.value}],"filter-type-==":[Qn,[Wn],function(tt,et){var rt=et[0];return tt.geometryType()===rt.value}],"filter-<":[Qn,[Wn,co],function(tt,et){var rt=et[0],it=et[1],nt=tt.properties()[rt.value],ot=it.value;return typeof nt==typeof ot&&nt<ot}],"filter-id-<":[Qn,[co],function(tt,et){var rt=et[0],it=tt.id(),nt=rt.value;return typeof it==typeof nt&&it<nt}],"filter->":[Qn,[Wn,co],function(tt,et){var rt=et[0],it=et[1],nt=tt.properties()[rt.value],ot=it.value;return typeof nt==typeof ot&&nt>ot}],"filter-id->":[Qn,[co],function(tt,et){var rt=et[0],it=tt.id(),nt=rt.value;return typeof it==typeof nt&&it>nt}],"filter-<=":[Qn,[Wn,co],function(tt,et){var rt=et[0],it=et[1],nt=tt.properties()[rt.value],ot=it.value;return typeof nt==typeof ot&&nt<=ot}],"filter-id-<=":[Qn,[co],function(tt,et){var rt=et[0],it=tt.id(),nt=rt.value;return typeof it==typeof nt&&it<=nt}],"filter->=":[Qn,[Wn,co],function(tt,et){var rt=et[0],it=et[1],nt=tt.properties()[rt.value],ot=it.value;return typeof nt==typeof ot&&nt>=ot}],"filter-id->=":[Qn,[co],function(tt,et){var rt=et[0],it=tt.id(),nt=rt.value;return typeof it==typeof nt&&it>=nt}],"filter-has":[Qn,[co],function(tt,et){return et[0].value in tt.properties()}],"filter-has-id":[Qn,[],function(tt){return null!==tt.id()&&void 0!==tt.id()}],"filter-type-in":[Qn,[Xt(Wn)],function(tt,et){return et[0].value.indexOf(tt.geometryType())>=0}],"filter-id-in":[Qn,[Xt(co)],function(tt,et){return et[0].value.indexOf(tt.id())>=0}],"filter-in-small":[Qn,[Wn,Xt(co)],function(tt,et){var rt=et[0];return et[1].value.indexOf(tt.properties()[rt.value])>=0}],"filter-in-large":[Qn,[Wn,Xt(co)],function(tt,et){var rt=et[0],it=et[1];return function(tt,et,rt,it){for(;rt<=it;){var nt=rt+it>>1;if(et[nt]===tt)return!0;et[nt]>tt?it=nt-1:rt=nt+1}return!1}(tt.properties()[rt.value],it.value,0,it.value.length-1)}],all:{type:Qn,overloads:[[[Qn,Qn],function(tt,et){var rt=et[1];return et[0].evaluate(tt)&&rt.evaluate(tt)}],[Pr(Qn),function(tt,et){for(var rt=0,it=et;rt<it.length;rt+=1)if(!it[rt].evaluate(tt))return!1;return!0}]]},any:{type:Qn,overloads:[[[Qn,Qn],function(tt,et){var rt=et[1];return et[0].evaluate(tt)||rt.evaluate(tt)}],[Pr(Qn),function(tt,et){for(var rt=0,it=et;rt<it.length;rt+=1)if(it[rt].evaluate(tt))return!0;return!1}]]},"!":[Qn,[Qn],function(tt,et){return!et[0].evaluate(tt)}],"is-supported-script":[Qn,[Wn],function(tt,et){var rt=tt.globals&&tt.globals.isSupportedScript;return!rt||rt(et[0].evaluate(tt))}],upcase:[Wn,[Wn],function(tt,et){return et[0].evaluate(tt).toUpperCase()}],downcase:[Wn,[Wn],function(tt,et){return et[0].evaluate(tt).toLowerCase()}],concat:[Wn,Pr(co),function(tt,et){return et.map((function(et){return ue(et.evaluate(tt))})).join("")}],"resolved-locale":[Wn,[So],function(tt,et){return et[0].evaluate(tt).resolvedLocale()}]});var Kr=function(tt,et){this.expression=tt,this._warningHistory={},this._evaluator=new ge,this._defaultValue=et?function(tt){return"color"===tt.type&&Lr(tt.default)?new te(0,0,0,0):"color"===tt.type?te.parse(tt.default)||null:void 0===tt.default?null:tt.default}(et):null,this._enumValues=et&&"enum"===et.type?et.values:null};function Gr(tt){return Array.isArray(tt)&&tt.length>0&&"string"==typeof tt[0]&&tt[0]in Ia}function Zr(tt,et){var rt=new je(Ia,[],et?function(tt){var et={color:lo,string:Wn,number:Gn,enum:Wn,boolean:Qn,formatted:zo,resolvedImage:ko};return"array"===tt.type?Xt(et[tt.value]||co,tt.length):et[tt.type]}(et):void 0),it=rt.parse(tt,void 0,void 0,void 0,et&&"string"===et.type?{typeAnnotation:"coerce"}:void 0);return it?Mr(new Kr(it,et)):Br(rt.errors)}Kr.prototype.evaluateWithoutErrorHandling=function(tt,et,rt,it,nt,ot){return this._evaluator.globals=tt,this._evaluator.feature=et,this._evaluator.featureState=rt,this._evaluator.canonical=it,this._evaluator.availableImages=nt||null,this._evaluator.formattedSection=ot,this.expression.evaluate(this._evaluator)},Kr.prototype.evaluate=function(tt,et,rt,it,nt,ot){this._evaluator.globals=tt,this._evaluator.feature=et||null,this._evaluator.featureState=rt||null,this._evaluator.canonical=it,this._evaluator.availableImages=nt||null,this._evaluator.formattedSection=ot||null;try{var at=this.expression.evaluate(this._evaluator);if(null==at||"number"==typeof at&&at!=at)return this._defaultValue;if(this._enumValues&&!(at in this._enumValues))throw new pe("Expected value to be one of "+Object.keys(this._enumValues).map((function(tt){return JSON.stringify(tt)})).join(", ")+", but found "+JSON.stringify(at)+" instead.");return at}catch(tt){return this._warningHistory[tt.message]||(this._warningHistory[tt.message]=!0,"undefined"!=typeof console&&console.warn(tt.message)),this._defaultValue}};var Xr=function(tt,et){this.kind=tt,this._styleExpression=et,this.isStateDependent="constant"!==tt&&!Oe(et.expression)};Xr.prototype.evaluateWithoutErrorHandling=function(tt,et,rt,it,nt,ot){return this._styleExpression.evaluateWithoutErrorHandling(tt,et,rt,it,nt,ot)},Xr.prototype.evaluate=function(tt,et,rt,it,nt,ot){return this._styleExpression.evaluate(tt,et,rt,it,nt,ot)};var Jr=function(tt,et,rt,it){this.kind=tt,this.zoomStops=rt,this._styleExpression=et,this.isStateDependent="camera"!==tt&&!Oe(et.expression),this.interpolationType=it};function Hr(tt,et){if("error"===(tt=Zr(tt,et)).result)return tt;var rt=tt.value.expression,it=Le(rt);if(!it&&!Tr(et))return Br([new Rn("","data expressions not supported")]);var nt=Re(rt,["zoom"]);if(!nt&&!Vr(et))return Br([new Rn("","zoom expressions not supported")]);var ot=function t(tt){var et=null;if(tt instanceof ur)et=t(tt.result);else if(tt instanceof sr)for(var rt=0,it=tt.args;rt<it.length&&!(et=t(it[rt]));rt+=1);else(tt instanceof Ne||tt instanceof ar)&&tt.input instanceof xe&&"zoom"===tt.input.name&&(et=tt);return et instanceof Rn||tt.eachChild((function(tt){var rt=t(tt);rt instanceof Rn?et=rt:!et&&rt?et=new Rn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):et&&rt&&et!==rt&&(et=new Rn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),et}(rt);return ot||nt?ot instanceof Rn?Br([ot]):ot instanceof ar&&!Fr(et)?Br([new Rn("",'"interpolate" expressions cannot be used with this property')]):Mr(ot?new Jr(it?"camera":"composite",tt.value,ot.labels,ot instanceof ar?ot.interpolation:void 0):new Xr(it?"constant":"source",tt.value)):Br([new Rn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Jr.prototype.evaluateWithoutErrorHandling=function(tt,et,rt,it,nt,ot){return this._styleExpression.evaluateWithoutErrorHandling(tt,et,rt,it,nt,ot)},Jr.prototype.evaluate=function(tt,et,rt,it,nt,ot){return this._styleExpression.evaluate(tt,et,rt,it,nt,ot)},Jr.prototype.interpolationFactor=function(tt,et,rt){return this.interpolationType?ar.interpolationFactor(this.interpolationType,tt,et,rt):0};var Yr=function(tt,et){this._parameters=tt,this._specification=et,Bt(this,function t(tt,et){var rt,it,nt,ot="color"===et.type,at=tt.stops&&"object"==typeof tt.stops[0][0],st=at||!(at||void 0!==tt.property),ct=tt.type||(Fr(et)?"exponential":"interval");if(ot&&((tt=Bt({},tt)).stops&&(tt.stops=tt.stops.map((function(tt){return[tt[0],te.parse(tt[1])]}))),tt.default=te.parse(tt.default?tt.default:et.default)),tt.colorSpace&&"rgb"!==tt.colorSpace&&!fa[tt.colorSpace])throw new Error("Unknown color space: "+tt.colorSpace);if("exponential"===ct)rt=qr;else if("interval"===ct)rt=jr;else if("categorical"===ct){rt=Ur,it=Object.create(null);for(var ht=0,dt=tt.stops;ht<dt.length;ht+=1){var mt=dt[ht];it[mt[0]]=mt[1]}nt=typeof tt.stops[0][0]}else{if("identity"!==ct)throw new Error('Unknown function type "'+ct+'"');rt=Nr}if(at){for(var yt={},gt=[],vt=0;vt<tt.stops.length;vt++){var _t=tt.stops[vt],Rt=_t[0].zoom;void 0===yt[Rt]&&(yt[Rt]={zoom:Rt,type:tt.type,property:tt.property,default:tt.default,stops:[]},gt.push(Rt)),yt[Rt].stops.push([_t[0].value,_t[1]])}for(var Ot=[],Zt=0,Ze=gt;Zt<Ze.length;Zt+=1){var Ge=Ze[Zt];Ot.push([yt[Ge].zoom,t(yt[Ge],et)])}var Xe={name:"linear"};return{kind:"composite",interpolationType:Xe,interpolationFactor:ar.interpolationFactor.bind(void 0,Xe),zoomStops:Ot.map((function(tt){return tt[0]})),evaluate:function(rt,it){var nt=rt.zoom;return qr({stops:Ot,base:tt.base},et,nt).evaluate(nt,it)}}}if(st){var Je="exponential"===ct?{name:"exponential",base:void 0!==tt.base?tt.base:1}:null;return{kind:"camera",interpolationType:Je,interpolationFactor:ar.interpolationFactor.bind(void 0,Je),zoomStops:tt.stops.map((function(tt){return tt[0]})),evaluate:function(ot){return rt(tt,et,ot.zoom,it,nt)}}}return{kind:"source",evaluate:function(ot,at){var st=at&&at.properties?at.properties[tt.property]:void 0;return void 0===st?Rr(tt.default,et.default):rt(tt,et,st,it,nt)}}}(this._parameters,this._specification))};function $r(tt){var et=tt.key,rt=tt.value,it=tt.valueSpec||{},nt=tt.objectElementValidators||{},ot=tt.style,at=tt.styleSpec,st=[],ct=Dr(rt);if("object"!==ct)return[new Pt(et,rt,"object expected, "+ct+" found")];for(var ht in rt){var dt=ht.split(".")[0],mt=it[dt]||it["*"],yt=void 0;if(nt[dt])yt=nt[dt];else if(it[dt])yt=An;else if(nt["*"])yt=nt["*"];else{if(!it["*"]){st.push(new Pt(et,rt[ht],'unknown property "'+ht+'"'));continue}yt=An}st=st.concat(yt({key:(et?et+".":et)+ht,value:rt[ht],valueSpec:mt,style:ot,styleSpec:at,object:rt,objectKey:ht},rt))}for(var gt in it)nt[gt]||it[gt].required&&void 0===it[gt].default&&void 0===rt[gt]&&st.push(new Pt(et,rt,'missing required property "'+gt+'"'));return st}function Wr(tt){var et=tt.value,rt=tt.valueSpec,it=tt.style,nt=tt.styleSpec,ot=tt.key,at=tt.arrayElementValidator||An;if("array"!==Dr(et))return[new Pt(ot,et,"array expected, "+Dr(et)+" found")];if(rt.length&&et.length!==rt.length)return[new Pt(ot,et,"array length "+rt.length+" expected, length "+et.length+" found")];if(rt["min-length"]&&et.length<rt["min-length"])return[new Pt(ot,et,"array length at least "+rt["min-length"]+" expected, length "+et.length+" found")];var st={type:rt.value,values:rt.values};nt.$version<7&&(st.function=rt.function),"object"===Dr(rt.value)&&(st=rt.value);for(var ct=[],ht=0;ht<et.length;ht++)ct=ct.concat(at({array:et,arrayIndex:ht,value:et[ht],valueSpec:st,style:it,styleSpec:nt,key:ot+"["+ht+"]"}));return ct}function Qr(tt){var et=tt.key,rt=tt.value,it=tt.valueSpec,nt=Dr(rt);return"number"===nt&&rt!=rt&&(nt="NaN"),"number"!==nt?[new Pt(et,rt,"number expected, "+nt+" found")]:"minimum"in it&&rt<it.minimum?[new Pt(et,rt,rt+" is less than the minimum value "+it.minimum)]:"maximum"in it&&rt>it.maximum?[new Pt(et,rt,rt+" is greater than the maximum value "+it.maximum)]:[]}function tn(tt){var et,rt,it,nt=tt.valueSpec,ot=Tt(tt.value.type),at={},st="categorical"!==ot&&void 0===tt.value.property,ct=!st,ht="array"===Dr(tt.value.stops)&&"array"===Dr(tt.value.stops[0])&&"object"===Dr(tt.value.stops[0][0]),dt=$r({key:tt.key,value:tt.value,valueSpec:tt.styleSpec.function,style:tt.style,styleSpec:tt.styleSpec,objectElementValidators:{stops:function(tt){if("identity"===ot)return[new Pt(tt.key,tt.value,'identity function may not have a "stops" property')];var et=[],rt=tt.value;return et=et.concat(Wr({key:tt.key,value:rt,valueSpec:tt.valueSpec,style:tt.style,styleSpec:tt.styleSpec,arrayElementValidator:c})),"array"===Dr(rt)&&0===rt.length&&et.push(new Pt(tt.key,rt,"array must have at least one stop")),et},default:function(tt){return An({key:tt.key,value:tt.value,valueSpec:nt,style:tt.style,styleSpec:tt.styleSpec})}}});return"identity"===ot&&st&&dt.push(new Pt(tt.key,tt.value,'missing required property "property"')),"identity"===ot||tt.value.stops||dt.push(new Pt(tt.key,tt.value,'missing required property "stops"')),"exponential"===ot&&tt.valueSpec.expression&&!Fr(tt.valueSpec)&&dt.push(new Pt(tt.key,tt.value,"exponential functions not supported")),tt.styleSpec.$version>=8&&(ct&&!Tr(tt.valueSpec)?dt.push(new Pt(tt.key,tt.value,"property functions not supported")):st&&!Vr(tt.valueSpec)&&dt.push(new Pt(tt.key,tt.value,"zoom functions not supported"))),"categorical"!==ot&&!ht||void 0!==tt.value.property||dt.push(new Pt(tt.key,tt.value,'"property" property is required')),dt;function c(tt){var et=[],ot=tt.value,st=tt.key;if("array"!==Dr(ot))return[new Pt(st,ot,"array expected, "+Dr(ot)+" found")];if(2!==ot.length)return[new Pt(st,ot,"array length 2 expected, length "+ot.length+" found")];if(ht){if("object"!==Dr(ot[0]))return[new Pt(st,ot,"object expected, "+Dr(ot[0])+" found")];if(void 0===ot[0].zoom)return[new Pt(st,ot,"object stop key must have zoom")];if(void 0===ot[0].value)return[new Pt(st,ot,"object stop key must have value")];if(it&&it>Tt(ot[0].zoom))return[new Pt(st,ot[0].zoom,"stop zoom values must appear in ascending order")];Tt(ot[0].zoom)!==it&&(it=Tt(ot[0].zoom),rt=void 0,at={}),et=et.concat($r({key:st+"[0]",value:ot[0],valueSpec:{zoom:{}},style:tt.style,styleSpec:tt.styleSpec,objectElementValidators:{zoom:Qr,value:h}}))}else et=et.concat(h({key:st+"[0]",value:ot[0],valueSpec:{},style:tt.style,styleSpec:tt.styleSpec},ot));return Gr(Vt(ot[1]))?et.concat([new Pt(st+"[1]",ot[1],"expressions are not allowed in function stops.")]):et.concat(An({key:st+"[1]",value:ot[1],valueSpec:nt,style:tt.style,styleSpec:tt.styleSpec}))}function h(tt,it){var st=Dr(tt.value),ct=Tt(tt.value),ht=null!==tt.value?tt.value:it;if(et){if(st!==et)return[new Pt(tt.key,ht,st+" stop domain type must match previous stop domain type "+et)]}else et=st;if("number"!==st&&"string"!==st&&"boolean"!==st)return[new Pt(tt.key,ht,"stop domain value must be a number, string, or boolean")];if("number"!==st&&"categorical"!==ot){var dt="number expected, "+st+" found";return Tr(nt)&&void 0===ot&&(dt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pt(tt.key,ht,dt)]}return"categorical"!==ot||"number"!==st||isFinite(ct)&&Math.floor(ct)===ct?"categorical"!==ot&&"number"===st&&void 0!==rt&&ct<rt?[new Pt(tt.key,ht,"stop domain values must appear in ascending order")]:(rt=ct,"categorical"===ot&&ct in at?[new Pt(tt.key,ht,"stop domain values must be unique")]:(at[ct]=!0,[])):[new Pt(tt.key,ht,"integer expected, found "+ct)]}}function en(tt){var et=("property"===tt.expressionContext?Hr:Zr)(Vt(tt.value),tt.valueSpec);if("error"===et.result)return et.value.map((function(et){return new Pt(""+tt.key+et.key,tt.value,et.message)}));var rt=et.value.expression||et.value._styleExpression.expression;if("property"===tt.expressionContext&&"text-font"===tt.propertyKey&&!rt.outputDefined())return[new Pt(tt.key,tt.value,'Invalid data expression for "'+tt.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===tt.expressionContext&&"layout"===tt.propertyType&&!Oe(rt))return[new Pt(tt.key,tt.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===tt.expressionContext&&!Oe(rt))return[new Pt(tt.key,tt.value,'"feature-state" data expressions are not supported with filters.')];if(tt.expressionContext&&0===tt.expressionContext.indexOf("cluster")){if(!Re(rt,["zoom","feature-state"]))return[new Pt(tt.key,tt.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===tt.expressionContext&&!Le(rt))return[new Pt(tt.key,tt.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function rn(tt){var et=tt.key,rt=tt.value,it=tt.valueSpec,nt=[];return Array.isArray(it.values)?-1===it.values.indexOf(Tt(rt))&&nt.push(new Pt(et,rt,"expected one of ["+it.values.join(", ")+"], "+JSON.stringify(rt)+" found")):-1===Object.keys(it.values).indexOf(Tt(rt))&&nt.push(new Pt(et,rt,"expected one of ["+Object.keys(it.values).join(", ")+"], "+JSON.stringify(rt)+" found")),nt}function nn(tt){if(!0===tt||!1===tt)return!0;if(!Array.isArray(tt)||0===tt.length)return!1;switch(tt[0]){case"has":return tt.length>=2&&"$id"!==tt[1]&&"$type"!==tt[1];case"in":return tt.length>=3&&("string"!=typeof tt[1]||Array.isArray(tt[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==tt.length||Array.isArray(tt[1])||Array.isArray(tt[2]);case"any":case"all":for(var et=0,rt=tt.slice(1);et<rt.length;et+=1){var it=rt[et];if(!nn(it)&&"boolean"!=typeof it)return!1}return!0;default:return!0}}Yr.deserialize=function(tt){return new Yr(tt._parameters,tt._specification)},Yr.serialize=function(tt){return{_parameters:tt._parameters,_specification:tt._specification}};var Aa={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function on(tt){if(null==tt)return{filter:function(){return!0},needGeometry:!1};nn(tt)||(tt=un(tt));var et=Zr(tt,Aa);if("error"===et.result)throw new Error(et.value.map((function(tt){return tt.key+": "+tt.message})).join(", "));return{filter:function(tt,rt,it){return et.value.evaluate(tt,rt,{},it)},needGeometry:function t(tt){if(!Array.isArray(tt))return!1;if("within"===tt[0])return!0;for(var et=1;et<tt.length;et++)if(t(tt[et]))return!0;return!1}(tt)}}function sn(tt,et){return tt<et?-1:tt>et?1:0}function un(tt){if(!tt)return!0;var et,rt=tt[0];return tt.length<=1?"any"!==rt:"=="===rt?ln(tt[1],tt[2],"=="):"!="===rt?hn(ln(tt[1],tt[2],"==")):"<"===rt||">"===rt||"<="===rt||">="===rt?ln(tt[1],tt[2],rt):"any"===rt?(et=tt.slice(1),["any"].concat(et.map(un))):"all"===rt?["all"].concat(tt.slice(1).map(un)):"none"===rt?["all"].concat(tt.slice(1).map(un).map(hn)):"in"===rt?pn(tt[1],tt.slice(2)):"!in"===rt?hn(pn(tt[1],tt.slice(2))):"has"===rt?cn(tt[1]):"!has"===rt?hn(cn(tt[1])):"within"!==rt||tt}function ln(tt,et,rt){switch(tt){case"$type":return["filter-type-"+rt,et];case"$id":return["filter-id-"+rt,et];default:return["filter-"+rt,tt,et]}}function pn(tt,et){if(0===et.length)return!1;switch(tt){case"$type":return["filter-type-in",["literal",et]];case"$id":return["filter-id-in",["literal",et]];default:return et.length>200&&!et.some((function(tt){return typeof tt!=typeof et[0]}))?["filter-in-large",tt,["literal",et.sort(sn)]]:["filter-in-small",tt,["literal",et]]}}function cn(tt){switch(tt){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",tt]}}function hn(tt){return["!",tt]}function fn(tt){return nn(Vt(tt.value))?en(Bt({},tt,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(tt){var et=tt.value,rt=tt.key;if("array"!==Dr(et))return[new Pt(rt,et,"array expected, "+Dr(et)+" found")];var it,nt=tt.styleSpec,ot=[];if(et.length<1)return[new Pt(rt,et,"filter array must have at least 1 element")];switch(ot=ot.concat(rn({key:rt+"[0]",value:et[0],valueSpec:nt.filter_operator,style:tt.style,styleSpec:tt.styleSpec})),Tt(et[0])){case"<":case"<=":case">":case">=":et.length>=2&&"$type"===Tt(et[1])&&ot.push(new Pt(rt,et,'"$type" cannot be use with operator "'+et[0]+'"'));case"==":case"!=":3!==et.length&&ot.push(new Pt(rt,et,'filter array for operator "'+et[0]+'" must have 3 elements'));case"in":case"!in":et.length>=2&&"string"!==(it=Dr(et[1]))&&ot.push(new Pt(rt+"[1]",et[1],"string expected, "+it+" found"));for(var at=2;at<et.length;at++)it=Dr(et[at]),"$type"===Tt(et[1])?ot=ot.concat(rn({key:rt+"["+at+"]",value:et[at],valueSpec:nt.geometry_type,style:tt.style,styleSpec:tt.styleSpec})):"string"!==it&&"number"!==it&&"boolean"!==it&&ot.push(new Pt(rt+"["+at+"]",et[at],"string, number, or boolean expected, "+it+" found"));break;case"any":case"all":case"none":for(var st=1;st<et.length;st++)ot=ot.concat(t({key:rt+"["+st+"]",value:et[st],style:tt.style,styleSpec:tt.styleSpec}));break;case"has":case"!has":it=Dr(et[1]),2!==et.length?ot.push(new Pt(rt,et,'filter array for "'+et[0]+'" operator must have 2 elements')):"string"!==it&&ot.push(new Pt(rt+"[1]",et[1],"string expected, "+it+" found"));break;case"within":it=Dr(et[1]),2!==et.length?ot.push(new Pt(rt,et,'filter array for "'+et[0]+'" operator must have 2 elements')):"object"!==it&&ot.push(new Pt(rt+"[1]",et[1],"object expected, "+it+" found"))}return ot}(tt)}function yn(tt,et){var rt=tt.key,it=tt.style,nt=tt.styleSpec,ot=tt.value,at=tt.objectKey,st=nt[et+"_"+tt.layerType];if(!st)return[];var ct=at.match(/^(.*)-transition$/);if("paint"===et&&ct&&st[ct[1]]&&st[ct[1]].transition)return An({key:rt,value:ot,valueSpec:nt.transition,style:it,styleSpec:nt});var ht,dt=tt.valueSpec||st[at];if(!dt)return[new Pt(rt,ot,'unknown property "'+at+'"')];if("string"===Dr(ot)&&Tr(dt)&&!dt.tokens&&(ht=/^{([^}]+)}$/.exec(ot)))return[new Pt(rt,ot,'"'+at+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(ht[1])+" }`.")];var mt=[];return"symbol"===tt.layerType&&("text-field"===at&&it&&!it.glyphs&&mt.push(new Pt(rt,ot,'use of "text-field" requires a style "glyphs" property')),"text-font"===at&&Lr(Vt(ot))&&"identity"===Tt(ot.type)&&mt.push(new Pt(rt,ot,'"text-font" does not support identity functions'))),mt.concat(An({key:tt.key,value:ot,valueSpec:dt,style:it,styleSpec:nt,expressionContext:"property",propertyType:et,propertyKey:at}))}function dn(tt){return yn(tt,"paint")}function mn(tt){return yn(tt,"layout")}function vn(tt){var et=[],rt=tt.value,it=tt.key,nt=tt.style,ot=tt.styleSpec;rt.type||rt.ref||et.push(new Pt(it,rt,'either "type" or "ref" is required'));var at,st=Tt(rt.type),ct=Tt(rt.ref);if(rt.id)for(var ht=Tt(rt.id),dt=0;dt<tt.arrayIndex;dt++){var mt=nt.layers[dt];Tt(mt.id)===ht&&et.push(new Pt(it,rt.id,'duplicate layer id "'+rt.id+'", previously used at line '+mt.id.__line__))}if("ref"in rt)["type","source","source-layer","filter","layout"].forEach((function(tt){tt in rt&&et.push(new Pt(it,rt[tt],'"'+tt+'" is prohibited for ref layers'))})),nt.layers.forEach((function(tt){Tt(tt.id)===ct&&(at=tt)})),at?at.ref?et.push(new Pt(it,rt.ref,"ref cannot reference another ref layer")):st=Tt(at.type):et.push(new Pt(it,rt.ref,'ref layer "'+ct+'" not found'));else if("background"!==st)if(rt.source){var yt=nt.sources&&nt.sources[rt.source],gt=yt&&Tt(yt.type);yt?"vector"===gt&&"raster"===st?et.push(new Pt(it,rt.source,'layer "'+rt.id+'" requires a raster source')):"raster"===gt&&"raster"!==st?et.push(new Pt(it,rt.source,'layer "'+rt.id+'" requires a vector source')):"vector"!==gt||rt["source-layer"]?"raster-dem"===gt&&"hillshade"!==st?et.push(new Pt(it,rt.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==st||!rt.paint||!rt.paint["line-gradient"]||"geojson"===gt&&yt.lineMetrics||et.push(new Pt(it,rt,'layer "'+rt.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):et.push(new Pt(it,rt,'layer "'+rt.id+'" must specify a "source-layer"')):et.push(new Pt(it,rt.source,'source "'+rt.source+'" not found'))}else et.push(new Pt(it,rt,'missing required property "source"'));return et=et.concat($r({key:it,value:rt,valueSpec:ot.layer,style:tt.style,styleSpec:tt.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return An({key:it+".type",value:rt.type,valueSpec:ot.layer.type,style:tt.style,styleSpec:tt.styleSpec,object:rt,objectKey:"type"})},filter:fn,layout:function(tt){return $r({layer:rt,key:tt.key,value:tt.value,style:tt.style,styleSpec:tt.styleSpec,objectElementValidators:{"*":function(tt){return mn(Bt({layerType:st},tt))}}})},paint:function(tt){return $r({layer:rt,key:tt.key,value:tt.value,style:tt.style,styleSpec:tt.styleSpec,objectElementValidators:{"*":function(tt){return dn(Bt({layerType:st},tt))}}})}}}))}function gn(tt){var et=tt.value,rt=tt.key,it=Dr(et);return"string"!==it?[new Pt(rt,et,"string expected, "+it+" found")]:[]}var ka={promoteId:function(tt){var et=tt.key,rt=tt.value;if("string"===Dr(rt))return gn({key:et,value:rt});var it=[];for(var nt in rt)it.push.apply(it,gn({key:et+"."+nt,value:rt[nt]}));return it}};function bn(tt){var et=tt.value,rt=tt.key,it=tt.styleSpec,nt=tt.style;if(!et.type)return[new Pt(rt,et,'"type" is required')];var ot,at=Tt(et.type);switch(at){case"vector":case"raster":case"raster-dem":return $r({key:rt,value:et,valueSpec:it["source_"+at.replace("-","_")],style:tt.style,styleSpec:it,objectElementValidators:ka});case"geojson":if(ot=$r({key:rt,value:et,valueSpec:it.source_geojson,style:nt,styleSpec:it,objectElementValidators:ka}),et.cluster)for(var st in et.clusterProperties){var ct=et.clusterProperties[st],ht=ct[0],dt="string"==typeof ht?[ht,["accumulated"],["get",st]]:ht;ot.push.apply(ot,en({key:rt+"."+st+".map",value:ct[1],expressionContext:"cluster-map"})),ot.push.apply(ot,en({key:rt+"."+st+".reduce",value:dt,expressionContext:"cluster-reduce"}))}return ot;case"video":return $r({key:rt,value:et,valueSpec:it.source_video,style:nt,styleSpec:it});case"image":return $r({key:rt,value:et,valueSpec:it.source_image,style:nt,styleSpec:it});case"canvas":return[new Pt(rt,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return rn({key:rt+".type",value:et.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:nt,styleSpec:it})}}function wn(tt){var et=tt.value,rt=tt.styleSpec,it=rt.light,nt=tt.style,ot=[],at=Dr(et);if(void 0===et)return ot;if("object"!==at)return ot.concat([new Pt("light",et,"object expected, "+at+" found")]);for(var st in et){var ct=st.match(/^(.*)-transition$/);ot=ot.concat(ct&&it[ct[1]]&&it[ct[1]].transition?An({key:st,value:et[st],valueSpec:rt.transition,style:nt,styleSpec:rt}):it[st]?An({key:st,value:et[st],valueSpec:it[st],style:nt,styleSpec:rt}):[new Pt(st,et[st],'unknown property "'+st+'"')])}return ot}var La={"*":function(){return[]},array:Wr,boolean:function(tt){var et=tt.value,rt=tt.key,it=Dr(et);return"boolean"!==it?[new Pt(rt,et,"boolean expected, "+it+" found")]:[]},number:Qr,color:function(tt){var et=tt.key,rt=tt.value,it=Dr(rt);return"string"!==it?[new Pt(et,rt,"color expected, "+it+" found")]:null===ea(rt)?[new Pt(et,rt,'color expected, "'+rt+'" found')]:[]},constants:Mt,enum:rn,filter:fn,function:tn,layer:vn,object:$r,source:bn,light:wn,string:gn,formatted:function(tt){return 0===gn(tt).length?[]:en(tt)},resolvedImage:function(tt){return 0===gn(tt).length?[]:en(tt)}};function An(tt){var et=tt.value,rt=tt.valueSpec,it=tt.styleSpec;return rt.expression&&Lr(Tt(et))?tn(tt):rt.expression&&Gr(Vt(et))?en(tt):rt.type&&La[rt.type]?La[rt.type](tt):$r(Bt({},tt,{valueSpec:rt.type?it[rt.type]:rt}))}function Sn(tt){var et=tt.value,rt=tt.key,it=gn(tt);return it.length||(-1===et.indexOf("{fontstack}")&&it.push(new Pt(rt,et,'"glyphs" url must include a "{fontstack}" token')),-1===et.indexOf("{range}")&&it.push(new Pt(rt,et,'"glyphs" url must include a "{range}" token'))),it}function kn(tt,et){void 0===et&&(et=Ln);var rt=[];return rt=rt.concat(An({key:"",value:tt,valueSpec:et.$root,styleSpec:et,style:tt,objectElementValidators:{glyphs:Sn,"*":function(){return[]}}})),tt.constants&&(rt=rt.concat(Mt({key:"constants",value:tt.constants,style:tt,styleSpec:et}))),In(rt)}function In(tt){return[].concat(tt).sort((function(tt,et){return tt.line-et.line}))}function zn(tt){return function(){var et=arguments;for(var rt=[],it=arguments.length;it--;)rt[it]=et[it];return In(tt.apply(this,rt))}}kn.source=zn(bn),kn.light=zn(wn),kn.layer=zn(vn),kn.filter=zn(fn),kn.paintProperty=zn(dn),kn.layoutProperty=zn(mn);var Oa=kn,ls=Oa.light,us=Oa.paintProperty,cs=Oa.layoutProperty;function Bn(tt,et){var rt=!1;if(et&&et.length)for(var it=0,nt=et;it<nt.length;it+=1)tt.fire(new Dn(new Error(nt[it].message))),rt=!0;return rt}var ps=Vn;function Vn(tt,et,rt){var it=this.cells=[];if(tt instanceof ArrayBuffer){this.arrayBuffer=tt;var nt=new Int32Array(this.arrayBuffer);tt=nt[0],this.d=(et=nt[1])+2*(rt=nt[2]);for(var ot=0;ot<this.d*this.d;ot++){var at=nt[3+ot],st=nt[3+ot+1];it.push(at===st?null:nt.subarray(at,st))}var ct=nt[3+it.length+1];this.keys=nt.subarray(nt[3+it.length],ct),this.bboxes=nt.subarray(ct),this.insert=this._insertReadonly}else{this.d=et+2*rt;for(var ht=0;ht<this.d*this.d;ht++)it.push([]);this.keys=[],this.bboxes=[]}this.n=et,this.extent=tt,this.padding=rt,this.scale=et/tt,this.uid=0;var dt=rt/et*tt;this.min=-dt,this.max=tt+dt}Vn.prototype.insert=function(tt,et,rt,it,nt){this._forEachCell(et,rt,it,nt,this._insertCell,this.uid++),this.keys.push(tt),this.bboxes.push(et),this.bboxes.push(rt),this.bboxes.push(it),this.bboxes.push(nt)},Vn.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Vn.prototype._insertCell=function(tt,et,rt,it,nt,ot){this.cells[nt].push(ot)},Vn.prototype.query=function(tt,et,rt,it,nt){var ot=this.min,at=this.max;if(tt<=ot&&et<=ot&&at<=rt&&at<=it&&!nt)return Array.prototype.slice.call(this.keys);var st=[];return this._forEachCell(tt,et,rt,it,this._queryCell,st,{},nt),st},Vn.prototype._queryCell=function(tt,et,rt,it,nt,ot,at,st){var ct=this.cells[nt];if(null!==ct)for(var ht=this.keys,dt=this.bboxes,mt=0;mt<ct.length;mt++){var yt=ct[mt];if(void 0===at[yt]){var gt=4*yt;(st?st(dt[gt+0],dt[gt+1],dt[gt+2],dt[gt+3]):tt<=dt[gt+2]&&et<=dt[gt+3]&&rt>=dt[gt+0]&&it>=dt[gt+1])?(at[yt]=!0,ot.push(ht[yt])):at[yt]=!1}}},Vn.prototype._forEachCell=function(tt,et,rt,it,nt,ot,at,st){for(var ct=this._convertToCellCoord(tt),ht=this._convertToCellCoord(et),dt=this._convertToCellCoord(rt),mt=this._convertToCellCoord(it),yt=ct;yt<=dt;yt++)for(var gt=ht;gt<=mt;gt++){var vt=this.d*gt+yt;if((!st||st(this._convertFromCellCoord(yt),this._convertFromCellCoord(gt),this._convertFromCellCoord(yt+1),this._convertFromCellCoord(gt+1)))&&nt.call(this,tt,et,rt,it,vt,ot,at,st))return}},Vn.prototype._convertFromCellCoord=function(tt){return(tt-this.padding)/this.scale},Vn.prototype._convertToCellCoord=function(tt){return Math.max(0,Math.min(this.d-1,Math.floor(tt*this.scale)+this.padding))},Vn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var tt=this.cells,et=3+this.cells.length+1+1,rt=0,it=0;it<this.cells.length;it++)rt+=this.cells[it].length;var nt=new Int32Array(et+rt+this.keys.length+this.bboxes.length);nt[0]=this.extent,nt[1]=this.n,nt[2]=this.padding;for(var ot=et,at=0;at<tt.length;at++){var st=tt[at];nt[3+at]=ot,nt.set(st,ot),ot+=st.length}return nt[3+tt.length]=ot,nt.set(this.keys,ot),nt[3+tt.length+1]=ot+=this.keys.length,nt.set(this.bboxes,ot),ot+=this.bboxes.length,nt.buffer};var hs=it.ImageData,ms=it.ImageBitmap,_s={};function On(tt,et,rt){void 0===rt&&(rt={}),Object.defineProperty(et,"_classRegistryKey",{value:tt,writeable:!1}),_s[tt]={klass:et,omit:rt.omit||[],shallow:rt.shallow||[]}}for(var bs in On("Object",Object),ps.serialize=function(tt,et){var rt=tt.toArrayBuffer();return et&&et.push(rt),{buffer:rt}},ps.deserialize=function(tt){return new ps(tt.buffer)},On("Grid",ps),On("Color",te),On("Error",Error),On("ResolvedImage",ie),On("StylePropertyFunction",Yr),On("StyleExpression",Kr,{omit:["_evaluator"]}),On("ZoomDependentExpression",Jr),On("ZoomConstantExpression",Xr),On("CompoundExpression",xe,{omit:["_evaluate"]}),Ia)Ia[bs]._classRegistryKey||On("Expression_"+bs,Ia[bs]);function Un(tt){return tt&&"undefined"!=typeof ArrayBuffer&&(tt instanceof ArrayBuffer||tt.constructor&&"ArrayBuffer"===tt.constructor.name)}function jn(tt){return ms&&tt instanceof ms}function qn(tt,et){if(null==tt||"boolean"==typeof tt||"number"==typeof tt||"string"==typeof tt||tt instanceof Boolean||tt instanceof Number||tt instanceof String||tt instanceof Date||tt instanceof RegExp)return tt;if(Un(tt)||jn(tt))return et&&et.push(tt),tt;if(ArrayBuffer.isView(tt)){var rt=tt;return et&&et.push(rt.buffer),rt}if(tt instanceof hs)return et&&et.push(tt.data.buffer),tt;if(Array.isArray(tt)){for(var it=[],nt=0,ot=tt;nt<ot.length;nt+=1)it.push(qn(ot[nt],et));return it}if("object"==typeof tt){var at=tt.constructor,st=at._classRegistryKey;if(!st)throw new Error("can't serialize object of unregistered class");var ct=at.serialize?at.serialize(tt,et):{};if(!at.serialize){for(var ht in tt)if(tt.hasOwnProperty(ht)&&!(_s[st].omit.indexOf(ht)>=0)){var dt=tt[ht];ct[ht]=_s[st].shallow.indexOf(ht)>=0?dt:qn(dt,et)}tt instanceof Error&&(ct.message=tt.message)}if(ct.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==st&&(ct.$name=st),ct}throw new Error("can't serialize object of type "+typeof tt)}function Nn(tt){if(null==tt||"boolean"==typeof tt||"number"==typeof tt||"string"==typeof tt||tt instanceof Boolean||tt instanceof Number||tt instanceof String||tt instanceof Date||tt instanceof RegExp||Un(tt)||jn(tt)||ArrayBuffer.isView(tt)||tt instanceof hs)return tt;if(Array.isArray(tt))return tt.map(Nn);if("object"==typeof tt){var et=tt.$name||"Object",rt=_s[et].klass;if(!rt)throw new Error("can't deserialize unregistered class "+et);if(rt.deserialize)return rt.deserialize(tt);for(var it=Object.create(rt.prototype),nt=0,ot=Object.keys(tt);nt<ot.length;nt+=1){var at=ot[nt];if("$name"!==at){var st=tt[at];it[at]=_s[et].shallow.indexOf(at)>=0?st:Nn(st)}}return it}throw new Error("can't deserialize object of type "+typeof tt)}var Kn=function(){this.first=!0};Kn.prototype.update=function(tt,et){var rt=Math.floor(tt);return this.first?(this.first=!1,this.lastIntegerZoom=rt,this.lastIntegerZoomTime=0,this.lastZoom=tt,this.lastFloorZoom=rt,!0):(this.lastFloorZoom>rt?(this.lastIntegerZoom=rt+1,this.lastIntegerZoomTime=et):this.lastFloorZoom<rt&&(this.lastIntegerZoom=rt,this.lastIntegerZoomTime=et),tt!==this.lastZoom&&(this.lastZoom=tt,this.lastFloorZoom=rt,!0))};var ws={"Latin-1 Supplement":function(tt){return tt>=128&&tt<=255},Arabic:function(tt){return tt>=1536&&tt<=1791},"Arabic Supplement":function(tt){return tt>=1872&&tt<=1919},"Arabic Extended-A":function(tt){return tt>=2208&&tt<=2303},"Hangul Jamo":function(tt){return tt>=4352&&tt<=4607},"Unified Canadian Aboriginal Syllabics":function(tt){return tt>=5120&&tt<=5759},Khmer:function(tt){return tt>=6016&&tt<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(tt){return tt>=6320&&tt<=6399},"General Punctuation":function(tt){return tt>=8192&&tt<=8303},"Letterlike Symbols":function(tt){return tt>=8448&&tt<=8527},"Number Forms":function(tt){return tt>=8528&&tt<=8591},"Miscellaneous Technical":function(tt){return tt>=8960&&tt<=9215},"Control Pictures":function(tt){return tt>=9216&&tt<=9279},"Optical Character Recognition":function(tt){return tt>=9280&&tt<=9311},"Enclosed Alphanumerics":function(tt){return tt>=9312&&tt<=9471},"Geometric Shapes":function(tt){return tt>=9632&&tt<=9727},"Miscellaneous Symbols":function(tt){return tt>=9728&&tt<=9983},"Miscellaneous Symbols and Arrows":function(tt){return tt>=11008&&tt<=11263},"CJK Radicals Supplement":function(tt){return tt>=11904&&tt<=12031},"Kangxi Radicals":function(tt){return tt>=12032&&tt<=12255},"Ideographic Description Characters":function(tt){return tt>=12272&&tt<=12287},"CJK Symbols and Punctuation":function(tt){return tt>=12288&&tt<=12351},Hiragana:function(tt){return tt>=12352&&tt<=12447},Katakana:function(tt){return tt>=12448&&tt<=12543},Bopomofo:function(tt){return tt>=12544&&tt<=12591},"Hangul Compatibility Jamo":function(tt){return tt>=12592&&tt<=12687},Kanbun:function(tt){return tt>=12688&&tt<=12703},"Bopomofo Extended":function(tt){return tt>=12704&&tt<=12735},"CJK Strokes":function(tt){return tt>=12736&&tt<=12783},"Katakana Phonetic Extensions":function(tt){return tt>=12784&&tt<=12799},"Enclosed CJK Letters and Months":function(tt){return tt>=12800&&tt<=13055},"CJK Compatibility":function(tt){return tt>=13056&&tt<=13311},"CJK Unified Ideographs Extension A":function(tt){return tt>=13312&&tt<=19903},"Yijing Hexagram Symbols":function(tt){return tt>=19904&&tt<=19967},"CJK Unified Ideographs":function(tt){return tt>=19968&&tt<=40959},"Yi Syllables":function(tt){return tt>=40960&&tt<=42127},"Yi Radicals":function(tt){return tt>=42128&&tt<=42191},"Hangul Jamo Extended-A":function(tt){return tt>=43360&&tt<=43391},"Hangul Syllables":function(tt){return tt>=44032&&tt<=55215},"Hangul Jamo Extended-B":function(tt){return tt>=55216&&tt<=55295},"Private Use Area":function(tt){return tt>=57344&&tt<=63743},"CJK Compatibility Ideographs":function(tt){return tt>=63744&&tt<=64255},"Arabic Presentation Forms-A":function(tt){return tt>=64336&&tt<=65023},"Vertical Forms":function(tt){return tt>=65040&&tt<=65055},"CJK Compatibility Forms":function(tt){return tt>=65072&&tt<=65103},"Small Form Variants":function(tt){return tt>=65104&&tt<=65135},"Arabic Presentation Forms-B":function(tt){return tt>=65136&&tt<=65279},"Halfwidth and Fullwidth Forms":function(tt){return tt>=65280&&tt<=65519}};function Zn(tt){for(var et=0,rt=tt;et<rt.length;et+=1)if(Xn(rt[et].charCodeAt(0)))return!0;return!1}function Xn(tt){return!(746!==tt&&747!==tt&&(tt<4352||!(ws["Bopomofo Extended"](tt)||ws.Bopomofo(tt)||ws["CJK Compatibility Forms"](tt)&&!(tt>=65097&&tt<=65103)||ws["CJK Compatibility Ideographs"](tt)||ws["CJK Compatibility"](tt)||ws["CJK Radicals Supplement"](tt)||ws["CJK Strokes"](tt)||!(!ws["CJK Symbols and Punctuation"](tt)||tt>=12296&&tt<=12305||tt>=12308&&tt<=12319||12336===tt)||ws["CJK Unified Ideographs Extension A"](tt)||ws["CJK Unified Ideographs"](tt)||ws["Enclosed CJK Letters and Months"](tt)||ws["Hangul Compatibility Jamo"](tt)||ws["Hangul Jamo Extended-A"](tt)||ws["Hangul Jamo Extended-B"](tt)||ws["Hangul Jamo"](tt)||ws["Hangul Syllables"](tt)||ws.Hiragana(tt)||ws["Ideographic Description Characters"](tt)||ws.Kanbun(tt)||ws["Kangxi Radicals"](tt)||ws["Katakana Phonetic Extensions"](tt)||ws.Katakana(tt)&&12540!==tt||!(!ws["Halfwidth and Fullwidth Forms"](tt)||65288===tt||65289===tt||65293===tt||tt>=65306&&tt<=65310||65339===tt||65341===tt||65343===tt||tt>=65371&&tt<=65503||65507===tt||tt>=65512&&tt<=65519)||!(!ws["Small Form Variants"](tt)||tt>=65112&&tt<=65118||tt>=65123&&tt<=65126)||ws["Unified Canadian Aboriginal Syllabics"](tt)||ws["Unified Canadian Aboriginal Syllabics Extended"](tt)||ws["Vertical Forms"](tt)||ws["Yijing Hexagram Symbols"](tt)||ws["Yi Syllables"](tt)||ws["Yi Radicals"](tt))))}function Jn(tt){return!(Xn(tt)||function(tt){return!!(ws["Latin-1 Supplement"](tt)&&(167===tt||169===tt||174===tt||177===tt||188===tt||189===tt||190===tt||215===tt||247===tt)||ws["General Punctuation"](tt)&&(8214===tt||8224===tt||8225===tt||8240===tt||8241===tt||8251===tt||8252===tt||8258===tt||8263===tt||8264===tt||8265===tt||8273===tt)||ws["Letterlike Symbols"](tt)||ws["Number Forms"](tt)||ws["Miscellaneous Technical"](tt)&&(tt>=8960&&tt<=8967||tt>=8972&&tt<=8991||tt>=8996&&tt<=9e3||9003===tt||tt>=9085&&tt<=9114||tt>=9150&&tt<=9165||9167===tt||tt>=9169&&tt<=9179||tt>=9186&&tt<=9215)||ws["Control Pictures"](tt)&&9251!==tt||ws["Optical Character Recognition"](tt)||ws["Enclosed Alphanumerics"](tt)||ws["Geometric Shapes"](tt)||ws["Miscellaneous Symbols"](tt)&&!(tt>=9754&&tt<=9759)||ws["Miscellaneous Symbols and Arrows"](tt)&&(tt>=11026&&tt<=11055||tt>=11088&&tt<=11097||tt>=11192&&tt<=11243)||ws["CJK Symbols and Punctuation"](tt)||ws.Katakana(tt)||ws["Private Use Area"](tt)||ws["CJK Compatibility Forms"](tt)||ws["Small Form Variants"](tt)||ws["Halfwidth and Fullwidth Forms"](tt)||8734===tt||8756===tt||8757===tt||tt>=9984&&tt<=10087||tt>=10102&&tt<=10131||65532===tt||65533===tt)}(tt))}function Hn(tt){return tt>=1424&&tt<=2303||ws["Arabic Presentation Forms-A"](tt)||ws["Arabic Presentation Forms-B"](tt)}function Yn(tt,et){return!(!et&&Hn(tt)||tt>=2304&&tt<=3583||tt>=3840&&tt<=4255||ws.Khmer(tt))}function $n(tt){for(var et=0,rt=tt;et<rt.length;et+=1)if(Hn(rt[et].charCodeAt(0)))return!0;return!1}var Ts=null,Is="unavailable",zs=null,ei=function(tt){tt&&"string"==typeof tt&&tt.indexOf("NetworkError")>-1&&(Is="error"),Ts&&Ts(tt)};function ri(){Ps.fire(new It("pluginStateChange",{pluginStatus:Is,pluginURL:zs}))}var Ps=new Ct,ii=function(){return Is},ai=function(){if("deferred"!==Is||!zs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Is="loading",ri(),zs&&bt({url:zs},(function(tt){tt?ei(tt):(Is="loaded",ri())}))},Ms={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===Is||null!=Ms.applyArabicShaping},isLoading:function(){return"loading"===Is},setState:function(tt){Is=tt.pluginStatus,zs=tt.pluginURL},isParsed:function(){return null!=Ms.applyArabicShaping&&null!=Ms.processBidirectionalText&&null!=Ms.processStyledBidirectionalText},getPluginURL:function(){return zs}},si=function(tt,et){this.zoom=tt,et?(this.now=et.now,this.fadeDuration=et.fadeDuration,this.zoomHistory=et.zoomHistory,this.transition=et.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Kn,this.transition={})};si.prototype.isSupportedScript=function(tt){return function(tt,et){for(var rt=0,it=tt;rt<it.length;rt+=1)if(!Yn(it[rt].charCodeAt(0),et))return!1;return!0}(tt,Ms.isLoaded())},si.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},si.prototype.getCrossfadeParameters=function(){var tt=this.zoom,et=tt-Math.floor(tt),rt=this.crossFadingFactor();return tt>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:et+(1-et)*rt}:{fromScale:.5,toScale:1,t:1-(1-rt)*et}};var ui=function(tt,et){this.property=tt,this.value=et,this.expression=function(tt,et){if(Lr(tt))return new Yr(tt,et);if(Gr(tt)){var rt=Hr(tt,et);if("error"===rt.result)throw new Error(rt.value.map((function(tt){return tt.key+": "+tt.message})).join(", "));return rt.value}var it=tt;return"string"==typeof tt&&"color"===et.type&&(it=te.parse(tt)),{kind:"constant",evaluate:function(){return it}}}(void 0===et?tt.specification.default:et,tt.specification)};ui.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},ui.prototype.possiblyEvaluate=function(tt,et,rt){return this.property.possiblyEvaluate(this,tt,et,rt)};var li=function(tt){this.property=tt,this.value=new ui(tt,void 0)};li.prototype.transitioned=function(tt,et){return new ci(this.property,this.value,et,h({},tt.transition,this.transition),tt.now)},li.prototype.untransitioned=function(){return new ci(this.property,this.value,null,{},0)};var pi=function(tt){this._properties=tt,this._values=Object.create(tt.defaultTransitionablePropertyValues)};pi.prototype.getValue=function(tt){return w(this._values[tt].value.value)},pi.prototype.setValue=function(tt,et){this._values.hasOwnProperty(tt)||(this._values[tt]=new li(this._values[tt].property)),this._values[tt].value=new ui(this._values[tt].property,null===et?void 0:w(et))},pi.prototype.getTransition=function(tt){return w(this._values[tt].transition)},pi.prototype.setTransition=function(tt,et){this._values.hasOwnProperty(tt)||(this._values[tt]=new li(this._values[tt].property)),this._values[tt].transition=w(et)||void 0},pi.prototype.serialize=function(){for(var tt={},et=0,rt=Object.keys(this._values);et<rt.length;et+=1){var it=rt[et],nt=this.getValue(it);void 0!==nt&&(tt[it]=nt);var ot=this.getTransition(it);void 0!==ot&&(tt[it+"-transition"]=ot)}return tt},pi.prototype.transitioned=function(tt,et){for(var rt=new hi(this._properties),it=0,nt=Object.keys(this._values);it<nt.length;it+=1){var ot=nt[it];rt._values[ot]=this._values[ot].transitioned(tt,et._values[ot])}return rt},pi.prototype.untransitioned=function(){for(var tt=new hi(this._properties),et=0,rt=Object.keys(this._values);et<rt.length;et+=1){var it=rt[et];tt._values[it]=this._values[it].untransitioned()}return tt};var ci=function(tt,et,rt,it,nt){this.property=tt,this.value=et,this.begin=nt+it.delay||0,this.end=this.begin+it.duration||0,tt.specification.transition&&(it.delay||it.duration)&&(this.prior=rt)};ci.prototype.possiblyEvaluate=function(tt,et,rt){var it=tt.now||0,nt=this.value.possiblyEvaluate(tt,et,rt),ot=this.prior;if(ot){if(it>this.end)return this.prior=null,nt;if(this.value.isDataDriven())return this.prior=null,nt;if(it<this.begin)return ot.possiblyEvaluate(tt,et,rt);var at=(it-this.begin)/(this.end-this.begin);return this.property.interpolate(ot.possiblyEvaluate(tt,et,rt),nt,function(tt){if(tt<=0)return 0;if(tt>=1)return 1;var et=tt*tt,rt=et*tt;return 4*(tt<.5?rt:3*(tt-et)+rt-.75)}(at))}return nt};var hi=function(tt){this._properties=tt,this._values=Object.create(tt.defaultTransitioningPropertyValues)};hi.prototype.possiblyEvaluate=function(tt,et,rt){for(var it=new di(this._properties),nt=0,ot=Object.keys(this._values);nt<ot.length;nt+=1){var at=ot[nt];it._values[at]=this._values[at].possiblyEvaluate(tt,et,rt)}return it},hi.prototype.hasTransition=function(){for(var tt=0,et=Object.keys(this._values);tt<et.length;tt+=1)if(this._values[et[tt]].prior)return!0;return!1};var fi=function(tt){this._properties=tt,this._values=Object.create(tt.defaultPropertyValues)};fi.prototype.getValue=function(tt){return w(this._values[tt].value)},fi.prototype.setValue=function(tt,et){this._values[tt]=new ui(this._values[tt].property,null===et?void 0:w(et))},fi.prototype.serialize=function(){for(var tt={},et=0,rt=Object.keys(this._values);et<rt.length;et+=1){var it=rt[et],nt=this.getValue(it);void 0!==nt&&(tt[it]=nt)}return tt},fi.prototype.possiblyEvaluate=function(tt,et,rt){for(var it=new di(this._properties),nt=0,ot=Object.keys(this._values);nt<ot.length;nt+=1){var at=ot[nt];it._values[at]=this._values[at].possiblyEvaluate(tt,et,rt)}return it};var yi=function(tt,et,rt){this.property=tt,this.value=et,this.parameters=rt};yi.prototype.isConstant=function(){return"constant"===this.value.kind},yi.prototype.constantOr=function(tt){return"constant"===this.value.kind?this.value.value:tt},yi.prototype.evaluate=function(tt,et,rt,it){return this.property.evaluate(this.value,this.parameters,tt,et,rt,it)};var di=function(tt){this._properties=tt,this._values=Object.create(tt.defaultPossiblyEvaluatedValues)};di.prototype.get=function(tt){return this._values[tt]};var mi=function(tt){this.specification=tt};mi.prototype.possiblyEvaluate=function(tt,et){return tt.expression.evaluate(et)},mi.prototype.interpolate=function(tt,et,rt){var it=oa[this.specification.type];return it?it(tt,et,rt):tt};var vi=function(tt,et){this.specification=tt,this.overrides=et};vi.prototype.possiblyEvaluate=function(tt,et,rt,it){return new yi(this,"constant"===tt.expression.kind||"camera"===tt.expression.kind?{kind:"constant",value:tt.expression.evaluate(et,null,{},rt,it)}:tt.expression,et)},vi.prototype.interpolate=function(tt,et,rt){if("constant"!==tt.value.kind||"constant"!==et.value.kind)return tt;if(void 0===tt.value.value||void 0===et.value.value)return new yi(this,{kind:"constant",value:void 0},tt.parameters);var it=oa[this.specification.type];return it?new yi(this,{kind:"constant",value:it(tt.value.value,et.value.value,rt)},tt.parameters):tt},vi.prototype.evaluate=function(tt,et,rt,it,nt,ot){return"constant"===tt.kind?tt.value:tt.evaluate(et,rt,it,nt,ot)};var Ds=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(tt,et,rt,it){if(void 0===tt.value)return new yi(this,{kind:"constant",value:void 0},et);if("constant"===tt.expression.kind){var nt=tt.expression.evaluate(et,null,{},rt,it),ot="resolvedImage"===tt.property.specification.type&&"string"!=typeof nt?nt.name:nt,at=this._calculate(ot,ot,ot,et);return new yi(this,{kind:"constant",value:at},et)}if("camera"===tt.expression.kind){var st=this._calculate(tt.expression.evaluate({zoom:et.zoom-1}),tt.expression.evaluate({zoom:et.zoom}),tt.expression.evaluate({zoom:et.zoom+1}),et);return new yi(this,{kind:"constant",value:st},et)}return new yi(this,tt.expression,et)},e.prototype.evaluate=function(tt,et,rt,it,nt,ot){if("source"===tt.kind){var at=tt.evaluate(et,rt,it,nt,ot);return this._calculate(at,at,at,et)}return"composite"===tt.kind?this._calculate(tt.evaluate({zoom:Math.floor(et.zoom)-1},rt,it),tt.evaluate({zoom:Math.floor(et.zoom)},rt,it),tt.evaluate({zoom:Math.floor(et.zoom)+1},rt,it),et):tt.value},e.prototype._calculate=function(tt,et,rt,it){return it.zoom>it.zoomHistory.lastIntegerZoom?{from:tt,to:et}:{from:rt,to:et}},e.prototype.interpolate=function(tt){return tt},e}(vi),xi=function(tt){this.specification=tt};xi.prototype.possiblyEvaluate=function(tt,et,rt,it){if(void 0!==tt.value){if("constant"===tt.expression.kind){var nt=tt.expression.evaluate(et,null,{},rt,it);return this._calculate(nt,nt,nt,et)}return this._calculate(tt.expression.evaluate(new si(Math.floor(et.zoom-1),et)),tt.expression.evaluate(new si(Math.floor(et.zoom),et)),tt.expression.evaluate(new si(Math.floor(et.zoom+1),et)),et)}},xi.prototype._calculate=function(tt,et,rt,it){return it.zoom>it.zoomHistory.lastIntegerZoom?{from:tt,to:et}:{from:rt,to:et}},xi.prototype.interpolate=function(tt){return tt};var bi=function(tt){this.specification=tt};bi.prototype.possiblyEvaluate=function(tt,et,rt,it){return!!tt.expression.evaluate(et,null,{},rt,it)},bi.prototype.interpolate=function(){return!1};var wi=function(tt){for(var et in this.properties=tt,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],tt){var rt=tt[et];rt.specification.overridable&&this.overridableProperties.push(et);var it=this.defaultPropertyValues[et]=new ui(rt,void 0),nt=this.defaultTransitionablePropertyValues[et]=new li(rt);this.defaultTransitioningPropertyValues[et]=nt.untransitioned(),this.defaultPossiblyEvaluatedValues[et]=it.possiblyEvaluate({})}};On("DataDrivenProperty",vi),On("DataConstantProperty",mi),On("CrossFadedDataDrivenProperty",Ds),On("CrossFadedProperty",xi),On("ColorRampProperty",bi);var Ls=function(tt){function e(et,rt){if(tt.call(this),this.id=et.id,this.type=et.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==et.type&&(this.metadata=(et=et).metadata,this.minzoom=et.minzoom,this.maxzoom=et.maxzoom,"background"!==et.type&&(this.source=et.source,this.sourceLayer=et["source-layer"],this.filter=et.filter),rt.layout&&(this._unevaluatedLayout=new fi(rt.layout)),rt.paint)){for(var it in this._transitionablePaint=new pi(rt.paint),et.paint)this.setPaintProperty(it,et.paint[it],{validate:!1});for(var nt in et.layout)this.setLayoutProperty(nt,et.layout[nt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new di(rt.paint)}}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(tt){return"visibility"===tt?this.visibility:this._unevaluatedLayout.getValue(tt)},e.prototype.setLayoutProperty=function(tt,et,rt){void 0===rt&&(rt={}),null!=et&&this._validate(cs,"layers."+this.id+".layout."+tt,tt,et,rt)||("visibility"!==tt?this._unevaluatedLayout.setValue(tt,et):this.visibility=et)},e.prototype.getPaintProperty=function(tt){return g(tt,"-transition")?this._transitionablePaint.getTransition(tt.slice(0,-"-transition".length)):this._transitionablePaint.getValue(tt)},e.prototype.setPaintProperty=function(tt,et,rt){if(void 0===rt&&(rt={}),null!=et&&this._validate(us,"layers."+this.id+".paint."+tt,tt,et,rt))return!1;if(g(tt,"-transition"))return this._transitionablePaint.setTransition(tt.slice(0,-"-transition".length),et||void 0),!1;var it=this._transitionablePaint._values[tt],nt="cross-faded-data-driven"===it.property.specification["property-type"],ot=it.value.isDataDriven(),at=it.value;this._transitionablePaint.setValue(tt,et),this._handleSpecialPaintPropertyUpdate(tt);var st=this._transitionablePaint._values[tt].value;return st.isDataDriven()||ot||nt||this._handleOverridablePaintPropertyUpdate(tt,at,st)},e.prototype._handleSpecialPaintPropertyUpdate=function(tt){},e.prototype._handleOverridablePaintPropertyUpdate=function(tt,et,rt){return!1},e.prototype.isHidden=function(tt){return!!(this.minzoom&&tt<this.minzoom)||!!(this.maxzoom&&tt>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(tt){this._transitioningPaint=this._transitionablePaint.transitioned(tt,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(tt,et){tt.getCrossfadeParameters&&(this._crossfadeParameters=tt.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(tt,void 0,et)),this.paint=this._transitioningPaint.possiblyEvaluate(tt,void 0,et)},e.prototype.serialize=function(){var tt={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&&(tt.layout=tt.layout||{},tt.layout.visibility=this.visibility),b(tt,(function(tt,et){return!(void 0===tt||"layout"===et&&!Object.keys(tt).length||"paint"===et&&!Object.keys(tt).length)}))},e.prototype._validate=function(tt,et,rt,it,nt){return void 0===nt&&(nt={}),(!nt||!1!==nt.validate)&&Bn(this,tt.call(Oa,{key:et,layerType:this.type,objectKey:rt,value:it,styleSpec:Ln,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var tt in this.paint._values){var et=this.paint.get(tt);if(et instanceof yi&&Tr(et.property.specification)&&("source"===et.value.kind||"composite"===et.value.kind)&&et.value.isStateDependent)return!0}return!1},e}(Ct),Bs={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Si=function(tt,et){this._structArray=tt,this._pos1=et*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ki=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ii(tt,et){void 0===et&&(et=1);var rt=0,it=0;return{members:tt.map((function(tt){var nt=Bs[tt.type].BYTES_PER_ELEMENT,ot=rt=zi(rt,Math.max(et,nt)),at=tt.components||1;return it=Math.max(it,nt),rt+=nt*at,{name:tt.name,type:tt.type,components:at,offset:ot}})),size:zi(rt,Math.max(it,et)),alignment:et}}function zi(tt,et){return Math.ceil(tt/et)*et}ki.serialize=function(tt,et){return tt._trim(),et&&(tt.isTransferred=!0,et.push(tt.arrayBuffer)),{length:tt.length,arrayBuffer:tt.arrayBuffer}},ki.deserialize=function(tt){var et=Object.create(this.prototype);return et.arrayBuffer=tt.arrayBuffer,et.length=tt.length,et.capacity=tt.arrayBuffer.byteLength/et.bytesPerElement,et._refreshViews(),et},ki.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ki.prototype.clear=function(){this.length=0},ki.prototype.resize=function(tt){this.reserve(tt),this.length=tt},ki.prototype.reserve=function(tt){if(tt>this.capacity){this.capacity=Math.max(tt,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var et=this.uint8;this._refreshViews(),et&&this.uint8.set(et)}},ki.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Rs=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et){var rt=this.length;return this.resize(rt+1),this.emplace(rt,tt,et)},e.prototype.emplace=function(tt,et,rt){var it=2*tt;return this.int16[it+0]=et,this.int16[it+1]=rt,tt},e}(ki);Rs.prototype.bytesPerElement=4,On("StructArrayLayout2i4",Rs);var Os=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it){var nt=this.length;return this.resize(nt+1),this.emplace(nt,tt,et,rt,it)},e.prototype.emplace=function(tt,et,rt,it,nt){var ot=4*tt;return this.int16[ot+0]=et,this.int16[ot+1]=rt,this.int16[ot+2]=it,this.int16[ot+3]=nt,tt},e}(ki);Os.prototype.bytesPerElement=8,On("StructArrayLayout4i8",Os);var Vs=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it,nt,ot){var at=this.length;return this.resize(at+1),this.emplace(at,tt,et,rt,it,nt,ot)},e.prototype.emplace=function(tt,et,rt,it,nt,ot,at){var st=6*tt;return this.int16[st+0]=et,this.int16[st+1]=rt,this.int16[st+2]=it,this.int16[st+3]=nt,this.int16[st+4]=ot,this.int16[st+5]=at,tt},e}(ki);Vs.prototype.bytesPerElement=12,On("StructArrayLayout2i4i12",Vs);var Ns=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it,nt,ot){var at=this.length;return this.resize(at+1),this.emplace(at,tt,et,rt,it,nt,ot)},e.prototype.emplace=function(tt,et,rt,it,nt,ot,at){var st=4*tt,ct=8*tt;return this.int16[st+0]=et,this.int16[st+1]=rt,this.uint8[ct+4]=it,this.uint8[ct+5]=nt,this.uint8[ct+6]=ot,this.uint8[ct+7]=at,tt},e}(ki);Ns.prototype.bytesPerElement=8,On("StructArrayLayout2i4ub8",Ns);var js=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et){var rt=this.length;return this.resize(rt+1),this.emplace(rt,tt,et)},e.prototype.emplace=function(tt,et,rt){var it=2*tt;return this.float32[it+0]=et,this.float32[it+1]=rt,tt},e}(ki);js.prototype.bytesPerElement=8,On("StructArrayLayout2f8",js);var qs=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it,nt,ot,at,st,ct,ht){var dt=this.length;return this.resize(dt+1),this.emplace(dt,tt,et,rt,it,nt,ot,at,st,ct,ht)},e.prototype.emplace=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt){var mt=10*tt;return this.uint16[mt+0]=et,this.uint16[mt+1]=rt,this.uint16[mt+2]=it,this.uint16[mt+3]=nt,this.uint16[mt+4]=ot,this.uint16[mt+5]=at,this.uint16[mt+6]=st,this.uint16[mt+7]=ct,this.uint16[mt+8]=ht,this.uint16[mt+9]=dt,tt},e}(ki);qs.prototype.bytesPerElement=20,On("StructArrayLayout10ui20",qs);var Gs=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt){var yt=this.length;return this.resize(yt+1),this.emplace(yt,tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt)},e.prototype.emplace=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt){var gt=12*tt;return this.int16[gt+0]=et,this.int16[gt+1]=rt,this.int16[gt+2]=it,this.int16[gt+3]=nt,this.uint16[gt+4]=ot,this.uint16[gt+5]=at,this.uint16[gt+6]=st,this.uint16[gt+7]=ct,this.int16[gt+8]=ht,this.int16[gt+9]=dt,this.int16[gt+10]=mt,this.int16[gt+11]=yt,tt},e}(ki);Gs.prototype.bytesPerElement=24,On("StructArrayLayout4i4ui4i24",Gs);var Xs=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt){var it=this.length;return this.resize(it+1),this.emplace(it,tt,et,rt)},e.prototype.emplace=function(tt,et,rt,it){var nt=3*tt;return this.float32[nt+0]=et,this.float32[nt+1]=rt,this.float32[nt+2]=it,tt},e}(ki);Xs.prototype.bytesPerElement=12,On("StructArrayLayout3f12",Xs);var Ws=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt){var et=this.length;return this.resize(et+1),this.emplace(et,tt)},e.prototype.emplace=function(tt,et){return this.uint32[1*tt+0]=et,tt},e}(ki);Ws.prototype.bytesPerElement=4,On("StructArrayLayout1ul4",Ws);var Ks=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it,nt,ot,at,st,ct){var ht=this.length;return this.resize(ht+1),this.emplace(ht,tt,et,rt,it,nt,ot,at,st,ct)},e.prototype.emplace=function(tt,et,rt,it,nt,ot,at,st,ct,ht){var dt=10*tt,mt=5*tt;return this.int16[dt+0]=et,this.int16[dt+1]=rt,this.int16[dt+2]=it,this.int16[dt+3]=nt,this.int16[dt+4]=ot,this.int16[dt+5]=at,this.uint32[mt+3]=st,this.uint16[dt+8]=ct,this.uint16[dt+9]=ht,tt},e}(ki);Ks.prototype.bytesPerElement=20,On("StructArrayLayout6i1ul2ui20",Ks);var Ys=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it,nt,ot){var at=this.length;return this.resize(at+1),this.emplace(at,tt,et,rt,it,nt,ot)},e.prototype.emplace=function(tt,et,rt,it,nt,ot,at){var st=6*tt;return this.int16[st+0]=et,this.int16[st+1]=rt,this.int16[st+2]=it,this.int16[st+3]=nt,this.int16[st+4]=ot,this.int16[st+5]=at,tt},e}(ki);Ys.prototype.bytesPerElement=12,On("StructArrayLayout2i2i2i12",Ys);var il=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it,nt){var ot=this.length;return this.resize(ot+1),this.emplace(ot,tt,et,rt,it,nt)},e.prototype.emplace=function(tt,et,rt,it,nt,ot){var at=4*tt,st=8*tt;return this.float32[at+0]=et,this.float32[at+1]=rt,this.float32[at+2]=it,this.int16[st+6]=nt,this.int16[st+7]=ot,tt},e}(ki);il.prototype.bytesPerElement=16,On("StructArrayLayout2f1f2i16",il);var cl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it){var nt=this.length;return this.resize(nt+1),this.emplace(nt,tt,et,rt,it)},e.prototype.emplace=function(tt,et,rt,it,nt){var ot=12*tt,at=3*tt;return this.uint8[ot+0]=et,this.uint8[ot+1]=rt,this.float32[at+1]=it,this.float32[at+2]=nt,tt},e}(ki);cl.prototype.bytesPerElement=12,On("StructArrayLayout2ub2f12",cl);var pl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt){var it=this.length;return this.resize(it+1),this.emplace(it,tt,et,rt)},e.prototype.emplace=function(tt,et,rt,it){var nt=3*tt;return this.uint16[nt+0]=et,this.uint16[nt+1]=rt,this.uint16[nt+2]=it,tt},e}(ki);pl.prototype.bytesPerElement=6,On("StructArrayLayout3ui6",pl);var gl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){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)},e.prototype.emplaceBack=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t,Rt){var Ot=this.length;return this.resize(Ot+1),this.emplace(Ot,tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t,Rt)},e.prototype.emplace=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t,Rt,Ot){var Zt=24*tt,Ze=12*tt,Ge=48*tt;return this.int16[Zt+0]=et,this.int16[Zt+1]=rt,this.uint16[Zt+2]=it,this.uint16[Zt+3]=nt,this.uint32[Ze+2]=ot,this.uint32[Ze+3]=at,this.uint32[Ze+4]=st,this.uint16[Zt+10]=ct,this.uint16[Zt+11]=ht,this.uint16[Zt+12]=dt,this.float32[Ze+7]=mt,this.float32[Ze+8]=yt,this.uint8[Ge+36]=gt,this.uint8[Ge+37]=vt,this.uint8[Ge+38]=_t,this.uint32[Ze+10]=Rt,this.int16[Zt+22]=Ot,tt},e}(ki);gl.prototype.bytesPerElement=48,On("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",gl);var _l=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){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)},e.prototype.emplaceBack=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t,Rt,Ot,Zt,Ze,Ge,Xe,Je,rr,wr,Ir,ti,ni){var oi=this.length;return this.resize(oi+1),this.emplace(oi,tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t,Rt,Ot,Zt,Ze,Ge,Xe,Je,rr,wr,Ir,ti,ni)},e.prototype.emplace=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t,Rt,Ot,Zt,Ze,Ge,Xe,Je,rr,wr,Ir,ti,ni,oi){var _i=34*tt,ji=17*tt;return this.int16[_i+0]=et,this.int16[_i+1]=rt,this.int16[_i+2]=it,this.int16[_i+3]=nt,this.int16[_i+4]=ot,this.int16[_i+5]=at,this.int16[_i+6]=st,this.int16[_i+7]=ct,this.uint16[_i+8]=ht,this.uint16[_i+9]=dt,this.uint16[_i+10]=mt,this.uint16[_i+11]=yt,this.uint16[_i+12]=gt,this.uint16[_i+13]=vt,this.uint16[_i+14]=_t,this.uint16[_i+15]=Rt,this.uint16[_i+16]=Ot,this.uint16[_i+17]=Zt,this.uint16[_i+18]=Ze,this.uint16[_i+19]=Ge,this.uint16[_i+20]=Xe,this.uint16[_i+21]=Je,this.uint16[_i+22]=rr,this.uint32[ji+12]=wr,this.float32[ji+13]=Ir,this.float32[ji+14]=ti,this.float32[ji+15]=ni,this.float32[ji+16]=oi,tt},e}(ki);_l.prototype.bytesPerElement=68,On("StructArrayLayout8i15ui1ul4f68",_l);var xl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt){var et=this.length;return this.resize(et+1),this.emplace(et,tt)},e.prototype.emplace=function(tt,et){return this.float32[1*tt+0]=et,tt},e}(ki);xl.prototype.bytesPerElement=4,On("StructArrayLayout1f4",xl);var wl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt){var it=this.length;return this.resize(it+1),this.emplace(it,tt,et,rt)},e.prototype.emplace=function(tt,et,rt,it){var nt=3*tt;return this.int16[nt+0]=et,this.int16[nt+1]=rt,this.int16[nt+2]=it,tt},e}(ki);wl.prototype.bytesPerElement=6,On("StructArrayLayout3i6",wl);var El=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt){var it=this.length;return this.resize(it+1),this.emplace(it,tt,et,rt)},e.prototype.emplace=function(tt,et,rt,it){var nt=4*tt;return this.uint32[2*tt+0]=et,this.uint16[nt+2]=rt,this.uint16[nt+3]=it,tt},e}(ki);El.prototype.bytesPerElement=8,On("StructArrayLayout1ul2ui8",El);var Sl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et){var rt=this.length;return this.resize(rt+1),this.emplace(rt,tt,et)},e.prototype.emplace=function(tt,et,rt){var it=2*tt;return this.uint16[it+0]=et,this.uint16[it+1]=rt,tt},e}(ki);Sl.prototype.bytesPerElement=4,On("StructArrayLayout2ui4",Sl);var Il=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt){var et=this.length;return this.resize(et+1),this.emplace(et,tt)},e.prototype.emplace=function(tt,et){return this.uint16[1*tt+0]=et,tt},e}(ki);Il.prototype.bytesPerElement=2,On("StructArrayLayout1ui2",Il);var zl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(tt,et,rt,it){var nt=this.length;return this.resize(nt+1),this.emplace(nt,tt,et,rt,it)},e.prototype.emplace=function(tt,et,rt,it,nt){var ot=4*tt;return this.float32[ot+0]=et,this.float32[ot+1]=rt,this.float32[ot+2]=it,this.float32[ot+3]=nt,tt},e}(ki);zl.prototype.bytesPerElement=16,On("StructArrayLayout4f16",zl);var Cl=function(tt){function e(){tt.apply(this,arguments)}tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e;var et={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return et.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},et.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},et.x1.get=function(){return this._structArray.int16[this._pos2+2]},et.y1.get=function(){return this._structArray.int16[this._pos2+3]},et.x2.get=function(){return this._structArray.int16[this._pos2+4]},et.y2.get=function(){return this._structArray.int16[this._pos2+5]},et.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},et.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},et.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},et.anchorPoint.get=function(){return new rt(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,et),e}(Si);Cl.prototype.size=20;var Al=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.get=function(tt){return new Cl(this,tt)},e}(Ks);On("CollisionBoxArray",Al);var kl=function(tt){function e(){tt.apply(this,arguments)}tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e;var et={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return et.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},et.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},et.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},et.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},et.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},et.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},et.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},et.segment.get=function(){return this._structArray.uint16[this._pos2+10]},et.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},et.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},et.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},et.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},et.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},et.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},et.placedOrientation.set=function(tt){this._structArray.uint8[this._pos1+37]=tt},et.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},et.hidden.set=function(tt){this._structArray.uint8[this._pos1+38]=tt},et.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},et.crossTileID.set=function(tt){this._structArray.uint32[this._pos4+10]=tt},et.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,et),e}(Si);kl.prototype.size=48;var Pl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.get=function(tt){return new kl(this,tt)},e}(gl);On("PlacedSymbolArray",Pl);var Ml=function(tt){function e(){tt.apply(this,arguments)}tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e;var et={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return et.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},et.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},et.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},et.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},et.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},et.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},et.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},et.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},et.key.get=function(){return this._structArray.uint16[this._pos2+8]},et.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},et.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},et.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},et.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},et.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},et.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},et.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},et.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},et.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},et.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},et.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},et.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},et.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},et.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},et.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},et.crossTileID.set=function(tt){this._structArray.uint32[this._pos4+12]=tt},et.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},et.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},et.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},et.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,et),e}(Si);Ml.prototype.size=68;var Bl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.get=function(tt){return new Ml(this,tt)},e}(_l);On("SymbolInstanceArray",Bl);var Rl=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getoffsetX=function(tt){return this.float32[1*tt+0]},e}(xl);On("GlyphOffsetArray",Rl);var Ql=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getx=function(tt){return this.int16[3*tt+0]},e.prototype.gety=function(tt){return this.int16[3*tt+1]},e.prototype.gettileUnitDistanceFromAnchor=function(tt){return this.int16[3*tt+2]},e}(wl);On("SymbolLineVertexArray",Ql);var xu=function(tt){function e(){tt.apply(this,arguments)}tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e;var et={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return et.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},et.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},et.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,et),e}(Si);xu.prototype.size=8;var wu=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.get=function(tt){return new xu(this,tt)},e}(El);On("FeatureIndexArray",wu);var Iu=Ii([{name:"a_pos",components:2,type:"Int16"}],4).members,sa=function(tt){void 0===tt&&(tt=[]),this.segments=tt};function ua(tt,et){return 256*(tt=p(Math.floor(tt),0,255))+p(Math.floor(et),0,255)}sa.prototype.prepareSegment=function(tt,et,rt,it){var nt=this.segments[this.segments.length-1];return tt>sa.MAX_VERTEX_ARRAY_LENGTH&&A("Max vertices per segment is "+sa.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+tt),(!nt||nt.vertexLength+tt>sa.MAX_VERTEX_ARRAY_LENGTH||nt.sortKey!==it)&&(nt={vertexOffset:et.length,primitiveOffset:rt.length,vertexLength:0,primitiveLength:0},void 0!==it&&(nt.sortKey=it),this.segments.push(nt)),nt},sa.prototype.get=function(){return this.segments},sa.prototype.destroy=function(){for(var tt=0,et=this.segments;tt<et.length;tt+=1){var rt=et[tt];for(var it in rt.vaos)rt.vaos[it].destroy()}},sa.simpleSegment=function(tt,et,rt,it){return new sa([{vertexOffset:tt,primitiveOffset:et,vertexLength:rt,primitiveLength:it,vaos:{},sortKey:0}])},sa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,On("SegmentVector",sa);var ku=Ii([{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"}]),Ru=e((function(tt){tt.exports=function(tt,et){var rt,it,nt,ot,at,st,ct,ht;for(it=tt.length-(rt=3&tt.length),nt=et,at=3432918353,st=461845907,ht=0;ht<it;)ct=255&tt.charCodeAt(ht)|(255&tt.charCodeAt(++ht))<<8|(255&tt.charCodeAt(++ht))<<16|(255&tt.charCodeAt(++ht))<<24,++ht,nt=27492+(65535&(ot=5*(65535&(nt=(nt^=ct=(65535&(ct=(ct=(65535&ct)*at+(((ct>>>16)*at&65535)<<16)&4294967295)<<15|ct>>>17))*st+(((ct>>>16)*st&65535)<<16)&4294967295)<<13|nt>>>19))+((5*(nt>>>16)&65535)<<16)&4294967295))+((58964+(ot>>>16)&65535)<<16);switch(ct=0,rt){case 3:ct^=(255&tt.charCodeAt(ht+2))<<16;case 2:ct^=(255&tt.charCodeAt(ht+1))<<8;case 1:nt^=ct=(65535&(ct=(ct=(65535&(ct^=255&tt.charCodeAt(ht)))*at+(((ct>>>16)*at&65535)<<16)&4294967295)<<15|ct>>>17))*st+(((ct>>>16)*st&65535)<<16)&4294967295}return nt^=tt.length,nt=2246822507*(65535&(nt^=nt>>>16))+((2246822507*(nt>>>16)&65535)<<16)&4294967295,nt=3266489909*(65535&(nt^=nt>>>13))+((3266489909*(nt>>>16)&65535)<<16)&4294967295,(nt^=nt>>>16)>>>0}})),Fu=e((function(tt){tt.exports=function(tt,et){for(var rt,it=tt.length,nt=et^it,ot=0;it>=4;)rt=1540483477*(65535&(rt=255&tt.charCodeAt(ot)|(255&tt.charCodeAt(++ot))<<8|(255&tt.charCodeAt(++ot))<<16|(255&tt.charCodeAt(++ot))<<24))+((1540483477*(rt>>>16)&65535)<<16),nt=1540483477*(65535&nt)+((1540483477*(nt>>>16)&65535)<<16)^(rt=1540483477*(65535&(rt^=rt>>>24))+((1540483477*(rt>>>16)&65535)<<16)),it-=4,++ot;switch(it){case 3:nt^=(255&tt.charCodeAt(ot+2))<<16;case 2:nt^=(255&tt.charCodeAt(ot+1))<<8;case 1:nt=1540483477*(65535&(nt^=255&tt.charCodeAt(ot)))+((1540483477*(nt>>>16)&65535)<<16)}return nt=1540483477*(65535&(nt^=nt>>>13))+((1540483477*(nt>>>16)&65535)<<16),(nt^=nt>>>15)>>>0}})),tc=Ru,ec=Fu;tc.murmur3=Ru,tc.murmur2=ec;var ya=function(){this.ids=[],this.positions=[],this.indexed=!1};ya.prototype.add=function(tt,et,rt,it){this.ids.push(ma(tt)),this.positions.push(et,rt,it)},ya.prototype.getPositions=function(tt){for(var et=ma(tt),rt=0,it=this.ids.length-1;rt<it;){var nt=rt+it>>1;this.ids[nt]>=et?it=nt:rt=nt+1}for(var ot=[];this.ids[rt]===et;)ot.push({index:this.positions[3*rt],start:this.positions[3*rt+1],end:this.positions[3*rt+2]}),rt++;return ot},ya.serialize=function(tt,et){var rt=new Float64Array(tt.ids),it=new Uint32Array(tt.positions);return function t(tt,et,rt,it){for(;rt<it;){for(var nt=tt[rt+it>>1],ot=rt-1,at=it+1;;){do{ot++}while(tt[ot]<nt);do{at--}while(tt[at]>nt);if(ot>=at)break;va(tt,ot,at),va(et,3*ot,3*at),va(et,3*ot+1,3*at+1),va(et,3*ot+2,3*at+2)}at-rt<it-at?(t(tt,et,rt,at),rt=at+1):(t(tt,et,at+1,it),it=at)}}(rt,it,0,rt.length-1),et&&et.push(rt.buffer,it.buffer),{ids:rt,positions:it}},ya.deserialize=function(tt){var et=new ya;return et.ids=tt.ids,et.positions=tt.positions,et.indexed=!0,et};var rc=Math.pow(2,53)-1;function ma(tt){var et=+tt;return!isNaN(et)&&et<=rc?et:tc(String(tt))}function va(tt,et,rt){var it=tt[et];tt[et]=tt[rt],tt[rt]=it}On("FeaturePositionMap",ya);var ga=function(tt,et){this.gl=tt.gl,this.location=et},ic=function(tt){function e(et,rt){tt.call(this,et,rt),this.current=0}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.set=function(tt){this.current!==tt&&(this.current=tt,this.gl.uniform1i(this.location,tt))},e}(ga),nc=function(tt){function e(et,rt){tt.call(this,et,rt),this.current=0}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.set=function(tt){this.current!==tt&&(this.current=tt,this.gl.uniform1f(this.location,tt))},e}(ga),oc=function(tt){function e(et,rt){tt.call(this,et,rt),this.current=[0,0]}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.set=function(tt){tt[0]===this.current[0]&&tt[1]===this.current[1]||(this.current=tt,this.gl.uniform2f(this.location,tt[0],tt[1]))},e}(ga),ac=function(tt){function e(et,rt){tt.call(this,et,rt),this.current=[0,0,0]}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.set=function(tt){tt[0]===this.current[0]&&tt[1]===this.current[1]&&tt[2]===this.current[2]||(this.current=tt,this.gl.uniform3f(this.location,tt[0],tt[1],tt[2]))},e}(ga),sc=function(tt){function e(et,rt){tt.call(this,et,rt),this.current=[0,0,0,0]}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.set=function(tt){tt[0]===this.current[0]&&tt[1]===this.current[1]&&tt[2]===this.current[2]&&tt[3]===this.current[3]||(this.current=tt,this.gl.uniform4f(this.location,tt[0],tt[1],tt[2],tt[3]))},e}(ga),lc=function(tt){function e(et,rt){tt.call(this,et,rt),this.current=te.transparent}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.set=function(tt){tt.r===this.current.r&&tt.g===this.current.g&&tt.b===this.current.b&&tt.a===this.current.a||(this.current=tt,this.gl.uniform4f(this.location,tt.r,tt.g,tt.b,tt.a))},e}(ga),uc=new Float32Array(16),cc=function(tt){function e(et,rt){tt.call(this,et,rt),this.current=uc}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.set=function(tt){if(tt[12]!==this.current[12]||tt[0]!==this.current[0])return this.current=tt,void this.gl.uniformMatrix4fv(this.location,!1,tt);for(var et=1;et<16;et++)if(tt[et]!==this.current[et]){this.current=tt,this.gl.uniformMatrix4fv(this.location,!1,tt);break}},e}(ga);function za(tt){return[ua(255*tt.r,255*tt.g),ua(255*tt.b,255*tt.a)]}var Ca=function(tt,et,rt){this.value=tt,this.uniformNames=et.map((function(tt){return"u_"+tt})),this.type=rt};Ca.prototype.setUniform=function(tt,et,rt){tt.set(rt.constantOr(this.value))},Ca.prototype.getBinding=function(tt,et,rt){return"color"===this.type?new lc(tt,et):new nc(tt,et)};var Ea=function(tt,et){this.uniformNames=et.map((function(tt){return"u_"+tt})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Ea.prototype.setConstantPatternPositions=function(tt,et){this.pixelRatioFrom=et.pixelRatio,this.pixelRatioTo=tt.pixelRatio,this.patternFrom=et.tlbr,this.patternTo=tt.tlbr},Ea.prototype.setUniform=function(tt,et,rt,it){var nt="u_pattern_to"===it?this.patternTo:"u_pattern_from"===it?this.patternFrom:"u_pixel_ratio_to"===it?this.pixelRatioTo:"u_pixel_ratio_from"===it?this.pixelRatioFrom:null;nt&&tt.set(nt)},Ea.prototype.getBinding=function(tt,et,rt){return"u_pattern"===rt.substr(0,9)?new sc(tt,et):new nc(tt,et)};var Pa=function(tt,et,rt,it){this.expression=tt,this.type=rt,this.maxValue=0,this.paintVertexAttributes=et.map((function(tt){return{name:"a_"+tt,type:"Float32",components:"color"===rt?2:1,offset:0}})),this.paintVertexArray=new it};Pa.prototype.populatePaintArray=function(tt,et,rt,it,nt){var ot=this.paintVertexArray.length,at=this.expression.evaluate(new si(0),et,{},it,[],nt);this.paintVertexArray.resize(tt),this._setPaintValue(ot,tt,at)},Pa.prototype.updatePaintArray=function(tt,et,rt,it){var nt=this.expression.evaluate({zoom:0},rt,it);this._setPaintValue(tt,et,nt)},Pa.prototype._setPaintValue=function(tt,et,rt){if("color"===this.type)for(var it=za(rt),nt=tt;nt<et;nt++)this.paintVertexArray.emplace(nt,it[0],it[1]);else{for(var ot=tt;ot<et;ot++)this.paintVertexArray.emplace(ot,rt);this.maxValue=Math.max(this.maxValue,Math.abs(rt))}},Pa.prototype.upload=function(tt){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=tt.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Pa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Ma=function(tt,et,rt,it,nt,ot){this.expression=tt,this.uniformNames=et.map((function(tt){return"u_"+tt+"_t"})),this.type=rt,this.useIntegerZoom=it,this.zoom=nt,this.maxValue=0,this.paintVertexAttributes=et.map((function(tt){return{name:"a_"+tt,type:"Float32",components:"color"===rt?4:2,offset:0}})),this.paintVertexArray=new ot};Ma.prototype.populatePaintArray=function(tt,et,rt,it,nt){var ot=this.expression.evaluate(new si(this.zoom),et,{},it,[],nt),at=this.expression.evaluate(new si(this.zoom+1),et,{},it,[],nt),st=this.paintVertexArray.length;this.paintVertexArray.resize(tt),this._setPaintValue(st,tt,ot,at)},Ma.prototype.updatePaintArray=function(tt,et,rt,it){var nt=this.expression.evaluate({zoom:this.zoom},rt,it),ot=this.expression.evaluate({zoom:this.zoom+1},rt,it);this._setPaintValue(tt,et,nt,ot)},Ma.prototype._setPaintValue=function(tt,et,rt,it){if("color"===this.type)for(var nt=za(rt),ot=za(it),at=tt;at<et;at++)this.paintVertexArray.emplace(at,nt[0],nt[1],ot[0],ot[1]);else{for(var st=tt;st<et;st++)this.paintVertexArray.emplace(st,rt,it);this.maxValue=Math.max(this.maxValue,Math.abs(rt),Math.abs(it))}},Ma.prototype.upload=function(tt){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=tt.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Ma.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Ma.prototype.setUniform=function(tt,et){var rt=this.useIntegerZoom?Math.floor(et.zoom):et.zoom,it=p(this.expression.interpolationFactor(rt,this.zoom,this.zoom+1),0,1);tt.set(it)},Ma.prototype.getBinding=function(tt,et,rt){return new nc(tt,et)};var Ba=function(tt,et,rt,it,nt,ot){this.expression=tt,this.type=et,this.useIntegerZoom=rt,this.zoom=it,this.layerId=ot,this.zoomInPaintVertexArray=new nt,this.zoomOutPaintVertexArray=new nt};Ba.prototype.populatePaintArray=function(tt,et,rt){var it=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(tt),this.zoomOutPaintVertexArray.resize(tt),this._setPaintValues(it,tt,et.patterns&&et.patterns[this.layerId],rt)},Ba.prototype.updatePaintArray=function(tt,et,rt,it,nt){this._setPaintValues(tt,et,rt.patterns&&rt.patterns[this.layerId],nt)},Ba.prototype._setPaintValues=function(tt,et,rt,it){if(it&&rt){var nt=it[rt.min],ot=it[rt.mid],at=it[rt.max];if(nt&&ot&&at)for(var st=tt;st<et;st++)this.zoomInPaintVertexArray.emplace(st,ot.tl[0],ot.tl[1],ot.br[0],ot.br[1],nt.tl[0],nt.tl[1],nt.br[0],nt.br[1],ot.pixelRatio,nt.pixelRatio),this.zoomOutPaintVertexArray.emplace(st,ot.tl[0],ot.tl[1],ot.br[0],ot.br[1],at.tl[0],at.tl[1],at.br[0],at.br[1],ot.pixelRatio,at.pixelRatio)}},Ba.prototype.upload=function(tt){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=tt.createVertexBuffer(this.zoomInPaintVertexArray,ku.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=tt.createVertexBuffer(this.zoomOutPaintVertexArray,ku.members,this.expression.isStateDependent))},Ba.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Ta=function(tt,et,rt){this.binders={},this._buffers=[];var it=[];for(var nt in tt.paint._values)if(rt(nt)){var ot=tt.paint.get(nt);if(ot instanceof yi&&Tr(ot.property.specification)){var at=Fa(nt,tt.type),st=ot.value,ct=ot.property.specification.type,ht=ot.property.useIntegerZoom,dt=ot.property.specification["property-type"],mt="cross-faded"===dt||"cross-faded-data-driven"===dt;if("constant"===st.kind)this.binders[nt]=mt?new Ea(st.value,at):new Ca(st.value,at,ct),it.push("/u_"+nt);else if("source"===st.kind||mt){var yt=Da(nt,ct,"source");this.binders[nt]=mt?new Ba(st,ct,ht,et,yt,tt.id):new Pa(st,at,ct,yt),it.push("/a_"+nt)}else{var gt=Da(nt,ct,"composite");this.binders[nt]=new Ma(st,at,ct,ht,et,gt),it.push("/z_"+nt)}}}this.cacheKey=it.sort().join("")};Ta.prototype.getMaxValue=function(tt){var et=this.binders[tt];return et instanceof Pa||et instanceof Ma?et.maxValue:0},Ta.prototype.populatePaintArrays=function(tt,et,rt,it,nt){for(var ot in this.binders){var at=this.binders[ot];(at instanceof Pa||at instanceof Ma||at instanceof Ba)&&at.populatePaintArray(tt,et,rt,it,nt)}},Ta.prototype.setConstantPatternPositions=function(tt,et){for(var rt in this.binders){var it=this.binders[rt];it instanceof Ea&&it.setConstantPatternPositions(tt,et)}},Ta.prototype.updatePaintArrays=function(tt,et,rt,it,nt){var ot=!1;for(var at in tt)for(var st=0,ct=et.getPositions(at);st<ct.length;st+=1){var ht=ct[st],dt=rt.feature(ht.index);for(var mt in this.binders){var yt=this.binders[mt];if((yt instanceof Pa||yt instanceof Ma||yt instanceof Ba)&&!0===yt.expression.isStateDependent){var gt=it.paint.get(mt);yt.expression=gt.value,yt.updatePaintArray(ht.start,ht.end,dt,tt[at],nt),ot=!0}}}return ot},Ta.prototype.defines=function(){var tt=[];for(var et in this.binders){var rt=this.binders[et];(rt instanceof Ca||rt instanceof Ea)&&tt.push.apply(tt,rt.uniformNames.map((function(tt){return"#define HAS_UNIFORM_"+tt})))}return tt},Ta.prototype.getBinderAttributes=function(){var tt=[];for(var et in this.binders){var rt=this.binders[et];if(rt instanceof Pa||rt instanceof Ma)for(var it=0;it<rt.paintVertexAttributes.length;it++)tt.push(rt.paintVertexAttributes[it].name);else if(rt instanceof Ba)for(var nt=0;nt<ku.members.length;nt++)tt.push(ku.members[nt].name)}return tt},Ta.prototype.getBinderUniforms=function(){var tt=[];for(var et in this.binders){var rt=this.binders[et];if(rt instanceof Ca||rt instanceof Ea||rt instanceof Ma)for(var it=0,nt=rt.uniformNames;it<nt.length;it+=1)tt.push(nt[it])}return tt},Ta.prototype.getPaintVertexBuffers=function(){return this._buffers},Ta.prototype.getUniforms=function(tt,et){var rt=[];for(var it in this.binders){var nt=this.binders[it];if(nt instanceof Ca||nt instanceof Ea||nt instanceof Ma)for(var ot=0,at=nt.uniformNames;ot<at.length;ot+=1){var st=at[ot];if(et[st]){var ct=nt.getBinding(tt,et[st],st);rt.push({name:st,property:it,binding:ct})}}}return rt},Ta.prototype.setUniforms=function(tt,et,rt,it){for(var nt=0,ot=et;nt<ot.length;nt+=1){var at=ot[nt],st=at.name,ct=at.property;this.binders[ct].setUniform(at.binding,it,rt.get(ct),st)}},Ta.prototype.updatePaintBuffers=function(tt){for(var et in this._buffers=[],this.binders){var rt=this.binders[et];if(tt&&rt instanceof Ba){var it=2===tt.fromScale?rt.zoomInPaintVertexBuffer:rt.zoomOutPaintVertexBuffer;it&&this._buffers.push(it)}else(rt instanceof Pa||rt instanceof Ma)&&rt.paintVertexBuffer&&this._buffers.push(rt.paintVertexBuffer)}},Ta.prototype.upload=function(tt){for(var et in this.binders){var rt=this.binders[et];(rt instanceof Pa||rt instanceof Ma||rt instanceof Ba)&&rt.upload(tt)}this.updatePaintBuffers()},Ta.prototype.destroy=function(){for(var tt in this.binders){var et=this.binders[tt];(et instanceof Pa||et instanceof Ma||et instanceof Ba)&&et.destroy()}};var Va=function(tt,et,rt){void 0===rt&&(rt=function(){return!0}),this.programConfigurations={};for(var it=0,nt=tt;it<nt.length;it+=1){var ot=nt[it];this.programConfigurations[ot.id]=new Ta(ot,et,rt)}this.needsUpload=!1,this._featureMap=new ya,this._bufferOffset=0};function Fa(tt,et){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"]}[tt]||[tt.replace(et+"-","").replace(/-/g,"_")]}function Da(tt,et,rt){var it={color:{source:js,composite:zl},number:{source:xl,composite:js}},nt=function(tt){return{"line-pattern":{source:qs,composite:qs},"fill-pattern":{source:qs,composite:qs},"fill-extrusion-pattern":{source:qs,composite:qs}}[tt]}(tt);return nt&&nt[rt]||it[et][rt]}Va.prototype.populatePaintArrays=function(tt,et,rt,it,nt,ot){for(var at in this.programConfigurations)this.programConfigurations[at].populatePaintArrays(tt,et,it,nt,ot);void 0!==et.id&&this._featureMap.add(et.id,rt,this._bufferOffset,tt),this._bufferOffset=tt,this.needsUpload=!0},Va.prototype.updatePaintArrays=function(tt,et,rt,it){for(var nt=0,ot=rt;nt<ot.length;nt+=1){var at=ot[nt];this.needsUpload=this.programConfigurations[at.id].updatePaintArrays(tt,this._featureMap,et,at,it)||this.needsUpload}},Va.prototype.get=function(tt){return this.programConfigurations[tt]},Va.prototype.upload=function(tt){if(this.needsUpload){for(var et in this.programConfigurations)this.programConfigurations[et].upload(tt);this.needsUpload=!1}},Va.prototype.destroy=function(){for(var tt in this.programConfigurations)this.programConfigurations[tt].destroy()},On("ConstantBinder",Ca),On("CrossFadedConstantBinder",Ea),On("SourceExpressionBinder",Pa),On("CrossFadedCompositeBinder",Ba),On("CompositeExpressionBinder",Ma),On("ProgramConfiguration",Ta,{omit:["_buffers"]}),On("ProgramConfigurationSet",Va);var pc=Math.pow(2,14)-1,hc=-pc-1;function Ra(tt){for(var et=8192/tt.extent,rt=tt.loadGeometry(),it=0;it<rt.length;it++)for(var nt=rt[it],ot=0;ot<nt.length;ot++){var at=nt[ot],st=Math.round(at.x*et),ct=Math.round(at.y*et);at.x=p(st,hc,pc),at.y=p(ct,hc,pc),(st<at.x||st>at.x+1||ct<at.y||ct>at.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return rt}function Ua(tt,et){return{type:tt.type,id:tt.id,properties:tt.properties,geometry:et?Ra(tt):[]}}function ja(tt,et,rt,it,nt){tt.emplaceBack(2*et+(it+1)/2,2*rt+(nt+1)/2)}var qa=function(tt){this.zoom=tt.zoom,this.overscaling=tt.overscaling,this.layers=tt.layers,this.layerIds=this.layers.map((function(tt){return tt.id})),this.index=tt.index,this.hasPattern=!1,this.layoutVertexArray=new Rs,this.indexArray=new pl,this.segments=new sa,this.programConfigurations=new Va(tt.layers,tt.zoom),this.stateDependentLayerIds=this.layers.filter((function(tt){return tt.isStateDependent()})).map((function(tt){return tt.id}))};function Na(tt,et){for(var rt=0;rt<tt.length;rt++)if(Wa(et,tt[rt]))return!0;for(var it=0;it<et.length;it++)if(Wa(tt,et[it]))return!0;return!!Xa(tt,et)}function Ka(tt,et,rt){return!!Wa(tt,et)||!!Ha(et,tt,rt)}function Ga(tt,et){if(1===tt.length)return $a(et,tt[0]);for(var rt=0;rt<et.length;rt++)for(var it=et[rt],nt=0;nt<it.length;nt++)if(Wa(tt,it[nt]))return!0;for(var ot=0;ot<tt.length;ot++)if($a(et,tt[ot]))return!0;for(var at=0;at<et.length;at++)if(Xa(tt,et[at]))return!0;return!1}function Za(tt,et,rt){if(tt.length>1){if(Xa(tt,et))return!0;for(var it=0;it<et.length;it++)if(Ha(et[it],tt,rt))return!0}for(var nt=0;nt<tt.length;nt++)if(Ha(tt[nt],et,rt))return!0;return!1}function Xa(tt,et){if(0===tt.length||0===et.length)return!1;for(var rt=0;rt<tt.length-1;rt++)for(var it=tt[rt],nt=tt[rt+1],ot=0;ot<et.length-1;ot++)if(Ja(it,nt,et[ot],et[ot+1]))return!0;return!1}function Ja(tt,et,rt,it){return S(tt,rt,it)!==S(et,rt,it)&&S(tt,et,rt)!==S(tt,et,it)}function Ha(tt,et,rt){var it=rt*rt;if(1===et.length)return tt.distSqr(et[0])<it;for(var nt=1;nt<et.length;nt++)if(Ya(tt,et[nt-1],et[nt])<it)return!0;return!1}function Ya(tt,et,rt){var it=et.distSqr(rt);if(0===it)return tt.distSqr(et);var nt=((tt.x-et.x)*(rt.x-et.x)+(tt.y-et.y)*(rt.y-et.y))/it;return tt.distSqr(nt<0?et:nt>1?rt:rt.sub(et)._mult(nt)._add(et))}function $a(tt,et){for(var rt,it,nt,ot=!1,at=0;at<tt.length;at++)for(var st=0,ct=(rt=tt[at]).length-1;st<rt.length;ct=st++)(it=rt[st]).y>et.y!=(nt=rt[ct]).y>et.y&&et.x<(nt.x-it.x)*(et.y-it.y)/(nt.y-it.y)+it.x&&(ot=!ot);return ot}function Wa(tt,et){for(var rt=!1,it=0,nt=tt.length-1;it<tt.length;nt=it++){var ot=tt[it],at=tt[nt];ot.y>et.y!=at.y>et.y&&et.x<(at.x-ot.x)*(et.y-ot.y)/(at.y-ot.y)+ot.x&&(rt=!rt)}return rt}function Qa(tt,et,rt){var it=rt[0],nt=rt[2];if(tt.x<it.x&&et.x<it.x||tt.x>nt.x&&et.x>nt.x||tt.y<it.y&&et.y<it.y||tt.y>nt.y&&et.y>nt.y)return!1;var ot=S(tt,et,rt[0]);return ot!==S(tt,et,rt[1])||ot!==S(tt,et,rt[2])||ot!==S(tt,et,rt[3])}function to(tt,et,rt){var it=et.paint.get(tt).value;return"constant"===it.kind?it.value:rt.programConfigurations.get(et.id).getMaxValue(tt)}function eo(tt){return Math.sqrt(tt[0]*tt[0]+tt[1]*tt[1])}function ro(tt,et,it,nt,ot){if(!et[0]&&!et[1])return tt;var at=rt.convert(et)._mult(ot);"viewport"===it&&at._rotate(-nt);for(var st=[],ct=0;ct<tt.length;ct++)st.push(tt[ct].sub(at));return st}qa.prototype.populate=function(tt,et,rt){var it=this.layers[0],nt=[],ot=null;"circle"===it.type&&(ot=it.layout.get("circle-sort-key"));for(var at=0,st=tt;at<st.length;at+=1){var ct=st[at],ht=ct.feature,dt=ct.id,mt=ct.index,yt=ct.sourceLayerIndex,gt=this.layers[0]._featureFilter.needGeometry,vt=Ua(ht,gt);if(this.layers[0]._featureFilter.filter(new si(this.zoom),vt,rt)){var _t=ot?ot.evaluate(vt,{},rt):void 0,Rt={id:dt,properties:ht.properties,type:ht.type,sourceLayerIndex:yt,index:mt,geometry:gt?vt.geometry:Ra(ht),patterns:{},sortKey:_t};nt.push(Rt)}}ot&&nt.sort((function(tt,et){return tt.sortKey-et.sortKey}));for(var Ot=0,Zt=nt;Ot<Zt.length;Ot+=1){var Ze=Zt[Ot],Ge=Ze.geometry,Xe=Ze.index,Je=Ze.sourceLayerIndex,rr=tt[Xe].feature;this.addFeature(Ze,Ge,Xe,rt),et.featureIndex.insert(rr,Ge,Xe,Je,this.index)}},qa.prototype.update=function(tt,et,rt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(tt,et,this.stateDependentLayers,rt)},qa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},qa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},qa.prototype.upload=function(tt){this.uploaded||(this.layoutVertexBuffer=tt.createVertexBuffer(this.layoutVertexArray,Iu),this.indexBuffer=tt.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(tt),this.uploaded=!0},qa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},qa.prototype.addFeature=function(tt,et,rt,it){for(var nt=0,ot=et;nt<ot.length;nt+=1)for(var at=0,st=ot[nt];at<st.length;at+=1){var ct=st[at],ht=ct.x,dt=ct.y;if(!(ht<0||ht>=8192||dt<0||dt>=8192)){var mt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,tt.sortKey),yt=mt.vertexLength;ja(this.layoutVertexArray,ht,dt,-1,-1),ja(this.layoutVertexArray,ht,dt,1,-1),ja(this.layoutVertexArray,ht,dt,1,1),ja(this.layoutVertexArray,ht,dt,-1,1),this.indexArray.emplaceBack(yt,yt+1,yt+2),this.indexArray.emplaceBack(yt,yt+3,yt+2),mt.vertexLength+=4,mt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,tt,rt,{},it)},On("CircleBucket",qa,{omit:["layers"]});var fc=new wi({"circle-sort-key":new vi(Ln.layout_circle["circle-sort-key"])}),dc={paint:new wi({"circle-radius":new vi(Ln.paint_circle["circle-radius"]),"circle-color":new vi(Ln.paint_circle["circle-color"]),"circle-blur":new vi(Ln.paint_circle["circle-blur"]),"circle-opacity":new vi(Ln.paint_circle["circle-opacity"]),"circle-translate":new mi(Ln.paint_circle["circle-translate"]),"circle-translate-anchor":new mi(Ln.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new mi(Ln.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new mi(Ln.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new vi(Ln.paint_circle["circle-stroke-width"]),"circle-stroke-color":new vi(Ln.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new vi(Ln.paint_circle["circle-stroke-opacity"])}),layout:fc},mc="undefined"!=typeof Float32Array?Float32Array:Array;function oo(tt){return tt[0]=1,tt[1]=0,tt[2]=0,tt[3]=0,tt[4]=0,tt[5]=1,tt[6]=0,tt[7]=0,tt[8]=0,tt[9]=0,tt[10]=1,tt[11]=0,tt[12]=0,tt[13]=0,tt[14]=0,tt[15]=1,tt}function so(tt,et,rt){var it=et[0],nt=et[1],ot=et[2],at=et[3],st=et[4],ct=et[5],ht=et[6],dt=et[7],mt=et[8],yt=et[9],gt=et[10],vt=et[11],_t=et[12],Rt=et[13],Ot=et[14],Zt=et[15],Ze=rt[0],Ge=rt[1],Xe=rt[2],Je=rt[3];return tt[0]=Ze*it+Ge*st+Xe*mt+Je*_t,tt[1]=Ze*nt+Ge*ct+Xe*yt+Je*Rt,tt[2]=Ze*ot+Ge*ht+Xe*gt+Je*Ot,tt[3]=Ze*at+Ge*dt+Xe*vt+Je*Zt,tt[4]=(Ze=rt[4])*it+(Ge=rt[5])*st+(Xe=rt[6])*mt+(Je=rt[7])*_t,tt[5]=Ze*nt+Ge*ct+Xe*yt+Je*Rt,tt[6]=Ze*ot+Ge*ht+Xe*gt+Je*Ot,tt[7]=Ze*at+Ge*dt+Xe*vt+Je*Zt,tt[8]=(Ze=rt[8])*it+(Ge=rt[9])*st+(Xe=rt[10])*mt+(Je=rt[11])*_t,tt[9]=Ze*nt+Ge*ct+Xe*yt+Je*Rt,tt[10]=Ze*ot+Ge*ht+Xe*gt+Je*Ot,tt[11]=Ze*at+Ge*dt+Xe*vt+Je*Zt,tt[12]=(Ze=rt[12])*it+(Ge=rt[13])*st+(Xe=rt[14])*mt+(Je=rt[15])*_t,tt[13]=Ze*nt+Ge*ct+Xe*yt+Je*Rt,tt[14]=Ze*ot+Ge*ht+Xe*gt+Je*Ot,tt[15]=Ze*at+Ge*dt+Xe*vt+Je*Zt,tt}Math.hypot||(Math.hypot=function(){for(var tt=arguments,et=0,rt=arguments.length;rt--;)et+=tt[rt]*tt[rt];return Math.sqrt(et)});var yc,gc=so;function po(tt,et,rt){var it=et[0],nt=et[1],ot=et[2],at=et[3];return tt[0]=rt[0]*it+rt[4]*nt+rt[8]*ot+rt[12]*at,tt[1]=rt[1]*it+rt[5]*nt+rt[9]*ot+rt[13]*at,tt[2]=rt[2]*it+rt[6]*nt+rt[10]*ot+rt[14]*at,tt[3]=rt[3]*it+rt[7]*nt+rt[11]*ot+rt[15]*at,tt}yc=new mc(3),mc!=Float32Array&&(yc[0]=0,yc[1]=0,yc[2]=0),function(){var tt=new mc(4);mc!=Float32Array&&(tt[0]=0,tt[1]=0,tt[2]=0,tt[3]=0)}();var vc=(function(){var tt=new mc(2);mc!=Float32Array&&(tt[0]=0,tt[1]=0)}(),function(tt){function e(et){tt.call(this,et,dc)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.createBucket=function(tt){return new qa(tt)},e.prototype.queryRadius=function(tt){var et=tt;return to("circle-radius",this,et)+to("circle-stroke-width",this,et)+eo(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(tt,et,rt,it,nt,ot,at,st){for(var ct=ro(tt,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),ot.angle,at),ht=this.paint.get("circle-radius").evaluate(et,rt)+this.paint.get("circle-stroke-width").evaluate(et,rt),dt="map"===this.paint.get("circle-pitch-alignment"),mt=dt?ct:function(tt,et){return tt.map((function(tt){return ho(tt,et)}))}(ct,st),yt=dt?ht*at:ht,gt=0,vt=it;gt<vt.length;gt+=1)for(var _t=0,Rt=vt[gt];_t<Rt.length;_t+=1){var Ot=Rt[_t],Zt=dt?Ot:ho(Ot,st),Ze=yt,Ge=po([],[Ot.x,Ot.y,0,1],st);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?Ze*=Ge[3]/ot.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(Ze*=ot.cameraToCenterDistance/Ge[3]),Ka(mt,Zt,Ze))return!0}return!1},e}(Ls));function ho(tt,et){var it=po([],[tt.x,tt.y,0,1],et);return new rt(it[0]/it[3],it[1]/it[3])}var _c=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e}(qa);function yo(tt,et,rt,it){var nt=et.width,ot=et.height;if(it){if(it instanceof Uint8ClampedArray)it=new Uint8Array(it.buffer);else if(it.length!==nt*ot*rt)throw new RangeError("mismatched image size")}else it=new Uint8Array(nt*ot*rt);return tt.width=nt,tt.height=ot,tt.data=it,tt}function mo(tt,et,rt){var it=et.width,nt=et.height;if(it!==tt.width||nt!==tt.height){var ot=yo({},{width:it,height:nt},rt);vo(tt,ot,{x:0,y:0},{x:0,y:0},{width:Math.min(tt.width,it),height:Math.min(tt.height,nt)},rt),tt.width=it,tt.height=nt,tt.data=ot.data}}function vo(tt,et,rt,it,nt,ot){if(0===nt.width||0===nt.height)return et;if(nt.width>tt.width||nt.height>tt.height||rt.x>tt.width-nt.width||rt.y>tt.height-nt.height)throw new RangeError("out of range source coordinates for image copy");if(nt.width>et.width||nt.height>et.height||it.x>et.width-nt.width||it.y>et.height-nt.height)throw new RangeError("out of range destination coordinates for image copy");for(var at=tt.data,st=et.data,ct=0;ct<nt.height;ct++)for(var ht=((rt.y+ct)*tt.width+rt.x)*ot,dt=((it.y+ct)*et.width+it.x)*ot,mt=0;mt<nt.width*ot;mt++)st[dt+mt]=at[ht+mt];return et}On("HeatmapBucket",_c,{omit:["layers"]});var go=function(tt,et){yo(this,tt,1,et)};go.prototype.resize=function(tt){mo(this,tt,1)},go.prototype.clone=function(){return new go({width:this.width,height:this.height},new Uint8Array(this.data))},go.copy=function(tt,et,rt,it,nt){vo(tt,et,rt,it,nt,1)};var xo=function(tt,et){yo(this,tt,4,et)};xo.prototype.resize=function(tt){mo(this,tt,4)},xo.prototype.replace=function(tt,et){et?this.data.set(tt):this.data=tt instanceof Uint8ClampedArray?new Uint8Array(tt.buffer):tt},xo.prototype.clone=function(){return new xo({width:this.width,height:this.height},new Uint8Array(this.data))},xo.copy=function(tt,et,rt,it,nt){vo(tt,et,rt,it,nt,4)},On("AlphaImage",go),On("RGBAImage",xo);var xc={paint:new wi({"heatmap-radius":new vi(Ln.paint_heatmap["heatmap-radius"]),"heatmap-weight":new vi(Ln.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new mi(Ln.paint_heatmap["heatmap-intensity"]),"heatmap-color":new bi(Ln.paint_heatmap["heatmap-color"]),"heatmap-opacity":new mi(Ln.paint_heatmap["heatmap-opacity"])})};function wo(tt){var et={},rt=tt.resolution||256,it=tt.clips?tt.clips.length:1,nt=tt.image||new xo({width:rt,height:it}),a=function(rt,it,ot){et[tt.evaluationKey]=ot;var at=tt.expression.evaluate(et);nt.data[rt+it+0]=Math.floor(255*at.r/at.a),nt.data[rt+it+1]=Math.floor(255*at.g/at.a),nt.data[rt+it+2]=Math.floor(255*at.b/at.a),nt.data[rt+it+3]=Math.floor(255*at.a)};if(tt.clips)for(var ot=0,at=0;ot<it;++ot,at+=4*rt)for(var st=0,ct=0;st<rt;st++,ct+=4){var ht=st/(rt-1),dt=tt.clips[ot];a(at,ct,dt.start*(1-ht)+dt.end*ht)}else for(var mt=0,yt=0;mt<rt;mt++,yt+=4)a(0,yt,mt/(rt-1));return nt}var bc=function(tt){function e(et){tt.call(this,et,xc),this._updateColorRamp()}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.createBucket=function(tt){return new _c(tt)},e.prototype._handleSpecialPaintPropertyUpdate=function(tt){"heatmap-color"===tt&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){this.colorRamp=wo({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(Ls),wc={paint:new wi({"hillshade-illumination-direction":new mi(Ln.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new mi(Ln.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new mi(Ln.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new mi(Ln.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new mi(Ln.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new mi(Ln.paint_hillshade["hillshade-accent-color"])})},Ec=function(tt){function e(et){tt.call(this,et,wc)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(Ls),Sc=Ii([{name:"a_pos",components:2,type:"Int16"}],4).members,Tc=Co,Ic=Co;function Co(tt,et,rt){rt=rt||2;var it,nt,ot,at,st,ct,ht,dt=et&&et.length,mt=dt?et[0]*rt:tt.length,yt=Eo(tt,0,mt,rt,!0),gt=[];if(!yt||yt.next===yt.prev)return gt;if(dt&&(yt=function(tt,et,rt,it){var nt,ot,at,st=[];for(nt=0,ot=et.length;nt<ot;nt++)(at=Eo(tt,et[nt]*it,nt<ot-1?et[nt+1]*it:tt.length,it,!1))===at.next&&(at.steiner=!0),st.push(Uo(at));for(st.sort(Do),nt=0;nt<st.length;nt++)Lo(st[nt],rt),rt=Po(rt,rt.next);return rt}(tt,et,yt,rt)),tt.length>80*rt){it=ot=tt[0],nt=at=tt[1];for(var vt=rt;vt<mt;vt+=rt)(st=tt[vt])<it&&(it=st),(ct=tt[vt+1])<nt&&(nt=ct),st>ot&&(ot=st),ct>at&&(at=ct);ht=0!==(ht=Math.max(ot-it,at-nt))?1/ht:0}return Mo(yt,gt,rt,it,nt,ht),gt}function Eo(tt,et,rt,it,nt){var ot,at;if(nt===Qo(tt,et,rt,it)>0)for(ot=et;ot<rt;ot+=it)at=Yo(ot,tt[ot],tt[ot+1],at);else for(ot=rt-it;ot>=et;ot-=it)at=Yo(ot,tt[ot],tt[ot+1],at);return at&&Ko(at,at.next)&&($o(at),at=at.next),at}function Po(tt,et){if(!tt)return tt;et||(et=tt);var rt,it=tt;do{if(rt=!1,it.steiner||!Ko(it,it.next)&&0!==No(it.prev,it,it.next))it=it.next;else{if($o(it),(it=et=it.prev)===it.next)break;rt=!0}}while(rt||it!==et);return et}function Mo(tt,et,rt,it,nt,ot,at){if(tt){!at&&ot&&function(tt,et,rt,it){var nt=tt;do{null===nt.z&&(nt.z=Ro(nt.x,nt.y,et,rt,it)),nt.prevZ=nt.prev,nt.nextZ=nt.next,nt=nt.next}while(nt!==tt);nt.prevZ.nextZ=null,nt.prevZ=null,function(tt){var et,rt,it,nt,ot,at,st,ct,ht=1;do{for(rt=tt,tt=null,ot=null,at=0;rt;){for(at++,it=rt,st=0,et=0;et<ht&&(st++,it=it.nextZ);et++);for(ct=ht;st>0||ct>0&&it;)0!==st&&(0===ct||!it||rt.z<=it.z)?(nt=rt,rt=rt.nextZ,st--):(nt=it,it=it.nextZ,ct--),ot?ot.nextZ=nt:tt=nt,nt.prevZ=ot,ot=nt;rt=it}ot.nextZ=null,ht*=2}while(at>1)}(nt)}(tt,it,nt,ot);for(var st,ct,ht=tt;tt.prev!==tt.next;)if(st=tt.prev,ct=tt.next,ot?To(tt,it,nt,ot):Bo(tt))et.push(st.i/rt),et.push(tt.i/rt),et.push(ct.i/rt),$o(tt),tt=ct.next,ht=ct.next;else if((tt=ct)===ht){at?1===at?Mo(tt=Vo(Po(tt),et,rt),et,rt,it,nt,ot,2):2===at&&Fo(tt,et,rt,it,nt,ot):Mo(Po(tt),et,rt,it,nt,ot,1);break}}}function Bo(tt){var et=tt.prev,rt=tt,it=tt.next;if(No(et,rt,it)>=0)return!1;for(var nt=tt.next.next;nt!==tt.prev;){if(jo(et.x,et.y,rt.x,rt.y,it.x,it.y,nt.x,nt.y)&&No(nt.prev,nt,nt.next)>=0)return!1;nt=nt.next}return!0}function To(tt,et,rt,it){var nt=tt.prev,ot=tt,at=tt.next;if(No(nt,ot,at)>=0)return!1;for(var st=nt.x>ot.x?nt.x>at.x?nt.x:at.x:ot.x>at.x?ot.x:at.x,ct=nt.y>ot.y?nt.y>at.y?nt.y:at.y:ot.y>at.y?ot.y:at.y,ht=Ro(nt.x<ot.x?nt.x<at.x?nt.x:at.x:ot.x<at.x?ot.x:at.x,nt.y<ot.y?nt.y<at.y?nt.y:at.y:ot.y<at.y?ot.y:at.y,et,rt,it),dt=Ro(st,ct,et,rt,it),mt=tt.prevZ,yt=tt.nextZ;mt&&mt.z>=ht&&yt&&yt.z<=dt;){if(mt!==tt.prev&&mt!==tt.next&&jo(nt.x,nt.y,ot.x,ot.y,at.x,at.y,mt.x,mt.y)&&No(mt.prev,mt,mt.next)>=0)return!1;if(mt=mt.prevZ,yt!==tt.prev&&yt!==tt.next&&jo(nt.x,nt.y,ot.x,ot.y,at.x,at.y,yt.x,yt.y)&&No(yt.prev,yt,yt.next)>=0)return!1;yt=yt.nextZ}for(;mt&&mt.z>=ht;){if(mt!==tt.prev&&mt!==tt.next&&jo(nt.x,nt.y,ot.x,ot.y,at.x,at.y,mt.x,mt.y)&&No(mt.prev,mt,mt.next)>=0)return!1;mt=mt.prevZ}for(;yt&&yt.z<=dt;){if(yt!==tt.prev&&yt!==tt.next&&jo(nt.x,nt.y,ot.x,ot.y,at.x,at.y,yt.x,yt.y)&&No(yt.prev,yt,yt.next)>=0)return!1;yt=yt.nextZ}return!0}function Vo(tt,et,rt){var it=tt;do{var nt=it.prev,ot=it.next.next;!Ko(nt,ot)&&Go(nt,it,it.next,ot)&&Jo(nt,ot)&&Jo(ot,nt)&&(et.push(nt.i/rt),et.push(it.i/rt),et.push(ot.i/rt),$o(it),$o(it.next),it=tt=ot),it=it.next}while(it!==tt);return Po(it)}function Fo(tt,et,rt,it,nt,ot){var at=tt;do{for(var st=at.next.next;st!==at.prev;){if(at.i!==st.i&&qo(at,st)){var ct=Ho(at,st);return at=Po(at,at.next),ct=Po(ct,ct.next),Mo(at,et,rt,it,nt,ot),void Mo(ct,et,rt,it,nt,ot)}st=st.next}at=at.next}while(at!==tt)}function Do(tt,et){return tt.x-et.x}function Lo(tt,et){if(et=function(tt,et){var rt,it=et,nt=tt.x,ot=tt.y,at=-1/0;do{if(ot<=it.y&&ot>=it.next.y&&it.next.y!==it.y){var st=it.x+(ot-it.y)*(it.next.x-it.x)/(it.next.y-it.y);if(st<=nt&&st>at){if(at=st,st===nt){if(ot===it.y)return it;if(ot===it.next.y)return it.next}rt=it.x<it.next.x?it:it.next}}it=it.next}while(it!==et);if(!rt)return null;if(nt===at)return rt;var ct,ht=rt,dt=rt.x,mt=rt.y,yt=1/0;it=rt;do{nt>=it.x&&it.x>=dt&&nt!==it.x&&jo(ot<mt?nt:at,ot,dt,mt,ot<mt?at:nt,ot,it.x,it.y)&&(ct=Math.abs(ot-it.y)/(nt-it.x),Jo(it,tt)&&(ct<yt||ct===yt&&(it.x>rt.x||it.x===rt.x&&Oo(rt,it)))&&(rt=it,yt=ct)),it=it.next}while(it!==ht);return rt}(tt,et)){var rt=Ho(et,tt);Po(et,et.next),Po(rt,rt.next)}}function Oo(tt,et){return No(tt.prev,tt,et.prev)<0&&No(et.next,tt,tt.next)<0}function Ro(tt,et,rt,it,nt){return(tt=1431655765&((tt=858993459&((tt=252645135&((tt=16711935&((tt=32767*(tt-rt)*nt)|tt<<8))|tt<<4))|tt<<2))|tt<<1))|(et=1431655765&((et=858993459&((et=252645135&((et=16711935&((et=32767*(et-it)*nt)|et<<8))|et<<4))|et<<2))|et<<1))<<1}function Uo(tt){var et=tt,rt=tt;do{(et.x<rt.x||et.x===rt.x&&et.y<rt.y)&&(rt=et),et=et.next}while(et!==tt);return rt}function jo(tt,et,rt,it,nt,ot,at,st){return(nt-at)*(et-st)-(tt-at)*(ot-st)>=0&&(tt-at)*(it-st)-(rt-at)*(et-st)>=0&&(rt-at)*(ot-st)-(nt-at)*(it-st)>=0}function qo(tt,et){return tt.next.i!==et.i&&tt.prev.i!==et.i&&!function(tt,et){var rt=tt;do{if(rt.i!==tt.i&&rt.next.i!==tt.i&&rt.i!==et.i&&rt.next.i!==et.i&&Go(rt,rt.next,tt,et))return!0;rt=rt.next}while(rt!==tt);return!1}(tt,et)&&(Jo(tt,et)&&Jo(et,tt)&&function(tt,et){var rt=tt,it=!1,nt=(tt.x+et.x)/2,ot=(tt.y+et.y)/2;do{rt.y>ot!=rt.next.y>ot&&rt.next.y!==rt.y&&nt<(rt.next.x-rt.x)*(ot-rt.y)/(rt.next.y-rt.y)+rt.x&&(it=!it),rt=rt.next}while(rt!==tt);return it}(tt,et)&&(No(tt.prev,tt,et.prev)||No(tt,et.prev,et))||Ko(tt,et)&&No(tt.prev,tt,tt.next)>0&&No(et.prev,et,et.next)>0)}function No(tt,et,rt){return(et.y-tt.y)*(rt.x-et.x)-(et.x-tt.x)*(rt.y-et.y)}function Ko(tt,et){return tt.x===et.x&&tt.y===et.y}function Go(tt,et,rt,it){var nt=Xo(No(tt,et,rt)),ot=Xo(No(tt,et,it)),at=Xo(No(rt,it,tt)),st=Xo(No(rt,it,et));return nt!==ot&&at!==st||!(0!==nt||!Zo(tt,rt,et))||!(0!==ot||!Zo(tt,it,et))||!(0!==at||!Zo(rt,tt,it))||!(0!==st||!Zo(rt,et,it))}function Zo(tt,et,rt){return et.x<=Math.max(tt.x,rt.x)&&et.x>=Math.min(tt.x,rt.x)&&et.y<=Math.max(tt.y,rt.y)&&et.y>=Math.min(tt.y,rt.y)}function Xo(tt){return tt>0?1:tt<0?-1:0}function Jo(tt,et){return No(tt.prev,tt,tt.next)<0?No(tt,et,tt.next)>=0&&No(tt,tt.prev,et)>=0:No(tt,et,tt.prev)<0||No(tt,tt.next,et)<0}function Ho(tt,et){var rt=new Wo(tt.i,tt.x,tt.y),it=new Wo(et.i,et.x,et.y),nt=tt.next,ot=et.prev;return tt.next=et,et.prev=tt,rt.next=nt,nt.prev=rt,it.next=rt,rt.prev=it,ot.next=it,it.prev=ot,it}function Yo(tt,et,rt,it){var nt=new Wo(tt,et,rt);return it?(nt.next=it.next,nt.prev=it,it.next.prev=nt,it.next=nt):(nt.prev=nt,nt.next=nt),nt}function $o(tt){tt.next.prev=tt.prev,tt.prev.next=tt.next,tt.prevZ&&(tt.prevZ.nextZ=tt.nextZ),tt.nextZ&&(tt.nextZ.prevZ=tt.prevZ)}function Wo(tt,et,rt){this.i=tt,this.x=et,this.y=rt,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Qo(tt,et,rt,it){for(var nt=0,ot=et,at=rt-it;ot<rt;ot+=it)nt+=(tt[at]-tt[ot])*(tt[ot+1]+tt[at+1]),at=ot;return nt}function ts(tt,et,rt,it,nt){!function t(tt,et,rt,it,nt){for(;it>rt;){if(it-rt>600){var ot=it-rt+1,at=et-rt+1,st=Math.log(ot),ct=.5*Math.exp(2*st/3),ht=.5*Math.sqrt(st*ct*(ot-ct)/ot)*(at-ot/2<0?-1:1);t(tt,et,Math.max(rt,Math.floor(et-at*ct/ot+ht)),Math.min(it,Math.floor(et+(ot-at)*ct/ot+ht)),nt)}var dt=tt[et],mt=rt,yt=it;for(es(tt,rt,et),nt(tt[it],dt)>0&&es(tt,rt,it);mt<yt;){for(es(tt,mt,yt),mt++,yt--;nt(tt[mt],dt)<0;)mt++;for(;nt(tt[yt],dt)>0;)yt--}0===nt(tt[rt],dt)?es(tt,rt,yt):es(tt,++yt,it),yt<=et&&(rt=yt+1),et<=yt&&(it=yt-1)}}(tt,et,rt||0,it||tt.length-1,nt||rs)}function es(tt,et,rt){var it=tt[et];tt[et]=tt[rt],tt[rt]=it}function rs(tt,et){return tt<et?-1:tt>et?1:0}function ns(tt,et){var rt=tt.length;if(rt<=1)return[tt];for(var it,nt,ot=[],at=0;at<rt;at++){var st=k(tt[at]);0!==st&&(tt[at].area=Math.abs(st),void 0===nt&&(nt=st<0),nt===st<0?(it&&ot.push(it),it=[tt[at]]):it.push(tt[at]))}if(it&&ot.push(it),et>1)for(var ct=0;ct<ot.length;ct++)ot[ct].length<=et||(ts(ot[ct],et,1,ot[ct].length-1,is),ot[ct]=ot[ct].slice(0,et));return ot}function is(tt,et){return et.area-tt.area}function as(tt,et,rt){for(var it=rt.patternDependencies,nt=!1,ot=0,at=et;ot<at.length;ot+=1){var st=at[ot].paint.get(tt+"-pattern");st.isConstant()||(nt=!0);var ct=st.constantOr(null);ct&&(nt=!0,it[ct.to]=!0,it[ct.from]=!0)}return nt}function os(tt,et,rt,it,nt){for(var ot=nt.patternDependencies,at=0,st=et;at<st.length;at+=1){var ct=st[at],ht=ct.paint.get(tt+"-pattern").value;if("constant"!==ht.kind){var dt=ht.evaluate({zoom:it-1},rt,{},nt.availableImages),mt=ht.evaluate({zoom:it},rt,{},nt.availableImages),yt=ht.evaluate({zoom:it+1},rt,{},nt.availableImages);mt=mt&&mt.name?mt.name:mt,yt=yt&&yt.name?yt.name:yt,ot[dt=dt&&dt.name?dt.name:dt]=!0,ot[mt]=!0,ot[yt]=!0,rt.patterns[ct.id]={min:dt,mid:mt,max:yt}}}return rt}Co.deviation=function(tt,et,rt,it){var nt=et&&et.length,ot=Math.abs(Qo(tt,0,nt?et[0]*rt:tt.length,rt));if(nt)for(var at=0,st=et.length;at<st;at++)ot-=Math.abs(Qo(tt,et[at]*rt,at<st-1?et[at+1]*rt:tt.length,rt));var ct=0;for(at=0;at<it.length;at+=3){var ht=it[at]*rt,dt=it[at+1]*rt,mt=it[at+2]*rt;ct+=Math.abs((tt[ht]-tt[mt])*(tt[dt+1]-tt[ht+1])-(tt[ht]-tt[dt])*(tt[mt+1]-tt[ht+1]))}return 0===ot&&0===ct?0:Math.abs((ct-ot)/ot)},Co.flatten=function(tt){for(var et=tt[0][0].length,rt={vertices:[],holes:[],dimensions:et},it=0,nt=0;nt<tt.length;nt++){for(var ot=0;ot<tt[nt].length;ot++)for(var at=0;at<et;at++)rt.vertices.push(tt[nt][ot][at]);nt>0&&rt.holes.push(it+=tt[nt-1].length)}return rt},Tc.default=Ic;var ss=function(tt){this.zoom=tt.zoom,this.overscaling=tt.overscaling,this.layers=tt.layers,this.layerIds=this.layers.map((function(tt){return tt.id})),this.index=tt.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Rs,this.indexArray=new pl,this.indexArray2=new Sl,this.programConfigurations=new Va(tt.layers,tt.zoom),this.segments=new sa,this.segments2=new sa,this.stateDependentLayerIds=this.layers.filter((function(tt){return tt.isStateDependent()})).map((function(tt){return tt.id}))};ss.prototype.populate=function(tt,et,rt){this.hasPattern=as("fill",this.layers,et);for(var it=this.layers[0].layout.get("fill-sort-key"),nt=[],ot=0,at=tt;ot<at.length;ot+=1){var st=at[ot],ct=st.feature,ht=st.id,dt=st.index,mt=st.sourceLayerIndex,yt=this.layers[0]._featureFilter.needGeometry,gt=Ua(ct,yt);if(this.layers[0]._featureFilter.filter(new si(this.zoom),gt,rt)){var vt=it?it.evaluate(gt,{},rt,et.availableImages):void 0,_t={id:ht,properties:ct.properties,type:ct.type,sourceLayerIndex:mt,index:dt,geometry:yt?gt.geometry:Ra(ct),patterns:{},sortKey:vt};nt.push(_t)}}it&&nt.sort((function(tt,et){return tt.sortKey-et.sortKey}));for(var Rt=0,Ot=nt;Rt<Ot.length;Rt+=1){var Zt=Ot[Rt],Ze=Zt.geometry,Ge=Zt.index,Xe=Zt.sourceLayerIndex;if(this.hasPattern){var Je=os("fill",this.layers,Zt,this.zoom,et);this.patternFeatures.push(Je)}else this.addFeature(Zt,Ze,Ge,rt,{});et.featureIndex.insert(tt[Ge].feature,Ze,Ge,Xe,this.index)}},ss.prototype.update=function(tt,et,rt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(tt,et,this.stateDependentLayers,rt)},ss.prototype.addFeatures=function(tt,et,rt){for(var it=0,nt=this.patternFeatures;it<nt.length;it+=1){var ot=nt[it];this.addFeature(ot,ot.geometry,ot.index,et,rt)}},ss.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ss.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ss.prototype.upload=function(tt){this.uploaded||(this.layoutVertexBuffer=tt.createVertexBuffer(this.layoutVertexArray,Sc),this.indexBuffer=tt.createIndexBuffer(this.indexArray),this.indexBuffer2=tt.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(tt),this.uploaded=!0},ss.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},ss.prototype.addFeature=function(tt,et,rt,it,nt){for(var ot=0,at=ns(et,500);ot<at.length;ot+=1){for(var st=at[ot],ct=0,ht=0,dt=st;ht<dt.length;ht+=1)ct+=dt[ht].length;for(var mt=this.segments.prepareSegment(ct,this.layoutVertexArray,this.indexArray),yt=mt.vertexLength,gt=[],vt=[],_t=0,Rt=st;_t<Rt.length;_t+=1){var Ot=Rt[_t];if(0!==Ot.length){Ot!==st[0]&&vt.push(gt.length/2);var Zt=this.segments2.prepareSegment(Ot.length,this.layoutVertexArray,this.indexArray2),Ze=Zt.vertexLength;this.layoutVertexArray.emplaceBack(Ot[0].x,Ot[0].y),this.indexArray2.emplaceBack(Ze+Ot.length-1,Ze),gt.push(Ot[0].x),gt.push(Ot[0].y);for(var Ge=1;Ge<Ot.length;Ge++)this.layoutVertexArray.emplaceBack(Ot[Ge].x,Ot[Ge].y),this.indexArray2.emplaceBack(Ze+Ge-1,Ze+Ge),gt.push(Ot[Ge].x),gt.push(Ot[Ge].y);Zt.vertexLength+=Ot.length,Zt.primitiveLength+=Ot.length}}for(var Xe=Tc(gt,vt),Je=0;Je<Xe.length;Je+=3)this.indexArray.emplaceBack(yt+Xe[Je],yt+Xe[Je+1],yt+Xe[Je+2]);mt.vertexLength+=ct,mt.primitiveLength+=Xe.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,tt,rt,nt,it)},On("FillBucket",ss,{omit:["layers","patternFeatures"]});var zc=new wi({"fill-sort-key":new vi(Ln.layout_fill["fill-sort-key"])}),Cc={paint:new wi({"fill-antialias":new mi(Ln.paint_fill["fill-antialias"]),"fill-opacity":new vi(Ln.paint_fill["fill-opacity"]),"fill-color":new vi(Ln.paint_fill["fill-color"]),"fill-outline-color":new vi(Ln.paint_fill["fill-outline-color"]),"fill-translate":new mi(Ln.paint_fill["fill-translate"]),"fill-translate-anchor":new mi(Ln.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ds(Ln.paint_fill["fill-pattern"])}),layout:zc},Ac=function(tt){function e(et){tt.call(this,et,Cc)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.recalculate=function(et,rt){tt.prototype.recalculate.call(this,et,rt);var it=this.paint._values["fill-outline-color"];"constant"===it.value.kind&&void 0===it.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(tt){return new ss(tt)},e.prototype.queryRadius=function(){return eo(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(tt,et,rt,it,nt,ot,at){return Ga(ro(tt,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),ot.angle,at),it)},e.prototype.isTileClipped=function(){return!0},e}(Ls),kc=Ii([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Pc=fs;function fs(tt,et,rt,it,nt){this.properties={},this.extent=rt,this.type=0,this._pbf=tt,this._geometry=-1,this._keys=it,this._values=nt,tt.readFields(ys,this,et)}function ys(tt,et,rt){1==tt?et.id=rt.readVarint():2==tt?function(tt,et){for(var rt=tt.readVarint()+tt.pos;tt.pos<rt;){var it=et._keys[tt.readVarint()],nt=et._values[tt.readVarint()];et.properties[it]=nt}}(rt,et):3==tt?et.type=rt.readVarint():4==tt&&(et._geometry=rt.pos)}function ds(tt){for(var et,rt,it=0,nt=0,ot=tt.length,at=ot-1;nt<ot;at=nt++)it+=((rt=tt[at]).x-(et=tt[nt]).x)*(et.y+rt.y);return it}fs.types=["Unknown","Point","LineString","Polygon"],fs.prototype.loadGeometry=function(){var tt=this._pbf;tt.pos=this._geometry;for(var et,it=tt.readVarint()+tt.pos,nt=1,ot=0,at=0,st=0,ct=[];tt.pos<it;){if(ot<=0){var ht=tt.readVarint();nt=7&ht,ot=ht>>3}if(ot--,1===nt||2===nt)at+=tt.readSVarint(),st+=tt.readSVarint(),1===nt&&(et&&ct.push(et),et=[]),et.push(new rt(at,st));else{if(7!==nt)throw new Error("unknown command "+nt);et&&et.push(et[0].clone())}}return et&&ct.push(et),ct},fs.prototype.bbox=function(){var tt=this._pbf;tt.pos=this._geometry;for(var et=tt.readVarint()+tt.pos,rt=1,it=0,nt=0,ot=0,at=1/0,st=-1/0,ct=1/0,ht=-1/0;tt.pos<et;){if(it<=0){var dt=tt.readVarint();rt=7&dt,it=dt>>3}if(it--,1===rt||2===rt)(nt+=tt.readSVarint())<at&&(at=nt),nt>st&&(st=nt),(ot+=tt.readSVarint())<ct&&(ct=ot),ot>ht&&(ht=ot);else if(7!==rt)throw new Error("unknown command "+rt)}return[at,ct,st,ht]},fs.prototype.toGeoJSON=function(tt,et,rt){var it,nt,ot=this.extent*Math.pow(2,rt),at=this.extent*tt,st=this.extent*et,ct=this.loadGeometry(),ht=fs.types[this.type];function p(tt){for(var et=0;et<tt.length;et++){var rt=tt[et];tt[et]=[360*(rt.x+at)/ot-180,360/Math.PI*Math.atan(Math.exp((180-360*(rt.y+st)/ot)*Math.PI/180))-90]}}switch(this.type){case 1:var dt=[];for(it=0;it<ct.length;it++)dt[it]=ct[it][0];p(ct=dt);break;case 2:for(it=0;it<ct.length;it++)p(ct[it]);break;case 3:for(ct=function(tt){var et=tt.length;if(et<=1)return[tt];for(var rt,it,nt=[],ot=0;ot<et;ot++){var at=ds(tt[ot]);0!==at&&(void 0===it&&(it=at<0),it===at<0?(rt&&nt.push(rt),rt=[tt[ot]]):rt.push(tt[ot]))}return rt&&nt.push(rt),nt}(ct),it=0;it<ct.length;it++)for(nt=0;nt<ct[it].length;nt++)p(ct[it][nt])}1===ct.length?ct=ct[0]:ht="Multi"+ht;var mt={type:"Feature",geometry:{type:ht,coordinates:ct},properties:this.properties};return"id"in this&&(mt.id=this.id),mt};var Mc=vs;function vs(tt,et){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=tt,this._keys=[],this._values=[],this._features=[],tt.readFields(gs,this,et),this.length=this._features.length}function gs(tt,et,rt){15===tt?et.version=rt.readVarint():1===tt?et.name=rt.readString():5===tt?et.extent=rt.readVarint():2===tt?et._features.push(rt.pos):3===tt?et._keys.push(rt.readString()):4===tt&&et._values.push(function(tt){for(var et=null,rt=tt.readVarint()+tt.pos;tt.pos<rt;){var it=tt.readVarint()>>3;et=1===it?tt.readString():2===it?tt.readFloat():3===it?tt.readDouble():4===it?tt.readVarint64():5===it?tt.readVarint():6===it?tt.readSVarint():7===it?tt.readBoolean():null}return et}(rt))}function xs(tt,et,rt){if(3===tt){var it=new Mc(rt,rt.readVarint()+rt.pos);it.length&&(et[it.name]=it)}}vs.prototype.feature=function(tt){if(tt<0||tt>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[tt];var et=this._pbf.readVarint()+this._pbf.pos;return new Pc(this._pbf,et,this.extent,this._keys,this._values)};var Dc={VectorTile:function(tt,et){this.layers=tt.readFields(xs,{},et)},VectorTileFeature:Pc,VectorTileLayer:Mc},Lc=Dc.VectorTileFeature.types,Bc=Math.pow(2,13);function As(tt,et,rt,it,nt,ot,at,st){tt.emplaceBack(et,rt,2*Math.floor(it*Bc)+at,nt*Bc*2,ot*Bc*2,Math.round(st))}var Ss=function(tt){this.zoom=tt.zoom,this.overscaling=tt.overscaling,this.layers=tt.layers,this.layerIds=this.layers.map((function(tt){return tt.id})),this.index=tt.index,this.hasPattern=!1,this.layoutVertexArray=new Vs,this.indexArray=new pl,this.programConfigurations=new Va(tt.layers,tt.zoom),this.segments=new sa,this.stateDependentLayerIds=this.layers.filter((function(tt){return tt.isStateDependent()})).map((function(tt){return tt.id}))};function ks(tt,et){return tt.x===et.x&&(tt.x<0||tt.x>8192)||tt.y===et.y&&(tt.y<0||tt.y>8192)}Ss.prototype.populate=function(tt,et,rt){this.features=[],this.hasPattern=as("fill-extrusion",this.layers,et);for(var it=0,nt=tt;it<nt.length;it+=1){var ot=nt[it],at=ot.feature,st=ot.id,ct=ot.index,ht=ot.sourceLayerIndex,dt=this.layers[0]._featureFilter.needGeometry,mt=Ua(at,dt);if(this.layers[0]._featureFilter.filter(new si(this.zoom),mt,rt)){var yt={id:st,sourceLayerIndex:ht,index:ct,geometry:dt?mt.geometry:Ra(at),properties:at.properties,type:at.type,patterns:{}};this.hasPattern?this.features.push(os("fill-extrusion",this.layers,yt,this.zoom,et)):this.addFeature(yt,yt.geometry,ct,rt,{}),et.featureIndex.insert(at,yt.geometry,ct,ht,this.index,!0)}}},Ss.prototype.addFeatures=function(tt,et,rt){for(var it=0,nt=this.features;it<nt.length;it+=1){var ot=nt[it];this.addFeature(ot,ot.geometry,ot.index,et,rt)}},Ss.prototype.update=function(tt,et,rt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(tt,et,this.stateDependentLayers,rt)},Ss.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ss.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ss.prototype.upload=function(tt){this.uploaded||(this.layoutVertexBuffer=tt.createVertexBuffer(this.layoutVertexArray,kc),this.indexBuffer=tt.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(tt),this.uploaded=!0},Ss.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ss.prototype.addFeature=function(tt,et,rt,it,nt){for(var ot=0,at=ns(et,500);ot<at.length;ot+=1){for(var st=at[ot],ct=0,ht=0,dt=st;ht<dt.length;ht+=1)ct+=dt[ht].length;for(var mt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),yt=0,gt=st;yt<gt.length;yt+=1){var vt=gt[yt];if(0!==vt.length&&!((Ji=vt).every((function(tt){return tt.x<0}))||Ji.every((function(tt){return tt.x>8192}))||Ji.every((function(tt){return tt.y<0}))||Ji.every((function(tt){return tt.y>8192}))))for(var _t=0,Rt=0;Rt<vt.length;Rt++){var Ot=vt[Rt];if(Rt>=1){var Zt=vt[Rt-1];if(!ks(Ot,Zt)){mt.vertexLength+4>sa.MAX_VERTEX_ARRAY_LENGTH&&(mt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Ze=Ot.sub(Zt)._perp()._unit(),Ge=Zt.dist(Ot);_t+Ge>32768&&(_t=0),As(this.layoutVertexArray,Ot.x,Ot.y,Ze.x,Ze.y,0,0,_t),As(this.layoutVertexArray,Ot.x,Ot.y,Ze.x,Ze.y,0,1,_t),As(this.layoutVertexArray,Zt.x,Zt.y,Ze.x,Ze.y,0,0,_t+=Ge),As(this.layoutVertexArray,Zt.x,Zt.y,Ze.x,Ze.y,0,1,_t);var Xe=mt.vertexLength;this.indexArray.emplaceBack(Xe,Xe+2,Xe+1),this.indexArray.emplaceBack(Xe+1,Xe+2,Xe+3),mt.vertexLength+=4,mt.primitiveLength+=2}}}}if(mt.vertexLength+ct>sa.MAX_VERTEX_ARRAY_LENGTH&&(mt=this.segments.prepareSegment(ct,this.layoutVertexArray,this.indexArray)),"Polygon"===Lc[tt.type]){for(var Je=[],rr=[],wr=mt.vertexLength,Ir=0,ti=st;Ir<ti.length;Ir+=1){var ni=ti[Ir];if(0!==ni.length){ni!==st[0]&&rr.push(Je.length/2);for(var oi=0;oi<ni.length;oi++){var _i=ni[oi];As(this.layoutVertexArray,_i.x,_i.y,0,0,1,1,0),Je.push(_i.x),Je.push(_i.y)}}}for(var ji=Tc(Je,rr),Ki=0;Ki<ji.length;Ki+=3)this.indexArray.emplaceBack(wr+ji[Ki],wr+ji[Ki+2],wr+ji[Ki+1]);mt.primitiveLength+=ji.length/3,mt.vertexLength+=ct}}var Ji;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,tt,rt,nt,it)},On("FillExtrusionBucket",Ss,{omit:["layers","features"]});var Rc={paint:new wi({"fill-extrusion-opacity":new mi(Ln["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new vi(Ln["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new mi(Ln["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new mi(Ln["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ds(Ln["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new vi(Ln["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new vi(Ln["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new mi(Ln["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Oc=function(tt){function e(et){tt.call(this,et,Rc)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.createBucket=function(tt){return new Ss(tt)},e.prototype.queryRadius=function(){return eo(this.paint.get("fill-extrusion-translate"))},e.prototype.is3D=function(){return!0},e.prototype.queryIntersectsFeature=function(tt,et,it,nt,ot,at,st,ct){var ht=ro(tt,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),at.angle,st),dt=this.paint.get("fill-extrusion-height").evaluate(et,it),mt=this.paint.get("fill-extrusion-base").evaluate(et,it),yt=function(tt,et,it,nt){for(var ot=[],at=0,st=tt;at<st.length;at+=1){var ct=st[at],ht=[ct.x,ct.y,0,1];po(ht,ht,et),ot.push(new rt(ht[0]/ht[3],ht[1]/ht[3]))}return ot}(ht,ct),gt=function(tt,et,it,nt){for(var ot=[],at=[],st=nt[8]*et,ct=nt[9]*et,ht=nt[10]*et,dt=nt[11]*et,mt=nt[8]*it,yt=nt[9]*it,gt=nt[10]*it,vt=nt[11]*it,_t=0,Rt=tt;_t<Rt.length;_t+=1){for(var Ot=[],Zt=[],Ze=0,Ge=Rt[_t];Ze<Ge.length;Ze+=1){var Xe=Ge[Ze],Je=Xe.x,rr=Xe.y,wr=nt[0]*Je+nt[4]*rr+nt[12],Ir=nt[1]*Je+nt[5]*rr+nt[13],ti=nt[2]*Je+nt[6]*rr+nt[14],ni=nt[3]*Je+nt[7]*rr+nt[15],oi=ti+ht,_i=ni+dt,ji=wr+mt,Ki=Ir+yt,Ji=ti+gt,an=ni+vt,_n=new rt((wr+st)/_i,(Ir+ct)/_i);_n.z=oi/_i,Ot.push(_n);var xn=new rt(ji/an,Ki/an);xn.z=Ji/an,Zt.push(xn)}ot.push(Ot),at.push(Zt)}return[ot,at]}(nt,mt,dt,ct);return function(tt,et,rt){var it=1/0;Ga(rt,et)&&(it=Es(rt,et[0]));for(var nt=0;nt<et.length;nt++)for(var ot=et[nt],at=tt[nt],st=0;st<ot.length-1;st++){var ct=ot[st],ht=[ct,ot[st+1],at[st+1],at[st],ct];Na(rt,ht)&&(it=Math.min(it,Es(rt,ht)))}return it!==1/0&&it}(gt[0],gt[1],yt)},e}(Ls);function Cs(tt,et){return tt.x*et.x+tt.y*et.y}function Es(tt,et){if(1===tt.length){for(var rt,it=0,nt=et[it++];!rt||nt.equals(rt);)if(!(rt=et[it++]))return 1/0;for(;it<et.length;it++){var ot=et[it],at=tt[0],st=rt.sub(nt),ct=ot.sub(nt),ht=at.sub(nt),dt=Cs(st,st),mt=Cs(st,ct),yt=Cs(ct,ct),gt=Cs(ht,st),vt=Cs(ht,ct),_t=dt*yt-mt*mt,Rt=(yt*gt-mt*vt)/_t,Ot=(dt*vt-mt*gt)/_t,Zt=nt.z*(1-Rt-Ot)+rt.z*Rt+ot.z*Ot;if(isFinite(Zt))return Zt}return 1/0}for(var Ze=1/0,Ge=0,Xe=et;Ge<Xe.length;Ge+=1)Ze=Math.min(Ze,Xe[Ge].z);return Ze}var Fc=Ii([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Vc=Ii([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,Uc=Dc.VectorTileFeature.types,Nc=Math.cos(Math.PI/180*37.5),jc=Math.pow(2,14)/.5,Fs=function(tt){var et=this;this.zoom=tt.zoom,this.overscaling=tt.overscaling,this.layers=tt.layers,this.layerIds=this.layers.map((function(tt){return tt.id})),this.index=tt.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((function(tt){et.gradients[tt.id]={}})),this.layoutVertexArray=new Ns,this.layoutVertexArray2=new js,this.indexArray=new pl,this.programConfigurations=new Va(tt.layers,tt.zoom),this.segments=new sa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((function(tt){return tt.isStateDependent()})).map((function(tt){return tt.id}))};Fs.prototype.populate=function(tt,et,rt){this.hasPattern=as("line",this.layers,et);for(var it=this.layers[0].layout.get("line-sort-key"),nt=[],ot=0,at=tt;ot<at.length;ot+=1){var st=at[ot],ct=st.feature,ht=st.id,dt=st.index,mt=st.sourceLayerIndex,yt=this.layers[0]._featureFilter.needGeometry,gt=Ua(ct,yt);if(this.layers[0]._featureFilter.filter(new si(this.zoom),gt,rt)){var vt=it?it.evaluate(gt,{},rt):void 0,_t={id:ht,properties:ct.properties,type:ct.type,sourceLayerIndex:mt,index:dt,geometry:yt?gt.geometry:Ra(ct),patterns:{},sortKey:vt};nt.push(_t)}}it&&nt.sort((function(tt,et){return tt.sortKey-et.sortKey}));for(var Rt=0,Ot=nt;Rt<Ot.length;Rt+=1){var Zt=Ot[Rt],Ze=Zt.geometry,Ge=Zt.index,Xe=Zt.sourceLayerIndex;if(this.hasPattern){var Je=os("line",this.layers,Zt,this.zoom,et);this.patternFeatures.push(Je)}else this.addFeature(Zt,Ze,Ge,rt,{});et.featureIndex.insert(tt[Ge].feature,Ze,Ge,Xe,this.index)}},Fs.prototype.update=function(tt,et,rt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(tt,et,this.stateDependentLayers,rt)},Fs.prototype.addFeatures=function(tt,et,rt){for(var it=0,nt=this.patternFeatures;it<nt.length;it+=1){var ot=nt[it];this.addFeature(ot,ot.geometry,ot.index,et,rt)}},Fs.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Fs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Fs.prototype.upload=function(tt){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=tt.createVertexBuffer(this.layoutVertexArray2,Vc)),this.layoutVertexBuffer=tt.createVertexBuffer(this.layoutVertexArray,Fc),this.indexBuffer=tt.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(tt),this.uploaded=!0},Fs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Fs.prototype.lineFeatureClips=function(tt){if(tt.properties&&tt.properties.hasOwnProperty("mapbox_clip_start")&&tt.properties.hasOwnProperty("mapbox_clip_end"))return{start:+tt.properties.mapbox_clip_start,end:+tt.properties.mapbox_clip_end}},Fs.prototype.addFeature=function(tt,et,rt,it,nt){var ot=this.layers[0].layout,at=ot.get("line-join").evaluate(tt,{}),st=ot.get("line-cap"),ct=ot.get("line-miter-limit"),ht=ot.get("line-round-limit");this.lineClips=this.lineFeatureClips(tt);for(var dt=0,mt=et;dt<mt.length;dt+=1)this.addLine(mt[dt],tt,at,st,ct,ht);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,tt,rt,nt,it)},Fs.prototype.addLine=function(tt,et,rt,it,nt,ot){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var at=0;at<tt.length-1;at++)this.totalDistance+=tt[at].dist(tt[at+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var st="Polygon"===Uc[et.type],ct=tt.length;ct>=2&&tt[ct-1].equals(tt[ct-2]);)ct--;for(var ht=0;ht<ct-1&&tt[ht].equals(tt[ht+1]);)ht++;if(!(ct<(st?3:2))){"bevel"===rt&&(nt=1.05);var dt,mt=this.overscaling<=16?122880/(512*this.overscaling):0,yt=this.segments.prepareSegment(10*ct,this.layoutVertexArray,this.indexArray),gt=void 0,vt=void 0,_t=void 0,Rt=void 0;this.e1=this.e2=-1,st&&(Rt=tt[ht].sub(dt=tt[ct-2])._unit()._perp());for(var Ot=ht;Ot<ct;Ot++)if(!(vt=Ot===ct-1?st?tt[ht+1]:void 0:tt[Ot+1])||!tt[Ot].equals(vt)){Rt&&(_t=Rt),dt&&(gt=dt),dt=tt[Ot],Rt=vt?vt.sub(dt)._unit()._perp():_t;var Zt=(_t=_t||Rt).add(Rt);0===Zt.x&&0===Zt.y||Zt._unit();var Ze=_t.x*Rt.x+_t.y*Rt.y,Ge=Zt.x*Rt.x+Zt.y*Rt.y,Xe=0!==Ge?1/Ge:1/0,Je=2*Math.sqrt(2-2*Ge),rr=Ge<Nc&&gt&&vt,wr=_t.x*Rt.y-_t.y*Rt.x>0;if(rr&&Ot>ht){var Ir=dt.dist(gt);if(Ir>2*mt){var ti=dt.sub(dt.sub(gt)._mult(mt/Ir)._round());this.updateDistance(gt,ti),this.addCurrentVertex(ti,_t,0,0,yt),gt=ti}}var ni=gt&&vt,oi=ni?rt:st?"butt":it;if(ni&&"round"===oi&&(Xe<ot?oi="miter":Xe<=2&&(oi="fakeround")),"miter"===oi&&Xe>nt&&(oi="bevel"),"bevel"===oi&&(Xe>2&&(oi="flipbevel"),Xe<nt&&(oi="miter")),gt&&this.updateDistance(gt,dt),"miter"===oi)Zt._mult(Xe),this.addCurrentVertex(dt,Zt,0,0,yt);else if("flipbevel"===oi){if(Xe>100)Zt=Rt.mult(-1);else{var _i=Xe*_t.add(Rt).mag()/_t.sub(Rt).mag();Zt._perp()._mult(_i*(wr?-1:1))}this.addCurrentVertex(dt,Zt,0,0,yt),this.addCurrentVertex(dt,Zt.mult(-1),0,0,yt)}else if("bevel"===oi||"fakeround"===oi){var ji=-Math.sqrt(Xe*Xe-1),Ki=wr?ji:0,Ji=wr?0:ji;if(gt&&this.addCurrentVertex(dt,_t,Ki,Ji,yt),"fakeround"===oi)for(var an=Math.round(180*Je/Math.PI/20),_n=1;_n<an;_n++){var xn=_n/an;if(.5!==xn){var En=xn-.5;xn+=xn*En*(xn-1)*((1.0904+Ze*(Ze*(3.55645-1.43519*Ze)-3.2452))*En*En+(.848013+Ze*(.215638*Ze-1.06021)))}var Tn=Rt.sub(_t)._mult(xn)._add(_t)._unit()._mult(wr?-1:1);this.addHalfVertex(dt,Tn.x,Tn.y,!1,wr,0,yt)}vt&&this.addCurrentVertex(dt,Rt,-Ki,-Ji,yt)}else if("butt"===oi)this.addCurrentVertex(dt,Zt,0,0,yt);else if("square"===oi){var Cn=gt?1:-1;this.addCurrentVertex(dt,Zt,Cn,Cn,yt)}else"round"===oi&&(gt&&(this.addCurrentVertex(dt,_t,0,0,yt),this.addCurrentVertex(dt,_t,1,1,yt,!0)),vt&&(this.addCurrentVertex(dt,Rt,-1,-1,yt,!0),this.addCurrentVertex(dt,Rt,0,0,yt)));if(rr&&Ot<ct-1){var Pn=dt.dist(vt);if(Pn>2*mt){var Mn=dt.add(vt.sub(dt)._mult(mt/Pn)._round());this.updateDistance(dt,Mn),this.addCurrentVertex(Mn,Rt,0,0,yt),dt=Mn}}}}},Fs.prototype.addCurrentVertex=function(tt,et,rt,it,nt,ot){void 0===ot&&(ot=!1);var at=et.y*it-et.x,st=-et.y-et.x*it;this.addHalfVertex(tt,et.x+et.y*rt,et.y-et.x*rt,ot,!1,rt,nt),this.addHalfVertex(tt,at,st,ot,!0,-it,nt),this.distance>jc/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(tt,et,rt,it,nt,ot))},Fs.prototype.addHalfVertex=function(tt,et,rt,it,nt,ot,at){var st=.5*(this.lineClips?this.scaledDistance*(jc-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((tt.x<<1)+(it?1:0),(tt.y<<1)+(nt?1:0),Math.round(63*et)+128,Math.round(63*rt)+128,1+(0===ot?0:ot<0?-1:1)|(63&st)<<2,st>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var ct=at.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ct),at.primitiveLength++),nt?this.e2=ct:this.e1=ct},Fs.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Fs.prototype.updateDistance=function(tt,et){this.distance+=tt.dist(et),this.updateScaledDistance()},On("LineBucket",Fs,{omit:["layers","patternFeatures"]});var qc=new wi({"line-cap":new mi(Ln.layout_line["line-cap"]),"line-join":new vi(Ln.layout_line["line-join"]),"line-miter-limit":new mi(Ln.layout_line["line-miter-limit"]),"line-round-limit":new mi(Ln.layout_line["line-round-limit"]),"line-sort-key":new vi(Ln.layout_line["line-sort-key"])}),Zc={paint:new wi({"line-opacity":new vi(Ln.paint_line["line-opacity"]),"line-color":new vi(Ln.paint_line["line-color"]),"line-translate":new mi(Ln.paint_line["line-translate"]),"line-translate-anchor":new mi(Ln.paint_line["line-translate-anchor"]),"line-width":new vi(Ln.paint_line["line-width"]),"line-gap-width":new vi(Ln.paint_line["line-gap-width"]),"line-offset":new vi(Ln.paint_line["line-offset"]),"line-blur":new vi(Ln.paint_line["line-blur"]),"line-dasharray":new xi(Ln.paint_line["line-dasharray"]),"line-pattern":new Ds(Ln.paint_line["line-pattern"]),"line-gradient":new bi(Ln.paint_line["line-gradient"])}),layout:qc},Gc=new(function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(et,rt){return rt=new si(Math.floor(rt.zoom),{now:rt.now,fadeDuration:rt.fadeDuration,zoomHistory:rt.zoomHistory,transition:rt.transition}),tt.prototype.possiblyEvaluate.call(this,et,rt)},e.prototype.evaluate=function(et,rt,it,nt){return rt=h({},rt,{zoom:Math.floor(rt.zoom)}),tt.prototype.evaluate.call(this,et,rt,it,nt)},e}(vi))(Zc.paint.properties["line-width"].specification);Gc.useIntegerZoom=!0;var Xc=function(tt){function e(et){tt.call(this,et,Zc),this.gradientVersion=0}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(tt){"line-gradient"===tt&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Ne,this.gradientVersion=(this.gradientVersion+1)%nt)},e.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},e.prototype.recalculate=function(et,rt){tt.prototype.recalculate.call(this,et,rt),this.paint._values["line-floorwidth"]=Gc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,et)},e.prototype.createBucket=function(tt){return new Fs(tt)},e.prototype.queryRadius=function(tt){var et=tt,rt=Us(to("line-width",this,et),to("line-gap-width",this,et)),it=to("line-offset",this,et);return rt/2+Math.abs(it)+eo(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(tt,et,it,nt,ot,at,st){var ct=ro(tt,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),at.angle,st),ht=st/2*Us(this.paint.get("line-width").evaluate(et,it),this.paint.get("line-gap-width").evaluate(et,it)),dt=this.paint.get("line-offset").evaluate(et,it);return dt&&(nt=function(tt,et){for(var it=[],nt=new rt(0,0),ot=0;ot<tt.length;ot++){for(var at=tt[ot],st=[],ct=0;ct<at.length;ct++){var ht=at[ct],dt=at[ct+1],mt=0===ct?nt:ht.sub(at[ct-1])._unit()._perp(),yt=ct===at.length-1?nt:dt.sub(ht)._unit()._perp(),gt=mt._add(yt)._unit();gt._mult(1/(gt.x*yt.x+gt.y*yt.y)),st.push(gt._mult(et)._add(ht))}it.push(st)}return it}(nt,dt*st)),function(tt,et,rt){for(var it=0;it<et.length;it++){var nt=et[it];if(tt.length>=3)for(var ot=0;ot<nt.length;ot++)if(Wa(tt,nt[ot]))return!0;if(Za(tt,nt,rt))return!0}return!1}(ct,nt,ht)},e.prototype.isTileClipped=function(){return!0},e}(Ls);function Us(tt,et){return et>0?et+2*tt:tt}var Wc=Ii([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Hc=Ii([{name:"a_projected_pos",components:3,type:"Float32"}],4),Kc=(Ii([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Ii([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Jc=(Ii([{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"}]),Ii([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Yc=Ii([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Zs(tt,et,rt){return tt.sections.forEach((function(tt){tt.text=function(tt,et,rt){var it=et.layout.get("text-transform").evaluate(rt,{});return"uppercase"===it?tt=tt.toLocaleUpperCase():"lowercase"===it&&(tt=tt.toLocaleLowerCase()),Ms.applyArabicShaping&&(tt=Ms.applyArabicShaping(tt)),tt}(tt.text,et,rt)})),tt}Ii([{name:"triangle",components:3,type:"Uint16"}]),Ii([{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"}]),Ii([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Ii([{type:"Float32",name:"offsetX"}]),Ii([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var $c={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Js=function(tt,et,rt,it,nt){var ot,at,st=8*nt-it-1,ct=(1<<st)-1,ht=ct>>1,dt=-7,mt=rt?nt-1:0,yt=rt?-1:1,gt=tt[et+mt];for(mt+=yt,ot=gt&(1<<-dt)-1,gt>>=-dt,dt+=st;dt>0;ot=256*ot+tt[et+mt],mt+=yt,dt-=8);for(at=ot&(1<<-dt)-1,ot>>=-dt,dt+=it;dt>0;at=256*at+tt[et+mt],mt+=yt,dt-=8);if(0===ot)ot=1-ht;else{if(ot===ct)return at?NaN:1/0*(gt?-1:1);at+=Math.pow(2,it),ot-=ht}return(gt?-1:1)*at*Math.pow(2,ot-it)},Hs=function(tt,et,rt,it,nt,ot){var at,st,ct,ht=8*ot-nt-1,dt=(1<<ht)-1,mt=dt>>1,yt=23===nt?Math.pow(2,-24)-Math.pow(2,-77):0,gt=it?0:ot-1,vt=it?1:-1,_t=et<0||0===et&&1/et<0?1:0;for(et=Math.abs(et),isNaN(et)||et===1/0?(st=isNaN(et)?1:0,at=dt):(at=Math.floor(Math.log(et)/Math.LN2),et*(ct=Math.pow(2,-at))<1&&(at--,ct*=2),(et+=at+mt>=1?yt/ct:yt*Math.pow(2,1-mt))*ct>=2&&(at++,ct/=2),at+mt>=dt?(st=0,at=dt):at+mt>=1?(st=(et*ct-1)*Math.pow(2,nt),at+=mt):(st=et*Math.pow(2,mt-1)*Math.pow(2,nt),at=0));nt>=8;tt[rt+gt]=255&st,gt+=vt,st/=256,nt-=8);for(at=at<<nt|st,ht+=nt;ht>0;tt[rt+gt]=255&at,gt+=vt,at/=256,ht-=8);tt[rt+gt-vt]|=128*_t},Qc=$s;function $s(tt){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(tt)?tt:new Uint8Array(tt||0),this.pos=0,this.type=0,this.length=this.buf.length}$s.Varint=0,$s.Fixed64=1,$s.Bytes=2,$s.Fixed32=5;var op="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Qs(tt){return tt.type===$s.Bytes?tt.readVarint()+tt.pos:tt.pos+1}function tu(tt,et,rt){return rt?4294967296*et+(tt>>>0):4294967296*(et>>>0)+(tt>>>0)}function eu(tt,et,rt){var it=et<=16383?1:et<=2097151?2:et<=268435455?3:Math.floor(Math.log(et)/(7*Math.LN2));rt.realloc(it);for(var nt=rt.pos-1;nt>=tt;nt--)rt.buf[nt+it]=rt.buf[nt]}function ru(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeVarint(tt[rt])}function nu(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeSVarint(tt[rt])}function iu(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeFloat(tt[rt])}function au(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeDouble(tt[rt])}function ou(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeBoolean(tt[rt])}function su(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeFixed32(tt[rt])}function uu(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeSFixed32(tt[rt])}function lu(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeFixed64(tt[rt])}function pu(tt,et){for(var rt=0;rt<tt.length;rt++)et.writeSFixed64(tt[rt])}function cu(tt,et){return(tt[et]|tt[et+1]<<8|tt[et+2]<<16)+16777216*tt[et+3]}function hu(tt,et,rt){tt[rt]=et,tt[rt+1]=et>>>8,tt[rt+2]=et>>>16,tt[rt+3]=et>>>24}function fu(tt,et){return(tt[et]|tt[et+1]<<8|tt[et+2]<<16)+(tt[et+3]<<24)}function yu(tt,et,rt){1===tt&&rt.readMessage(du,et)}function du(tt,et,rt){if(3===tt){var it=rt.readMessage(mu,{}),nt=it.width,ot=it.height,at=it.left,st=it.top,ct=it.advance;et.push({id:it.id,bitmap:new go({width:nt+6,height:ot+6},it.bitmap),metrics:{width:nt,height:ot,left:at,top:st,advance:ct}})}}function mu(tt,et,rt){1===tt?et.id=rt.readVarint():2===tt?et.bitmap=rt.readBytes():3===tt?et.width=rt.readVarint():4===tt?et.height=rt.readVarint():5===tt?et.left=rt.readSVarint():6===tt?et.top=rt.readSVarint():7===tt&&(et.advance=rt.readVarint())}function vu(tt){for(var et=0,rt=0,it=0,nt=tt;it<nt.length;it+=1){var ot=nt[it];et+=ot.w*ot.h,rt=Math.max(rt,ot.w)}tt.sort((function(tt,et){return et.h-tt.h}));for(var at=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(et/.95)),rt),h:1/0}],st=0,ct=0,ht=0,dt=tt;ht<dt.length;ht+=1)for(var mt=dt[ht],yt=at.length-1;yt>=0;yt--){var gt=at[yt];if(!(mt.w>gt.w||mt.h>gt.h)){if(mt.x=gt.x,mt.y=gt.y,ct=Math.max(ct,mt.y+mt.h),st=Math.max(st,mt.x+mt.w),mt.w===gt.w&&mt.h===gt.h){var vt=at.pop();yt<at.length&&(at[yt]=vt)}else mt.h===gt.h?(gt.x+=mt.w,gt.w-=mt.w):mt.w===gt.w?(gt.y+=mt.h,gt.h-=mt.h):(at.push({x:gt.x+mt.w,y:gt.y,w:gt.w-mt.w,h:mt.h}),gt.y+=mt.h,gt.h-=mt.h);break}}return{w:st,h:ct,fill:et/(st*ct)||0}}$s.prototype={destroy:function(){this.buf=null},readFields:function(tt,et,rt){for(rt=rt||this.length;this.pos<rt;){var it=this.readVarint(),nt=it>>3,ot=this.pos;this.type=7&it,tt(nt,et,this),this.pos===ot&&this.skip(it)}return et},readMessage:function(tt,et){return this.readFields(tt,et,this.readVarint()+this.pos)},readFixed32:function(){var tt=cu(this.buf,this.pos);return this.pos+=4,tt},readSFixed32:function(){var tt=fu(this.buf,this.pos);return this.pos+=4,tt},readFixed64:function(){var tt=cu(this.buf,this.pos)+4294967296*cu(this.buf,this.pos+4);return this.pos+=8,tt},readSFixed64:function(){var tt=cu(this.buf,this.pos)+4294967296*fu(this.buf,this.pos+4);return this.pos+=8,tt},readFloat:function(){var tt=Js(this.buf,this.pos,!0,23,4);return this.pos+=4,tt},readDouble:function(){var tt=Js(this.buf,this.pos,!0,52,8);return this.pos+=8,tt},readVarint:function(tt){var et,rt,it=this.buf;return et=127&(rt=it[this.pos++]),rt<128?et:(et|=(127&(rt=it[this.pos++]))<<7,rt<128?et:(et|=(127&(rt=it[this.pos++]))<<14,rt<128?et:(et|=(127&(rt=it[this.pos++]))<<21,rt<128?et:function(tt,et,rt){var it,nt,ot=rt.buf;if(it=(112&(nt=ot[rt.pos++]))>>4,nt<128)return tu(tt,it,et);if(it|=(127&(nt=ot[rt.pos++]))<<3,nt<128)return tu(tt,it,et);if(it|=(127&(nt=ot[rt.pos++]))<<10,nt<128)return tu(tt,it,et);if(it|=(127&(nt=ot[rt.pos++]))<<17,nt<128)return tu(tt,it,et);if(it|=(127&(nt=ot[rt.pos++]))<<24,nt<128)return tu(tt,it,et);if(it|=(1&(nt=ot[rt.pos++]))<<31,nt<128)return tu(tt,it,et);throw new Error("Expected varint not more than 10 bytes")}(et|=(15&(rt=it[this.pos]))<<28,tt,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var tt=this.readVarint();return tt%2==1?(tt+1)/-2:tt/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var tt=this.readVarint()+this.pos,et=this.pos;return this.pos=tt,tt-et>=12&&op?function(tt,et,rt){return op.decode(tt.subarray(et,rt))}(this.buf,et,tt):function(tt,et,rt){for(var it="",nt=et;nt<rt;){var ot,at,st,ct=tt[nt],ht=null,dt=ct>239?4:ct>223?3:ct>191?2:1;if(nt+dt>rt)break;1===dt?ct<128&&(ht=ct):2===dt?128==(192&(ot=tt[nt+1]))&&(ht=(31&ct)<<6|63&ot)<=127&&(ht=null):3===dt?(at=tt[nt+2],128==(192&(ot=tt[nt+1]))&&128==(192&at)&&((ht=(15&ct)<<12|(63&ot)<<6|63&at)<=2047||ht>=55296&&ht<=57343)&&(ht=null)):4===dt&&(at=tt[nt+2],st=tt[nt+3],128==(192&(ot=tt[nt+1]))&&128==(192&at)&&128==(192&st)&&((ht=(15&ct)<<18|(63&ot)<<12|(63&at)<<6|63&st)<=65535||ht>=1114112)&&(ht=null)),null===ht?(ht=65533,dt=1):ht>65535&&(ht-=65536,it+=String.fromCharCode(ht>>>10&1023|55296),ht=56320|1023&ht),it+=String.fromCharCode(ht),nt+=dt}return it}(this.buf,et,tt)},readBytes:function(){var tt=this.readVarint()+this.pos,et=this.buf.subarray(this.pos,tt);return this.pos=tt,et},readPackedVarint:function(tt,et){if(this.type!==$s.Bytes)return tt.push(this.readVarint(et));var rt=Qs(this);for(tt=tt||[];this.pos<rt;)tt.push(this.readVarint(et));return tt},readPackedSVarint:function(tt){if(this.type!==$s.Bytes)return tt.push(this.readSVarint());var et=Qs(this);for(tt=tt||[];this.pos<et;)tt.push(this.readSVarint());return tt},readPackedBoolean:function(tt){if(this.type!==$s.Bytes)return tt.push(this.readBoolean());var et=Qs(this);for(tt=tt||[];this.pos<et;)tt.push(this.readBoolean());return tt},readPackedFloat:function(tt){if(this.type!==$s.Bytes)return tt.push(this.readFloat());var et=Qs(this);for(tt=tt||[];this.pos<et;)tt.push(this.readFloat());return tt},readPackedDouble:function(tt){if(this.type!==$s.Bytes)return tt.push(this.readDouble());var et=Qs(this);for(tt=tt||[];this.pos<et;)tt.push(this.readDouble());return tt},readPackedFixed32:function(tt){if(this.type!==$s.Bytes)return tt.push(this.readFixed32());var et=Qs(this);for(tt=tt||[];this.pos<et;)tt.push(this.readFixed32());return tt},readPackedSFixed32:function(tt){if(this.type!==$s.Bytes)return tt.push(this.readSFixed32());var et=Qs(this);for(tt=tt||[];this.pos<et;)tt.push(this.readSFixed32());return tt},readPackedFixed64:function(tt){if(this.type!==$s.Bytes)return tt.push(this.readFixed64());var et=Qs(this);for(tt=tt||[];this.pos<et;)tt.push(this.readFixed64());return tt},readPackedSFixed64:function(tt){if(this.type!==$s.Bytes)return tt.push(this.readSFixed64());var et=Qs(this);for(tt=tt||[];this.pos<et;)tt.push(this.readSFixed64());return tt},skip:function(tt){var et=7&tt;if(et===$s.Varint)for(;this.buf[this.pos++]>127;);else if(et===$s.Bytes)this.pos=this.readVarint()+this.pos;else if(et===$s.Fixed32)this.pos+=4;else{if(et!==$s.Fixed64)throw new Error("Unimplemented type: "+et);this.pos+=8}},writeTag:function(tt,et){this.writeVarint(tt<<3|et)},realloc:function(tt){for(var et=this.length||16;et<this.pos+tt;)et*=2;if(et!==this.length){var rt=new Uint8Array(et);rt.set(this.buf),this.buf=rt,this.length=et}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(tt){this.realloc(4),hu(this.buf,tt,this.pos),this.pos+=4},writeSFixed32:function(tt){this.realloc(4),hu(this.buf,tt,this.pos),this.pos+=4},writeFixed64:function(tt){this.realloc(8),hu(this.buf,-1&tt,this.pos),hu(this.buf,Math.floor(tt*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(tt){this.realloc(8),hu(this.buf,-1&tt,this.pos),hu(this.buf,Math.floor(tt*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(tt){(tt=+tt||0)>268435455||tt<0?function(tt,et){var rt,it;if(tt>=0?(rt=tt%4294967296|0,it=tt/4294967296|0):(it=~(-tt/4294967296),4294967295^(rt=~(-tt%4294967296))?rt=rt+1|0:(rt=0,it=it+1|0)),tt>=0x10000000000000000||tt<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");et.realloc(10),function(tt,et,rt){rt.buf[rt.pos++]=127&tt|128,tt>>>=7,rt.buf[rt.pos++]=127&tt|128,tt>>>=7,rt.buf[rt.pos++]=127&tt|128,tt>>>=7,rt.buf[rt.pos++]=127&tt|128,rt.buf[rt.pos]=127&(tt>>>=7)}(rt,0,et),function(tt,et){var rt=(7&tt)<<4;et.buf[et.pos++]|=rt|((tt>>>=3)?128:0),tt&&(et.buf[et.pos++]=127&tt|((tt>>>=7)?128:0),tt&&(et.buf[et.pos++]=127&tt|((tt>>>=7)?128:0),tt&&(et.buf[et.pos++]=127&tt|((tt>>>=7)?128:0),tt&&(et.buf[et.pos++]=127&tt|((tt>>>=7)?128:0),tt&&(et.buf[et.pos++]=127&tt)))))}(it,et)}(tt,this):(this.realloc(4),this.buf[this.pos++]=127&tt|(tt>127?128:0),tt<=127||(this.buf[this.pos++]=127&(tt>>>=7)|(tt>127?128:0),tt<=127||(this.buf[this.pos++]=127&(tt>>>=7)|(tt>127?128:0),tt<=127||(this.buf[this.pos++]=tt>>>7&127))))},writeSVarint:function(tt){this.writeVarint(tt<0?2*-tt-1:2*tt)},writeBoolean:function(tt){this.writeVarint(Boolean(tt))},writeString:function(tt){tt=String(tt),this.realloc(4*tt.length),this.pos++;var et=this.pos;this.pos=function(tt,et,rt){for(var it,nt,ot=0;ot<et.length;ot++){if((it=et.charCodeAt(ot))>55295&&it<57344){if(!nt){it>56319||ot+1===et.length?(tt[rt++]=239,tt[rt++]=191,tt[rt++]=189):nt=it;continue}if(it<56320){tt[rt++]=239,tt[rt++]=191,tt[rt++]=189,nt=it;continue}it=nt-55296<<10|it-56320|65536,nt=null}else nt&&(tt[rt++]=239,tt[rt++]=191,tt[rt++]=189,nt=null);it<128?tt[rt++]=it:(it<2048?tt[rt++]=it>>6|192:(it<65536?tt[rt++]=it>>12|224:(tt[rt++]=it>>18|240,tt[rt++]=it>>12&63|128),tt[rt++]=it>>6&63|128),tt[rt++]=63&it|128)}return rt}(this.buf,tt,this.pos);var rt=this.pos-et;rt>=128&&eu(et,rt,this),this.pos=et-1,this.writeVarint(rt),this.pos+=rt},writeFloat:function(tt){this.realloc(4),Hs(this.buf,tt,this.pos,!0,23,4),this.pos+=4},writeDouble:function(tt){this.realloc(8),Hs(this.buf,tt,this.pos,!0,52,8),this.pos+=8},writeBytes:function(tt){var et=tt.length;this.writeVarint(et),this.realloc(et);for(var rt=0;rt<et;rt++)this.buf[this.pos++]=tt[rt]},writeRawMessage:function(tt,et){this.pos++;var rt=this.pos;tt(et,this);var it=this.pos-rt;it>=128&&eu(rt,it,this),this.pos=rt-1,this.writeVarint(it),this.pos+=it},writeMessage:function(tt,et,rt){this.writeTag(tt,$s.Bytes),this.writeRawMessage(et,rt)},writePackedVarint:function(tt,et){et.length&&this.writeMessage(tt,ru,et)},writePackedSVarint:function(tt,et){et.length&&this.writeMessage(tt,nu,et)},writePackedBoolean:function(tt,et){et.length&&this.writeMessage(tt,ou,et)},writePackedFloat:function(tt,et){et.length&&this.writeMessage(tt,iu,et)},writePackedDouble:function(tt,et){et.length&&this.writeMessage(tt,au,et)},writePackedFixed32:function(tt,et){et.length&&this.writeMessage(tt,su,et)},writePackedSFixed32:function(tt,et){et.length&&this.writeMessage(tt,uu,et)},writePackedFixed64:function(tt,et){et.length&&this.writeMessage(tt,lu,et)},writePackedSFixed64:function(tt,et){et.length&&this.writeMessage(tt,pu,et)},writeBytesField:function(tt,et){this.writeTag(tt,$s.Bytes),this.writeBytes(et)},writeFixed32Field:function(tt,et){this.writeTag(tt,$s.Fixed32),this.writeFixed32(et)},writeSFixed32Field:function(tt,et){this.writeTag(tt,$s.Fixed32),this.writeSFixed32(et)},writeFixed64Field:function(tt,et){this.writeTag(tt,$s.Fixed64),this.writeFixed64(et)},writeSFixed64Field:function(tt,et){this.writeTag(tt,$s.Fixed64),this.writeSFixed64(et)},writeVarintField:function(tt,et){this.writeTag(tt,$s.Varint),this.writeVarint(et)},writeSVarintField:function(tt,et){this.writeTag(tt,$s.Varint),this.writeSVarint(et)},writeStringField:function(tt,et){this.writeTag(tt,$s.Bytes),this.writeString(et)},writeFloatField:function(tt,et){this.writeTag(tt,$s.Fixed32),this.writeFloat(et)},writeDoubleField:function(tt,et){this.writeTag(tt,$s.Fixed64),this.writeDouble(et)},writeBooleanField:function(tt,et){this.writeVarintField(tt,Boolean(et))}};var gu=function(tt,et){var rt=et.pixelRatio,it=et.version,nt=et.stretchX,ot=et.stretchY,at=et.content;this.paddedRect=tt,this.pixelRatio=rt,this.stretchX=nt,this.stretchY=ot,this.content=at,this.version=it},lp={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};lp.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},lp.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},lp.tlbr.get=function(){return this.tl.concat(this.br)},lp.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(gu.prototype,lp);var bu=function(tt,et){var rt={},it={};this.haveRenderCallbacks=[];var nt=[];this.addImages(tt,rt,nt),this.addImages(et,it,nt);var ot=vu(nt),at=new xo({width:ot.w||1,height:ot.h||1});for(var st in tt){var ct=tt[st],ht=rt[st].paddedRect;xo.copy(ct.data,at,{x:0,y:0},{x:ht.x+1,y:ht.y+1},ct.data)}for(var dt in et){var mt=et[dt],yt=it[dt].paddedRect,gt=yt.x+1,vt=yt.y+1,_t=mt.data.width,Rt=mt.data.height;xo.copy(mt.data,at,{x:0,y:0},{x:gt,y:vt},mt.data),xo.copy(mt.data,at,{x:0,y:Rt-1},{x:gt,y:vt-1},{width:_t,height:1}),xo.copy(mt.data,at,{x:0,y:0},{x:gt,y:vt+Rt},{width:_t,height:1}),xo.copy(mt.data,at,{x:_t-1,y:0},{x:gt-1,y:vt},{width:1,height:Rt}),xo.copy(mt.data,at,{x:0,y:0},{x:gt+_t,y:vt},{width:1,height:Rt})}this.image=at,this.iconPositions=rt,this.patternPositions=it};bu.prototype.addImages=function(tt,et,rt){for(var it in tt){var nt=tt[it],ot={x:0,y:0,w:nt.data.width+2,h:nt.data.height+2};rt.push(ot),et[it]=new gu(ot,nt),nt.hasRenderCallback&&this.haveRenderCallbacks.push(it)}},bu.prototype.patchUpdatedImages=function(tt,et){for(var rt in tt.dispatchRenderCallbacks(this.haveRenderCallbacks),tt.updatedImages)this.patchUpdatedImage(this.iconPositions[rt],tt.getImage(rt),et),this.patchUpdatedImage(this.patternPositions[rt],tt.getImage(rt),et)},bu.prototype.patchUpdatedImage=function(tt,et,rt){if(tt&&et&&tt.version!==et.version){tt.version=et.version;var it=tt.tl;rt.update(et.data,void 0,{x:it[0],y:it[1]})}},On("ImagePosition",gu),On("ImageAtlas",bu);var up={horizontal:1,vertical:2,horizontalOnly:3},_u=function(){this.scale=1,this.fontStack="",this.imageName=null};_u.forText=function(tt,et){var rt=new _u;return rt.scale=tt||1,rt.fontStack=et,rt},_u.forImage=function(tt){var et=new _u;return et.imageName=tt,et};var Au=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Su(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t){var Rt,Ot=Au.fromFeature(tt,nt);mt===up.vertical&&Ot.verticalizePunctuation();var Zt=Ms.processBidirectionalText,Ze=Ms.processStyledBidirectionalText;if(Zt&&1===Ot.sections.length){Rt=[];for(var Ge=0,Xe=Zt(Ot.toString(),Mu(Ot,ht,ot,et,it,gt,vt));Ge<Xe.length;Ge+=1){var Je=Xe[Ge],rr=new Au;rr.text=Je,rr.sections=Ot.sections;for(var wr=0;wr<Je.length;wr++)rr.sectionIndex.push(0);Rt.push(rr)}}else if(Ze){Rt=[];for(var Ir=0,ti=Ze(Ot.text,Ot.sectionIndex,Mu(Ot,ht,ot,et,it,gt,vt));Ir<ti.length;Ir+=1){var ni=ti[Ir],oi=new Au;oi.text=ni[0],oi.sectionIndex=ni[1],oi.sections=Ot.sections,Rt.push(oi)}}else Rt=function(tt,et){for(var rt=[],it=tt.text,nt=0,ot=0,at=et;ot<at.length;ot+=1){var st=at[ot];rt.push(tt.substring(nt,st)),nt=st}return nt<it.length&&rt.push(tt.substring(nt,it.length)),rt}(Ot,Mu(Ot,ht,ot,et,it,gt,vt));var _i=[],ji={positionedLines:_i,text:Ot.toString(),top:dt[1],bottom:dt[1],left:dt[0],right:dt[0],writingMode:mt,iconsInText:!1,verticalizable:!1};return function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt){for(var yt=0,gt=-17,vt=0,_t=0,Rt="right"===st?1:"left"===st?0:.5,Ot=0,Zt=0,Ze=nt;Zt<Ze.length;Zt+=1){var Ge=Ze[Zt];Ge.trim();var Xe=Ge.getMaxScale(),Je=24*(Xe-1),rr={positionedGlyphs:[],lineOffset:0};tt.positionedLines[Ot]=rr;var wr=rr.positionedGlyphs,Ir=0;if(Ge.length()){for(var ti=0;ti<Ge.length();ti++){var ni=Ge.getSection(ti),oi=Ge.getSectionIndex(ti),_i=Ge.getCharCode(ti),ji=0,Ki=null,Ji=null,an=null,_n=24,xn=!(ct===up.horizontal||!dt&&!Xn(_i)||dt&&(cp[_i]||(Fn=_i,ws.Arabic(Fn)||ws["Arabic Supplement"](Fn)||ws["Arabic Extended-A"](Fn)||ws["Arabic Presentation Forms-A"](Fn)||ws["Arabic Presentation Forms-B"](Fn))));if(ni.imageName){var En=it[ni.imageName];if(!En)continue;an=ni.imageName,tt.iconsInText=tt.iconsInText||!0,Ji=En.paddedRect;var Tn=En.displaySize;ni.scale=24*ni.scale/mt,ji=Je+(24-Tn[1]*ni.scale),_n=(Ki={width:Tn[0],height:Tn[1],left:1,top:-3,advance:xn?Tn[1]:Tn[0]}).advance;var Cn=xn?Tn[0]*ni.scale-24*Xe:Tn[1]*ni.scale-24*Xe;Cn>0&&Cn>Ir&&(Ir=Cn)}else{var Pn=rt[ni.fontStack],Mn=Pn&&Pn[_i];if(Mn&&Mn.rect)Ji=Mn.rect,Ki=Mn.metrics;else{var Dn=et[ni.fontStack],Ln=Dn&&Dn[_i];if(!Ln)continue;Ki=Ln.metrics}ji=24*(Xe-ni.scale)}xn?(tt.verticalizable=!0,wr.push({glyph:_i,imageName:an,x:yt,y:gt+ji,vertical:xn,scale:ni.scale,fontStack:ni.fontStack,sectionIndex:oi,metrics:Ki,rect:Ji}),yt+=_n*ni.scale+ht):(wr.push({glyph:_i,imageName:an,x:yt,y:gt+ji,vertical:xn,scale:ni.scale,fontStack:ni.fontStack,sectionIndex:oi,metrics:Ki,rect:Ji}),yt+=Ki.advance*ni.scale+ht)}0!==wr.length&&(vt=Math.max(yt-ht,vt),Tu(wr,0,wr.length-1,Rt,Ir)),yt=0;var Rn=ot*Xe+Ir;rr.lineOffset=Math.max(Ir,Je),gt+=Rn,_t=Math.max(Rn,_t),++Ot}else gt+=ot,++Ot}var Fn,Gn=gt- -17,Wn=Bu(at),Qn=Wn.horizontalAlign,lo=Wn.verticalAlign;(function(tt,et,rt,it,nt,ot,at,st,ct){var ht,dt=(et-rt)*nt;ht=ot!==at?-st*it- -17:(-it*ct+.5)*at;for(var mt=0,yt=tt;mt<yt.length;mt+=1)for(var gt=0,vt=yt[mt].positionedGlyphs;gt<vt.length;gt+=1){var _t=vt[gt];_t.x+=dt,_t.y+=ht}})(tt.positionedLines,Rt,Qn,lo,vt,_t,ot,Gn,nt.length),tt.top+=-lo*Gn,tt.bottom=tt.top+Gn,tt.left+=-Qn*vt,tt.right=tt.left+vt}(ji,et,rt,it,Rt,at,st,ct,mt,ht,yt,_t),!function(tt){for(var et=0,rt=tt;et<rt.length;et+=1)if(0!==rt[et].positionedGlyphs.length)return!1;return!0}(_i)&&ji}Au.fromFeature=function(tt,et){for(var rt=new Au,it=0;it<tt.sections.length;it++){var nt=tt.sections[it];nt.image?rt.addImageSection(nt):rt.addTextSection(nt,et)}return rt},Au.prototype.length=function(){return this.text.length},Au.prototype.getSection=function(tt){return this.sections[this.sectionIndex[tt]]},Au.prototype.getSectionIndex=function(tt){return this.sectionIndex[tt]},Au.prototype.getCharCode=function(tt){return this.text.charCodeAt(tt)},Au.prototype.verticalizePunctuation=function(){this.text=function(tt){for(var et="",rt=0;rt<tt.length;rt++){var it=tt.charCodeAt(rt+1)||null,nt=tt.charCodeAt(rt-1)||null;et+=it&&Jn(it)&&!$c[tt[rt+1]]||nt&&Jn(nt)&&!$c[tt[rt-1]]||!$c[tt[rt]]?tt[rt]:$c[tt[rt]]}return et}(this.text)},Au.prototype.trim=function(){for(var tt=0,et=0;et<this.text.length&&cp[this.text.charCodeAt(et)];et++)tt++;for(var rt=this.text.length,it=this.text.length-1;it>=0&&it>=tt&&cp[this.text.charCodeAt(it)];it--)rt--;this.text=this.text.substring(tt,rt),this.sectionIndex=this.sectionIndex.slice(tt,rt)},Au.prototype.substring=function(tt,et){var rt=new Au;return rt.text=this.text.substring(tt,et),rt.sectionIndex=this.sectionIndex.slice(tt,et),rt.sections=this.sections,rt},Au.prototype.toString=function(){return this.text},Au.prototype.getMaxScale=function(){var tt=this;return this.sectionIndex.reduce((function(et,rt){return Math.max(et,tt.sections[rt].scale)}),0)},Au.prototype.addTextSection=function(tt,et){this.text+=tt.text,this.sections.push(_u.forText(tt.scale,tt.fontStack||et));for(var rt=this.sections.length-1,it=0;it<tt.text.length;++it)this.sectionIndex.push(rt)},Au.prototype.addImageSection=function(tt){var et=tt.image?tt.image.name:"";if(0!==et.length){var rt=this.getNextImageSectionCharCode();rt?(this.text+=String.fromCharCode(rt),this.sections.push(_u.forImage(et)),this.sectionIndex.push(this.sections.length-1)):A("Reached maximum number of images 6401")}else A("Can't add FormattedSection with an empty image.")},Au.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var cp={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},pp={};function zu(tt,et,rt,it,nt,ot){if(et.imageName){var at=it[et.imageName];return at?at.displaySize[0]*et.scale*24/ot+nt:0}var st=rt[et.fontStack],ct=st&&st[tt];return ct?ct.metrics.advance*et.scale+nt:0}function Cu(tt,et,rt,it){var nt=Math.pow(tt-et,2);return it?tt<et?nt/2:2*nt:nt+Math.abs(rt)*rt}function Eu(tt,et,rt){var it=0;return 10===tt&&(it-=1e4),rt&&(it+=150),40!==tt&&65288!==tt||(it+=50),41!==et&&65289!==et||(it+=50),it}function Pu(tt,et,rt,it,nt,ot){for(var at=null,st=Cu(et,rt,nt,ot),ct=0,ht=it;ct<ht.length;ct+=1){var dt=ht[ct],mt=Cu(et-dt.x,rt,nt,ot)+dt.badness;mt<=st&&(at=dt,st=mt)}return{index:tt,x:et,priorBreak:at,badness:st}}function Mu(tt,et,rt,it,nt,ot,at){if("point"!==ot)return[];if(!tt)return[];for(var st,ct=[],ht=function(tt,et,rt,it,nt,ot){for(var at=0,st=0;st<tt.length();st++){var ct=tt.getSection(st);at+=zu(tt.getCharCode(st),ct,it,nt,et,ot)}return at/Math.max(1,Math.ceil(at/rt))}(tt,et,rt,it,nt,at),dt=tt.text.indexOf("​")>=0,mt=0,yt=0;yt<tt.length();yt++){var gt=tt.getSection(yt),vt=tt.getCharCode(yt);if(cp[vt]||(mt+=zu(vt,gt,it,nt,et,at)),yt<tt.length()-1){var _t=!((st=vt)<11904||!(ws["Bopomofo Extended"](st)||ws.Bopomofo(st)||ws["CJK Compatibility Forms"](st)||ws["CJK Compatibility Ideographs"](st)||ws["CJK Compatibility"](st)||ws["CJK Radicals Supplement"](st)||ws["CJK Strokes"](st)||ws["CJK Symbols and Punctuation"](st)||ws["CJK Unified Ideographs Extension A"](st)||ws["CJK Unified Ideographs"](st)||ws["Enclosed CJK Letters and Months"](st)||ws["Halfwidth and Fullwidth Forms"](st)||ws.Hiragana(st)||ws["Ideographic Description Characters"](st)||ws["Kangxi Radicals"](st)||ws["Katakana Phonet
3ic Extensions"](st)||ws.Katakana(st)||ws["Vertical Forms"](st)||ws["Yi Radicals"](st)||ws["Yi Syllables"](st)));(pp[vt]||_t||gt.imageName)&&ct.push(Pu(yt+1,mt,ht,ct,Eu(vt,tt.getCharCode(yt+1),_t&&dt),!1))}}return function t(tt){return tt?t(tt.priorBreak).concat(tt.index):[]}(Pu(tt.length(),mt,ht,ct,0,!0))}function Bu(tt){var et=.5,rt=.5;switch(tt){case"right":case"top-right":case"bottom-right":et=1;break;case"left":case"top-left":case"bottom-left":et=0}switch(tt){case"bottom":case"bottom-right":case"bottom-left":rt=1;break;case"top":case"top-right":case"top-left":rt=0}return{horizontalAlign:et,verticalAlign:rt}}function Tu(tt,et,rt,it,nt){if(it||nt)for(var ot=tt[rt],at=(tt[rt].x+ot.metrics.advance*ot.scale)*it,st=et;st<=rt;st++)tt[st].x-=at,tt[st].y+=nt}function Vu(tt,et,rt,it,nt,ot){var at,st=tt.image;if(st.content){var ct=st.content,ht=st.pixelRatio||1;at=[ct[0]/ht,ct[1]/ht,st.displaySize[0]-ct[2]/ht,st.displaySize[1]-ct[3]/ht]}var dt,mt,yt,gt,vt=et.left*ot,_t=et.right*ot;"width"===rt||"both"===rt?(gt=nt[0]+vt-it[3],mt=nt[0]+_t+it[1]):mt=(gt=nt[0]+(vt+_t-st.displaySize[0])/2)+st.displaySize[0];var Rt=et.top*ot,Ot=et.bottom*ot;return"height"===rt||"both"===rt?(dt=nt[1]+Rt-it[0],yt=nt[1]+Ot+it[2]):yt=(dt=nt[1]+(Rt+Ot-st.displaySize[1])/2)+st.displaySize[1],{image:st,top:dt,right:mt,bottom:yt,left:gt,collisionPadding:at}}pp[10]=!0,pp[32]=!0,pp[38]=!0,pp[40]=!0,pp[41]=!0,pp[43]=!0,pp[45]=!0,pp[47]=!0,pp[173]=!0,pp[183]=!0,pp[8203]=!0,pp[8208]=!0,pp[8211]=!0,pp[8231]=!0;var hp=function(tt){function e(et,rt,it,nt){tt.call(this,et,rt),this.angle=it,void 0!==nt&&(this.segment=nt)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(rt);function Du(tt,et){var rt=et.expression;if("constant"===rt.kind)return{kind:"constant",layoutSize:rt.evaluate(new si(tt+1))};if("source"===rt.kind)return{kind:"source"};for(var it=rt.zoomStops,nt=rt.interpolationType,ot=0;ot<it.length&&it[ot]<=tt;)ot++;for(var at=ot=Math.max(0,ot-1);at<it.length&&it[at]<tt+1;)at++;at=Math.min(it.length-1,at);var st=it[ot],ct=it[at];return"composite"===rt.kind?{kind:"composite",minZoom:st,maxZoom:ct,interpolationType:nt}:{kind:"camera",minZoom:st,maxZoom:ct,minSize:rt.evaluate(new si(st)),maxSize:rt.evaluate(new si(ct)),interpolationType:nt}}function Lu(tt,et,rt){var it=et.uSize,nt=rt.lowerSize;return"source"===tt.kind?nt/128:"composite"===tt.kind?Ke(nt/128,rt.upperSize/128,et.uSizeT):it}function Ou(tt,et){var rt=0,it=0;if("constant"===tt.kind)it=tt.layoutSize;else if("source"!==tt.kind){var nt=tt.interpolationType,ot=nt?p(ar.interpolationFactor(nt,et,tt.minZoom,tt.maxZoom),0,1):0;"camera"===tt.kind?it=Ke(tt.minSize,tt.maxSize,ot):rt=ot}return{uSizeT:rt,uSize:it}}On("Anchor",hp);var fp=Object.freeze({__proto__:null,getSizeData:Du,evaluateSizeForFeature:Lu,evaluateSizeForZoom:Ou,SIZE_PACK_FACTOR:128});function Uu(tt,et,rt,it,nt){if(void 0===et.segment)return!0;for(var ot=et,at=et.segment+1,st=0;st>-rt/2;){if(--at<0)return!1;st-=tt[at].dist(ot),ot=tt[at]}st+=tt[at].dist(tt[at+1]),at++;for(var ct=[],ht=0;st<rt/2;){var dt=tt[at],mt=tt[at+1];if(!mt)return!1;var yt=tt[at-1].angleTo(dt)-dt.angleTo(mt);for(yt=Math.abs((yt+3*Math.PI)%(2*Math.PI)-Math.PI),ct.push({distance:st,angleDelta:yt}),ht+=yt;st-ct[0].distance>it;)ht-=ct.shift().angleDelta;if(ht>nt)return!1;at++,st+=dt.dist(mt)}return!0}function ju(tt){for(var et=0,rt=0;rt<tt.length-1;rt++)et+=tt[rt].dist(tt[rt+1]);return et}function qu(tt,et,rt){return tt?.6*et*rt:0}function Nu(tt,et){return Math.max(tt?tt.right-tt.left:0,et?et.right-et.left:0)}function Ku(tt,et,rt,it,nt,ot){for(var at=qu(rt,nt,ot),st=Nu(rt,it)*ot,ct=0,ht=ju(tt)/2,dt=0;dt<tt.length-1;dt++){var mt=tt[dt],yt=tt[dt+1],gt=mt.dist(yt);if(ct+gt>ht){var vt=(ht-ct)/gt,_t=Ke(mt.x,yt.x,vt),Rt=Ke(mt.y,yt.y,vt),Ot=new hp(_t,Rt,yt.angleTo(mt),dt);return Ot._round(),!at||Uu(tt,Ot,st,at,et)?Ot:void 0}ct+=gt}}function Gu(tt,et,rt,it,nt,ot,at,st,ct){var ht=qu(it,ot,at),dt=Nu(it,nt),mt=dt*at,yt=0===tt[0].x||tt[0].x===ct||0===tt[0].y||tt[0].y===ct;return et-mt<et/4&&(et=mt+et/4),function t(tt,et,rt,it,nt,ot,at,st,ct){for(var ht=ot/2,dt=ju(tt),mt=0,yt=et-rt,gt=[],vt=0;vt<tt.length-1;vt++){for(var _t=tt[vt],Rt=tt[vt+1],Ot=_t.dist(Rt),Zt=Rt.angleTo(_t);yt+rt<mt+Ot;){var Ze=((yt+=rt)-mt)/Ot,Ge=Ke(_t.x,Rt.x,Ze),Xe=Ke(_t.y,Rt.y,Ze);if(Ge>=0&&Ge<ct&&Xe>=0&&Xe<ct&&yt-ht>=0&&yt+ht<=dt){var Je=new hp(Ge,Xe,Zt,vt);Je._round(),it&&!Uu(tt,Je,ot,it,nt)||gt.push(Je)}}mt+=Ot}return st||gt.length||at||(gt=t(tt,mt/2,rt,it,nt,ot,at,!0,ct)),gt}
vendor: 103,690 bytes, line 3
3(tt,yt?et/2*st%et:(dt/2+2*ot)*at*st%et,et,ht,rt,mt,yt,!1,ct)}function Zu(tt,et,it,nt,ot){for(var at=[],st=0;st<tt.length;st++)for(var ct=tt[st],ht=void 0,dt=0;dt<ct.length-1;dt++){var mt=ct[dt],yt=ct[dt+1];mt.x<et&&yt.x<et||(mt.x<et?mt=new rt(et,mt.y+(et-mt.x)/(yt.x-mt.x)*(yt.y-mt.y))._round():yt.x<et&&(yt=new rt(et,mt.y+(et-mt.x)/(yt.x-mt.x)*(yt.y-mt.y))._round()),mt.y<it&&yt.y<it||(mt.y<it?mt=new rt(mt.x+(it-mt.y)/(yt.y-mt.y)*(yt.x-mt.x),it)._round():yt.y<it&&(yt=new rt(mt.x+(it-mt.y)/(yt.y-mt.y)*(yt.x-mt.x),it)._round()),mt.x>=nt&&yt.x>=nt||(mt.x>=nt?mt=new rt(nt,mt.y+(nt-mt.x)/(yt.x-mt.x)*(yt.y-mt.y))._round():yt.x>=nt&&(yt=new rt(nt,mt.y+(nt-mt.x)/(yt.x-mt.x)*(yt.y-mt.y))._round()),mt.y>=ot&&yt.y>=ot||(mt.y>=ot?mt=new rt(mt.x+(ot-mt.y)/(yt.y-mt.y)*(yt.x-mt.x),ot)._round():yt.y>=ot&&(yt=new rt(mt.x+(ot-mt.y)/(yt.y-mt.y)*(yt.x-mt.x),ot)._round()),ht&&mt.equals(ht[ht.length-1])||at.push(ht=[mt]),ht.push(yt)))))}return at}function Xu(tt,et,it,nt){var ot=[],at=tt.image,st=at.pixelRatio,ct=at.paddedRect.w-2,ht=at.paddedRect.h-2,dt=tt.right-tt.left,mt=tt.bottom-tt.top,yt=at.stretchX||[[0,ct]],gt=at.stretchY||[[0,ht]],y=function(tt,et){return tt+et[1]-et[0]},vt=yt.reduce(y,0),_t=gt.reduce(y,0),Rt=ct-vt,Ot=ht-_t,Zt=0,Ze=vt,Ge=0,Xe=_t,Je=0,rr=Rt,wr=0,Ir=Ot;if(at.content&&nt){var ti=at.content;Zt=Ju(yt,0,ti[0]),Ge=Ju(gt,0,ti[1]),Ze=Ju(yt,ti[0],ti[2]),Xe=Ju(gt,ti[1],ti[3]),Je=ti[0]-Zt,wr=ti[1]-Ge,rr=ti[2]-ti[0]-Ze,Ir=ti[3]-ti[1]-Xe}var C=function(nt,ot,ct,ht){var yt=Yu(nt.stretch-Zt,Ze,dt,tt.left),gt=$u(nt.fixed-Je,rr,nt.stretch,vt),Rt=Yu(ot.stretch-Ge,Xe,mt,tt.top),Ot=$u(ot.fixed-wr,Ir,ot.stretch,_t),ti=Yu(ct.stretch-Zt,Ze,dt,tt.left),ni=$u(ct.fixed-Je,rr,ct.stretch,vt),oi=Yu(ht.stretch-Ge,Xe,mt,tt.top),_i=$u(ht.fixed-wr,Ir,ht.stretch,_t),ji=new rt(yt,Rt),Ki=new rt(ti,Rt),Ji=new rt(ti,oi),an=new rt(yt,oi),_n=new rt(gt/st,Ot/st),xn=new rt(ni/st,_i/st),En=et*Math.PI/180;if(En){var Tn=Math.sin(En),Cn=Math.cos(En),Pn=[Cn,-Tn,Tn,Cn];ji._matMult(Pn),Ki._matMult(Pn),an._matMult(Pn),Ji._matMult(Pn)}var Mn=nt.stretch+nt.fixed,Dn=ot.stretch+ot.fixed;return{tl:ji,tr:Ki,bl:an,br:Ji,tex:{x:at.paddedRect.x+1+Mn,y:at.paddedRect.y+1+Dn,w:ct.stretch+ct.fixed-Mn,h:ht.stretch+ht.fixed-Dn},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:_n,pixelOffsetBR:xn,minFontScaleX:rr/st/dt,minFontScaleY:Ir/st/mt,isSDF:it}};if(nt&&(at.stretchX||at.stretchY))for(var ni=Hu(yt,Rt,vt),oi=Hu(gt,Ot,_t),_i=0;_i<ni.length-1;_i++)for(var ji=ni[_i],Ki=ni[_i+1],Ji=0;Ji<oi.length-1;Ji++)ot.push(C(ji,oi[Ji],Ki,oi[Ji+1]));else ot.push(C({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ct+1},{fixed:0,stretch:ht+1}));return ot}function Ju(tt,et,rt){for(var it=0,nt=0,ot=tt;nt<ot.length;nt+=1){var at=ot[nt];it+=Math.max(et,Math.min(rt,at[1]))-Math.max(et,Math.min(rt,at[0]))}return it}function Hu(tt,et,rt){for(var it=[{fixed:-1,stretch:0}],nt=0,ot=tt;nt<ot.length;nt+=1){var at=ot[nt],st=at[0],ct=at[1],ht=it[it.length-1];it.push({fixed:st-ht.stretch,stretch:ht.stretch}),it.push({fixed:st-ht.stretch,stretch:ht.stretch+(ct-st)})}return it.push({fixed:et+1,stretch:rt}),it}function Yu(tt,et,rt,it){return tt/et*rt+it}function $u(tt,et,rt,it){return tt-et*rt/it}var Wu=function(tt,et,it,nt,ot,at,st,ct,ht,dt){if(this.boxStartIndex=tt.length,ht){var mt=at.top,yt=at.bottom,gt=at.collisionPadding;gt&&(mt-=gt[1],yt+=gt[3]);var vt=yt-mt;vt>0&&(vt=Math.max(10,vt),this.circleDiameter=vt)}else{var _t=at.top*st-ct,Rt=at.bottom*st+ct,Ot=at.left*st-ct,Zt=at.right*st+ct,Ze=at.collisionPadding;if(Ze&&(Ot-=Ze[0]*st,_t-=Ze[1]*st,Zt+=Ze[2]*st,Rt+=Ze[3]*st),dt){var Ge=new rt(Ot,_t),Xe=new rt(Zt,_t),Je=new rt(Ot,Rt),rr=new rt(Zt,Rt),wr=dt*Math.PI/180;Ge._rotate(wr),Xe._rotate(wr),Je._rotate(wr),rr._rotate(wr),Ot=Math.min(Ge.x,Xe.x,Je.x,rr.x),Zt=Math.max(Ge.x,Xe.x,Je.x,rr.x),_t=Math.min(Ge.y,Xe.y,Je.y,rr.y),Rt=Math.max(Ge.y,Xe.y,Je.y,rr.y)}tt.emplaceBack(et.x,et.y,Ot,_t,Zt,Rt,it,nt,ot)}this.boxEndIndex=tt.length},Qu=function(tt,et){if(void 0===tt&&(tt=[]),void 0===et&&(et=tl),this.data=tt,this.length=this.data.length,this.compare=et,this.length>0)for(var rt=(this.length>>1)-1;rt>=0;rt--)this._down(rt)};function tl(tt,et){return tt<et?-1:tt>et?1:0}function el(tt,et,it){void 0===et&&(et=1),void 0===it&&(it=!1);for(var nt=1/0,ot=1/0,at=-1/0,st=-1/0,ct=tt[0],ht=0;ht<ct.length;ht++){var dt=ct[ht];(!ht||dt.x<nt)&&(nt=dt.x),(!ht||dt.y<ot)&&(ot=dt.y),(!ht||dt.x>at)&&(at=dt.x),(!ht||dt.y>st)&&(st=dt.y)}var mt=Math.min(at-nt,st-ot),yt=mt/2,gt=new Qu([],rl);if(0===mt)return new rt(nt,ot);for(var vt=nt;vt<at;vt+=mt)for(var _t=ot;_t<st;_t+=mt)gt.push(new nl(vt+yt,_t+yt,yt,tt));for(var Rt=function(tt){for(var et=0,rt=0,it=0,nt=tt[0],ot=0,at=nt.length,st=at-1;ot<at;st=ot++){var ct=nt[ot],ht=nt[st],dt=ct.x*ht.y-ht.x*ct.y;rt+=(ct.x+ht.x)*dt,it+=(ct.y+ht.y)*dt,et+=3*dt}return new nl(rt/et,it/et,0,tt)}(tt),Ot=gt.length;gt.length;){var Zt=gt.pop();(Zt.d>Rt.d||!Rt.d)&&(Rt=Zt,it&&console.log("found best %d after %d probes",Math.round(1e4*Zt.d)/1e4,Ot)),Zt.max-Rt.d<=et||(gt.push(new nl(Zt.p.x-(yt=Zt.h/2),Zt.p.y-yt,yt,tt)),gt.push(new nl(Zt.p.x+yt,Zt.p.y-yt,yt,tt)),gt.push(new nl(Zt.p.x-yt,Zt.p.y+yt,yt,tt)),gt.push(new nl(Zt.p.x+yt,Zt.p.y+yt,yt,tt)),Ot+=4)}return it&&(console.log("num probes: "+Ot),console.log("best distance: "+Rt.d)),Rt.p}function rl(tt,et){return et.max-tt.max}function nl(tt,et,it,nt){this.p=new rt(tt,et),this.h=it,this.d=function(tt,et){for(var rt=!1,it=1/0,nt=0;nt<et.length;nt++)for(var ot=et[nt],at=0,st=ot.length,ct=st-1;at<st;ct=at++){var ht=ot[at],dt=ot[ct];ht.y>tt.y!=dt.y>tt.y&&tt.x<(dt.x-ht.x)*(tt.y-ht.y)/(dt.y-ht.y)+ht.x&&(rt=!rt),it=Math.min(it,Ya(tt,ht,dt))}return(rt?1:-1)*Math.sqrt(it)}(this.p,nt),this.max=this.d+this.h*Math.SQRT2}Qu.prototype.push=function(tt){this.data.push(tt),this.length++,this._up(this.length-1)},Qu.prototype.pop=function(){if(0!==this.length){var tt=this.data[0],et=this.data.pop();return this.length--,this.length>0&&(this.data[0]=et,this._down(0)),tt}},Qu.prototype.peek=function(){return this.data[0]},Qu.prototype._up=function(tt){for(var et=this.data,rt=this.compare,it=et[tt];tt>0;){var nt=tt-1>>1,ot=et[nt];if(rt(it,ot)>=0)break;et[tt]=ot,tt=nt}et[tt]=it},Qu.prototype._down=function(tt){for(var et=this.data,rt=this.compare,it=this.length>>1,nt=et[tt];tt<it;){var ot=1+(tt<<1),at=et[ot],st=ot+1;if(st<this.length&&rt(et[st],at)<0&&(ot=st,at=et[st]),rt(at,nt)>=0)break;et[tt]=at,tt=ot}et[tt]=nt};var dp=Number.POSITIVE_INFINITY;function al(tt,et){return et[1]!==dp?function(tt,et,rt){var it=0,nt=0;switch(et=Math.abs(et),rt=Math.abs(rt),tt){case"top-right":case"top-left":case"top":nt=rt-7;break;case"bottom-right":case"bottom-left":case"bottom":nt=7-rt}switch(tt){case"top-right":case"bottom-right":case"right":it=-et;break;case"top-left":case"bottom-left":case"left":it=et}return[it,nt]}(tt,et[0],et[1]):function(tt,et){var rt=0,it=0;et<0&&(et=0);var nt=et/Math.sqrt(2);switch(tt){case"top-right":case"top-left":it=nt-7;break;case"bottom-right":case"bottom-left":it=7-nt;break;case"bottom":it=7-et;break;case"top":it=et-7}switch(tt){case"top-right":case"bottom-right":rt=-nt;break;case"top-left":case"bottom-left":rt=nt;break;case"left":rt=et;break;case"right":rt=-et}return[rt,it]}(tt,et[0])}function ol(tt){switch(tt){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function sl(tt,et,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t){var Rt=function(tt,et,it,nt,ot,at,st,ct){for(var ht=nt.layout.get("text-rotate").evaluate(at,{})*Math.PI/180,dt=[],mt=0,yt=et.positionedLines;mt<yt.length;mt+=1)for(var gt=yt[mt],vt=0,_t=gt.positionedGlyphs;vt<_t.length;vt+=1){var Rt=_t[vt];if(Rt.rect){var Ot=Rt.rect||{},Zt=4,Ze=!0,Ge=1,Xe=0,Je=(ot||ct)&&Rt.vertical,rr=Rt.metrics.advance*Rt.scale/2;if(ct&&et.verticalizable&&(Xe=gt.lineOffset/2-(Rt.imageName?-(24-Rt.metrics.width*Rt.scale)/2:24*(Rt.scale-1))),Rt.imageName){var wr=st[Rt.imageName];Ze=wr.sdf,Zt=1/(Ge=wr.pixelRatio)}var Ir=ot?[Rt.x+rr,Rt.y]:[0,0],ti=ot?[0,0]:[Rt.x+rr+it[0],Rt.y+it[1]-Xe],ni=[0,0];Je&&(ni=ti,ti=[0,0]);var oi=(Rt.metrics.left-Zt)*Rt.scale-rr+ti[0],_i=(-Rt.metrics.top-Zt)*Rt.scale+ti[1],ji=oi+Ot.w*Rt.scale/Ge,Ki=_i+Ot.h*Rt.scale/Ge,Ji=new rt(oi,_i),an=new rt(ji,_i),_n=new rt(oi,Ki),xn=new rt(ji,Ki);if(Je){var En=new rt(-rr,rr- -17),Tn=-Math.PI/2,Cn=12-rr,Pn=new rt(22-Cn,-(Rt.imageName?Cn:0)),Mn=new(Function.prototype.bind.apply(rt,[null].concat(ni)));Ji._rotateAround(Tn,En)._add(Pn)._add(Mn),an._rotateAround(Tn,En)._add(Pn)._add(Mn),_n._rotateAround(Tn,En)._add(Pn)._add(Mn),xn._rotateAround(Tn,En)._add(Pn)._add(Mn)}if(ht){var Dn=Math.sin(ht),Ln=Math.cos(ht),Rn=[Ln,-Dn,Dn,Ln];Ji._matMult(Rn),an._matMult(Rn),_n._matMult(Rn),xn._matMult(Rn)}var Fn=new rt(0,0),Gn=new rt(0,0);dt.push({tl:Ji,tr:an,bl:_n,br:xn,tex:Ot,writingMode:et.writingMode,glyphOffset:Ir,sectionIndex:Rt.sectionIndex,isSDF:Ze,pixelOffsetTL:Fn,pixelOffsetBR:Gn,minFontScaleX:0,minFontScaleY:0})}}return dt}(0,it,ct,ot,at,st,nt,tt.allowVerticalPlacement),Ot=tt.textSizeData,Zt=null;"source"===Ot.kind?(Zt=[128*ot.layout.get("text-size").evaluate(st,{})])[0]>32640&&A(tt.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===Ot.kind&&((Zt=[128*vt.compositeTextSizes[0].evaluate(st,{},_t),128*vt.compositeTextSizes[1].evaluate(st,{},_t)])[0]>32640||Zt[1]>32640)&&A(tt.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),tt.addSymbols(tt.text,Rt,Zt,ct,at,st,dt,et,ht.lineStartIndex,ht.lineLength,gt,_t);for(var Ze=0,Ge=mt;Ze<Ge.length;Ze+=1)yt[Ge[Ze]]=tt.text.placedSymbolArray.length-1;return 4*Rt.length}function ul(tt){for(var et in tt)return tt[et];return null}function ll(tt,et,rt,it){var nt=tt.compareText;if(et in nt){for(var ot=nt[et],at=ot.length-1;at>=0;at--)if(it.dist(ot[at])<rt)return!0}else nt[et]=[];return nt[et].push(it),!1}var mp=Dc.VectorTileFeature.types,yp=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function hl(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt){var gt=st?Math.min(32640,Math.round(st[0])):0,vt=st?Math.min(32640,Math.round(st[1])):0;tt.emplaceBack(et,rt,Math.round(32*it),Math.round(32*nt),ot,at,(gt<<1)+(ct?1:0),vt,16*ht,16*dt,256*mt,256*yt)}function fl(tt,et,rt){tt.emplaceBack(et.x,et.y,rt),tt.emplaceBack(et.x,et.y,rt),tt.emplaceBack(et.x,et.y,rt),tt.emplaceBack(et.x,et.y,rt)}function yl(tt){for(var et=0,rt=tt.sections;et<rt.length;et+=1)if($n(rt[et].text))return!0;return!1}var dl=function(tt){this.layoutVertexArray=new Gs,this.indexArray=new pl,this.programConfigurations=tt,this.segments=new sa,this.dynamicLayoutVertexArray=new Xs,this.opacityVertexArray=new Ws,this.placedSymbolArray=new Pl};dl.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},dl.prototype.upload=function(tt,et,rt,it){this.isEmpty()||(rt&&(this.layoutVertexBuffer=tt.createVertexBuffer(this.layoutVertexArray,Wc.members),this.indexBuffer=tt.createIndexBuffer(this.indexArray,et),this.dynamicLayoutVertexBuffer=tt.createVertexBuffer(this.dynamicLayoutVertexArray,Hc.members,!0),this.opacityVertexBuffer=tt.createVertexBuffer(this.opacityVertexArray,yp,!0),this.opacityVertexBuffer.itemSize=1),(rt||it)&&this.programConfigurations.upload(tt))},dl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},On("SymbolBuffers",dl);var ml=function(tt,et,rt){this.layoutVertexArray=new tt,this.layoutAttributes=et,this.indexArray=new rt,this.segments=new sa,this.collisionVertexArray=new cl};ml.prototype.upload=function(tt){this.layoutVertexBuffer=tt.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=tt.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=tt.createVertexBuffer(this.collisionVertexArray,Kc.members,!0)},ml.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},On("CollisionBuffers",ml);var vl=function(tt){this.collisionBoxArray=tt.collisionBoxArray,this.zoom=tt.zoom,this.overscaling=tt.overscaling,this.layers=tt.layers,this.layerIds=this.layers.map((function(tt){return tt.id})),this.index=tt.index,this.pixelRatio=tt.pixelRatio,this.sourceLayerIndex=tt.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=oo([]),this.placementViewportMatrix=oo([]);var et=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Du(this.zoom,et["text-size"]),this.iconSizeData=Du(this.zoom,et["icon-size"]);var rt=this.layers[0].layout,it=rt.get("symbol-sort-key"),nt=rt.get("symbol-z-order");this.canOverlap=rt.get("text-allow-overlap")||rt.get("icon-allow-overlap")||rt.get("text-ignore-placement")||rt.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==nt&&void 0!==it.constantOr(1),this.sortFeaturesByY=("viewport-y"===nt||"auto"===nt&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===rt.get("symbol-placement")&&(this.writingModes=rt.get("text-writing-mode").map((function(tt){return up[tt]}))),this.stateDependentLayerIds=this.layers.filter((function(tt){return tt.isStateDependent()})).map((function(tt){return tt.id})),this.sourceID=tt.sourceID};vl.prototype.createArrays=function(){this.text=new dl(new Va(this.layers,this.zoom,(function(tt){return/^text/.test(tt)}))),this.icon=new dl(new Va(this.layers,this.zoom,(function(tt){return/^icon/.test(tt)}))),this.glyphOffsetArray=new Rl,this.lineVertexArray=new Ql,this.symbolInstances=new Bl},vl.prototype.calculateGlyphDependencies=function(tt,et,rt,it,nt){for(var ot=0;ot<tt.length;ot++)if(et[tt.charCodeAt(ot)]=!0,(rt||it)&&nt){var at=$c[tt.charAt(ot)];at&&(et[at.charCodeAt(0)]=!0)}},vl.prototype.populate=function(tt,et,rt){var it=this.layers[0],nt=it.layout,ot=nt.get("text-font"),at=nt.get("text-field"),st=nt.get("icon-image"),ct=("constant"!==at.value.kind||at.value.value instanceof ne&&!at.value.value.isEmpty()||at.value.value.toString().length>0)&&("constant"!==ot.value.kind||ot.value.value.length>0),ht="constant"!==st.value.kind||!!st.value.value||Object.keys(st.parameters).length>0,dt=nt.get("symbol-sort-key");if(this.features=[],ct||ht){for(var mt=et.iconDependencies,yt=et.glyphDependencies,gt=et.availableImages,vt=new si(this.zoom),_t=0,Rt=tt;_t<Rt.length;_t+=1){var Ot=Rt[_t],Zt=Ot.feature,Ze=Ot.id,Ge=Ot.index,Xe=Ot.sourceLayerIndex,Je=it._featureFilter.needGeometry,rr=Ua(Zt,Je);if(it._featureFilter.filter(vt,rr,rt)){Je||(rr.geometry=Ra(Zt));var wr=void 0;if(ct){var Ir=it.getValueAndResolveTokens("text-field",rr,rt,gt),ti=ne.factory(Ir);yl(ti)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===ii()||this.hasRTLText&&Ms.isParsed())&&(wr=Zs(ti,it,rr))}var ni=void 0;if(ht){var oi=it.getValueAndResolveTokens("icon-image",rr,rt,gt);ni=oi instanceof ie?oi:ie.fromString(oi)}if(wr||ni){var _i=this.sortFeaturesByKey?dt.evaluate(rr,{},rt):void 0;if(this.features.push({id:Ze,text:wr,icon:ni,index:Ge,sourceLayerIndex:Xe,geometry:rr.geometry,properties:Zt.properties,type:mp[Zt.type],sortKey:_i}),ni&&(mt[ni.name]=!0),wr){var ji=ot.evaluate(rr,{},rt).join(","),Ki="map"===nt.get("text-rotation-alignment")&&"point"!==nt.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(up.vertical)>=0;for(var Ji=0,an=wr.sections;Ji<an.length;Ji+=1){var _n=an[Ji];if(_n.image)mt[_n.image.name]=!0;else{var xn=Zn(wr.toString()),En=_n.fontStack||ji,Tn=yt[En]=yt[En]||{};this.calculateGlyphDependencies(_n.text,Tn,Ki,this.allowVerticalPlacement,xn)}}}}}}"line"===nt.get("symbol-placement")&&(this.features=function(tt){var et={},rt={},it=[],nt=0;function a(et){it.push(tt[et]),nt++}function o(tt,et,nt){var ot=rt[tt];return delete rt[tt],rt[et]=ot,it[ot].geometry[0].pop(),it[ot].geometry[0]=it[ot].geometry[0].concat(nt[0]),ot}function s(tt,rt,nt){var ot=et[rt];return delete et[rt],et[tt]=ot,it[ot].geometry[0].shift(),it[ot].geometry[0]=nt[0].concat(it[ot].geometry[0]),ot}function u(tt,et,rt){var it=rt?et[0][et[0].length-1]:et[0][0];return tt+":"+it.x+":"+it.y}for(var ot=0;ot<tt.length;ot++){var at=tt[ot],st=at.geometry,ct=at.text?at.text.toString():null;if(ct){var ht=u(ct,st),dt=u(ct,st,!0);if(ht in rt&&dt in et&&rt[ht]!==et[dt]){var mt=s(ht,dt,st),yt=o(ht,dt,it[mt].geometry);delete et[ht],delete rt[dt],rt[u(ct,it[yt].geometry,!0)]=yt,it[mt].geometry=null}else ht in rt?o(ht,dt,st):dt in et?s(ht,dt,st):(a(ot),et[ht]=nt-1,rt[dt]=nt-1)}else a(ot)}return it.filter((function(tt){return tt.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(tt,et){return tt.sortKey-et.sortKey}))}},vl.prototype.update=function(tt,et,rt){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(tt,et,this.layers,rt),this.icon.programConfigurations.updatePaintArrays(tt,et,this.layers,rt))},vl.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},vl.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},vl.prototype.upload=function(tt){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(tt),this.iconCollisionBox.upload(tt)),this.text.upload(tt,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(tt,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},vl.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},vl.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},vl.prototype.addToLineVertexArray=function(tt,et){var rt=this.lineVertexArray.length;if(void 0!==tt.segment){for(var it=tt.dist(et[tt.segment+1]),nt=tt.dist(et[tt.segment]),ot={},at=tt.segment+1;at<et.length;at++)ot[at]={x:et[at].x,y:et[at].y,tileUnitDistanceFromAnchor:it},at<et.length-1&&(it+=et[at+1].dist(et[at]));for(var st=tt.segment||0;st>=0;st--)ot[st]={x:et[st].x,y:et[st].y,tileUnitDistanceFromAnchor:nt},st>0&&(nt+=et[st-1].dist(et[st]));for(var ct=0;ct<et.length;ct++){var ht=ot[ct];this.lineVertexArray.emplaceBack(ht.x,ht.y,ht.tileUnitDistanceFromAnchor)}}return{lineStartIndex:rt,lineLength:this.lineVertexArray.length-rt}},vl.prototype.addSymbols=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt){for(var yt=tt.indexArray,gt=tt.layoutVertexArray,vt=tt.segments.prepareSegment(4*et.length,gt,yt,this.canOverlap?ot.sortKey:void 0),_t=this.glyphOffsetArray.length,Rt=vt.vertexLength,Ot=this.allowVerticalPlacement&&at===up.vertical?Math.PI/2:0,Zt=ot.text&&ot.text.sections,Ze=0;Ze<et.length;Ze++){var Ge=et[Ze],Xe=Ge.tl,Je=Ge.tr,rr=Ge.bl,wr=Ge.br,Ir=Ge.tex,ti=Ge.pixelOffsetTL,ni=Ge.pixelOffsetBR,oi=Ge.minFontScaleX,_i=Ge.minFontScaleY,ji=Ge.glyphOffset,Ki=Ge.isSDF,Ji=Ge.sectionIndex,an=vt.vertexLength,_n=ji[1];hl(gt,st.x,st.y,Xe.x,_n+Xe.y,Ir.x,Ir.y,rt,Ki,ti.x,ti.y,oi,_i),hl(gt,st.x,st.y,Je.x,_n+Je.y,Ir.x+Ir.w,Ir.y,rt,Ki,ni.x,ti.y,oi,_i),hl(gt,st.x,st.y,rr.x,_n+rr.y,Ir.x,Ir.y+Ir.h,rt,Ki,ti.x,ni.y,oi,_i),hl(gt,st.x,st.y,wr.x,_n+wr.y,Ir.x+Ir.w,Ir.y+Ir.h,rt,Ki,ni.x,ni.y,oi,_i),fl(tt.dynamicLayoutVertexArray,st,Ot),yt.emplaceBack(an,an+1,an+2),yt.emplaceBack(an+1,an+2,an+3),vt.vertexLength+=4,vt.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(ji[0]),Ze!==et.length-1&&Ji===et[Ze+1].sectionIndex||tt.programConfigurations.populatePaintArrays(gt.length,ot,ot.index,{},mt,Zt&&Zt[Ji])}tt.placedSymbolArray.emplaceBack(st.x,st.y,_t,this.glyphOffsetArray.length-_t,Rt,ct,ht,st.segment,rt?rt[0]:0,rt?rt[1]:0,it[0],it[1],at,0,!1,0,dt)},vl.prototype._addCollisionDebugVertex=function(tt,et,rt,it,nt,ot){return et.emplaceBack(0,0),tt.emplaceBack(rt.x,rt.y,it,nt,Math.round(ot.x),Math.round(ot.y))},vl.prototype.addCollisionDebugVertices=function(tt,et,it,nt,ot,at,st){var ct=ot.segments.prepareSegment(4,ot.layoutVertexArray,ot.indexArray),ht=ct.vertexLength,dt=ot.layoutVertexArray,mt=ot.collisionVertexArray,yt=st.anchorX,gt=st.anchorY;this._addCollisionDebugVertex(dt,mt,at,yt,gt,new rt(tt,et)),this._addCollisionDebugVertex(dt,mt,at,yt,gt,new rt(it,et)),this._addCollisionDebugVertex(dt,mt,at,yt,gt,new rt(it,nt)),this._addCollisionDebugVertex(dt,mt,at,yt,gt,new rt(tt,nt)),ct.vertexLength+=4;var vt=ot.indexArray;vt.emplaceBack(ht,ht+1),vt.emplaceBack(ht+1,ht+2),vt.emplaceBack(ht+2,ht+3),vt.emplaceBack(ht+3,ht),ct.primitiveLength+=4},vl.prototype.addDebugCollisionBoxes=function(tt,et,rt,it){for(var nt=tt;nt<et;nt++){var ot=this.collisionBoxArray.get(nt);this.addCollisionDebugVertices(ot.x1,ot.y1,ot.x2,ot.y2,it?this.textCollisionBox:this.iconCollisionBox,ot.anchorPoint,rt)}},vl.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new ml(Ys,Jc.members,Sl),this.iconCollisionBox=new ml(Ys,Jc.members,Sl);for(var tt=0;tt<this.symbolInstances.length;tt++){var et=this.symbolInstances.get(tt);this.addDebugCollisionBoxes(et.textBoxStartIndex,et.textBoxEndIndex,et,!0),this.addDebugCollisionBoxes(et.verticalTextBoxStartIndex,et.verticalTextBoxEndIndex,et,!0),this.addDebugCollisionBoxes(et.iconBoxStartIndex,et.iconBoxEndIndex,et,!1),this.addDebugCollisionBoxes(et.verticalIconBoxStartIndex,et.verticalIconBoxEndIndex,et,!1)}},vl.prototype._deserializeCollisionBoxesForSymbol=function(tt,et,rt,it,nt,ot,at,st,ct){for(var ht={},dt=et;dt<rt;dt++){var mt=tt.get(dt);ht.textBox={x1:mt.x1,y1:mt.y1,x2:mt.x2,y2:mt.y2,anchorPointX:mt.anchorPointX,anchorPointY:mt.anchorPointY},ht.textFeatureIndex=mt.featureIndex;break}for(var yt=it;yt<nt;yt++){var gt=tt.get(yt);ht.verticalTextBox={x1:gt.x1,y1:gt.y1,x2:gt.x2,y2:gt.y2,anchorPointX:gt.anchorPointX,anchorPointY:gt.anchorPointY},ht.verticalTextFeatureIndex=gt.featureIndex;break}for(var vt=ot;vt<at;vt++){var _t=tt.get(vt);ht.iconBox={x1:_t.x1,y1:_t.y1,x2:_t.x2,y2:_t.y2,anchorPointX:_t.anchorPointX,anchorPointY:_t.anchorPointY},ht.iconFeatureIndex=_t.featureIndex;break}for(var Rt=st;Rt<ct;Rt++){var Ot=tt.get(Rt);ht.verticalIconBox={x1:Ot.x1,y1:Ot.y1,x2:Ot.x2,y2:Ot.y2,anchorPointX:Ot.anchorPointX,anchorPointY:Ot.anchorPointY},ht.verticalIconFeatureIndex=Ot.featureIndex;break}return ht},vl.prototype.deserializeCollisionBoxes=function(tt){this.collisionArrays=[];for(var et=0;et<this.symbolInstances.length;et++){var rt=this.symbolInstances.get(et);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(tt,rt.textBoxStartIndex,rt.textBoxEndIndex,rt.verticalTextBoxStartIndex,rt.verticalTextBoxEndIndex,rt.iconBoxStartIndex,rt.iconBoxEndIndex,rt.verticalIconBoxStartIndex,rt.verticalIconBoxEndIndex))}},vl.prototype.hasTextData=function(){return this.text.segments.get().length>0},vl.prototype.hasIconData=function(){return this.icon.segments.get().length>0},vl.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},vl.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},vl.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},vl.prototype.addIndicesForPlacedSymbol=function(tt,et){for(var rt=tt.placedSymbolArray.get(et),it=rt.vertexStartIndex+4*rt.numGlyphs,nt=rt.vertexStartIndex;nt<it;nt+=4)tt.indexArray.emplaceBack(nt,nt+1,nt+2),tt.indexArray.emplaceBack(nt+1,nt+2,nt+3)},vl.prototype.getSortedSymbolIndexes=function(tt){if(this.sortedAngle===tt&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var et=Math.sin(tt),rt=Math.cos(tt),it=[],nt=[],ot=[],at=0;at<this.symbolInstances.length;++at){ot.push(at);var st=this.symbolInstances.get(at);it.push(0|Math.round(et*st.anchorX+rt*st.anchorY)),nt.push(st.featureIndex)}return ot.sort((function(tt,et){return it[tt]-it[et]||nt[et]-nt[tt]})),ot},vl.prototype.addToSortKeyRanges=function(tt,et){var rt=this.sortKeyRanges[this.sortKeyRanges.length-1];rt&&rt.sortKey===et?rt.symbolInstanceEnd=tt+1:this.sortKeyRanges.push({sortKey:et,symbolInstanceStart:tt,symbolInstanceEnd:tt+1})},vl.prototype.sortFeatures=function(tt){var et=this;if(this.sortFeaturesByY&&this.sortedAngle!==tt&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(tt),this.sortedAngle=tt,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var rt=0,it=this.symbolInstanceIndexes;rt<it.length;rt+=1){var nt=this.symbolInstances.get(it[rt]);this.featureSortOrder.push(nt.featureIndex),[nt.rightJustifiedTextSymbolIndex,nt.centerJustifiedTextSymbolIndex,nt.leftJustifiedTextSymbolIndex].forEach((function(tt,rt,it){tt>=0&&it.indexOf(tt)===rt&&et.addIndicesForPlacedSymbol(et.text,tt)})),nt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,nt.verticalPlacedTextSymbolIndex),nt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,nt.placedIconSymbolIndex),nt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,nt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},On("SymbolBucket",vl,{omit:["layers","collisionBoxArray","features","compareText"]}),vl.MAX_GLYPHS=65535,vl.addDynamicAttributes=fl;var gp=new wi({"symbol-placement":new mi(Ln.layout_symbol["symbol-placement"]),"symbol-spacing":new mi(Ln.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new mi(Ln.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new vi(Ln.layout_symbol["symbol-sort-key"]),"symbol-z-order":new mi(Ln.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new mi(Ln.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new mi(Ln.layout_symbol["icon-ignore-placement"]),"icon-optional":new mi(Ln.layout_symbol["icon-optional"]),"icon-rotation-alignment":new mi(Ln.layout_symbol["icon-rotation-alignment"]),"icon-size":new vi(Ln.layout_symbol["icon-size"]),"icon-text-fit":new mi(Ln.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new mi(Ln.layout_symbol["icon-text-fit-padding"]),"icon-image":new vi(Ln.layout_symbol["icon-image"]),"icon-rotate":new vi(Ln.layout_symbol["icon-rotate"]),"icon-padding":new mi(Ln.layout_symbol["icon-padding"]),"icon-keep-upright":new mi(Ln.layout_symbol["icon-keep-upright"]),"icon-offset":new vi(Ln.layout_symbol["icon-offset"]),"icon-anchor":new vi(Ln.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new mi(Ln.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new mi(Ln.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new mi(Ln.layout_symbol["text-rotation-alignment"]),"text-field":new vi(Ln.layout_symbol["text-field"]),"text-font":new vi(Ln.layout_symbol["text-font"]),"text-size":new vi(Ln.layout_symbol["text-size"]),"text-max-width":new vi(Ln.layout_symbol["text-max-width"]),"text-line-height":new mi(Ln.layout_symbol["text-line-height"]),"text-letter-spacing":new vi(Ln.layout_symbol["text-letter-spacing"]),"text-justify":new vi(Ln.layout_symbol["text-justify"]),"text-radial-offset":new vi(Ln.layout_symbol["text-radial-offset"]),"text-variable-anchor":new mi(Ln.layout_symbol["text-variable-anchor"]),"text-anchor":new vi(Ln.layout_symbol["text-anchor"]),"text-max-angle":new mi(Ln.layout_symbol["text-max-angle"]),"text-writing-mode":new mi(Ln.layout_symbol["text-writing-mode"]),"text-rotate":new vi(Ln.layout_symbol["text-rotate"]),"text-padding":new mi(Ln.layout_symbol["text-padding"]),"text-keep-upright":new mi(Ln.layout_symbol["text-keep-upright"]),"text-transform":new vi(Ln.layout_symbol["text-transform"]),"text-offset":new vi(Ln.layout_symbol["text-offset"]),"text-allow-overlap":new mi(Ln.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new mi(Ln.layout_symbol["text-ignore-placement"]),"text-optional":new mi(Ln.layout_symbol["text-optional"])}),vp={paint:new wi({"icon-opacity":new vi(Ln.paint_symbol["icon-opacity"]),"icon-color":new vi(Ln.paint_symbol["icon-color"]),"icon-halo-color":new vi(Ln.paint_symbol["icon-halo-color"]),"icon-halo-width":new vi(Ln.paint_symbol["icon-halo-width"]),"icon-halo-blur":new vi(Ln.paint_symbol["icon-halo-blur"]),"icon-translate":new mi(Ln.paint_symbol["icon-translate"]),"icon-translate-anchor":new mi(Ln.paint_symbol["icon-translate-anchor"]),"text-opacity":new vi(Ln.paint_symbol["text-opacity"]),"text-color":new vi(Ln.paint_symbol["text-color"],{runtimeType:lo,getOverride:function(tt){return tt.textColor},hasOverride:function(tt){return!!tt.textColor}}),"text-halo-color":new vi(Ln.paint_symbol["text-halo-color"]),"text-halo-width":new vi(Ln.paint_symbol["text-halo-width"]),"text-halo-blur":new vi(Ln.paint_symbol["text-halo-blur"]),"text-translate":new mi(Ln.paint_symbol["text-translate"]),"text-translate-anchor":new mi(Ln.paint_symbol["text-translate-anchor"])}),layout:gp},bl=function(tt){this.type=tt.property.overrides?tt.property.overrides.runtimeType:Fn,this.defaultValue=tt};bl.prototype.evaluate=function(tt){if(tt.formattedSection){var et=this.defaultValue.property.overrides;if(et&&et.hasOverride(tt.formattedSection))return et.getOverride(tt.formattedSection)}return tt.feature&&tt.featureState?this.defaultValue.evaluate(tt.feature,tt.featureState):this.defaultValue.property.specification.default},bl.prototype.eachChild=function(tt){this.defaultValue.isConstant()||tt(this.defaultValue.value._styleExpression.expression)},bl.prototype.outputDefined=function(){return!1},bl.prototype.serialize=function(){return null},On("FormatSectionOverride",bl,{omit:["defaultValue"]});var _p=function(tt){function e(et){tt.call(this,et,vp)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.recalculate=function(et,rt){if(tt.prototype.recalculate.call(this,et,rt),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var it=this.layout.get("text-writing-mode");if(it){for(var nt=[],ot=0,at=it;ot<at.length;ot+=1){var st=at[ot];nt.indexOf(st)<0&&nt.push(st)}this.layout._values["text-writing-mode"]=nt}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},e.prototype.getValueAndResolveTokens=function(tt,et,rt,it){var nt=this.layout.get(tt).evaluate(et,{},rt,it),ot=this._unevaluatedLayout._values[tt];return ot.isDataDriven()||Gr(ot.value)||!nt?nt:function(tt,et){return et.replace(/{([^{}]+)}/g,(function(et,rt){return rt in tt?String(tt[rt]):""}))}(et.properties,nt)},e.prototype.createBucket=function(tt){return new vl(tt)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype._setPaintOverrides=function(){for(var tt=0,et=vp.paint.overridableProperties;tt<et.length;tt+=1){var rt=et[tt];if(e.hasPaintOverride(this.layout,rt)){var it,nt=this.paint.get(rt),ot=new bl(nt),at=new Kr(ot,nt.property.specification);it="constant"===nt.value.kind||"source"===nt.value.kind?new Xr("source",at):new Jr("composite",at,nt.value.zoomStops,nt.value._interpolationType),this.paint._values[rt]=new yi(nt.property,it,nt.parameters)}}},e.prototype._handleOverridablePaintPropertyUpdate=function(tt,et,rt){return!(!this.layout||et.isDataDriven()||rt.isDataDriven())&&e.hasPaintOverride(this.layout,tt)},e.hasPaintOverride=function(tt,et){var rt=tt.get("text-field"),it=vp.paint.properties[et],nt=!1,a=function(tt){for(var et=0,rt=tt;et<rt.length;et+=1)if(it.overrides&&it.overrides.hasOverride(rt[et]))return void(nt=!0)};if("constant"===rt.value.kind&&rt.value.value instanceof ne)a(rt.value.value.sections);else if("source"===rt.value.kind){var o=function(tt){nt||(tt instanceof le&&se(tt.value)===zo?a(tt.value.sections):tt instanceof fe?a(tt.sections):tt.eachChild(o))},ot=rt.value;ot._styleExpression&&o(ot._styleExpression.expression)}return nt},e}(Ls),xp={paint:new wi({"background-color":new mi(Ln.paint_background["background-color"]),"background-pattern":new xi(Ln.paint_background["background-pattern"]),"background-opacity":new mi(Ln.paint_background["background-opacity"])})},bp=function(tt){function e(et){tt.call(this,et,xp)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e}(Ls),wp={paint:new wi({"raster-opacity":new mi(Ln.paint_raster["raster-opacity"]),"raster-hue-rotate":new mi(Ln.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new mi(Ln.paint_raster["raster-brightness-min"]),"raster-brightness-max":new mi(Ln.paint_raster["raster-brightness-max"]),"raster-saturation":new mi(Ln.paint_raster["raster-saturation"]),"raster-contrast":new mi(Ln.paint_raster["raster-contrast"]),"raster-resampling":new mi(Ln.paint_raster["raster-resampling"]),"raster-fade-duration":new mi(Ln.paint_raster["raster-fade-duration"])})},Ep=function(tt){function e(et){tt.call(this,et,wp)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e}(Ls),Sp=function(tt){function e(et){tt.call(this,et,{}),this.implementation=et}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(tt){this.implementation.onAdd&&this.implementation.onAdd(tt,tt.painter.context.gl)},e.prototype.onRemove=function(tt){this.implementation.onRemove&&this.implementation.onRemove(tt,tt.painter.context.gl)},e}(Ls),Tp={circle:vc,heatmap:bc,hillshade:Ec,fill:Ac,"fill-extrusion":Oc,line:Xc,symbol:_p,background:bp,raster:Ep},Ip=it.HTMLImageElement,zp=it.HTMLCanvasElement,Cp=it.HTMLVideoElement,Ap=it.ImageData,kp=it.ImageBitmap,Tl=function(tt,et,rt,it){this.context=tt,this.format=rt,this.texture=tt.gl.createTexture(),this.update(et,it)};Tl.prototype.update=function(tt,et,rt){var it=tt.width,nt=tt.height,ot=!(this.size&&this.size[0]===it&&this.size[1]===nt||rt),at=this.context,st=at.gl;if(this.useMipmap=Boolean(et&&et.useMipmap),st.bindTexture(st.TEXTURE_2D,this.texture),at.pixelStoreUnpackFlipY.set(!1),at.pixelStoreUnpack.set(1),at.pixelStoreUnpackPremultiplyAlpha.set(this.format===st.RGBA&&(!et||!1!==et.premultiply)),ot)this.size=[it,nt],tt instanceof Ip||tt instanceof zp||tt instanceof Cp||tt instanceof Ap||kp&&tt instanceof kp?st.texImage2D(st.TEXTURE_2D,0,this.format,this.format,st.UNSIGNED_BYTE,tt):st.texImage2D(st.TEXTURE_2D,0,this.format,it,nt,0,this.format,st.UNSIGNED_BYTE,tt.data);else{var ct=rt||{x:0,y:0},ht=ct.x,dt=ct.y;tt instanceof Ip||tt instanceof zp||tt instanceof Cp||tt instanceof Ap||kp&&tt instanceof kp?st.texSubImage2D(st.TEXTURE_2D,0,ht,dt,st.RGBA,st.UNSIGNED_BYTE,tt):st.texSubImage2D(st.TEXTURE_2D,0,ht,dt,it,nt,st.RGBA,st.UNSIGNED_BYTE,tt.data)}this.useMipmap&&this.isSizePowerOfTwo()&&st.generateMipmap(st.TEXTURE_2D)},Tl.prototype.bind=function(tt,et,rt){var it=this.context.gl;it.bindTexture(it.TEXTURE_2D,this.texture),rt!==it.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(rt=it.LINEAR),tt!==this.filter&&(it.texParameteri(it.TEXTURE_2D,it.TEXTURE_MAG_FILTER,tt),it.texParameteri(it.TEXTURE_2D,it.TEXTURE_MIN_FILTER,rt||tt),this.filter=tt),et!==this.wrap&&(it.texParameteri(it.TEXTURE_2D,it.TEXTURE_WRAP_S,et),it.texParameteri(it.TEXTURE_2D,it.TEXTURE_WRAP_T,et),this.wrap=et)},Tl.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Tl.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Vl=function(tt){var et=this;this._callback=tt,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){et._triggered=!1,et._callback()})};Vl.prototype.trigger=function(){var tt=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){tt._triggered=!1,tt._callback()}),0))},Vl.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Fl=function(tt,et,rt){this.target=tt,this.parent=et,this.mapId=rt,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},v(["receive","process"],this),this.invoker=new Vl(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=I()?tt:it};function Dl(tt,et,rt){var it=2*Math.PI*6378137/256/Math.pow(2,rt);return[tt*it-2*Math.PI*6378137/2,et*it-2*Math.PI*6378137/2]}Fl.prototype.send=function(tt,et,rt,it,nt){var ot=this;void 0===nt&&(nt=!1);var at=Math.round(1e18*Math.random()).toString(36).substring(0,10);rt&&(this.callbacks[at]=rt);var st=E(this.globalScope)?void 0:[];return this.target.postMessage({id:at,type:tt,hasCallback:!!rt,targetMapId:it,mustQueue:nt,sourceMapId:this.mapId,data:qn(et,st)},st),{cancel:function(){rt&&delete ot.callbacks[at],ot.target.postMessage({id:at,type:"<cancel>",targetMapId:it,sourceMapId:ot.mapId})}}},Fl.prototype.receive=function(tt){var et=tt.data,rt=et.id;if(rt&&(!et.targetMapId||this.mapId===et.targetMapId))if("<cancel>"===et.type){delete this.tasks[rt];var it=this.cancelCallbacks[rt];delete this.cancelCallbacks[rt],it&&it()}else I()||et.mustQueue?(this.tasks[rt]=et,this.taskQueue.push(rt),this.invoker.trigger()):this.processTask(rt,et)},Fl.prototype.process=function(){if(this.taskQueue.length){var tt=this.taskQueue.shift(),et=this.tasks[tt];delete this.tasks[tt],this.taskQueue.length&&this.invoker.trigger(),et&&this.processTask(tt,et)}},Fl.prototype.processTask=function(tt,et){var rt=this;if("<response>"===et.type){var it=this.callbacks[tt];delete this.callbacks[tt],it&&(et.error?it(Nn(et.error)):it(null,Nn(et.data)))}else{var nt=!1,ot=E(this.globalScope)?void 0:[],at=et.hasCallback?function(et,it){nt=!0,delete rt.cancelCallbacks[tt],rt.target.postMessage({id:tt,type:"<response>",sourceMapId:rt.mapId,error:et?qn(et):null,data:qn(it,ot)},ot)}:function(tt){nt=!0},st=null,ct=Nn(et.data);if(this.parent[et.type])st=this.parent[et.type](et.sourceMapId,ct,at);else if(this.parent.getWorkerSource){var ht=et.type.split(".");st=this.parent.getWorkerSource(et.sourceMapId,ht[0],ct.source)[ht[1]](ct,at)}else at(new Error("Could not find function "+et.type));!nt&&st&&st.cancel&&(this.cancelCallbacks[tt]=st.cancel)}},Fl.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Ll=function(tt,et){tt&&(et?this.setSouthWest(tt).setNorthEast(et):4===tt.length?this.setSouthWest([tt[0],tt[1]]).setNorthEast([tt[2],tt[3]]):this.setSouthWest(tt[0]).setNorthEast(tt[1]))};Ll.prototype.setNorthEast=function(tt){return this._ne=tt instanceof Ol?new Ol(tt.lng,tt.lat):Ol.convert(tt),this},Ll.prototype.setSouthWest=function(tt){return this._sw=tt instanceof Ol?new Ol(tt.lng,tt.lat):Ol.convert(tt),this},Ll.prototype.extend=function(tt){var et,rt,it=this._sw,nt=this._ne;if(tt instanceof Ol)et=tt,rt=tt;else{if(!(tt instanceof Ll))return Array.isArray(tt)?4===tt.length||tt.every(Array.isArray)?this.extend(Ll.convert(tt)):this.extend(Ol.convert(tt)):this;if(rt=tt._ne,!(et=tt._sw)||!rt)return this}return it||nt?(it.lng=Math.min(et.lng,it.lng),it.lat=Math.min(et.lat,it.lat),nt.lng=Math.max(rt.lng,nt.lng),nt.lat=Math.max(rt.lat,nt.lat)):(this._sw=new Ol(et.lng,et.lat),this._ne=new Ol(rt.lng,rt.lat)),this},Ll.prototype.getCenter=function(){return new Ol((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Ll.prototype.getSouthWest=function(){return this._sw},Ll.prototype.getNorthEast=function(){return this._ne},Ll.prototype.getNorthWest=function(){return new Ol(this.getWest(),this.getNorth())},Ll.prototype.getSouthEast=function(){return new Ol(this.getEast(),this.getSouth())},Ll.prototype.getWest=function(){return this._sw.lng},Ll.prototype.getSouth=function(){return this._sw.lat},Ll.prototype.getEast=function(){return this._ne.lng},Ll.prototype.getNorth=function(){return this._ne.lat},Ll.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Ll.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Ll.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Ll.prototype.contains=function(tt){var et=Ol.convert(tt),rt=et.lng,it=et.lat,nt=this._sw.lng<=rt&&rt<=this._ne.lng;return this._sw.lng>this._ne.lng&&(nt=this._sw.lng>=rt&&rt>=this._ne.lng),this._sw.lat<=it&&it<=this._ne.lat&&nt},Ll.convert=function(tt){return!tt||tt instanceof Ll?tt:new Ll(tt)};var Ol=function(tt,et){if(isNaN(tt)||isNaN(et))throw new Error("Invalid LngLat object: ("+tt+", "+et+")");if(this.lng=+tt,this.lat=+et,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ol.prototype.wrap=function(){return new Ol(c(this.lng,-180,180),this.lat)},Ol.prototype.toArray=function(){return[this.lng,this.lat]},Ol.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ol.prototype.distanceTo=function(tt){var et=Math.PI/180,rt=this.lat*et,it=tt.lat*et,nt=Math.sin(rt)*Math.sin(it)+Math.cos(rt)*Math.cos(it)*Math.cos((tt.lng-this.lng)*et);return 6371008.8*Math.acos(Math.min(nt,1))},Ol.prototype.toBounds=function(tt){void 0===tt&&(tt=0);var et=360*tt/40075017,rt=et/Math.cos(Math.PI/180*this.lat);return new Ll(new Ol(this.lng-rt,this.lat-et),new Ol(this.lng+rt,this.lat+et))},Ol.convert=function(tt){if(tt instanceof Ol)return tt;if(Array.isArray(tt)&&(2===tt.length||3===tt.length))return new Ol(Number(tt[0]),Number(tt[1]));if(!Array.isArray(tt)&&"object"==typeof tt&&null!==tt)return new Ol(Number("lng"in tt?tt.lng:tt.lon),Number(tt.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Pp=2*Math.PI*6371008.8;function Ul(tt){return Pp*Math.cos(tt*Math.PI/180)}function jl(tt){return(180+tt)/360}function ql(tt){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+tt*Math.PI/360)))/360}function Nl(tt,et){return tt/Ul(et)}function Kl(tt){return 360/Math.PI*Math.atan(Math.exp((180-360*tt)*Math.PI/180))-90}var Gl=function(tt,et,rt){void 0===rt&&(rt=0),this.x=+tt,this.y=+et,this.z=+rt};Gl.fromLngLat=function(tt,et){void 0===et&&(et=0);var rt=Ol.convert(tt);return new Gl(jl(rt.lng),ql(rt.lat),Nl(et,rt.lat))},Gl.prototype.toLngLat=function(){return new Ol(360*this.x-180,Kl(this.y))},Gl.prototype.toAltitude=function(){return this.z*Ul(Kl(this.y))},Gl.prototype.meterInMercatorCoordinateUnits=function(){return 1/Pp*(tt=Kl(this.y),1/Math.cos(tt*Math.PI/180));var tt};var Zl=function(tt,et,rt){this.z=tt,this.x=et,this.y=rt,this.key=Hl(0,tt,tt,et,rt)};Zl.prototype.equals=function(tt){return this.z===tt.z&&this.x===tt.x&&this.y===tt.y},Zl.prototype.url=function(tt,et){var rt,it,nt,ot,at,st=(it=this.y,nt=this.z,ot=Dl(256*(rt=this.x),256*(it=Math.pow(2,nt)-it-1),nt),at=Dl(256*(rt+1),256*(it+1),nt),ot[0]+","+ot[1]+","+at[0]+","+at[1]),ct=function(tt,et,rt){for(var it,nt="",ot=tt;ot>0;ot--)nt+=(et&(it=1<<ot-1)?1:0)+(rt&it?2:0);return nt}(this.z,this.x,this.y);return tt[(this.x+this.y)%tt.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===et?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",ct).replace("{bbox-epsg-3857}",st)},Zl.prototype.getTilePoint=function(tt){var et=Math.pow(2,this.z);return new rt(8192*(tt.x*et-this.x),8192*(tt.y*et-this.y))},Zl.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Xl=function(tt,et){this.wrap=tt,this.canonical=et,this.key=Hl(tt,et.z,et.z,et.x,et.y)},Jl=function(tt,et,rt,it,nt){this.overscaledZ=tt,this.wrap=et,this.canonical=new Zl(rt,+it,+nt),this.key=Hl(et,tt,rt,it,nt)};function Hl(tt,et,rt,it,nt){(tt*=2)<0&&(tt=-1*tt-1);var ot=1<<rt;return(ot*ot*tt+ot*nt+it).toString(36)+rt.toString(36)+et.toString(36)}Jl.prototype.equals=function(tt){return this.overscaledZ===tt.overscaledZ&&this.wrap===tt.wrap&&this.canonical.equals(tt.canonical)},Jl.prototype.scaledTo=function(tt){var et=this.canonical.z-tt;return tt>this.canonical.z?new Jl(tt,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Jl(tt,this.wrap,tt,this.canonical.x>>et,this.canonical.y>>et)},Jl.prototype.calculateScaledKey=function(tt,et){var rt=this.canonical.z-tt;return tt>this.canonical.z?Hl(this.wrap*+et,tt,this.canonical.z,this.canonical.x,this.canonical.y):Hl(this.wrap*+et,tt,tt,this.canonical.x>>rt,this.canonical.y>>rt)},Jl.prototype.isChildOf=function(tt){if(tt.wrap!==this.wrap)return!1;var et=this.canonical.z-tt.canonical.z;return 0===tt.overscaledZ||tt.overscaledZ<this.overscaledZ&&tt.canonical.x===this.canonical.x>>et&&tt.canonical.y===this.canonical.y>>et},Jl.prototype.children=function(tt){if(this.overscaledZ>=tt)return[new Jl(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var et=this.canonical.z+1,rt=2*this.canonical.x,it=2*this.canonical.y;return[new Jl(et,this.wrap,et,rt,it),new Jl(et,this.wrap,et,rt+1,it),new Jl(et,this.wrap,et,rt,it+1),new Jl(et,this.wrap,et,rt+1,it+1)]},Jl.prototype.isLessThan=function(tt){return this.wrap<tt.wrap||!(this.wrap>tt.wrap)&&(this.overscaledZ<tt.overscaledZ||!(this.overscaledZ>tt.overscaledZ)&&(this.canonical.x<tt.canonical.x||!(this.canonical.x>tt.canonical.x)&&this.canonical.y<tt.canonical.y))},Jl.prototype.wrapped=function(){return new Jl(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Jl.prototype.unwrapTo=function(tt){return new Jl(this.overscaledZ,tt,this.canonical.z,this.canonical.x,this.canonical.y)},Jl.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Jl.prototype.toUnwrapped=function(){return new Xl(this.wrap,this.canonical)},Jl.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Jl.prototype.getTilePoint=function(tt){return this.canonical.getTilePoint(new Gl(tt.x-this.wrap,tt.y))},On("CanonicalTileID",Zl),On("OverscaledTileID",Jl,{omit:["posMatrix"]});var Yl=function(tt,et,rt){if(this.uid=tt,et.height!==et.width)throw new RangeError("DEM tiles must be square");if(rt&&"mapbox"!==rt&&"terrarium"!==rt)return A('"'+rt+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=et.height;var it=this.dim=et.height-2;this.data=new Uint32Array(et.data.buffer),this.encoding=rt||"mapbox";for(var nt=0;nt<it;nt++)this.data[this._idx(-1,nt)]=this.data[this._idx(0,nt)],this.data[this._idx(it,nt)]=this.data[this._idx(it-1,nt)],this.data[this._idx(nt,-1)]=this.data[this._idx(nt,0)],this.data[this._idx(nt,it)]=this.data[this._idx(nt,it-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(it,-1)]=this.data[this._idx(it-1,0)],this.data[this._idx(-1,it)]=this.data[this._idx(0,it-1)],this.data[this._idx(it,it)]=this.data[this._idx(it-1,it-1)]};Yl.prototype.get=function(tt,et){var rt=new Uint8Array(this.data.buffer),it=4*this._idx(tt,et);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(rt[it],rt[it+1],rt[it+2])},Yl.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Yl.prototype._idx=function(tt,et){if(tt<-1||tt>=this.dim+1||et<-1||et>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(et+1)*this.stride+(tt+1)},Yl.prototype._unpackMapbox=function(tt,et,rt){return(256*tt*256+256*et+rt)/10-1e4},Yl.prototype._unpackTerrarium=function(tt,et,rt){return 256*tt+et+rt/256-32768},Yl.prototype.getPixels=function(){return new xo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Yl.prototype.backfillBorder=function(tt,et,rt){if(this.dim!==tt.dim)throw new Error("dem dimension mismatch");var it=et*this.dim,nt=et*this.dim+this.dim,ot=rt*this.dim,at=rt*this.dim+this.dim;switch(et){case-1:it=nt-1;break;case 1:nt=it+1}switch(rt){case-1:ot=at-1;break;case 1:at=ot+1}for(var st=-et*this.dim,ct=-rt*this.dim,ht=ot;ht<at;ht++)for(var dt=it;dt<nt;dt++)this.data[this._idx(dt,ht)]=tt.data[this._idx(dt+st,ht+ct)]},On("DEMData",Yl);var $l=function(tt){this._stringToNumber={},this._numberToString=[];for(var et=0;et<tt.length;et++){var rt=tt[et];this._stringToNumber[rt]=et,this._numberToString[et]=rt}};$l.prototype.encode=function(tt){return this._stringToNumber[tt]},$l.prototype.decode=function(tt){return this._numberToString[tt]};var Wl=function(tt,et,rt,it,nt){this.type="Feature",this._vectorTileFeature=tt,tt._z=et,tt._x=rt,tt._y=it,this.properties=tt.properties,this.id=nt},Mp={geometry:{configurable:!0}};Mp.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Mp.geometry.set=function(tt){this._geometry=tt},Wl.prototype.toJSON=function(){var tt={geometry:this.geometry};for(var et in this)"_geometry"!==et&&"_vectorTileFeature"!==et&&(tt[et]=this[et]);return tt},Object.defineProperties(Wl.prototype,Mp);var tp=function(){this.state={},this.stateChanges={},this.deletedStates={}};tp.prototype.updateState=function(tt,et,rt){var it=String(et);if(this.stateChanges[tt]=this.stateChanges[tt]||{},this.stateChanges[tt][it]=this.stateChanges[tt][it]||{},h(this.stateChanges[tt][it],rt),null===this.deletedStates[tt])for(var nt in this.deletedStates[tt]={},this.state[tt])nt!==it&&(this.deletedStates[tt][nt]=null);else if(this.deletedStates[tt]&&null===this.deletedStates[tt][it])for(var ot in this.deletedStates[tt][it]={},this.state[tt][it])rt[ot]||(this.deletedStates[tt][it][ot]=null);else for(var at in rt)this.deletedStates[tt]&&this.deletedStates[tt][it]&&null===this.deletedStates[tt][it][at]&&delete this.deletedStates[tt][it][at]},tp.prototype.removeFeatureState=function(tt,et,rt){if(null!==this.deletedStates[tt]){var it=String(et);if(this.deletedStates[tt]=this.deletedStates[tt]||{},rt&&void 0!==et)null!==this.deletedStates[tt][it]&&(this.deletedStates[tt][it]=this.deletedStates[tt][it]||{},this.deletedStates[tt][it][rt]=null);else if(void 0!==et)if(this.stateChanges[tt]&&this.stateChanges[tt][it])for(rt in this.deletedStates[tt][it]={},this.stateChanges[tt][it])this.deletedStates[tt][it][rt]=null;else this.deletedStates[tt][it]=null;else this.deletedStates[tt]=null}},tp.prototype.getState=function(tt,et){var rt=String(et),it=h({},(this.state[tt]||{})[rt],(this.stateChanges[tt]||{})[rt]);if(null===this.deletedStates[tt])return{};if(this.deletedStates[tt]){var nt=this.deletedStates[tt][et];if(null===nt)return{};for(var ot in nt)delete it[ot]}return it},tp.prototype.initializeTileState=function(tt,et){tt.setFeatureState(this.state,et)},tp.prototype.coalesceChanges=function(tt,et){var rt={};for(var it in this.stateChanges){this.state[it]=this.state[it]||{};var nt={};for(var ot in this.stateChanges[it])this.state[it][ot]||(this.state[it][ot]={}),h(this.state[it][ot],this.stateChanges[it][ot]),nt[ot]=this.state[it][ot];rt[it]=nt}for(var at in this.deletedStates){this.state[at]=this.state[at]||{};var st={};if(null===this.deletedStates[at])for(var ct in this.state[at])st[ct]={},this.state[at][ct]={};else for(var ht in this.deletedStates[at]){if(null===this.deletedStates[at][ht])this.state[at][ht]={};else for(var dt=0,mt=Object.keys(this.deletedStates[at][ht]);dt<mt.length;dt+=1)delete this.state[at][ht][mt[dt]];st[ht]=this.state[at][ht]}rt[at]=rt[at]||{},h(rt[at],st)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(rt).length)for(var yt in tt)tt[yt].setFeatureState(rt,et)};var ep=function(tt,et){this.tileID=tt,this.x=tt.canonical.x,this.y=tt.canonical.y,this.z=tt.canonical.z,this.grid=new ps(8192,16,0),this.grid3D=new ps(8192,16,0),this.featureIndexArray=new wu,this.promoteId=et};function rp(tt,et,rt,it,nt){return x(tt,(function(tt,ot){var at=et instanceof di?et.get(ot):null;return at&&at.evaluate?at.evaluate(rt,it,nt):at}))}function np(tt){for(var et=1/0,rt=1/0,it=-1/0,nt=-1/0,ot=0,at=tt;ot<at.length;ot+=1){var st=at[ot];et=Math.min(et,st.x),rt=Math.min(rt,st.y),it=Math.max(it,st.x),nt=Math.max(nt,st.y)}return{minX:et,minY:rt,maxX:it,maxY:nt}}function ip(tt,et){return et-tt}ep.prototype.insert=function(tt,et,rt,it,nt,ot){var at=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(rt,it,nt);for(var st=ot?this.grid3D:this.grid,ct=0;ct<et.length;ct++){for(var ht=et[ct],dt=[1/0,1/0,-1/0,-1/0],mt=0;mt<ht.length;mt++){var yt=ht[mt];dt[0]=Math.min(dt[0],yt.x),dt[1]=Math.min(dt[1],yt.y),dt[2]=Math.max(dt[2],yt.x),dt[3]=Math.max(dt[3],yt.y)}dt[0]<8192&&dt[1]<8192&&dt[2]>=0&&dt[3]>=0&&st.insert(at,dt[0],dt[1],dt[2],dt[3])}},ep.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Dc.VectorTile(new Qc(this.rawTileData)).layers,this.sourceLayerCoder=new $l(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ep.prototype.query=function(tt,et,it,nt){var ot=this;this.loadVTLayers();for(var at=tt.params||{},st=8192/tt.tileSize/tt.scale,ct=on(at.filter),ht=tt.queryGeometry,dt=tt.queryPadding*st,mt=np(ht),yt=this.grid.query(mt.minX-dt,mt.minY-dt,mt.maxX+dt,mt.maxY+dt),gt=np(tt.cameraQueryGeometry),vt=this.grid3D.query(gt.minX-dt,gt.minY-dt,gt.maxX+dt,gt.maxY+dt,(function(et,it,nt,ot){return function(tt,et,it,nt,ot){for(var at=0,st=tt;at<st.length;at+=1){var ct=st[at];if(et<=ct.x&&it<=ct.y&&nt>=ct.x&&ot>=ct.y)return!0}var ht=[new rt(et,it),new rt(et,ot),new rt(nt,ot),new rt(nt,it)];if(tt.length>2)for(var dt=0,mt=ht;dt<mt.length;dt+=1)if(Wa(tt,mt[dt]))return!0;for(var yt=0;yt<tt.length-1;yt++)if(Qa(tt[yt],tt[yt+1],ht))return!0;return!1}(tt.cameraQueryGeometry,et-dt,it-dt,nt+dt,ot+dt)})),_t=0,Rt=vt;_t<Rt.length;_t+=1)yt.push(Rt[_t]);yt.sort(ip);for(var Ot,Zt={},x=function(rt){var dt=yt[rt];if(dt!==Ot){Ot=dt;var mt=ot.featureIndexArray.get(dt),gt=null;ot.loadMatchingFeature(Zt,mt.bucketIndex,mt.sourceLayerIndex,mt.featureIndex,ct,at.layers,at.availableImages,et,it,nt,(function(et,rt,it){return gt||(gt=Ra(et)),rt.queryIntersectsFeature(ht,et,it,gt,ot.z,tt.transform,st,tt.pixelPosMatrix)}))}},Ze=0;Ze<yt.length;Ze++)x(Ze);return Zt},ep.prototype.loadMatchingFeature=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt){var mt=this.bucketLayerIDs[et];if(!ot||function(tt,et){for(var rt=0;rt<tt.length;rt++)if(et.indexOf(tt[rt])>=0)return!0;return!1}(ot,mt)){var yt=this.sourceLayerCoder.decode(rt),gt=this.vtLayers[yt].feature(it);if(nt.needGeometry){var vt=Ua(gt,!0);if(!nt.filter(new si(this.tileID.overscaledZ),vt,this.tileID.canonical))return}else if(!nt.filter(new si(this.tileID.overscaledZ),gt))return;for(var _t=this.getId(gt,yt),Rt=0;Rt<mt.length;Rt++){var Ot=mt[Rt];if(!(ot&&ot.indexOf(Ot)<0)){var Zt=st[Ot];if(Zt){var Ze={};void 0!==_t&&ht&&(Ze=ht.getState(Zt.sourceLayer||"_geojsonTileLayer",_t));var Ge=h({},ct[Ot]);Ge.paint=rp(Ge.paint,Zt.paint,gt,Ze,at),Ge.layout=rp(Ge.layout,Zt.layout,gt,Ze,at);var Xe=!dt||dt(gt,Zt,Ze);if(Xe){var Je=new Wl(gt,this.z,this.x,this.y,_t);Je.layer=Ge;var rr=tt[Ot];void 0===rr&&(rr=tt[Ot]=[]),rr.push({featureIndex:it,feature:Je,intersectionZ:Xe})}}}}}},ep.prototype.lookupSymbolFeatures=function(tt,et,rt,it,nt,ot,at,st){var ct={};this.loadVTLayers();for(var ht=on(nt),dt=0,mt=tt;dt<mt.length;dt+=1)this.loadMatchingFeature(ct,rt,it,mt[dt],ht,ot,at,st,et);return ct},ep.prototype.hasLayer=function(tt){for(var et=0,rt=this.bucketLayerIDs;et<rt.length;et+=1)for(var it=0,nt=rt[et];it<nt.length;it+=1)if(tt===nt[it])return!0;return!1},ep.prototype.getId=function(tt,et){var rt=tt.id;return this.promoteId&&"boolean"==typeof(rt=tt.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[et]])&&(rt=Number(rt)),rt},On("FeatureIndex",ep,{omit:["rawTileData","sourceLayerCoder"]});var ap=function(tt,et){this.tileID=tt,this.uid=y(),this.uses=0,this.tileSize=et,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};ap.prototype.registerFadeDuration=function(tt){var et=tt+this.timeAdded;et<Rt.now()||this.fadeEndTime&&et<this.fadeEndTime||(this.fadeEndTime=et)},ap.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},ap.prototype.loadVectorData=function(tt,et,rt){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",tt){for(var it in tt.featureIndex&&(this.latestFeatureIndex=tt.featureIndex,tt.rawTileData?(this.latestRawTileData=tt.rawTileData,this.latestFeatureIndex.rawTileData=tt.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=tt.collisionBoxArray,this.buckets=function(tt,et){var rt={};if(!et)return rt;for(var n=function(){var tt=nt[it],ot=tt.layerIds.map((function(tt){return et.getLayer(tt)})).filter(Boolean);if(0!==ot.length){tt.layers=ot,tt.stateDependentLayerIds&&(tt.stateDependentLayers=tt.stateDependentLayerIds.map((function(tt){return ot.filter((function(et){return et.id===tt}))[0]})));for(var at=0,st=ot;at<st.length;at+=1)rt[st[at].id]=tt}},it=0,nt=tt;it<nt.length;it+=1)n();return rt}(tt.buckets,et.style),this.hasSymbolBuckets=!1,this.buckets){var nt=this.buckets[it];if(nt instanceof vl){if(this.hasSymbolBuckets=!0,!rt)break;nt.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var ot in this.buckets){var at=this.buckets[ot];if(at instanceof vl&&at.hasRTLText){this.hasRTLText=!0,Ms.isLoading()||Ms.isLoaded()||"deferred"!==ii()||ai();break}}for(var st in this.queryPadding=0,this.buckets){var ct=this.buckets[st];this.queryPadding=Math.max(this.queryPadding,et.style.getLayer(st).queryRadius(ct))}tt.imageAtlas&&(this.imageAtlas=tt.imageAtlas),tt.glyphAtlasImage&&(this.glyphAtlasImage=tt.glyphAtlasImage)}else this.collisionBoxArray=new Al},ap.prototype.unloadVectorData=function(){for(var tt in this.buckets)this.buckets[tt].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},ap.prototype.getBucket=function(tt){return this.buckets[tt.id]},ap.prototype.upload=function(tt){for(var et in this.buckets){var rt=this.buckets[et];rt.uploadPending()&&rt.upload(tt)}var it=tt.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Tl(tt,this.imageAtlas.image,it.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Tl(tt,this.glyphAtlasImage,it.ALPHA),this.glyphAtlasImage=null)},ap.prototype.prepare=function(tt){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(tt,this.imageAtlasTexture)},ap.prototype.queryRenderedFeatures=function(tt,et,rt,it,nt,ot,at,st,ct,ht){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:it,cameraQueryGeometry:nt,scale:ot,tileSize:this.tileSize,pixelPosMatrix:ht,transform:st,params:at,queryPadding:this.queryPadding*ct},tt,et,rt):{}},ap.prototype.querySourceFeatures=function(tt,et){var rt=this.latestFeatureIndex;if(rt&&rt.rawTileData){var it=rt.loadVTLayers(),nt=et?et.sourceLayer:"",ot=it._geojsonTileLayer||it[nt];if(ot)for(var at=on(et&&et.filter),st=this.tileID.canonical,ct=st.z,ht=st.x,dt=st.y,mt={z:ct,x:ht,y:dt},yt=0;yt<ot.length;yt++){var gt=ot.feature(yt);if(at.needGeometry){var vt=Ua(gt,!0);if(!at.filter(new si(this.tileID.overscaledZ),vt,this.tileID.canonical))continue}else if(!at.filter(new si(this.tileID.overscaledZ),gt))continue;var _t=rt.getId(gt,nt),Rt=new Wl(gt,ct,ht,dt,_t);Rt.tile=mt,tt.push(Rt)}}},ap.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},ap.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},ap.prototype.setExpiryData=function(tt){var et=this.expirationTime;if(tt.cacheControl){var rt=z(tt.cacheControl);rt["max-age"]&&(this.expirationTime=Date.now()+1e3*rt["max-age"])}else tt.expires&&(this.expirationTime=new Date(tt.expires).getTime());if(this.expirationTime){var it=Date.now(),nt=!1;if(this.expirationTime>it)nt=!1;else if(et)if(this.expirationTime<et)nt=!0;else{var ot=this.expirationTime-et;ot?this.expirationTime=it+Math.max(ot,3e4):nt=!0}else nt=!0;nt?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},ap.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},ap.prototype.setFeatureState=function(tt,et){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(tt).length){var rt=this.latestFeatureIndex.loadVTLayers();for(var it in this.buckets)if(et.style.hasLayer(it)){var nt=this.buckets[it],ot=nt.layers[0].sourceLayer||"_geojsonTileLayer",at=rt[ot],st=tt[ot];if(at&&st&&0!==Object.keys(st).length){nt.update(st,at,this.imageAtlas&&this.imageAtlas.patternPositions||{});var ct=et&&et.style&&et.style.getLayer(it);ct&&(this.queryPadding=Math.max(this.queryPadding,ct.queryRadius(nt)))}}}},ap.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},ap.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<Rt.now()},ap.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},ap.prototype.setHoldDuration=function(tt){this.symbolFadeHoldUntil=Rt.now()+tt},ap.prototype.setDependencies=function(tt,et){for(var rt={},it=0,nt=et;it<nt.length;it+=1)rt[nt[it]]=!0;this.dependencies[tt]=rt},ap.prototype.hasDependency=function(tt,et){for(var rt=0,it=tt;rt<it.length;rt+=1){var nt=this.dependencies[it[rt]];if(nt)for(var ot=0,at=et;ot<at.length;ot+=1)if(nt[at[ot]])return!0}return!1};var Dp=it.performance,sp=function(tt){this._marks={start:[tt.url,"start"].join("#"),end:[tt.url,"end"].join("#"),measure:tt.url.toString()},Dp.mark(this._marks.start)};sp.prototype.finish=function(){Dp.mark(this._marks.end);var tt=Dp.getEntriesByName(this._marks.measure);return 0===tt.length&&(Dp.measure(this._marks.measure,this._marks.start,this._marks.end),tt=Dp.getEntriesByName(this._marks.measure),Dp.clearMarks(this._marks.start),Dp.clearMarks(this._marks.end),Dp.clearMeasures(this._marks.measure)),tt},tt.Actor=Fl,tt.AlphaImage=go,tt.CanonicalTileID=Zl,tt.CollisionBoxArray=Al,tt.Color=te,tt.DEMData=Yl,tt.DataConstantProperty=mi,tt.DictionaryCoder=$l,tt.EXTENT=8192,tt.ErrorEvent=Dn,tt.EvaluationParameters=si,tt.Event=It,tt.Evented=Ct,tt.FeatureIndex=ep,tt.FillBucket=ss,tt.FillExtrusionBucket=Ss,tt.ImageAtlas=bu,tt.ImagePosition=gu,tt.LineBucket=Fs,tt.LngLat=Ol,tt.LngLatBounds=Ll,tt.MercatorCoordinate=Gl,tt.ONE_EM=24,tt.OverscaledTileID=Jl,tt.Point=rt,tt.Point$1=rt,tt.Properties=wi,tt.Protobuf=Qc,tt.RGBAImage=xo,tt.RequestManager=G,tt.RequestPerformance=sp,tt.ResourceType=xn,tt.SegmentVector=sa,tt.SourceFeatureState=tp,tt.StructArrayLayout1ui2=Il,tt.StructArrayLayout2f1f2i16=il,tt.StructArrayLayout2i4=Rs,tt.StructArrayLayout3ui6=pl,tt.StructArrayLayout4i8=Os,tt.SymbolBucket=vl,tt.Texture=Tl,tt.Tile=ap,tt.Transitionable=pi,tt.Uniform1f=nc,tt.Uniform1i=ic,tt.Uniform2f=oc,tt.Uniform3f=ac,tt.Uniform4f=sc,tt.UniformColor=lc,tt.UniformMatrix4f=cc,tt.UnwrappedTileID=Xl,tt.ValidationError=Pt,tt.WritingMode=up,tt.ZoomHistory=Kn,tt.add=function(tt,et,rt){return tt[0]=et[0]+rt[0],tt[1]=et[1]+rt[1],tt[2]=et[2]+rt[2],tt},tt.addDynamicAttributes=fl,tt.asyncAll=function(tt,et,rt){if(!tt.length)return rt(null,[]);var it=tt.length,nt=new Array(tt.length),ot=null;tt.forEach((function(tt,at){et(tt,(function(tt,et){tt&&(ot=tt),nt[at]=et,0==--it&&rt(ot,nt)}))}))},tt.bezier=u,tt.bindAll=v,tt.browser=Rt,tt.cacheEntryPossiblyAdded=function(tt){++_n>Ji&&(tt.getActor().send("enforceCacheSizeLimit",Ki),_n=0)},tt.clamp=p,tt.clearTileCache=function(tt){var et=it.caches.delete("mapbox-tiles");tt&&et.catch(tt).then((function(){return tt()}))},tt.clipLine=Zu,tt.clone=function(tt){var et=new mc(16);return et[0]=tt[0],et[1]=tt[1],et[2]=tt[2],et[3]=tt[3],et[4]=tt[4],et[5]=tt[5],et[6]=tt[6],et[7]=tt[7],et[8]=tt[8],et[9]=tt[9],et[10]=tt[10],et[11]=tt[11],et[12]=tt[12],et[13]=tt[13],et[14]=tt[14],et[15]=tt[15],et},tt.clone$1=w,tt.clone$2=function(tt){var et=new mc(3);return et[0]=tt[0],et[1]=tt[1],et[2]=tt[2],et},tt.collisionCircleLayout=Yc,tt.config=Ot,tt.create=function(){var tt=new mc(16);return mc!=Float32Array&&(tt[1]=0,tt[2]=0,tt[3]=0,tt[4]=0,tt[6]=0,tt[7]=0,tt[8]=0,tt[9]=0,tt[11]=0,tt[12]=0,tt[13]=0,tt[14]=0),tt[0]=1,tt[5]=1,tt[10]=1,tt[15]=1,tt},tt.create$1=function(){var tt=new mc(9);return mc!=Float32Array&&(tt[1]=0,tt[2]=0,tt[3]=0,tt[5]=0,tt[6]=0,tt[7]=0),tt[0]=1,tt[4]=1,tt[8]=1,tt},tt.create$2=function(){var tt=new mc(4);return mc!=Float32Array&&(tt[1]=0,tt[2]=0),tt[0]=1,tt[3]=1,tt},tt.createCommonjsModule=e,tt.createExpression=Zr,tt.createLayout=Ii,tt.createStyleLayer=function(tt){return"custom"===tt.type?new Sp(tt):new Tp[tt.type](tt)},tt.cross=function(tt,et,rt){var it=et[0],nt=et[1],ot=et[2],at=rt[0],st=rt[1],ct=rt[2];return tt[0]=nt*ct-ot*st,tt[1]=ot*at-it*ct,tt[2]=it*st-nt*at,tt},tt.deepEqual=function t(tt,et){if(Array.isArray(tt)){if(!Array.isArray(et)||tt.length!==et.length)return!1;for(var rt=0;rt<tt.length;rt++)if(!t(tt[rt],et[rt]))return!1;return!0}if("object"==typeof tt&&null!==tt&&null!==et){if("object"!=typeof et)return!1;if(Object.keys(tt).length!==Object.keys(et).length)return!1;for(var it in tt)if(!t(tt[it],et[it]))return!1;return!0}return tt===et},tt.dot=function(tt,et){return tt[0]*et[0]+tt[1]*et[1]+tt[2]*et[2]},tt.dot$1=function(tt,et){return tt[0]*et[0]+tt[1]*et[1]+tt[2]*et[2]+tt[3]*et[3]},tt.ease=ot,tt.emitValidationErrors=Bn,tt.endsWith=g,tt.enforceCacheSizeLimit=function(tt){lt(),wr&&wr.then((function(et){et.keys().then((function(rt){for(var it=0;it<rt.length-tt;it++)et.delete(rt[it])}))}))},tt.evaluateSizeForFeature=Lu,tt.evaluateSizeForZoom=Ou,tt.evaluateVariableOffset=al,tt.evented=Ps,tt.extend=h,tt.featureFilter=on,tt.filterObject=b,tt.fromRotation=function(tt,et){var rt=Math.sin(et),it=Math.cos(et);return tt[0]=it,tt[1]=rt,tt[2]=0,tt[3]=-rt,tt[4]=it,tt[5]=0,tt[6]=0,tt[7]=0,tt[8]=1,tt},tt.getAnchorAlignment=Bu,tt.getAnchorJustification=ol,tt.getArrayBuffer=bt,tt.getImage=At,tt.getJSON=function(tt,et){return xt(h(tt,{type:"json"}),et)},tt.getRTLTextPluginStatus=ii,tt.getReferrer=Tn,tt.getVideo=function(tt,et){var rt,nt,ot=it.document.createElement("video");ot.muted=!0,ot.onloadstart=function(){et(null,ot)};for(var at=0;at<tt.length;at++){var st=it.document.createElement("source");rt=tt[at],nt=void 0,(nt=it.document.createElement("a")).href=rt,(nt.protocol!==it.document.location.protocol||nt.host!==it.document.location.host)&&(ot.crossOrigin="Anonymous"),st.src=tt[at],ot.appendChild(st)}return{cancel:function(){}}},tt.identity=oo,tt.invert=function(tt,et){var rt=et[0],it=et[1],nt=et[2],ot=et[3],at=et[4],st=et[5],ct=et[6],ht=et[7],dt=et[8],mt=et[9],yt=et[10],gt=et[11],vt=et[12],_t=et[13],Rt=et[14],Ot=et[15],Zt=rt*st-it*at,Ze=rt*ct-nt*at,Ge=rt*ht-ot*at,Xe=it*ct-nt*st,Je=it*ht-ot*st,rr=nt*ht-ot*ct,wr=dt*_t-mt*vt,Ir=dt*Rt-yt*vt,ti=dt*Ot-gt*vt,ni=mt*Rt-yt*_t,oi=mt*Ot-gt*_t,_i=yt*Ot-gt*Rt,ji=Zt*_i-Ze*oi+Ge*ni+Xe*ti-Je*Ir+rr*wr;return ji?(tt[0]=(st*_i-ct*oi+ht*ni)*(ji=1/ji),tt[1]=(nt*oi-it*_i-ot*ni)*ji,tt[2]=(_t*rr-Rt*Je+Ot*Xe)*ji,tt[3]=(yt*Je-mt*rr-gt*Xe)*ji,tt[4]=(ct*ti-at*_i-ht*Ir)*ji,tt[5]=(rt*_i-nt*ti+ot*Ir)*ji,tt[6]=(Rt*Ge-vt*rr-Ot*Ze)*ji,tt[7]=(dt*rr-yt*Ge+gt*Ze)*ji,tt[8]=(at*oi-st*ti+ht*wr)*ji,tt[9]=(it*ti-rt*oi-ot*wr)*ji,tt[10]=(vt*Je-_t*Ge+Ot*Zt)*ji,tt[11]=(mt*Ge-dt*Je-gt*Zt)*ji,tt[12]=(st*Ir-at*ni-ct*wr)*ji,tt[13]=(rt*ni-it*Ir+nt*wr)*ji,tt[14]=(_t*Ze-vt*Xe-Rt*Zt)*ji,tt[15]=(dt*Xe-mt*Ze+yt*Zt)*ji,tt):null},tt.isChar=ws,tt.isMapboxURL=Z,tt.keysDifference=function(tt,et){var rt=[];for(var it in tt)it in et||rt.push(it);return rt},tt.makeRequest=xt,tt.mapObject=x,tt.mercatorXfromLng=jl,tt.mercatorYfromLat=ql,tt.mercatorZfromAltitude=Nl,tt.mul=gc,tt.multiply=so,tt.mvt=Dc,tt.nextPowerOfTwo=function(tt){return tt<=1?1:Math.pow(2,Math.ceil(Math.log(tt)/Math.LN2))},tt.normalize=function(tt,et){var rt=et[0],it=et[1],nt=et[2],ot=rt*rt+it*it+nt*nt;return ot>0&&(ot=1/Math.sqrt(ot)),tt[0]=et[0]*ot,tt[1]=et[1]*ot,tt[2]=et[2]*ot,tt},tt.number=Ke,tt.offscreenCanvasSupported=ft,tt.ortho=function(tt,et,rt,it,nt,ot,at){var st=1/(et-rt),ct=1/(it-nt),ht=1/(ot-at);return tt[0]=-2*st,tt[1]=0,tt[2]=0,tt[3]=0,tt[4]=0,tt[5]=-2*ct,tt[6]=0,tt[7]=0,tt[8]=0,tt[9]=0,tt[10]=2*ht,tt[11]=0,tt[12]=(et+rt)*st,tt[13]=(nt+it)*ct,tt[14]=(at+ot)*ht,tt[15]=1,tt},tt.parseGlyphPBF=function(tt){return new Qc(tt).readFields(yu,[])},tt.pbf=Qc,tt.performSymbolLayout=function(tt,et,rt,it,nt,ot,at){tt.createArrays(),tt.tilePixelRatio=8192/(512*tt.overscaling),tt.compareText={},tt.iconsNeedLinear=!1;var st=tt.layers[0].layout,ct=tt.layers[0]._unevaluatedLayout._values,ht={};if("composite"===tt.textSizeData.kind){var dt=tt.textSizeData,mt=dt.maxZoom;ht.compositeTextSizes=[ct["text-size"].possiblyEvaluate(new si(dt.minZoom),at),ct["text-size"].possiblyEvaluate(new si(mt),at)]}if("composite"===tt.iconSizeData.kind){var yt=tt.iconSizeData,gt=yt.maxZoom;ht.compositeIconSizes=[ct["icon-size"].possiblyEvaluate(new si(yt.minZoom),at),ct["icon-size"].possiblyEvaluate(new si(gt),at)]}ht.layoutTextSize=ct["text-size"].possiblyEvaluate(new si(tt.zoom+1),at),ht.layoutIconSize=ct["icon-size"].possiblyEvaluate(new si(tt.zoom+1),at),ht.textMaxSize=ct["text-size"].possiblyEvaluate(new si(18));for(var vt=24*st.get("text-line-height"),_t="map"===st.get("text-rotation-alignment")&&"point"!==st.get("symbol-placement"),Rt=st.get("text-keep-upright"),Ot=st.get("text-size"),g=function(){var ot=Ze[Zt],ct=st.get("text-font").evaluate(ot,{},at).join(","),dt=Ot.evaluate(ot,{},at),mt=ht.layoutTextSize.evaluate(ot,{},at),yt=ht.layoutIconSize.evaluate(ot,{},at),gt={horizontal:{},vertical:void 0},Ge=ot.text,Xe=[0,0];if(Ge){var Je=Ge.toString(),rr=24*st.get("text-letter-spacing").evaluate(ot,{},at),wr=function(tt){for(var et=0,rt=tt;et<rt.length;et+=1)if(it=rt[et].charCodeAt(0),ws.Arabic(it)||ws["Arabic Supplement"](it)||ws["Arabic Extended-A"](it)||ws["Arabic Presentation Forms-A"](it)||ws["Arabic Presentation Forms-B"](it))return!1;var it;return!0}(Je)?rr:0,Ir=st.get("text-anchor").evaluate(ot,{},at),ti=st.get("text-variable-anchor");if(!ti){var ni=st.get("text-radial-offset").evaluate(ot,{},at);Xe=ni?al(Ir,[24*ni,dp]):st.get("text-offset").evaluate(ot,{},at).map((function(tt){return 24*tt}))}var oi=_t?"center":st.get("text-justify").evaluate(ot,{},at),_i=st.get("symbol-placement"),ji="point"===_i?24*st.get("text-max-width").evaluate(ot,{},at):0,B=function(){tt.allowVerticalPlacement&&Zn(Je)&&(gt.vertical=Su(Ge,et,rt,nt,ct,ji,vt,Ir,"left",wr,Xe,up.vertical,!0,_i,mt,dt))};if(!_t&&ti){for(var Ki="auto"===oi?ti.map((function(tt){return ol(tt)})):[oi],Ji=!1,an=0;an<Ki.length;an++){var _n=Ki[an];if(!gt.horizontal[_n])if(Ji)gt.horizontal[_n]=gt.horizontal[0];else{var xn=Su(Ge,et,rt,nt,ct,ji,vt,"center",_n,wr,Xe,up.horizontal,!1,_i,mt,dt);xn&&(gt.horizontal[_n]=xn,Ji=1===xn.positionedLines.length)}}B()}else{"auto"===oi&&(oi=ol(Ir));var En=Su(Ge,et,rt,nt,ct,ji,vt,Ir,oi,wr,Xe,up.horizontal,!1,_i,mt,dt);En&&(gt.horizontal[oi]=En),B(),Zn(Je)&&_t&&Rt&&(gt.vertical=Su(Ge,et,rt,nt,ct,ji,vt,Ir,oi,wr,Xe,up.vertical,!1,_i,mt,dt))}}var Tn=void 0,Cn=!1;if(ot.icon&&ot.icon.name){var Pn=it[ot.icon.name];Pn&&(Tn=function(tt,et,rt){var it=Bu(rt),nt=et[0]-tt.displaySize[0]*it.horizontalAlign,ot=et[1]-tt.displaySize[1]*it.verticalAlign;return{image:tt,top:ot,bottom:ot+tt.displaySize[1],left:nt,right:nt+tt.displaySize[0]}}(nt[ot.icon.name],st.get("icon-offset").evaluate(ot,{},at),st.get("icon-anchor").evaluate(ot,{},at)),Cn=Pn.sdf,void 0===tt.sdfIcons?tt.sdfIcons=Pn.sdf:tt.sdfIcons!==Pn.sdf&&A("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Pn.pixelRatio!==tt.pixelRatio||0!==st.get("icon-rotate").constantOr(1))&&(tt.iconsNeedLinear=!0))}var Mn=ul(gt.horizontal)||gt.vertical;tt.iconsInText=!!Mn&&Mn.iconsInText,(Mn||Tn)&&function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt){var mt=ot.textMaxSize.evaluate(et,{});void 0===mt&&(mt=at);var yt,gt=tt.layers[0].layout,vt=gt.get("icon-offset").evaluate(et,{},dt),_t=ul(rt.horizontal),Rt=at/24,Ot=tt.tilePixelRatio*Rt,Zt=tt.tilePixelRatio*mt/24,Ze=tt.tilePixelRatio*st,Ge=tt.tilePixelRatio*gt.get("symbol-spacing"),Xe=gt.get("text-padding")*tt.tilePixelRatio,Je=gt.get("icon-padding")*tt.tilePixelRatio,rr=gt.get("text-max-angle")/180*Math.PI,wr="map"===gt.get("text-rotation-alignment")&&"point"!==gt.get("symbol-placement"),Ir="map"===gt.get("icon-rotation-alignment")&&"point"!==gt.get("symbol-placement"),ti=gt.get("symbol-placement"),ni=Ge/2,oi=gt.get("icon-text-fit");it&&"none"!==oi&&(tt.allowVerticalPlacement&&rt.vertical&&(yt=Vu(it,rt.vertical,oi,gt.get("icon-text-fit-padding"),vt,Rt)),_t&&(it=Vu(it,_t,oi,gt.get("icon-text-fit-padding"),vt,Rt)));var P=function(st,mt){mt.x<0||mt.x>=8192||mt.y<0||mt.y>=8192||function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t,Rt,Ot,Zt,Ze,Ge,Xe,Je,rr,wr){var Ir,ti,ni,oi,_i,ji=tt.addToLineVertexArray(et,rt),Ki=0,Ji=0,an=0,_n=0,xn=-1,En=-1,Tn={},Cn=tc(""),Pn=0,Mn=0;if(void 0===st._unevaluatedLayout.getValue("text-radial-offset")?(Pn=(Ir=st.layout.get("text-offset").evaluate(Ge,{},rr).map((function(tt){return 24*tt})))[0],Mn=Ir[1]):(Pn=24*st.layout.get("text-radial-offset").evaluate(Ge,{},rr),Mn=dp),tt.allowVerticalPlacement&&it.vertical){var Dn=st.layout.get("text-rotate").evaluate(Ge,{},rr)+90;oi=new Wu(ct,et,ht,dt,mt,it.vertical,yt,gt,vt,Dn),at&&(_i=new Wu(ct,et,ht,dt,mt,at,Rt,Ot,vt,Dn))}if(nt){var Ln=st.layout.get("icon-rotate").evaluate(Ge,{}),Rn="none"!==st.layout.get("icon-text-fit"),Fn=Xu(nt,Ln,Je,Rn),Gn=at?Xu(at,Ln,Je,Rn):void 0;ni=new Wu(ct,et,ht,dt,mt,nt,Rt,Ot,!1,Ln),Ki=4*Fn.length;var Wn=tt.iconSizeData,Qn=null;"source"===Wn.kind?(Qn=[128*st.layout.get("icon-size").evaluate(Ge,{})])[0]>32640&&A(tt.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===Wn.kind&&((Qn=[128*Xe.compositeIconSizes[0].evaluate(Ge,{},rr),128*Xe.compositeIconSizes[1].evaluate(Ge,{},rr)])[0]>32640||Qn[1]>32640)&&A(tt.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),tt.addSymbols(tt.icon,Fn,Qn,Ze,Zt,Ge,!1,et,ji.lineStartIndex,ji.lineLength,-1,rr),xn=tt.icon.placedSymbolArray.length-1,Gn&&(Ji=4*Gn.length,tt.addSymbols(tt.icon,Gn,Qn,Ze,Zt,Ge,up.vertical,et,ji.lineStartIndex,ji.lineLength,-1,rr),En=tt.icon.placedSymbolArray.length-1)}for(var lo in it.horizontal){var uo=it.horizontal[lo];if(!ti){Cn=tc(uo.text);var co=st.layout.get("text-rotate").evaluate(Ge,{},rr);ti=new Wu(ct,et,ht,dt,mt,uo,yt,gt,vt,co)}var So=1===uo.positionedLines.length;if(an+=sl(tt,et,uo,ot,st,vt,Ge,_t,ji,it.vertical?up.horizontal:up.horizontalOnly,So?Object.keys(it.horizontal):[lo],Tn,xn,Xe,rr),So)break}it.vertical&&(_n+=sl(tt,et,it.vertical,ot,st,vt,Ge,_t,ji,up.vertical,["vertical"],Tn,En,Xe,rr));var zo=ti?ti.boxStartIndex:tt.collisionBoxArray.length,ko=ti?ti.boxEndIndex:tt.collisionBoxArray.length,ta=oi?oi.boxStartIndex:tt.collisionBoxArray.length,ea=oi?oi.boxEndIndex:tt.collisionBoxArray.length,ra=ni?ni.boxStartIndex:tt.collisionBoxArray.length,ia=ni?ni.boxEndIndex:tt.collisionBoxArray.length,na=_i?_i.boxStartIndex:tt.collisionBoxArray.length,oa=_i?_i.boxEndIndex:tt.collisionBoxArray.length,aa=-1,ut=function(tt,et){return tt&&tt.circleDiameter?Math.max(tt.circleDiameter,et):et};aa=ut(ti,aa),aa=ut(oi,aa),aa=ut(ni,aa);var la=(aa=ut(_i,aa))>-1?1:0;la&&(aa*=wr/24),tt.glyphOffsetArray.length>=vl.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==Ge.sortKey&&tt.addToSortKeyRanges(tt.symbolInstances.length,Ge.sortKey),tt.symbolInstances.emplaceBack(et.x,et.y,Tn.right>=0?Tn.right:-1,Tn.center>=0?Tn.center:-1,Tn.left>=0?Tn.left:-1,Tn.vertical||-1,xn,En,Cn,zo,ko,ta,ea,ra,ia,na,oa,ht,an,_n,Ki,Ji,la,0,yt,Pn,Mn,aa)}(tt,mt,st,rt,it,nt,yt,tt.layers[0],tt.collisionBoxArray,et.index,et.sourceLayerIndex,tt.index,Ot,Xe,wr,ct,Ze,Je,Ir,vt,et,ot,ht,dt,at)};if("line"===ti)for(var _i=0,ji=Zu(et.geometry,0,0,8192,8192);_i<ji.length;_i+=1)for(var Ki=ji[_i],Ji=0,an=Gu(Ki,Ge,rr,rt.vertical||_t,it,24,Zt,tt.overscaling,8192);Ji<an.length;Ji+=1){var _n=an[Ji];_t&&ll(tt,_t.text,ni,_n)||P(Ki,_n)}else if("line-center"===ti)for(var xn=0,En=et.geometry;xn<En.length;xn+=1){var Tn=En[xn];if(Tn.length>1){var Cn=Ku(Tn,rr,rt.vertical||_t,it,24,Zt);Cn&&P(Tn,Cn)}}else if("Polygon"===et.type)for(var Pn=0,Mn=ns(et.geometry,0);Pn<Mn.length;Pn+=1){var Dn=Mn[Pn],Ln=el(Dn,16);P(Dn[0],new hp(Ln.x,Ln.y,0))}else if("LineString"===et.type)for(var Rn=0,Fn=et.geometry;Rn<Fn.length;Rn+=1){var Gn=Fn[Rn];P(Gn,new hp(Gn[0].x,Gn[0].y,0))}else if("Point"===et.type)for(var Wn=0,Qn=et.geometry;Wn<Qn.length;Wn+=1)for(var lo=0,uo=Qn[Wn];lo<uo.length;lo+=1){var co=uo[lo];P([co],new hp(co.x,co.y,0))}}(tt,ot,gt,Tn,it,ht,mt,yt,Xe,Cn,at)},Zt=0,Ze=tt.features;Zt<Ze.length;Zt+=1)g();ot&&tt.generateCollisionDebugBuffers()},tt.perspective=function(tt,et,rt,it,nt){var ot,at=1/Math.tan(et/2);return tt[0]=at/rt,tt[1]=0,tt[2]=0,tt[3]=0,tt[4]=0,tt[5]=at,tt[6]=0,tt[7]=0,tt[8]=0,tt[9]=0,tt[11]=-1,tt[12]=0,tt[13]=0,tt[15]=0,null!=nt&&nt!==1/0?(tt[10]=(nt+it)*(ot=1/(it-nt)),tt[14]=2*nt*it*ot):(tt[10]=-1,tt[14]=-2*it),tt},tt.pick=function(tt,et){for(var rt={},it=0;it<et.length;it++){var nt=et[it];nt in tt&&(rt[nt]=tt[nt])}return rt},tt.plugin=Ms,tt.polygonIntersectsPolygon=Na,tt.postMapLoadEvent=ji,tt.postTurnstileEvent=oi,tt.potpack=vu,tt.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],tt.register=On,tt.registerForPluginStateChange=function(tt){return tt({pluginStatus:Is,pluginURL:zs}),Ps.on("pluginStateChange",tt),tt},tt.renderColorRamp=wo,tt.rotate=function(tt,et,rt){var it=et[0],nt=et[1],ot=et[2],at=et[3],st=Math.sin(rt),ct=Math.cos(rt);return tt[0]=it*ct+ot*st,tt[1]=nt*ct+at*st,tt[2]=it*-st+ot*ct,tt[3]=nt*-st+at*ct,tt},tt.rotateX=function(tt,et,rt){var it=Math.sin(rt),nt=Math.cos(rt),ot=et[4],at=et[5],st=et[6],ct=et[7],ht=et[8],dt=et[9],mt=et[10],yt=et[11];return et!==tt&&(tt[0]=et[0],tt[1]=et[1],tt[2]=et[2],tt[3]=et[3],tt[12]=et[12],tt[13]=et[13],tt[14]=et[14],tt[15]=et[15]),tt[4]=ot*nt+ht*it,tt[5]=at*nt+dt*it,tt[6]=st*nt+mt*it,tt[7]=ct*nt+yt*it,tt[8]=ht*nt-ot*it,tt[9]=dt*nt-at*it,tt[10]=mt*nt-st*it,tt[11]=yt*nt-ct*it,tt},tt.rotateZ=function(tt,et,rt){var it=Math.sin(rt),nt=Math.cos(rt),ot=et[0],at=et[1],st=et[2],ct=et[3],ht=et[4],dt=et[5],mt=et[6],yt=et[7];return et!==tt&&(tt[8]=et[8],tt[9]=et[9],tt[10]=et[10],tt[11]=et[11],tt[12]=et[12],tt[13]=et[13],tt[14]=et[14],tt[15]=et[15]),tt[0]=ot*nt+ht*it,tt[1]=at*nt+dt*it,tt[2]=st*nt+mt*it,tt[3]=ct*nt+yt*it,tt[4]=ht*nt-ot*it,tt[5]=dt*nt-at*it,tt[6]=mt*nt-st*it,tt[7]=yt*nt-ct*it,tt},tt.scale=function(tt,et,rt){var it=rt[0],nt=rt[1],ot=rt[2];return tt[0]=et[0]*it,tt[1]=et[1]*it,tt[2]=et[2]*it,tt[3]=et[3]*it,tt[4]=et[4]*nt,tt[5]=et[5]*nt,tt[6]=et[6]*nt,tt[7]=et[7]*nt,tt[8]=et[8]*ot,tt[9]=et[9]*ot,tt[10]=et[10]*ot,tt[11]=et[11]*ot,tt[12]=et[12],tt[13]=et[13],tt[14]=et[14],tt[15]=et[15],tt},tt.scale$1=function(tt,et,rt){return tt[0]=et[0]*rt,tt[1]=et[1]*rt,tt[2]=et[2]*rt,tt[3]=et[3]*rt,tt},tt.scale$2=function(tt,et,rt){return tt[0]=et[0]*rt,tt[1]=et[1]*rt,tt[2]=et[2]*rt,tt},tt.setCacheLimits=function(tt,et){Ki=tt,Ji=et},tt.setRTLTextPlugin=function(tt,et,rt){if(void 0===rt&&(rt=!1),"deferred"===Is||"loading"===Is||"loaded"===Is)throw new Error("setRTLTextPlugin cannot be called multiple times.");zs=Rt.resolveURL(tt),Is="deferred",Ts=et,ri(),rt||ai()},tt.sphericalToCartesian=function(tt){var et=tt[0],rt=tt[1],it=tt[2];return rt+=90,rt*=Math.PI/180,it*=Math.PI/180,{x:et*Math.cos(rt)*Math.sin(it),y:et*Math.sin(rt)*Math.sin(it),z:et*Math.cos(it)}},tt.sqrLen=function(tt){var et=tt[0],rt=tt[1];return et*et+rt*rt},tt.styleSpec=Ln,tt.sub=function(tt,et,rt){return tt[0]=et[0]-rt[0],tt[1]=et[1]-rt[1],tt[2]=et[2]-rt[2],tt},tt.symbolSize=fp,tt.transformMat3=function(tt,et,rt){var it=et[0],nt=et[1],ot=et[2];return tt[0]=it*rt[0]+nt*rt[3]+ot*rt[6],tt[1]=it*rt[1]+nt*rt[4]+ot*rt[7],tt[2]=it*rt[2]+nt*rt[5]+ot*rt[8],tt},tt.transformMat4=po,tt.translate=function(tt,et,rt){var it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t=rt[0],Rt=rt[1],Ot=rt[2];return et===tt?(tt[12]=et[0]*_t+et[4]*Rt+et[8]*Ot+et[12],tt[13]=et[1]*_t+et[5]*Rt+et[9]*Ot+et[13],tt[14]=et[2]*_t+et[6]*Rt+et[10]*Ot+et[14],tt[15]=et[3]*_t+et[7]*Rt+et[11]*Ot+et[15]):(nt=et[1],ot=et[2],at=et[3],st=et[4],ct=et[5],ht=et[6],dt=et[7],mt=et[8],yt=et[9],gt=et[10],vt=et[11],tt[0]=it=et[0],tt[1]=nt,tt[2]=ot,tt[3]=at,tt[4]=st,tt[5]=ct,tt[6]=ht,tt[7]=dt,tt[8]=mt,tt[9]=yt,tt[10]=gt,tt[11]=vt,tt[12]=it*_t+st*Rt+mt*Ot+et[12],tt[13]=nt*_t+ct*Rt+yt*Ot+et[13],tt[14]=ot*_t+ht*Rt+gt*Ot+et[14],tt[15]=at*_t+dt*Rt+vt*Ot+et[15]),tt},tt.triggerPluginCompletionEvent=ei,tt.uniqueId=y,tt.validateCustomStyleLayer=function(tt){var et=[],rt=tt.id;return void 0===rt&&et.push({message:"layers."+rt+': missing required property "id"'}),void 0===tt.render&&et.push({message:"layers."+rt+': missing required method "render"'}),tt.renderingMode&&"2d"!==tt.renderingMode&&"3d"!==tt.renderingMode&&et.push({message:"layers."+rt+': property "renderingMode" must be either "2d" or "3d"'}),et},tt.validateLight=ls,tt.validateStyle=Oa,tt.values=function(tt){var et=[];for(var rt in tt)et.push(tt[rt]);return et},tt.vectorTile=Dc,tt.version="1.13.3",tt.warnOnce=A,tt.webpSupported=Zt,tt.window=it,tt.wrap=c}));define(["./shared"],(function(tt){function t(tt){var et=typeof tt;if("number"===et||"boolean"===et||"string"===et||null==tt)return JSON.stringify(tt);if(Array.isArray(tt)){for(var rt="[",it=0,nt=tt;it<nt.length;it+=1)rt+=t(nt[it])+",";return rt+"]"}for(var ot=Object.keys(tt).sort(),at="{",st=0;st<ot.length;st++)at+=JSON.stringify(ot[st])+":"+t(tt[ot[st]])+",";return at+"}"}function r(et){for(var rt="",it=0,nt=tt.refProperties;it<nt.length;it+=1)rt+="/"+t(et[nt[it]]);return rt}var i=function(tt){this.keyCache={},tt&&this.replace(tt)};i.prototype.replace=function(tt){this._layerConfigs={},this._layers={},this.update(tt,[])},i.prototype.update=function(et,rt){for(var it=this,nt=0,ot=et;nt<ot.length;nt+=1){var at=ot[nt];this._layerConfigs[at.id]=at;var st=this._layers[at.id]=tt.createStyleLayer(at);st._featureFilter=tt.featureFilter(st.filter),this.keyCache[at.id]&&delete this.keyCache[at.id]}for(var ct=0,ht=rt;ct<ht.length;ct+=1){var dt=ht[ct];delete this.keyCache[dt],delete this._layerConfigs[dt],delete this._layers[dt]}this.familiesBySource={};for(var mt=0,yt=function(tt,et){for(var rt={},it=0;it<tt.length;it++){var nt=et&&et[tt[it].id]||r(tt[it]);et&&(et[tt[it].id]=nt);var ot=rt[nt];ot||(ot=rt[nt]=[]),ot.push(tt[it])}var at=[];for(var st in rt)at.push(rt[st]);return at}(tt.values(this._layerConfigs),this.keyCache);mt<yt.length;mt+=1){var gt=yt[mt].map((function(tt){return it._layers[tt.id]})),vt=gt[0];if("none"!==vt.visibility){var _t=vt.source||"",Rt=this.familiesBySource[_t];Rt||(Rt=this.familiesBySource[_t]={});var Ot=vt.sourceLayer||"_geojsonTileLayer",Zt=Rt[Ot];Zt||(Zt=Rt[Ot]=[]),Zt.push(gt)}}};var o=function(et){var rt={},it=[];for(var nt in et){var ot=et[nt],at=rt[nt]={};for(var st in ot){var ct=ot[+st];if(ct&&0!==ct.bitmap.width&&0!==ct.bitmap.height){var ht={x:0,y:0,w:ct.bitmap.width+2,h:ct.bitmap.height+2};it.push(ht),at[st]={rect:ht,metrics:ct.metrics}}}}var dt=tt.potpack(it),mt=new tt.AlphaImage({width:dt.w||1,height:dt.h||1});for(var yt in et){var gt=et[yt];for(var vt in gt){var _t=gt[+vt];if(_t&&0!==_t.bitmap.width&&0!==_t.bitmap.height){var Rt=rt[yt][vt].rect;tt.AlphaImage.copy(_t.bitmap,mt,{x:0,y:0},{x:Rt.x+1,y:Rt.y+1},_t.bitmap)}}}this.image=mt,this.positions=rt};tt.register("GlyphAtlas",o);var n=function(et){this.tileID=new tt.OverscaledTileID(et.tileID.overscaledZ,et.tileID.wrap,et.tileID.canonical.z,et.tileID.canonical.x,et.tileID.canonical.y),this.uid=et.uid,this.zoom=et.zoom,this.pixelRatio=et.pixelRatio,this.tileSize=et.tileSize,this.source=et.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=et.showCollisionBoxes,this.collectResourceTiming=!!et.collectResourceTiming,this.returnDependencies=!!et.returnDependencies,this.promoteId=et.promoteId};function a(et,rt,it){for(var nt=new tt.EvaluationParameters(rt),ot=0,at=et;ot<at.length;ot+=1)at[ot].recalculate(nt,it)}function s(et,rt){var it=tt.getArrayBuffer(et.request,(function(et,it,nt,ot){et?rt(et):it&&rt(null,{vectorTile:new tt.vectorTile.VectorTile(new tt.pbf(it)),rawData:it,cacheControl:nt,expires:ot})}));return function(){it.cancel(),rt()}}n.prototype.parse=function(et,rt,it,nt,ot){var at=this;this.status="parsing",this.data=et,this.collisionBoxArray=new tt.CollisionBoxArray;var st=new tt.DictionaryCoder(Object.keys(et.layers).sort()),ct=new tt.FeatureIndex(this.tileID,this.promoteId);ct.bucketLayerIDs=[];var ht,dt,mt,yt,gt={},vt={featureIndex:ct,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:it},_t=rt.familiesBySource[this.source];for(var Rt in _t){var Ot=et.layers[Rt];if(Ot){1===Ot.version&&tt.warnOnce('Vector tile source "'+this.source+'" layer "'+Rt+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Zt=st.encode(Rt),Ze=[],Ge=0;Ge<Ot.length;Ge++){var Xe=Ot.feature(Ge),Je=ct.getId(Xe,Rt);Ze.push({feature:Xe,id:Je,index:Ge,sourceLayerIndex:Zt})}for(var rr=0,wr=_t[Rt];rr<wr.length;rr+=1){var Ir=wr[rr],ti=Ir[0];ti.minzoom&&this.zoom<Math.floor(ti.minzoom)||ti.maxzoom&&this.zoom>=ti.maxzoom||"none"!==ti.visibility&&(a(Ir,this.zoom,it),(gt[ti.id]=ti.createBucket({index:ct.bucketLayerIDs.length,layers:Ir,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Zt,sourceID:this.source})).populate(Ze,vt,this.tileID.canonical),ct.bucketLayerIDs.push(Ir.map((function(tt){return tt.id}))))}}}var ni=tt.mapObject(vt.glyphDependencies,(function(tt){return Object.keys(tt).map(Number)}));Object.keys(ni).length?nt.send("getGlyphs",{uid:this.uid,stacks:ni},(function(tt,et){ht||(ht=tt,dt=et,z.call(at))})):dt={};var oi=Object.keys(vt.iconDependencies);oi.length?nt.send("getImages",{icons:oi,source:this.source,tileID:this.tileID,type:"icons"},(function(tt,et){ht||(ht=tt,mt=et,z.call(at))})):mt={};var _i=Object.keys(vt.patternDependencies);function z(){if(ht)return ot(ht);if(dt&&mt&&yt){var et=new o(dt),rt=new tt.ImageAtlas(mt,yt);for(var nt in gt){var at=gt[nt];at instanceof tt.SymbolBucket?(a(at.layers,this.zoom,it),tt.performSymbolLayout(at,dt,et.positions,mt,rt.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):at.hasPattern&&(at instanceof tt.LineBucket||at instanceof tt.FillBucket||at instanceof tt.FillExtrusionBucket)&&(a(at.layers,this.zoom,it),at.addFeatures(vt,this.tileID.canonical,rt.patternPositions))}this.status="done",ot(null,{buckets:tt.values(gt).filter((function(tt){return!tt.isEmpty()})),featureIndex:ct,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:et.image,imageAtlas:rt,glyphMap:this.returnDependencies?dt:null,iconMap:this.returnDependencies?mt:null,glyphPositions:this.returnDependencies?et.positions:null})}}_i.length?nt.send("getImages",{icons:_i,source:this.source,tileID:this.tileID,type:"patterns"},(function(tt,et){ht||(ht=tt,yt=et,z.call(at))})):yt={},z.call(this)};var l=function(tt,et,rt,it){this.actor=tt,this.layerIndex=et,this.availableImages=rt,this.loadVectorData=it||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(et,rt){var it=this,nt=et.uid;this.loading||(this.loading={});var ot=!!(et&&et.request&&et.request.collectResourceTiming)&&new tt.RequestPerformance(et.request),at=this.loading[nt]=new n(et);at.abort=this.loadVectorData(et,(function(et,st){if(delete it.loading[nt],et||!st)return at.status="done",it.loaded[nt]=at,rt(et);var ct=st.rawData,ht={};st.expires&&(ht.expires=st.expires),st.cacheControl&&(ht.cacheControl=st.cacheControl);var dt={};if(ot){var mt=ot.finish();mt&&(dt.resourceTiming=JSON.parse(JSON.stringify(mt)))}at.vectorTile=st.vectorTile,at.parse(st.vectorTile,it.layerIndex,it.availableImages,it.actor,(function(et,it){if(et||!it)return rt(et);rt(null,tt.extend({rawTileData:ct.slice(0)},it,ht,dt))})),it.loaded=it.loaded||{},it.loaded[nt]=at}))},l.prototype.reloadTile=function(tt,et){var rt=this,it=this.loaded,nt=tt.uid,ot=this;if(it&&it[nt]){var at=it[nt];at.showCollisionBoxes=tt.showCollisionBoxes;var s=function(tt,it){var nt=at.reloadCallback;nt&&(delete at.reloadCallback,at.parse(at.vectorTile,ot.layerIndex,rt.availableImages,ot.actor,nt)),et(tt,it)};"parsing"===at.status?at.reloadCallback=s:"done"===at.status&&(at.vectorTile?at.parse(at.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(tt,et){var rt=this.loading,it=tt.uid;rt&&rt[it]&&rt[it].abort&&(rt[it].abort(),delete rt[it]),et()},l.prototype.removeTile=function(tt,et){var rt=this.loaded,it=tt.uid;rt&&rt[it]&&delete rt[it],et()};var et=tt.window.ImageBitmap,h=function(){this.loaded={}};function c(tt,et){if(0!==tt.length){p(tt[0],et);for(var rt=1;rt<tt.length;rt++)p(tt[rt],!et)}}function p(tt,et){for(var rt=0,it=0,nt=0,ot=tt.length,at=ot-1;nt<ot;at=nt++){var st=(tt[nt][0]-tt[at][0])*(tt[at][1]+tt[nt][1]),ct=rt+st;it+=Math.abs(rt)>=Math.abs(st)?rt-ct+st:st-ct+rt,rt=ct}rt+it>=0!=!!et&&tt.reverse()}h.prototype.loadTile=function(rt,it){var nt=rt.uid,ot=rt.encoding,at=rt.rawImageData,st=et&&at instanceof et?this.getImageData(at):at,ct=new tt.DEMData(nt,st,ot);this.loaded=this.loaded||{},this.loaded[nt]=ct,it(null,ct)},h.prototype.getImageData=function(et){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(et.width,et.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=et.width,this.offscreenCanvas.height=et.height,this.offscreenCanvasContext.drawImage(et,0,0,et.width,et.height);var rt=this.offscreenCanvasContext.getImageData(-1,-1,et.width+2,et.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new tt.RGBAImage({width:rt.width,height:rt.height},rt.data)},h.prototype.removeTile=function(tt){var et=this.loaded,rt=tt.uid;et&&et[rt]&&delete et[rt]};var rt=tt.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(et){this._feature=et,this.extent=tt.EXTENT,this.type=et.type,this.properties=et.tags,"id"in et&&!isNaN(et.id)&&(this.id=parseInt(et.id,10))};d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var et=[],rt=0,it=this._feature.geometry;rt<it.length;rt+=1){var nt=it[rt];et.push([new tt.Point$1(nt[0],nt[1])])}return et}for(var ot=[],at=0,st=this._feature.geometry;at<st.length;at+=1){for(var ct=[],ht=0,dt=st[at];ht<dt.length;ht+=1){var mt=dt[ht];ct.push(new tt.Point$1(mt[0],mt[1]))}ot.push(ct)}return ot},d.prototype.toGeoJSON=function(tt,et,it){return rt.call(this,tt,et,it)};var g=function(et){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=tt.EXTENT,this.length=et.length,this._features=et};g.prototype.feature=function(tt){return new d(this._features[tt])};var it=tt.vectorTile.VectorTileFeature,nt=y;function y(tt,et){this.options=et||{},this.features=tt,this.length=tt.length}function x(tt,et){this.id="number"==typeof tt.id?tt.id:void 0,this.type=tt.type,this.rawGeometry=1===tt.type?[tt.geometry]:tt.geometry,this.properties=tt.tags,this.extent=et||4096}y.prototype.feature=function(tt){return new x(this.features[tt],this.options.extent)},x.prototype.loadGeometry=function(){var et=this.rawGeometry;this.geometry=[];for(var rt=0;rt<et.length;rt++){for(var it=et[rt],nt=[],ot=0;ot<it.length;ot++)nt.push(new tt.Point$1(it[ot][0],it[ot][1]));this.geometry.push(nt)}return this.geometry},x.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var tt=this.geometry,et=1/0,rt=-1/0,it=1/0,nt=-1/0,ot=0;ot<tt.length;ot++)for(var at=tt[ot],st=0;st<at.length;st++){var ct=at[st];et=Math.min(et,ct.x),rt=Math.max(rt,ct.x),it=Math.min(it,ct.y),nt=Math.max(nt,ct.y)}return[et,it,rt,nt]},x.prototype.toGeoJSON=it.prototype.toGeoJSON;var ot=I,at=nt;function I(et){var rt=new tt.pbf;return function(tt,et){for(var rt in tt.layers)et.writeMessage(3,M,tt.layers[rt])}(et,rt),rt.finish()}function M(tt,et){var rt;et.writeVarintField(15,tt.version||1),et.writeStringField(1,tt.name||""),et.writeVarintField(5,tt.extent||4096);var it={keys:[],values:[],keycache:{},valuecache:{}};for(rt=0;rt<tt.length;rt++)it.feature=tt.feature(rt),et.writeMessage(2,b,it);var nt=it.keys;for(rt=0;rt<nt.length;rt++)et.writeStringField(3,nt[rt]);var ot=it.values;for(rt=0;rt<ot.length;rt++)et.writeMessage(4,C,ot[rt])}function b(tt,et){var rt=tt.feature;void 0!==rt.id&&et.writeVarintField(1,rt.id),et.writeMessage(2,_,tt),et.writeVarintField(3,rt.type),et.writeMessage(4,T,rt)}function _(tt,et){var rt=tt.feature,it=tt.keys,nt=tt.values,ot=tt.keycache,at=tt.valuecache;for(var st in rt.properties){var ct=ot[st];void 0===ct&&(it.push(st),ot[st]=ct=it.length-1),et.writeVarint(ct);var ht=rt.properties[st],dt=typeof ht;"string"!==dt&&"boolean"!==dt&&"number"!==dt&&(ht=JSON.stringify(ht));var mt=dt+":"+ht,yt=at[mt];void 0===yt&&(nt.push(ht),at[mt]=yt=nt.length-1),et.writeVarint(yt)}}function k(tt,et){return(et<<3)+(7&tt)}function P(tt){return tt<<1^tt>>31}function T(tt,et){for(var rt=tt.loadGeometry(),it=tt.type,nt=0,ot=0,at=rt.length,st=0;st<at;st++){var ct=rt[st],ht=1;1===it&&(ht=ct.length),et.writeVarint(k(1,ht));for(var dt=3===it?ct.length-1:ct.length,mt=0;mt<dt;mt++){1===mt&&1!==it&&et.writeVarint(k(2,dt-1));var yt=ct[mt].x-nt,gt=ct[mt].y-ot;et.writeVarint(P(yt)),et.writeVarint(P(gt)),nt+=yt,ot+=gt}3===it&&et.writeVarint(k(7,1))}}function C(tt,et){var rt=typeof tt;"string"===rt?et.writeStringField(1,tt):"boolean"===rt?et.writeBooleanField(7,tt):"number"===rt&&(tt%1!=0?et.writeDoubleField(3,tt):tt<0?et.writeSVarintField(6,tt):et.writeVarintField(5,tt))}function D(tt,et,rt,it){L(tt,rt,it),L(et,2*rt,2*it),L(et,2*rt+1,2*it+1)}function L(tt,et,rt){var it=tt[et];tt[et]=tt[rt],tt[rt]=it}function z(tt,et,rt,it){var nt=tt-rt,ot=et-it;return nt*nt+ot*ot}ot.fromVectorTileJs=I,ot.fromGeojsonVt=function(tt,et){et=et||{};var rt={};for(var it in tt)rt[it]=new nt(tt[it].features,et),rt[it].name=it,rt[it].version=et.version,rt[it].extent=et.extent;return I({layers:rt})},ot.GeoJSONWrapper=at;var O=function(tt){return tt[0]},E=function(tt){return tt[1]},F=function(tt,et,rt,it,nt){void 0===et&&(et=O),void 0===rt&&(rt=E),void 0===it&&(it=64),void 0===nt&&(nt=Float64Array),this.nodeSize=it,this.points=tt;for(var ot=tt.length<65536?Uint16Array:Uint32Array,at=this.ids=new ot(tt.length),st=this.coords=new nt(2*tt.length),ct=0;ct<tt.length;ct++)at[ct]=ct,st[2*ct]=et(tt[ct]),st[2*ct+1]=rt(tt[ct]);!function e(tt,et,rt,it,nt,ot){if(!(nt-it<=rt)){var at=it+nt>>1;!function e(tt,et,rt,it,nt,ot){for(;nt>it;){if(nt-it>600){var at=nt-it+1,st=rt-it+1,ct=Math.log(at),ht=.5*Math.exp(2*ct/3),dt=.5*Math.sqrt(ct*ht*(at-ht)/at)*(st-at/2<0?-1:1);e(tt,et,rt,Math.max(it,Math.floor(rt-st*ht/at+dt)),Math.min(nt,Math.floor(rt+(at-st)*ht/at+dt)),ot)}var mt=et[2*rt+ot],yt=it,gt=nt;for(D(tt,et,it,rt),et[2*nt+ot]>mt&&D(tt,et,it,nt);yt<gt;){for(D(tt,et,yt,gt),yt++,gt--;et[2*yt+ot]<mt;)yt++;for(;et[2*gt+ot]>mt;)gt--}et[2*it+ot]===mt?D(tt,et,it,gt):D(tt,et,++gt,nt),gt<=rt&&(it=gt+1),rt<=gt&&(nt=gt-1)}}(tt,et,at,it,nt,ot%2),e(tt,et,rt,it,at-1,ot+1),e(tt,et,rt,at+1,nt,ot+1)}}(at,st,it,0,at.length-1,0)};F.prototype.range=function(tt,et,rt,it){return function(tt,et,rt,it,nt,ot,at){for(var st,ct,ht=[0,tt.length-1,0],dt=[];ht.length;){var mt=ht.pop(),yt=ht.pop(),gt=ht.pop();if(yt-gt<=at)for(var vt=gt;vt<=yt;vt++)ct=et[2*vt+1],(st=et[2*vt])>=rt&&st<=nt&&ct>=it&&ct<=ot&&dt.push(tt[vt]);else{var _t=Math.floor((gt+yt)/2);ct=et[2*_t+1],(st=et[2*_t])>=rt&&st<=nt&&ct>=it&&ct<=ot&&dt.push(tt[_t]);var Rt=(mt+1)%2;(0===mt?rt<=st:it<=ct)&&(ht.push(gt),ht.push(_t-1),ht.push(Rt)),(0===mt?nt>=st:ot>=ct)&&(ht.push(_t+1),ht.push(yt),ht.push(Rt))}}return dt}(this.ids,this.coords,tt,et,rt,it,this.nodeSize)},F.prototype.within=function(tt,et,rt){return function(tt,et,rt,it,nt,ot){for(var at=[0,tt.length-1,0],st=[],ct=nt*nt;at.length;){var ht=at.pop(),dt=at.pop(),mt=at.pop();if(dt-mt<=ot)for(var yt=mt;yt<=dt;yt++)z(et[2*yt],et[2*yt+1],rt,it)<=ct&&st.push(tt[yt]);else{var gt=Math.floor((mt+dt)/2),vt=et[2*gt],_t=et[2*gt+1];z(vt,_t,rt,it)<=ct&&st.push(tt[gt]);var Rt=(ht+1)%2;(0===ht?rt-nt<=vt:it-nt<=_t)&&(at.push(mt),at.push(gt-1),at.push(Rt)),(0===ht?rt+nt>=vt:it+nt>=_t)&&(at.push(gt+1),at.push(dt),at.push(Rt))}}return st}(this.ids,this.coords,tt,et,rt,this.nodeSize)};var st={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(tt){return tt}},J=function(tt){this.options=V(Object.create(st),tt),this.trees=new Array(this.options.maxZoom+1)};function Z(tt,et,rt,it,nt){return{x:tt,y:et,zoom:1/0,id:rt,parentId:-1,numPoints:it,properties:nt}}function A(tt,et){var rt=tt.geometry.coordinates,it=rt[1];return{x:Y(rt[0]),y:j(it),zoom:1/0,index:et,parentId:-1}}function B(tt){return{type:"Feature",id:tt.id,properties:G(tt),geometry:{type:"Point",coordinates:[(it=tt.x,360*(it-.5)),(et=tt.y,rt=(180-360*et)*Math.PI/180,360*Math.atan(Math.exp(rt))/Math.PI-90)]}};var et,rt,it}function G(tt){var et=tt.numPoints,rt=et>=1e4?Math.round(et/1e3)+"k":et>=1e3?Math.round(et/100)/10+"k":et;return V(V({},tt.properties),{cluster:!0,cluster_id:tt.id,point_count:et,point_count_abbreviated:rt})}function Y(tt){return tt/360+.5}function j(tt){var et=Math.sin(tt*Math.PI/180),rt=.5-.25*Math.log((1+et)/(1-et))/Math.PI;return rt<0?0:rt>1?1:rt}function V(tt,et){for(var rt in et)tt[rt]=et[rt];return tt}function X(tt){return tt.x}function W(tt){return tt.y}function R(tt,et,rt,it,nt,ot){var at=nt-rt,st=ot-it;if(0!==at||0!==st){var ct=((tt-rt)*at+(et-it)*st)/(at*at+st*st);ct>1?(rt=nt,it=ot):ct>0&&(rt+=at*ct,it+=st*ct)}return(at=tt-rt)*at+(st=et-it)*st}function q(tt,et,rt,it){var nt={id:void 0===tt?null:tt,type:et,geometry:rt,tags:it,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(tt){var et=tt.geometry,rt=tt.type;if("Point"===rt||"MultiPoint"===rt||"LineString"===rt)U(tt,et);else if("Polygon"===rt||"MultiLineString"===rt)for(var it=0;it<et.length;it++)U(tt,et[it]);else if("MultiPolygon"===rt)for(it=0;it<et.length;it++)for(var nt=0;nt<et[it].length;nt++)U(tt,et[it][nt])}(nt),nt}function U(tt,et){for(var rt=0;rt<et.length;rt+=3)tt.minX=Math.min(tt.minX,et[rt]),tt.minY=Math.min(tt.minY,et[rt+1]),tt.maxX=Math.max(tt.maxX,et[rt]),tt.maxY=Math.max(tt.maxY,et[rt+1])}function $(tt,et,rt,it){if(et.geometry){var nt=et.geometry.coordinates,ot=et.geometry.type,at=Math.pow(rt.tolerance/((1<<rt.maxZoom)*rt.extent),2),st=[],ct=et.id;if(rt.promoteId?ct=et.properties[rt.promoteId]:rt.generateId&&(ct=it||0),"Point"===ot)H(nt,st);else if("MultiPoint"===ot)for(var ht=0;ht<nt.length;ht++)H(nt[ht],st);else if("LineString"===ot)K(nt,st,at,!1);else if("MultiLineString"===ot){if(rt.lineMetrics){for(ht=0;ht<nt.length;ht++)K(nt[ht],st=[],at,!1),tt.push(q(ct,"LineString",st,et.properties));return}Q(nt,st,at,!1)}else if("Polygon"===ot)Q(nt,st,at,!0);else{if("MultiPolygon"!==ot){if("GeometryCollection"===ot){for(ht=0;ht<et.geometry.geometries.length;ht++)$(tt,{id:ct,geometry:et.geometry.geometries[ht],properties:et.properties},rt,it);return}throw new Error("Input data is not a valid GeoJSON object.")}for(ht=0;ht<nt.length;ht++){var dt=[];Q(nt[ht],dt,at,!0),st.push(dt)}}tt.push(q(ct,ot,st,et.properties))}}function H(tt,et){et.push(ee(tt[0])),et.push(te(tt[1])),et.push(0)}function K(tt,et,rt,it){for(var nt,ot,at=0,st=0;st<tt.length;st++){var ct=ee(tt[st][0]),ht=te(tt[st][1]);et.push(ct),et.push(ht),et.push(0),st>0&&(at+=it?(nt*ht-ct*ot)/2:Math.sqrt(Math.pow(ct-nt,2)+Math.pow(ht-ot,2))),nt=ct,ot=ht}var dt=et.length-3;et[2]=1,function e(tt,et,rt,it){for(var nt,ot=it,at=rt-et>>1,st=rt-et,ct=tt[et],ht=tt[et+1],dt=tt[rt],mt=tt[rt+1],yt=et+3;yt<rt;yt+=3){var gt=R(tt[yt],tt[yt+1],ct,ht,dt,mt);if(gt>ot)nt=yt,ot=gt;else if(gt===ot){var vt=Math.abs(yt-at);vt<st&&(nt=yt,st=vt)}}ot>it&&(nt-et>3&&e(tt,et,nt,it),tt[nt+2]=ot,rt-nt>3&&e(tt,nt,rt,it))}(et,0,dt,rt),et[dt+2]=1,et.size=Math.abs(at),et.start=0,et.end=et.size}function Q(tt,et,rt,it){for(var nt=0;nt<tt.length;nt++){var ot=[];K(tt[nt],ot,rt,it),et.push(ot)}}function ee(tt){return tt/360+.5}function te(tt){var et=Math.sin(tt*Math.PI/180),rt=.5-.25*Math.log((1+et)/(1-et))/Math.PI;return rt<0?0:rt>1?1:rt}function re(tt,et,rt,it,nt,ot,at,st){if(it/=et,ot>=(rt/=et)&&at<it)return tt;if(at<rt||ot>=it)return null;for(var ct=[],ht=0;ht<tt.length;ht++){var dt=tt[ht],mt=dt.geometry,yt=dt.type,gt=0===nt?dt.minX:dt.minY,vt=0===nt?dt.maxX:dt.maxY;if(gt>=rt&&vt<it)ct.push(dt);else if(!(vt<rt||gt>=it)){var _t=[];if("Point"===yt||"MultiPoint"===yt)ie(mt,_t,rt,it,nt);else if("LineString"===yt)oe(mt,_t,rt,it,nt,!1,st.lineMetrics);else if("MultiLineString"===yt)ae(mt,_t,rt,it,nt,!1);else if("Polygon"===yt)ae(mt,_t,rt,it,nt,!0);else if("MultiPolygon"===yt)for(var Rt=0;Rt<mt.length;Rt++){var Ot=[];ae(mt[Rt],Ot,rt,it,nt,!0),Ot.length&&_t.push(Ot)}if(_t.length){if(st.lineMetrics&&"LineString"===yt){for(Rt=0;Rt<_t.length;Rt++)ct.push(q(dt.id,yt,_t[Rt],dt.tags));continue}"LineString"!==yt&&"MultiLineString"!==yt||(1===_t.length?(yt="LineString",_t=_t[0]):yt="MultiLineString"),"Point"!==yt&&"MultiPoint"!==yt||(yt=3===_t.length?"Point":"MultiPoint"),ct.push(q(dt.id,yt,_t,dt.tags))}}}return ct.length?ct:null}function ie(tt,et,rt,it,nt){for(var ot=0;ot<tt.length;ot+=3){var at=tt[ot+nt];at>=rt&&at<=it&&(et.push(tt[ot]),et.push(tt[ot+1]),et.push(tt[ot+2]))}}function oe(tt,et,rt,it,nt,ot,at){for(var st,ct,ht=ne(tt),dt=0===nt?le:ue,mt=tt.start,yt=0;yt<tt.length-3;yt+=3){var gt=tt[yt],vt=tt[yt+1],_t=tt[yt+2],Rt=tt[yt+3],Ot=tt[yt+4],Zt=0===nt?gt:vt,Ze=0===nt?Rt:Ot,Ge=!1;at&&(st=Math.sqrt(Math.pow(gt-Rt,2)+Math.pow(vt-Ot,2))),Zt<rt?Ze>rt&&(ct=dt(ht,gt,vt,Rt,Ot,rt),at&&(ht.start=mt+st*ct)):Zt>it?Ze<it&&(ct=dt(ht,gt,vt,Rt,Ot,it),at&&(ht.start=mt+st*ct)):se(ht,gt,vt,_t),Ze<rt&&Zt>=rt&&(ct=dt(ht,gt,vt,Rt,Ot,rt),Ge=!0),Ze>it&&Zt<=it&&(ct=dt(ht,gt,vt,Rt,Ot,it),Ge=!0),!ot&&Ge&&(at&&(ht.end=mt+st*ct),et.push(ht),ht=ne(tt)),at&&(mt+=st)}var Xe=tt.length-3;gt=tt[Xe],vt=tt[Xe+1],_t=tt[Xe+2],(Zt=0===nt?gt:vt)>=rt&&Zt<=it&&se(ht,gt,vt,_t),Xe=ht.length-3,ot&&Xe>=3&&(ht[Xe]!==ht[0]||ht[Xe+1]!==ht[1])&&se(ht,ht[0],ht[1],ht[2]),ht.length&&et.push(ht)}function ne(tt){var et=[];return et.size=tt.size,et.start=tt.start,et.end=tt.end,et}function ae(tt,et,rt,it,nt,ot){for(var at=0;at<tt.length;at++)oe(tt[at],et,rt,it,nt,ot,!1)}function se(tt,et,rt,it){tt.push(et),tt.push(rt),tt.push(it)}function le(tt,et,rt,it,nt,ot){var at=(ot-et)/(it-et);return tt.push(ot),tt.push(rt+(nt-rt)*at),tt.push(1),at}function ue(tt,et,rt,it,nt,ot){var at=(ot-rt)/(nt-rt);return tt.push(et+(it-et)*at),tt.push(ot),tt.push(1),at}function he(tt,et){for(var rt=[],it=0;
vendor: 3,444 bytes, line 3
3it<tt.length;it++){var nt,ot=tt[it],at=ot.type;if("Point"===at||"MultiPoint"===at||"LineString"===at)nt=ce(ot.geometry,et);else if("MultiLineString"===at||"Polygon"===at){nt=[];for(var st=0;st<ot.geometry.length;st++)nt.push(ce(ot.geometry[st],et))}else if("MultiPolygon"===at)for(nt=[],st=0;st<ot.geometry.length;st++){for(var ct=[],ht=0;ht<ot.geometry[st].length;ht++)ct.push(ce(ot.geometry[st][ht],et));nt.push(ct)}rt.push(q(ot.id,at,nt,ot.tags))}return rt}function ce(tt,et){var rt=[];rt.size=tt.size,void 0!==tt.start&&(rt.start=tt.start,rt.end=tt.end);for(var it=0;it<tt.length;it+=3)rt.push(tt[it]+et,tt[it+1],tt[it+2]);return rt}function pe(tt,et){if(tt.transformed)return tt;var rt,it,nt,ot=1<<tt.z,at=tt.x,st=tt.y;for(rt=0;rt<tt.features.length;rt++){var ct=tt.features[rt],ht=ct.geometry,dt=ct.type;if(ct.geometry=[],1===dt)for(it=0;it<ht.length;it+=2)ct.geometry.push(fe(ht[it],ht[it+1],et,ot,at,st));else for(it=0;it<ht.length;it++){var mt=[];for(nt=0;nt<ht[it].length;nt+=2)mt.push(fe(ht[it][nt],ht[it][nt+1],et,ot,at,st));ct.geometry.push(mt)}}return tt.transformed=!0,tt}function fe(tt,et,rt,it,nt,ot){return[Math.round(rt*(tt*it-nt)),Math.round(rt*(et*it-ot))]}function de(tt,et,rt,it,nt){for(var ot=et===nt.maxZoom?0:nt.tolerance/((1<<et)*nt.extent),at={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:rt,y:it,z:et,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},st=0;st<tt.length;st++){at.numFeatures++,ge(at,tt[st],ot,nt);var ct=tt[st].minX,ht=tt[st].minY,dt=tt[st].maxX,mt=tt[st].maxY;ct<at.minX&&(at.minX=ct),ht<at.minY&&(at.minY=ht),dt>at.maxX&&(at.maxX=dt),mt>at.maxY&&(at.maxY=mt)}return at}function ge(tt,et,rt,it){var nt=et.geometry,ot=et.type,at=[];if("Point"===ot||"MultiPoint"===ot)for(var st=0;st<nt.length;st+=3)at.push(nt[st]),at.push(nt[st+1]),tt.numPoints++,tt.numSimplified++;else if("LineString"===ot)ve(at,nt,tt,rt,!1,!1);else if("MultiLineString"===ot||"Polygon"===ot)for(st=0;st<nt.length;st++)ve(at,nt[st],tt,rt,"Polygon"===ot,0===st);else if("MultiPolygon"===ot)for(var ct=0;ct<nt.length;ct++){var ht=nt[ct];for(st=0;st<ht.length;st++)ve(at,ht[st],tt,rt,!0,0===st)}if(at.length){var dt=et.tags||null;if("LineString"===ot&&it.lineMetrics){for(var mt in dt={},et.tags)dt[mt]=et.tags[mt];dt.mapbox_clip_start=nt.start/nt.size,dt.mapbox_clip_end=nt.end/nt.size}var yt={geometry:at,type:"Polygon"===ot||"MultiPolygon"===ot?3:"LineString"===ot||"MultiLineString"===ot?2:1,tags:dt};null!==et.id&&(yt.id=et.id),tt.features.push(yt)}}function ve(tt,et,rt,it,nt,ot){var at=it*it;if(it>0&&et.size<(nt?at:it))rt.numPoints+=et.length/3;else{for(var st=[],ct=0;ct<et.length;ct+=3)(0===it||et[ct+2]>at)&&(rt.numSimplified++,st.push(et[ct]),st.push(et[ct+1])),rt.numPoints++;nt&&function(tt,et){for(var rt=0,it=0,nt=tt.length,ot=nt-2;it<nt;ot=it,it+=2)rt+=(tt[it]-tt[ot])*(tt[it+1]+tt[ot+1]);if(rt>0===et)for(it=0,nt=tt.length;it<nt/2;it+=2){var at=tt[it],st=tt[it+1];tt[it]=tt[nt-2-it],tt[it+1]=tt[nt-1-it],tt[nt-2-it]=at,tt[nt-1-it]=st}}(st,ot),tt.push(st)}}function me(tt,et){var rt=(et=this.options=function(tt,et){for(var rt in et)tt[rt]=et[rt];return tt}(Object.create(this.options),et)).debug;if(rt&&console.time("preprocess data"),et.maxZoom<0||et.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(et.promoteId&&et.generateId)throw new Error("promoteId and generateId cannot be used together.");var it=function(tt,et){var rt=[];if("FeatureCollection"===tt.type)for(var it=0;
vendor: 17,492 bytes, line 3
3it<tt.features.length;it++)$(rt,tt.features[it],et,it);else $(rt,"Feature"===tt.type?tt:{geometry:tt},et);return rt}(tt,et);this.tiles={},this.tileCoords=[],rt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",et.indexMaxZoom,et.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(it=function(tt,et){var rt=et.buffer/et.extent,it=tt,nt=re(tt,1,-1-rt,rt,0,-1,2,et),ot=re(tt,1,1-rt,2+rt,0,-1,2,et);return(nt||ot)&&(it=re(tt,1,-rt,1+rt,0,-1,2,et)||[],nt&&(it=he(nt,1).concat(it)),ot&&(it=it.concat(he(ot,-1)))),it}(it,et)).length&&this.splitTile(it,0,0,0),rt&&(it.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function ye(tt,et,rt){return 32*((1<<tt)*rt+et)+tt}function xe(tt,et){var rt=tt.tileID.canonical;if(!this._geoJSONIndex)return et(null,null);var it=this._geoJSONIndex.getTile(rt.z,rt.x,rt.y);if(!it)return et(null,null);var nt=new g(it.features),at=ot(nt);0===at.byteOffset&&at.byteLength===at.buffer.byteLength||(at=new Uint8Array(at)),et(null,{vectorTile:nt,rawData:at.buffer})}J.prototype.load=function(tt){var et=this.options,rt=et.log,it=et.minZoom,nt=et.maxZoom,ot=et.nodeSize;rt&&console.time("total time");var at="prepare "+tt.length+" points";rt&&console.time(at),this.points=tt;for(var st=[],ct=0;ct<tt.length;ct++)tt[ct].geometry&&st.push(A(tt[ct],ct));this.trees[nt+1]=new F(st,X,W,ot,Float32Array),rt&&console.timeEnd(at);for(var ht=nt;ht>=it;ht--){var dt=+Date.now();st=this._cluster(st,ht),this.trees[ht]=new F(st,X,W,ot,Float32Array),rt&&console.log("z%d: %d clusters in %dms",ht,st.length,+Date.now()-dt)}return rt&&console.timeEnd("total time"),this},J.prototype.getClusters=function(tt,et){var rt=((tt[0]+180)%360+360)%360-180,it=Math.max(-90,Math.min(90,tt[1])),nt=180===tt[2]?180:((tt[2]+180)%360+360)%360-180,ot=Math.max(-90,Math.min(90,tt[3]));if(tt[2]-tt[0]>=360)rt=-180,nt=180;else if(rt>nt){var at=this.getClusters([rt,it,180,ot],et),st=this.getClusters([-180,it,nt,ot],et);return at.concat(st)}for(var ct=this.trees[this._limitZoom(et)],ht=[],dt=0,mt=ct.range(Y(rt),j(ot),Y(nt),j(it));dt<mt.length;dt+=1){var yt=ct.points[mt[dt]];ht.push(yt.numPoints?B(yt):this.points[yt.index])}return ht},J.prototype.getChildren=function(tt){var et=this._getOriginId(tt),rt=this._getOriginZoom(tt),it="No cluster with the specified id.",nt=this.trees[rt];if(!nt)throw new Error(it);var ot=nt.points[et];if(!ot)throw new Error(it);for(var at=this.options.radius/(this.options.extent*Math.pow(2,rt-1)),st=[],ct=0,ht=nt.within(ot.x,ot.y,at);ct<ht.length;ct+=1){var dt=nt.points[ht[ct]];dt.parentId===tt&&st.push(dt.numPoints?B(dt):this.points[dt.index])}if(0===st.length)throw new Error(it);return st},J.prototype.getLeaves=function(tt,et,rt){var it=[];return this._appendLeaves(it,tt,et=et||10,rt=rt||0,0),it},J.prototype.getTile=function(tt,et,rt){var it=this.trees[this._limitZoom(tt)],nt=Math.pow(2,tt),ot=this.options,at=ot.radius/ot.extent,st=(rt-at)/nt,ct=(rt+1+at)/nt,ht={features:[]};return this._addTileFeatures(it.range((et-at)/nt,st,(et+1+at)/nt,ct),it.points,et,rt,nt,ht),0===et&&this._addTileFeatures(it.range(1-at/nt,st,1,ct),it.points,nt,rt,nt,ht),et===nt-1&&this._addTileFeatures(it.range(0,st,at/nt,ct),it.points,-1,rt,nt,ht),ht.features.length?ht:null},J.prototype.getClusterExpansionZoom=function(tt){for(var et=this._getOriginZoom(tt)-1;et<=this.options.maxZoom;){var rt=this.getChildren(tt);if(et++,1!==rt.length)break;tt=rt[0].properties.cluster_id}return et},J.prototype._appendLeaves=function(tt,et,rt,it,nt){for(var ot=0,at=this.getChildren(et);ot<at.length;ot+=1){var st=at[ot],ct=st.properties;if(ct&&ct.cluster?nt+ct.point_count<=it?nt+=ct.point_count:nt=this._appendLeaves(tt,ct.cluster_id,rt,it,nt):nt<it?nt++:tt.push(st),tt.length===rt)break}return nt},J.prototype._addTileFeatures=function(tt,et,rt,it,nt,ot){for(var at=0,st=tt;at<st.length;at+=1){var ct=et[st[at]],ht=ct.numPoints,dt={type:1,geometry:[[Math.round(this.options.extent*(ct.x*nt-rt)),Math.round(this.options.extent*(ct.y*nt-it))]],tags:ht?G(ct):this.points[ct.index].properties},mt=void 0;ht?mt=ct.id:this.options.generateId?mt=ct.index:this.points[ct.index].id&&(mt=this.points[ct.index].id),void 0!==mt&&(dt.id=mt),ot.features.push(dt)}},J.prototype._limitZoom=function(tt){return Math.max(this.options.minZoom,Math.min(+tt,this.options.maxZoom+1))},J.prototype._cluster=function(tt,et){for(var rt=[],it=this.options,nt=it.reduce,ot=it.minPoints,at=it.radius/(it.extent*Math.pow(2,et)),st=0;st<tt.length;st++){var ct=tt[st];if(!(ct.zoom<=et)){ct.zoom=et;for(var ht=this.trees[et+1],dt=ht.within(ct.x,ct.y,at),mt=ct.numPoints||1,yt=mt,gt=0,vt=dt;gt<vt.length;gt+=1){var _t=ht.points[vt[gt]];_t.zoom>et&&(yt+=_t.numPoints||1)}if(yt>=ot){for(var Rt=ct.x*mt,Ot=ct.y*mt,Zt=nt&&mt>1?this._map(ct,!0):null,Ze=(st<<5)+(et+1)+this.points.length,Ge=0,Xe=dt;Ge<Xe.length;Ge+=1){var Je=ht.points[Xe[Ge]];if(!(Je.zoom<=et)){Je.zoom=et;var rr=Je.numPoints||1;Rt+=Je.x*rr,Ot+=Je.y*rr,Je.parentId=Ze,nt&&(Zt||(Zt=this._map(ct,!0)),nt(Zt,this._map(Je)))}}ct.parentId=Ze,rt.push(Z(Rt/yt,Ot/yt,Ze,yt,Zt))}else if(rt.push(ct),yt>1)for(var wr=0,Ir=dt;wr<Ir.length;wr+=1){var ti=ht.points[Ir[wr]];ti.zoom<=et||(ti.zoom=et,rt.push(ti))}}}return rt},J.prototype._getOriginId=function(tt){return tt-this.points.length>>5},J.prototype._getOriginZoom=function(tt){return(tt-this.points.length)%32},J.prototype._map=function(tt,et){if(tt.numPoints)return et?V({},tt.properties):tt.properties;var rt=this.points[tt.index].properties,it=this.options.map(rt);return et&&it===rt?V({},it):it},me.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},me.prototype.splitTile=function(tt,et,rt,it,nt,ot,at){for(var st=[tt,et,rt,it],ct=this.options,ht=ct.debug;st.length;){it=st.pop(),rt=st.pop(),et=st.pop(),tt=st.pop();var dt=1<<et,mt=ye(et,rt,it),yt=this.tiles[mt];if(!yt&&(ht>1&&console.time("creation"),yt=this.tiles[mt]=de(tt,et,rt,it,ct),this.tileCoords.push({z:et,x:rt,y:it}),ht)){ht>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",et,rt,it,yt.numFeatures,yt.numPoints,yt.numSimplified),console.timeEnd("creation"));var gt="z"+et;this.stats[gt]=(this.stats[gt]||0)+1,this.total++}if(yt.source=tt,nt){if(et===ct.maxZoom||et===nt)continue;var vt=1<<nt-et;if(rt!==Math.floor(ot/vt)||it!==Math.floor(at/vt))continue}else if(et===ct.indexMaxZoom||yt.numPoints<=ct.indexMaxPoints)continue;if(yt.source=null,0!==tt.length){ht>1&&console.time("clipping");var _t,Rt,Ot,Zt,Ze,Ge,Xe=.5*ct.buffer/ct.extent,Je=.5-Xe,rr=.5+Xe,wr=1+Xe;_t=Rt=Ot=Zt=null,Ze=re(tt,dt,rt-Xe,rt+rr,0,yt.minX,yt.maxX,ct),Ge=re(tt,dt,rt+Je,rt+wr,0,yt.minX,yt.maxX,ct),tt=null,Ze&&(_t=re(Ze,dt,it-Xe,it+rr,1,yt.minY,yt.maxY,ct),Rt=re(Ze,dt,it+Je,it+wr,1,yt.minY,yt.maxY,ct),Ze=null),Ge&&(Ot=re(Ge,dt,it-Xe,it+rr,1,yt.minY,yt.maxY,ct),Zt=re(Ge,dt,it+Je,it+wr,1,yt.minY,yt.maxY,ct),Ge=null),ht>1&&console.timeEnd("clipping"),st.push(_t||[],et+1,2*rt,2*it),st.push(Rt||[],et+1,2*rt,2*it+1),st.push(Ot||[],et+1,2*rt+1,2*it),st.push(Zt||[],et+1,2*rt+1,2*it+1)}}},me.prototype.getTile=function(tt,et,rt){var it=this.options,nt=it.extent,ot=it.debug;if(tt<0||tt>24)return null;var at=1<<tt,st=ye(tt,et=(et%at+at)%at,rt);if(this.tiles[st])return pe(this.tiles[st],nt);ot>1&&console.log("drilling down to z%d-%d-%d",tt,et,rt);for(var ct,ht=tt,dt=et,mt=rt;!ct&&ht>0;)ht--,dt=Math.floor(dt/2),mt=Math.floor(mt/2),ct=this.tiles[ye(ht,dt,mt)];return ct&&ct.source?(ot>1&&console.log("found parent tile z%d-%d-%d",ht,dt,mt),ot>1&&console.time("drilling down"),this.splitTile(ct.source,ht,dt,mt,tt,et,rt),ot>1&&console.timeEnd("drilling down"),this.tiles[st]?pe(this.tiles[st],nt):null):null};var ct=function(et){function r(tt,rt,it,nt){et.call(this,tt,rt,it,xe),nt&&(this.loadGeoJSON=nt)}return et&&(r.__proto__=et),(r.prototype=Object.create(et&&et.prototype)).constructor=r,r.prototype.loadData=function(tt,et){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=et,this._pendingLoadDataParams=tt,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var et=this;if(this._pendingCallback&&this._pendingLoadDataParams){var rt=this._pendingCallback,it=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var nt=!!(it&&it.request&&it.request.collectResourceTiming)&&new tt.RequestPerformance(it.request);this.loadGeoJSON(it,(function(ot,at){if(ot||!at)return rt(ot);if("object"!=typeof at)return rt(new Error("Input data given to '"+it.source+"' is not a valid GeoJSON object."));!function e(tt,et){var rt,it=tt&&tt.type;if("FeatureCollection"===it)for(rt=0;rt<tt.features.length;rt++)e(tt.features[rt],et);else if("GeometryCollection"===it)for(rt=0;rt<tt.geometries.length;rt++)e(tt.geometries[rt],et);else if("Feature"===it)e(tt.geometry,et);else if("Polygon"===it)c(tt.coordinates,et);else if("MultiPolygon"===it)for(rt=0;rt<tt.coordinates.length;rt++)c(tt.coordinates[rt],et);return tt}(at,!0);try{if(it.filter){var st=tt.createExpression(it.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===st.result)throw new Error(st.value.map((function(tt){return tt.key+": "+tt.message})).join(", "));var ct=at.features.filter((function(tt){return st.value.evaluate({zoom:0},tt)}));at={type:"FeatureCollection",features:ct}}et._geoJSONIndex=it.cluster?new J(function(et){var rt=et.superclusterOptions,it=et.clusterProperties;if(!it||!rt)return rt;for(var nt={},ot={},at={accumulated:null,zoom:0},st={properties:null},ct=Object.keys(it),ht=0,dt=ct;ht<dt.length;ht+=1){var mt=dt[ht],yt=it[mt],gt=yt[0],vt=tt.createExpression(yt[1]),_t=tt.createExpression("string"==typeof gt?[gt,["accumulated"],["get",mt]]:gt);nt[mt]=vt.value,ot[mt]=_t.value}return rt.map=function(tt){st.properties=tt;for(var et={},rt=0,it=ct;rt<it.length;rt+=1){var ot=it[rt];et[ot]=nt[ot].evaluate(at,st)}return et},rt.reduce=function(tt,et){st.properties=et;for(var rt=0,it=ct;rt<it.length;rt+=1){var nt=it[rt];at.accumulated=tt[nt],tt[nt]=ot[nt].evaluate(at,st)}},rt}(it)).load(at.features):function(tt,et){return new me(tt,et)}(at,it.geojsonVtOptions)}catch(tt){return rt(tt)}et.loaded={};var ht={};if(nt){var dt=nt.finish();dt&&(ht.resourceTiming={},ht.resourceTiming[it.source]=JSON.parse(JSON.stringify(dt)))}rt(null,ht)}))}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(tt,rt){var it=this.loaded;return it&&it[tt.uid]?et.prototype.reloadTile.call(this,tt,rt):this.loadTile(tt,rt)},r.prototype.loadGeoJSON=function(et,rt){if(et.request)tt.getJSON(et.request,rt);else{if("string"!=typeof et.data)return rt(new Error("Input data given to '"+et.source+"' is not a valid GeoJSON object."));try{return rt(null,JSON.parse(et.data))}catch(tt){return rt(new Error("Input data given to '"+et.source+"' is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(tt,et){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),et()},r.prototype.getClusterExpansionZoom=function(tt,et){try{et(null,this._geoJSONIndex.getClusterExpansionZoom(tt.clusterId))}catch(tt){et(tt)}},r.prototype.getClusterChildren=function(tt,et){try{et(null,this._geoJSONIndex.getChildren(tt.clusterId))}catch(tt){et(tt)}},r.prototype.getClusterLeaves=function(tt,et){try{et(null,this._geoJSONIndex.getLeaves(tt.clusterId,tt.limit,tt.offset))}catch(tt){et(tt)}},r}(l),Se=function(et){var rt=this;this.self=et,this.actor=new tt.Actor(et,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:ct},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(tt,et){if(rt.workerSourceTypes[tt])throw new Error('Worker source with name "'+tt+'" already registered.');rt.workerSourceTypes[tt]=et},this.self.registerRTLTextPlugin=function(et){if(tt.plugin.isParsed())throw new Error("RTL text plugin already registered.");tt.plugin.applyArabicShaping=et.applyArabicShaping,tt.plugin.processBidirectionalText=et.processBidirectionalText,tt.plugin.processStyledBidirectionalText=et.processStyledBidirectionalText}};return Se.prototype.setReferrer=function(tt,et){this.referrer=et},Se.prototype.setImages=function(tt,et,rt){for(var it in this.availableImages[tt]=et,this.workerSources[tt]){var nt=this.workerSources[tt][it];for(var ot in nt)nt[ot].availableImages=et}rt()},Se.prototype.setLayers=function(tt,et,rt){this.getLayerIndex(tt).replace(et),rt()},Se.prototype.updateLayers=function(tt,et,rt){this.getLayerIndex(tt).update(et.layers,et.removedIds),rt()},Se.prototype.loadTile=function(tt,et,rt){this.getWorkerSource(tt,et.type,et.source).loadTile(et,rt)},Se.prototype.loadDEMTile=function(tt,et,rt){this.getDEMWorkerSource(tt,et.source).loadTile(et,rt)},Se.prototype.reloadTile=function(tt,et,rt){this.getWorkerSource(tt,et.type,et.source).reloadTile(et,rt)},Se.prototype.abortTile=function(tt,et,rt){this.getWorkerSource(tt,et.type,et.source).abortTile(et,rt)},Se.prototype.removeTile=function(tt,et,rt){this.getWorkerSource(tt,et.type,et.source).removeTile(et,rt)},Se.prototype.removeDEMTile=function(tt,et){this.getDEMWorkerSource(tt,et.source).removeTile(et)},Se.prototype.removeSource=function(tt,et,rt){if(this.workerSources[tt]&&this.workerSources[tt][et.type]&&this.workerSources[tt][et.type][et.source]){var it=this.workerSources[tt][et.type][et.source];delete this.workerSources[tt][et.type][et.source],void 0!==it.removeSource?it.removeSource(et,rt):rt()}},Se.prototype.loadWorkerSource=function(tt,et,rt){try{this.self.importScripts(et.url),rt()}catch(tt){rt(tt.toString())}},Se.prototype.syncRTLPluginState=function(et,rt,it){try{tt.plugin.setState(rt);var nt=tt.plugin.getPluginURL();if(tt.plugin.isLoaded()&&!tt.plugin.isParsed()&&null!=nt){this.self.importScripts(nt);var ot=tt.plugin.isParsed();it(ot?void 0:new Error("RTL Text Plugin failed to import scripts from "+nt),ot)}}catch(tt){it(tt.toString())}},Se.prototype.getAvailableImages=function(tt){var et=this.availableImages[tt];return et||(et=[]),et},Se.prototype.getLayerIndex=function(tt){var et=this.layerIndexes[tt];return et||(et=this.layerIndexes[tt]=new i),et},Se.prototype.getWorkerSource=function(tt,et,rt){var it=this;return this.workerSources[tt]||(this.workerSources[tt]={}),this.workerSources[tt][et]||(this.workerSources[tt][et]={}),this.workerSources[tt][et][rt]||(this.workerSources[tt][et][rt]=new this.workerSourceTypes[et]({send:function(et,rt,nt){it.actor.send(et,rt,nt,tt)}},this.getLayerIndex(tt),this.getAvailableImages(tt))),this.workerSources[tt][et][rt]},Se.prototype.getDEMWorkerSource=function(tt,et){return this.demWorkerSources[tt]||(this.demWorkerSources[tt]={}),this.demWorkerSources[tt][et]||(this.demWorkerSources[tt][et]=new h),this.demWorkerSources[tt][et]},Se.prototype.enforceCacheSizeLimit=function(et,rt){tt.enforceCacheSizeLimit(rt)},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new Se(self)),Se}));define(["./shared"],(function(tt){var et=tt.createCommonjsModule((function(tt){function e(tt){return!i(tt)}function i(tt){return"undefined"==typeof window||"undefined"==typeof document?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var tt,et,rt=new Blob([""],{type:"text/javascript"}),it=URL.createObjectURL(rt);try{et=new Worker(it),tt=!0}catch(et){tt=!1}return et&&et.terminate(),URL.revokeObjectURL(it),tt}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var tt=document.createElement("canvas");tt.width=tt.height=1;var et=tt.getContext("2d");if(!et)return!1;var rt=et.getImageData(0,0,1,1);return rt&&rt.width===tt.width}()?(void 0===et[rt=tt&&tt.failIfMajorPerformanceCaveat]&&(et[rt]=function(tt){var et=function(tt){var et=document.createElement("canvas"),rt=Object.create(e.webGLContextAttributes);return rt.failIfMajorPerformanceCaveat=tt,et.probablySupportsContext?et.probablySupportsContext("webgl",rt)||et.probablySupportsContext("experimental-webgl",rt):et.supportsContext?et.supportsContext("webgl",rt)||et.supportsContext("experimental-webgl",rt):et.getContext("webgl",rt)||et.getContext("experimental-webgl",rt)}(tt);if(!et)return!1;var rt=et.createShader(et.VERTEX_SHADER);return!(!rt||et.isContextLost())&&(et.shaderSource(rt,"void main() {}"),et.compileShader(rt),!0===et.getShaderParameter(rt,et.COMPILE_STATUS))}(rt)),et[rt]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray supp
3ort":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var rt}tt.exports?tt.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e,window.mapboxgl.notSupportedReason=i);var et={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),rt={create:function(et,rt,it){var nt=tt.window.document.createElement(et);return void 0!==rt&&(nt.className=rt),it&&it.appendChild(nt),nt},createNS:function(et,rt){return tt.window.document.createElementNS(et,rt)}},it=tt.window.document&&tt.window.document.documentElement.style;function r(tt){if(!it)return tt[0];for(var et=0;et<tt.length;et++)if(tt[et]in it)return tt[et];return tt[0]}var nt,ot=r(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);rt.disableDrag=function(){it&&ot&&(nt=it[ot],it[ot]="none")},rt.enableDrag=function(){it&&ot&&(it[ot]=nt)};var at=r(["transform","WebkitTransform"]);rt.setTransform=function(tt,et){tt.style[at]=et};var st=!1;try{var ct=Object.defineProperty({},"passive",{get:function(){st=!0}});tt.window.addEventListener("test",ct,ct),tt.window.removeEventListener("test",ct,ct)}catch(tt){st=!1}rt.addEventListener=function(tt,et,rt,it){void 0===it&&(it={}),tt.addEventListener(et,rt,"passive"in it&&st?it:it.capture)},rt.removeEventListener=function(tt,et,rt,it){void 0===it&&(it={}),tt.removeEventListener(et,rt,"passive"in it&&st?it:it.capture)};var u=function(et){et.preventDefault(),et.stopPropagation(),tt.window.removeEventListener("click",u,!0)};function h(tt){var et=tt.userImage;return!!(et&&et.render&&et.render())&&(tt.data.replace(new Uint8Array(et.data.buffer)),!0)}rt.suppressClick=function(){tt.window.addEventListener("click",u,!0),tt.window.setTimeout((function(){tt.window.removeEventListener("click",u,!0)}),0)},rt.mousePos=function(et,rt){var it=et.getBoundingClientRect();return new tt.Point(rt.clientX-it.left-et.clientLeft,rt.clientY-it.top-et.clientTop)},rt.touchPos=function(et,rt){for(var it=et.getBoundingClientRect(),nt=[],ot=0;ot<rt.length;ot++)nt.push(new tt.Point(rt[ot].clientX-it.left-et.clientLeft,rt[ot].clientY-it.top-et.clientTop));return nt},rt.mouseButton=function(et){return void 0!==tt.window.InstallTrigger&&2===et.button&&et.ctrlKey&&tt.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:et.button},rt.remove=function(tt){tt.parentNode&&tt.parentNode.removeChild(tt)};var ht=function(et){function i(){et.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new tt.RGBAImage({width:1,height:1}),this.dirty=!0}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.isLoaded=function(){return this.loaded},i.prototype.setLoaded=function(tt){if(this.loaded!==tt&&(this.loaded=tt,tt)){for(var et=0,rt=this.requestors;et<rt.length;et+=1){var it=rt[et];this._notify(it.ids,it.callback)}this.requestors=[]}},i.prototype.getImage=function(tt){return this.images[tt]},i.prototype.addImage=function(tt,et){this._validate(tt,et)&&(this.images[tt]=et)},i.prototype._validate=function(et,rt){var it=!0;return this._validateStretch(rt.stretchX,rt.data&&rt.data.width)||(this.fire(new tt.ErrorEvent(new Error('Image "'+et+'" has invalid "stretchX" value'))),it=!1),this._validateStretch(rt.stretchY,rt.data&&rt.data.height)||(this.fire(new tt.ErrorEvent(new Error('Image "'+et+'" has invalid "stretchY" value'))),it=!1),this._validateContent(rt.content,rt)||(this.fire(new tt.ErrorEvent(new Error('Image "'+et+'" has invalid "content" value'))),it=!1),it},i.prototype._validateStretch=function(tt,et){if(!tt)return!0;for(var rt=0,it=0,nt=tt;it<nt.length;it+=1){var ot=nt[it];if(ot[0]<rt||ot[1]<ot[0]||et<ot[1])return!1;rt=ot[1]}return!0},i.prototype._validateContent=function(tt,et){return!(tt&&(4!==tt.length||tt[0]<0||et.data.width<tt[0]||tt[1]<0||et.data.height<tt[1]||tt[2]<0||et.data.width<tt[2]||tt[3]<0||et.data.height<tt[3]||tt[2]<tt[0]||tt[3]<tt[1]))},i.prototype.updateImage=function(tt,et){et.version=this.images[tt].version+1,this.images[tt]=et,this.updatedImages[tt]=!0},i.prototype.removeImage=function(tt){var et=this.images[tt];delete this.images[tt],delete this.patterns[tt],et.userImage&&et.userImage.onRemove&&et.userImage.onRemove()},i.prototype.listImages=function(){return Object.keys(this.images)},i.prototype.getImages=function(tt,et){var rt=!0;if(!this.isLoaded())for(var it=0,nt=tt;it<nt.length;it+=1)this.images[nt[it]]||(rt=!1);this.isLoaded()||rt?this._notify(tt,et):this.requestors.push({ids:tt,callback:et})},i.prototype._notify=function(et,rt){for(var it={},nt=0,ot=et;nt<ot.length;nt+=1){var at=ot[nt];this.images[at]||this.fire(new tt.Event("styleimagemissing",{id:at}));var st=this.images[at];
vendor: 126,358 bytes, line 3
3st?it[at]={data:st.data.clone(),pixelRatio:st.pixelRatio,sdf:st.sdf,version:st.version,stretchX:st.stretchX,stretchY:st.stretchY,content:st.content,hasRenderCallback:Boolean(st.userImage&&st.userImage.render)}:tt.warnOnce('Image "'+at+'" 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.')}rt(null,it)},i.prototype.getPixelSize=function(){var tt=this.atlasImage;return{width:tt.width,height:tt.height}},i.prototype.getPattern=function(et){var rt=this.patterns[et],it=this.getImage(et);if(!it)return null;if(rt&&rt.position.version===it.version)return rt.position;if(rt)rt.position.version=it.version;else{var nt={w:it.data.width+2,h:it.data.height+2,x:0,y:0},ot=new tt.ImagePosition(nt,it);this.patterns[et]={bin:nt,position:ot}}return this._updatePatternAtlas(),this.patterns[et].position},i.prototype.bind=function(et){var rt=et.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new tt.Texture(et,this.atlasImage,rt.RGBA),this.atlasTexture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE)},i.prototype._updatePatternAtlas=function(){var et=[];for(var rt in this.patterns)et.push(this.patterns[rt].bin);var it=tt.potpack(et),nt=it.w,ot=it.h,at=this.atlasImage;for(var st in at.resize({width:nt||1,height:ot||1}),this.patterns){var ct=this.patterns[st].bin,ht=ct.x+1,dt=ct.y+1,mt=this.images[st].data,yt=mt.width,gt=mt.height;tt.RGBAImage.copy(mt,at,{x:0,y:0},{x:ht,y:dt},{width:yt,height:gt}),tt.RGBAImage.copy(mt,at,{x:0,y:gt-1},{x:ht,y:dt-1},{width:yt,height:1}),tt.RGBAImage.copy(mt,at,{x:0,y:0},{x:ht,y:dt+gt},{width:yt,height:1}),tt.RGBAImage.copy(mt,at,{x:yt-1,y:0},{x:ht-1,y:dt},{width:1,height:gt}),tt.RGBAImage.copy(mt,at,{x:0,y:0},{x:ht+yt,y:dt},{width:1,height:gt})}this.dirty=!0},i.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},i.prototype.dispatchRenderCallbacks=function(tt){for(var et=0,rt=tt;et<rt.length;et+=1){var it=rt[et];if(!this.callbackDispatchedThisFrame[it]){this.callbackDispatchedThisFrame[it]=!0;var nt=this.images[it];h(nt)&&this.updateImage(it,nt)}}},i}(tt.Evented),dt=m,mt=m,yt=1e20;function m(tt,et,rt,it,nt,ot){this.fontSize=tt||24,this.buffer=void 0===et?3:et,this.cutoff=it||.25,this.fontFamily=nt||"sans-serif",this.fontWeight=ot||"normal",this.radius=rt||8;var at=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=at,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(at*at),this.gridInner=new Float64Array(at*at),this.f=new Float64Array(at),this.d=new Float64Array(at),this.z=new Float64Array(at+1),this.v=new Int16Array(at),this.middle=Math.round(at/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function g(tt,et,rt,it,nt,ot,at){for(var st=0;st<et;st++){for(var ct=0;ct<rt;ct++)it[ct]=tt[ct*et+st];for(v(it,nt,ot,at,rt),ct=0;ct<rt;ct++)tt[ct*et+st]=nt[ct]}for(ct=0;ct<rt;ct++){for(st=0;st<et;st++)it[st]=tt[ct*et+st];for(v(it,nt,ot,at,et),st=0;st<et;st++)tt[ct*et+st]=Math.sqrt(nt[st])}}function v(tt,et,rt,it,nt){rt[0]=0,it[0]=-yt,it[1]=+yt;for(var ot=1,at=0;ot<nt;ot++){for(var st=(tt[ot]+ot*ot-(tt[rt[at]]+rt[at]*rt[at]))/(2*ot-2*rt[at]);st<=it[at];)at--,st=(tt[ot]+ot*ot-(tt[rt[at]]+rt[at]*rt[at]))/(2*ot-2*rt[at]);rt[++at]=ot,it[at]=st,it[at+1]=+yt}for(ot=0,at=0;ot<nt;ot++){for(;it[at+1]<ot;)at++;et[ot]=(ot-rt[at])*(ot-rt[at])+tt[rt[at]]}}m.prototype.draw=function(tt){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(tt,this.buffer,this.middle);for(var et=this.ctx.getImageData(0,0,this.size,this.size),rt=new Uint8ClampedArray(this.size*this.size),it=0;it<this.size*this.size;it++){var nt=et.data[4*it+3]/255;this.gridOuter[it]=1===nt?0:0===nt?yt:Math.pow(Math.max(0,.5-nt),2),this.gridInner[it]=1===nt?yt:0===nt?0:Math.pow(Math.max(0,nt-.5),2)}for(g(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),g(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),it=0;it<this.size*this.size;it++)rt[it]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[it]-this.gridInner[it])/this.radius+this.cutoff))));return rt},dt.default=mt;var y=function(tt,et){this.requestManager=tt,this.localIdeographFontFamily=et,this.entries={}};y.prototype.setURL=function(tt){this.url=tt},y.prototype.getGlyphs=function(et,rt){var it=this,nt=[];for(var ot in et)for(var at=0,st=et[ot];at<st.length;at+=1)nt.push({stack:ot,id:st[at]});tt.asyncAll(nt,(function(tt,et){var rt=tt.stack,nt=tt.id,ot=it.entries[rt];ot||(ot=it.entries[rt]={glyphs:{},requests:{},ranges:{}});var at=ot.glyphs[nt];if(void 0===at){if(at=it._tinySDF(ot,rt,nt))return ot.glyphs[nt]=at,void et(null,{stack:rt,id:nt,glyph:at});var st=Math.floor(nt/256);if(256*st>65535)et(new Error("glyphs > 65535 not supported"));else if(ot.ranges[st])et(null,{stack:rt,id:nt,glyph:at});else{var ct=ot.requests[st];ct||(ct=ot.requests[st]=[],y.loadGlyphRange(rt,st,it.url,it.requestManager,(function(tt,et){if(et){for(var rt in et)it._doesCharSupportLocalGlyph(+rt)||(ot.glyphs[+rt]=et[+rt]);ot.ranges[st]=!0}for(var nt=0,at=ct;nt<at.length;nt+=1)(0,at[nt])(tt,et);delete ot.requests[st]}))),ct.push((function(tt,it){tt?et(tt):it&&et(null,{stack:rt,id:nt,glyph:it[nt]||null})}))}}else et(null,{stack:rt,id:nt,glyph:at})}),(function(tt,et){if(tt)rt(tt);else if(et){for(var it={},nt=0,ot=et;nt<ot.length;nt+=1){var at=ot[nt],st=at.stack,ct=at.id,ht=at.glyph;(it[st]||(it[st]={}))[ct]=ht&&{id:ht.id,bitmap:ht.bitmap.clone(),metrics:ht.metrics}}rt(null,it)}}))},y.prototype._doesCharSupportLocalGlyph=function(et){return!!this.localIdeographFontFamily&&(tt.isChar["CJK Unified Ideographs"](et)||tt.isChar["Hangul Syllables"](et)||tt.isChar.Hiragana(et)||tt.isChar.Katakana(et))},y.prototype._tinySDF=function(et,rt,it){var nt=this.localIdeographFontFamily;if(nt&&this._doesCharSupportLocalGlyph(it)){var ot=et.tinySDF;if(!ot){var at="400";/bold/i.test(rt)?at="900":/medium/i.test(rt)?at="500":/light/i.test(rt)&&(at="200"),ot=et.tinySDF=new y.TinySDF(24,3,8,.25,nt,at)}return{id:it,bitmap:new tt.AlphaImage({width:30,height:30},ot.draw(String.fromCharCode(it))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},y.loadGlyphRange=function(et,rt,it,nt,ot){var at=256*rt,st=at+255,ct=nt.transformRequest(nt.normalizeGlyphsURL(it).replace("{fontstack}",et).replace("{range}",at+"-"+st),tt.ResourceType.Glyphs);tt.getArrayBuffer(ct,(function(et,rt){if(et)ot(et);else if(rt){for(var it={},nt=0,at=tt.parseGlyphPBF(rt);nt<at.length;nt+=1){var st=at[nt];it[st.id]=st}ot(null,it)}}))},y.TinySDF=dt;var x=function(){this.specification=tt.styleSpec.light.position};x.prototype.possiblyEvaluate=function(et,rt){return tt.sphericalToCartesian(et.expression.evaluate(rt))},x.prototype.interpolate=function(et,rt,it){return{x:tt.number(et.x,rt.x,it),y:tt.number(et.y,rt.y,it),z:tt.number(et.z,rt.z,it)}};var gt=new tt.Properties({anchor:new tt.DataConstantProperty(tt.styleSpec.light.anchor),position:new x,color:new tt.DataConstantProperty(tt.styleSpec.light.color),intensity:new tt.DataConstantProperty(tt.styleSpec.light.intensity)}),vt=function(et){function i(rt){et.call(this),this._transitionable=new tt.Transitionable(gt),this.setLight(rt),this._transitioning=this._transitionable.untransitioned()}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.getLight=function(){return this._transitionable.serialize()},i.prototype.setLight=function(et,rt){if(void 0===rt&&(rt={}),!this._validate(tt.validateLight,et,rt))for(var it in et){var nt=et[it];tt.endsWith(it,"-transition")?this._transitionable.setTransition(it.slice(0,-"-transition".length),nt):this._transitionable.setValue(it,nt)}},i.prototype.updateTransitions=function(tt){this._transitioning=this._transitionable.transitioned(tt,this._transitioning)},i.prototype.hasTransition=function(){return this._transitioning.hasTransition()},i.prototype.recalculate=function(tt){this.properties=this._transitioning.possiblyEvaluate(tt)},i.prototype._validate=function(et,rt,it){return(!it||!1!==it.validate)&&tt.emitValidationErrors(this,et.call(tt.validateStyle,tt.extend({value:rt,style:{glyphs:!0,sprite:!0},styleSpec:tt.styleSpec})))},i}(tt.Evented),T=function(tt,et){this.width=tt,this.height=et,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};T.prototype.getDash=function(tt,et){var rt=tt.join(",")+String(et);return this.dashEntry[rt]||(this.dashEntry[rt]=this.addDash(tt,et)),this.dashEntry[rt]},T.prototype.getDashRanges=function(tt,et,rt){var it=[],nt=tt.length%2==1?-tt[tt.length-1]*rt:0,ot=tt[0]*rt,at=!0;it.push({left:nt,right:ot,isDash:at,zeroLength:0===tt[0]});for(var st=tt[0],ct=1;ct<tt.length;ct++){var ht=tt[ct];it.push({left:nt=st*rt,right:ot=(st+=ht)*rt,isDash:at=!at,zeroLength:0===ht})}return it},T.prototype.addRoundDash=function(tt,et,rt){for(var it=et/2,nt=-rt;nt<=rt;nt++)for(var ot=this.width*(this.nextRow+rt+nt),at=0,st=tt[at],ct=0;ct<this.width;ct++){ct/st.right>1&&(st=tt[++at]);var ht=Math.abs(ct-st.left),dt=Math.abs(ct-st.right),mt=Math.min(ht,dt),yt=void 0,gt=nt/rt*(it+1);if(st.isDash){var vt=it-Math.abs(gt);yt=Math.sqrt(mt*mt+vt*vt)}else yt=it-Math.sqrt(mt*mt+gt*gt);this.data[ot+ct]=Math.max(0,Math.min(255,yt+128))}},T.prototype.addRegularDash=function(tt){for(var et=tt.length-1;et>=0;--et){var rt=tt[et],it=tt[et+1];rt.zeroLength?tt.splice(et,1):it&&it.isDash===rt.isDash&&(it.left=rt.left,tt.splice(et,1))}var nt=tt[0],ot=tt[tt.length-1];nt.isDash===ot.isDash&&(nt.left=ot.left-this.width,ot.right=nt.right+this.width);for(var at=this.width*this.nextRow,st=0,ct=tt[st],ht=0;ht<this.width;ht++){ht/ct.right>1&&(ct=tt[++st]);var dt=Math.abs(ht-ct.left),mt=Math.abs(ht-ct.right),yt=Math.min(dt,mt);this.data[at+ht]=Math.max(0,Math.min(255,(ct.isDash?yt:-yt)+128))}},T.prototype.addDash=function(et,rt){var it=rt?7:0,nt=2*it+1;if(this.nextRow+nt>this.height)return tt.warnOnce("LineAtlas out of space"),null;for(var ot=0,at=0;at<et.length;at++)ot+=et[at];if(0!==ot){var st=this.width/ot,ct=this.getDashRanges(et,this.width,st);rt?this.addRoundDash(ct,st,it):this.addRegularDash(ct)}var ht={y:(this.nextRow+it+.5)/this.height,height:2*it/this.height,width:ot};return this.nextRow+=nt,this.dirty=!0,ht},T.prototype.bind=function(tt){var et=tt.gl;this.texture?(et.bindTexture(et.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,et.texSubImage2D(et.TEXTURE_2D,0,0,0,this.width,this.height,et.ALPHA,et.UNSIGNED_BYTE,this.data))):(this.texture=et.createTexture(),et.bindTexture(et.TEXTURE_2D,this.texture),et.texParameteri(et.TEXTURE_2D,et.TEXTURE_WRAP_S,et.REPEAT),et.texParameteri(et.TEXTURE_2D,et.TEXTURE_WRAP_T,et.REPEAT),et.texParameteri(et.TEXTURE_2D,et.TEXTURE_MIN_FILTER,et.LINEAR),et.texParameteri(et.TEXTURE_2D,et.TEXTURE_MAG_FILTER,et.LINEAR),et.texImage2D(et.TEXTURE_2D,0,et.ALPHA,this.width,this.height,0,et.ALPHA,et.UNSIGNED_BYTE,this.data))};var _t=function e(et,rt){this.workerPool=et,this.actors=[],this.currentActor=0,this.id=tt.uniqueId();for(var it=this.workerPool.acquire(this.id),nt=0;nt<it.length;nt++){var ot=new e.Actor(it[nt],rt,this.id);ot.name="Worker "+nt,this.actors.push(ot)}};function I(et,rt,it){var r=function(nt,ot){if(nt)return it(nt);if(ot){var at=tt.pick(tt.extend(ot,et),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);ot.vector_layers&&(at.vectorLayers=ot.vector_layers,at.vectorLayerIds=at.vectorLayers.map((function(tt){return tt.id}))),at.tiles=rt.canonicalizeTileset(at,et.url),it(null,at)}};return et.url?tt.getJSON(rt.transformRequest(rt.normalizeSourceURL(et.url),tt.ResourceType.Source),r):tt.browser.frame((function(){return r(null,et)}))}_t.prototype.broadcast=function(et,rt,it){tt.asyncAll(this.actors,(function(tt,it){tt.send(et,rt,it)}),it=it||function(){})},_t.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},_t.prototype.remove=function(){this.actors.forEach((function(tt){tt.remove()})),this.actors=[],this.workerPool.release(this.id)},_t.Actor=tt.Actor;var P=function(et,rt,it){this.bounds=tt.LngLatBounds.convert(this.validateBounds(et)),this.minzoom=rt||0,this.maxzoom=it||24};P.prototype.validateBounds=function(tt){return Array.isArray(tt)&&4===tt.length?[Math.max(-180,tt[0]),Math.max(-90,tt[1]),Math.min(180,tt[2]),Math.min(90,tt[3])]:[-180,-90,180,90]},P.prototype.contains=function(et){var rt=Math.pow(2,et.z),it=Math.floor(tt.mercatorXfromLng(this.bounds.getWest())*rt),nt=Math.floor(tt.mercatorYfromLat(this.bounds.getNorth())*rt),ot=Math.ceil(tt.mercatorXfromLng(this.bounds.getEast())*rt),at=Math.ceil(tt.mercatorYfromLat(this.bounds.getSouth())*rt);return et.x>=it&&et.x<ot&&et.y>=nt&&et.y<at};var Rt=function(et){function i(rt,it,nt,ot){if(et.call(this),this.id=rt,this.dispatcher=nt,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,tt.extend(this,tt.pick(it,["url","scheme","tileSize","promoteId"])),this._options=tt.extend({type:"vector"},it),this._collectResourceTiming=it.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(ot)}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.load=function(){var et=this;this._loaded=!1,this.fire(new tt.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=I(this._options,this.map._requestManager,(function(rt,it){et._tileJSONRequest=null,et._loaded=!0,rt?et.fire(new tt.ErrorEvent(rt)):it&&(tt.extend(et,it),it.bounds&&(et.tileBounds=new P(it.bounds,et.minzoom,et.maxzoom)),tt.postTurnstileEvent(it.tiles,et.map._requestManager._customAccessToken),tt.postMapLoadEvent(it.tiles,et.map._getMapId(),et.map._requestManager._skuToken,et.map._requestManager._customAccessToken),et.fire(new tt.Event("data",{dataType:"source",sourceDataType:"metadata"})),et.fire(new tt.Event("data",{dataType:"source",sourceDataType:"content"})))}))},i.prototype.loaded=function(){return this._loaded},i.prototype.hasTile=function(tt){return!this.tileBounds||this.tileBounds.contains(tt.canonical)},i.prototype.onAdd=function(tt){this.map=tt,this.load()},i.prototype.setSourceProperty=function(tt){this._tileJSONRequest&&this._tileJSONRequest.cancel(),tt(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},i.prototype.setTiles=function(tt){var et=this;return this.setSourceProperty((function(){et._options.tiles=tt})),this},i.prototype.setUrl=function(tt){var et=this;return this.setSourceProperty((function(){et.url=tt,et._options.url=tt})),this},i.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},i.prototype.serialize=function(){return tt.extend({},this._options)},i.prototype.loadTile=function(et,rt){var it=this.map._requestManager.normalizeTileURL(et.tileID.canonical.url(this.tiles,this.scheme)),nt={request:this.map._requestManager.transformRequest(it,tt.ResourceType.Tile),uid:et.uid,tileID:et.tileID,zoom:et.tileID.overscaledZ,tileSize:this.tileSize*et.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:tt.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function a(it,nt){return delete et.request,et.aborted?rt(null):it&&404!==it.status?rt(it):(nt&&nt.resourceTiming&&(et.resourceTiming=nt.resourceTiming),this.map._refreshExpiredTiles&&nt&&et.setExpiryData(nt),et.loadVectorData(nt,this.map.painter),tt.cacheEntryPossiblyAdded(this.dispatcher),rt(null),void(et.reloadCallback&&(this.loadTile(et,et.reloadCallback),et.reloadCallback=null)))}nt.request.collectResourceTiming=this._collectResourceTiming,et.actor&&"expired"!==et.state?"loading"===et.state?et.reloadCallback=rt:et.request=et.actor.send("reloadTile",nt,a.bind(this)):(et.actor=this.dispatcher.getActor(),et.request=et.actor.send("loadTile",nt,a.bind(this)))},i.prototype.abortTile=function(tt){tt.request&&(tt.request.cancel(),delete tt.request),tt.actor&&tt.actor.send("abortTile",{uid:tt.uid,type:this.type,source:this.id},void 0)},i.prototype.unloadTile=function(tt){tt.unloadVectorData(),tt.actor&&tt.actor.send("removeTile",{uid:tt.uid,type:this.type,source:this.id},void 0)},i.prototype.hasTransition=function(){return!1},i}(tt.Evented),Ot=function(et){function i(rt,it,nt,ot){et.call(this),this.id=rt,this.dispatcher=nt,this.setEventedParent(ot),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=tt.extend({type:"raster"},it),tt.extend(this,tt.pick(it,["url","scheme","tileSize"]))}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.load=function(){var et=this;this._loaded=!1,this.fire(new tt.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=I(this._options,this.map._requestManager,(function(rt,it){et._tileJSONRequest=null,et._loaded=!0,rt?et.fire(new tt.ErrorEvent(rt)):it&&(tt.extend(et,it),it.bounds&&(et.tileBounds=new P(it.bounds,et.minzoom,et.maxzoom)),tt.postTurnstileEvent(it.tiles),tt.postMapLoadEvent(it.tiles,et.map._getMapId(),et.map._requestManager._skuToken),et.fire(new tt.Event("data",{dataType:"source",sourceDataType:"metadata"})),et.fire(new tt.Event("data",{dataType:"source",sourceDataType:"content"})))}))},i.prototype.loaded=function(){return this._loaded},i.prototype.onAdd=function(tt){this.map=tt,this.load()},i.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},i.prototype.serialize=function(){return tt.extend({},this._options)},i.prototype.hasTile=function(tt){return!this.tileBounds||this.tileBounds.contains(tt.canonical)},i.prototype.loadTile=function(et,rt){var it=this,nt=this.map._requestManager.normalizeTileURL(et.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);et.request=tt.getImage(this.map._requestManager.transformRequest(nt,tt.ResourceType.Tile),(function(nt,ot){if(delete et.request,et.aborted)et.state="unloaded",rt(null);else if(nt)et.state="errored",rt(nt);else if(ot){it.map._refreshExpiredTiles&&et.setExpiryData(ot),delete ot.cacheControl,delete ot.expires;var at=it.map.painter.context,st=at.gl;et.texture=it.map.painter.getTileTexture(ot.width),et.texture?et.texture.update(ot,{useMipmap:!0}):(et.texture=new tt.Texture(at,ot,st.RGBA,{useMipmap:!0}),et.texture.bind(st.LINEAR,st.CLAMP_TO_EDGE,st.LINEAR_MIPMAP_NEAREST),at.extTextureFilterAnisotropic&&st.texParameterf(st.TEXTURE_2D,at.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,at.extTextureFilterAnisotropicMax)),et.state="loaded",tt.cacheEntryPossiblyAdded(it.dispatcher),rt(null)}}))},i.prototype.abortTile=function(tt,et){tt.request&&(tt.request.cancel(),delete tt.request),et()},i.prototype.unloadTile=function(tt,et){tt.texture&&this.map.painter.saveTileTexture(tt.texture),et()},i.prototype.hasTransition=function(){return!1},i}(tt.Evented),Zt=function(et){function i(rt,it,nt,ot){et.call(this,rt,it,nt,ot),this.type="raster-dem",this.maxzoom=22,this._options=tt.extend({type:"raster-dem"},it),this.encoding=it.encoding||"mapbox"}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},i.prototype.loadTile=function(et,rt){var it=this.map._requestManager.normalizeTileURL(et.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function r(tt,it){tt&&(et.state="errored",rt(tt)),it&&(et.dem=it,et.needsHillshadePrepare=!0,et.state="loaded",rt(null))}et.request=tt.getImage(this.map._requestManager.transformRequest(it,tt.ResourceType.Tile),function(it,nt){if(delete et.request,et.aborted)et.state="unloaded",rt(null);else if(it)et.state="errored",rt(it);else if(nt){this.map._refreshExpiredTiles&&et.setExpiryData(nt),delete nt.cacheControl,delete nt.expires;var ot=tt.window.ImageBitmap&&nt instanceof tt.window.ImageBitmap&&tt.offscreenCanvasSupported()?nt:tt.browser.getImageData(nt,1),at={uid:et.uid,coord:et.tileID,source:this.id,rawImageData:ot,encoding:this.encoding};et.actor&&"expired"!==et.state||(et.actor=this.dispatcher.getActor(),et.actor.send("loadDEMTile",at,r.bind(this)))}}.bind(this)),et.neighboringTiles=this._getNeighboringTiles(et.tileID)},i.prototype._getNeighboringTiles=function(et){var rt=et.canonical,it=Math.pow(2,rt.z),nt=(rt.x-1+it)%it,ot=0===rt.x?et.wrap-1:et.wrap,at=(rt.x+1+it)%it,st=rt.x+1===it?et.wrap+1:et.wrap,ct={};return ct[new tt.OverscaledTileID(et.overscaledZ,ot,rt.z,nt,rt.y).key]={backfilled:!1},ct[new tt.OverscaledTileID(et.overscaledZ,st,rt.z,at,rt.y).key]={backfilled:!1},rt.y>0&&(ct[new tt.OverscaledTileID(et.overscaledZ,ot,rt.z,nt,rt.y-1).key]={backfilled:!1},ct[new tt.OverscaledTileID(et.overscaledZ,et.wrap,rt.z,rt.x,rt.y-1).key]={backfilled:!1},ct[new tt.OverscaledTileID(et.overscaledZ,st,rt.z,at,rt.y-1).key]={backfilled:!1}),rt.y+1<it&&(ct[new tt.OverscaledTileID(et.overscaledZ,ot,rt.z,nt,rt.y+1).key]={backfilled:!1},ct[new tt.OverscaledTileID(et.overscaledZ,et.wrap,rt.z,rt.x,rt.y+1).key]={backfilled:!1},ct[new tt.OverscaledTileID(et.overscaledZ,st,rt.z,at,rt.y+1).key]={backfilled:!1}),ct},i.prototype.unloadTile=function(tt){tt.demTexture&&this.map.painter.saveTileTexture(tt.demTexture),tt.fbo&&(tt.fbo.destroy(),delete tt.fbo),tt.dem&&delete tt.dem,delete tt.neighboringTiles,tt.state="unloaded",tt.actor&&tt.actor.send("removeDEMTile",{uid:tt.uid,source:this.id})},i}(Ot),Ze=function(et){function i(rt,it,nt,ot){et.call(this),this.id=rt,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=nt.getActor(),this.setEventedParent(ot),this._data=it.data,this._options=tt.extend({},it),this._collectResourceTiming=it.collectResourceTiming,this._resourceTiming=[],void 0!==it.maxzoom&&(this.maxzoom=it.maxzoom),it.type&&(this.type=it.type),it.attribution&&(this.attribution=it.attribution),this.promoteId=it.promoteId;var at=tt.EXTENT/this.tileSize;this.workerOptions=tt.extend({source:this.id,cluster:it.cluster||!1,geojsonVtOptions:{buffer:(void 0!==it.buffer?it.buffer:128)*at,tolerance:(void 0!==it.tolerance?it.tolerance:.375)*at,extent:tt.EXTENT,maxZoom:this.maxzoom,lineMetrics:it.lineMetrics||!1,generateId:it.generateId||!1},superclusterOptions:{maxZoom:void 0!==it.clusterMaxZoom?Math.min(it.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,it.clusterMinPoints||2),extent:tt.EXTENT,radius:(it.clusterRadius||50)*at,log:!1,generateId:it.generateId||!1},clusterProperties:it.clusterProperties,filter:it.filter},it.workerOptions)}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.load=function(){var et=this;this.fire(new tt.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(rt){if(rt)et.fire(new tt.ErrorEvent(rt));else{var it={dataType:"source",sourceDataType:"metadata"};et._collectResourceTiming&&et._resourceTiming&&et._resourceTiming.length>0&&(it.resourceTiming=et._resourceTiming,et._resourceTiming=[]),et.fire(new tt.Event("data",it))}}))},i.prototype.onAdd=function(tt){this.map=tt,this.load()},i.prototype.setData=function(et){var rt=this;return this._data=et,this.fire(new tt.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(et){if(et)rt.fire(new tt.ErrorEvent(et));else{var it={dataType:"source",sourceDataType:"content"};rt._collectResourceTiming&&rt._resourceTiming&&rt._resourceTiming.length>0&&(it.resourceTiming=rt._resourceTiming,rt._resourceTiming=[]),rt.fire(new tt.Event("data",it))}})),this},i.prototype.getClusterExpansionZoom=function(tt,et){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:tt,source:this.id},et),this},i.prototype.getClusterChildren=function(tt,et){return this.actor.send("geojson.getClusterChildren",{clusterId:tt,source:this.id},et),this},i.prototype.getClusterLeaves=function(tt,et,rt,it){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:tt,limit:et,offset:rt},it),this},i.prototype._updateWorkerData=function(et){var rt=this;this._loaded=!1;var it=tt.extend({},this.workerOptions),nt=this._data;"string"==typeof nt?(it.request=this.map._requestManager.transformRequest(tt.browser.resolveURL(nt),tt.ResourceType.Source),it.request.collectResourceTiming=this._collectResourceTiming):it.data=JSON.stringify(nt),this.actor.send(this.type+".loadData",it,(function(tt,nt){rt._removed||nt&&nt.abandoned||(rt._loaded=!0,nt&&nt.resourceTiming&&nt.resourceTiming[rt.id]&&(rt._resourceTiming=nt.resourceTiming[rt.id].slice(0)),rt.actor.send(rt.type+".coalesce",{source:it.source},null),et(tt))}))},i.prototype.loaded=function(){return this._loaded},i.prototype.loadTile=function(et,rt){var it=this,nt=et.actor?"reloadTile":"loadTile";et.actor=this.actor,et.request=this.actor.send(nt,{type:this.type,uid:et.uid,tileID:et.tileID,zoom:et.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:tt.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(tt,ot){return delete et.request,et.unloadVectorData(),et.aborted?rt(null):tt?rt(tt):(et.loadVectorData(ot,it.map.painter,"reloadTile"===nt),rt(null))}))},i.prototype.abortTile=function(tt){tt.request&&(tt.request.cancel(),delete tt.request),tt.aborted=!0},i.prototype.unloadTile=function(tt){tt.unloadVectorData(),this.actor.send("removeTile",{uid:tt.uid,type:this.type,source:this.id})},i.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},i.prototype.serialize=function(){return tt.extend({},this._options,{type:this.type,data:this._data})},i.prototype.hasTransition=function(){return!1},i}(tt.Evented),Ge=tt.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Xe=function(et){function i(tt,rt,it,nt){et.call(this),this.id=tt,this.dispatcher=it,this.coordinates=rt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(nt),this.options=rt}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.load=function(et,rt){var it=this;this._loaded=!1,this.fire(new tt.Event("dataloading",{dataType:"source"})),this.url=this.options.url,tt.getImage(this.map._requestManager.transformRequest(this.url,tt.ResourceType.Image),(function(nt,ot){it._loaded=!0,nt?it.fire(new tt.ErrorEvent(nt)):ot&&(it.image=ot,et&&(it.coordinates=et),rt&&rt(),it._finishLoading())}))},i.prototype.loaded=function(){return this._loaded},i.prototype.updateImage=function(tt){var et=this;return this.image&&tt.url?(this.options.url=tt.url,this.load(tt.coordinates,(function(){et.texture=null})),this):this},i.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new tt.Event("data",{dataType:"source",sourceDataType:"metadata"})))},i.prototype.onAdd=function(tt){this.map=tt,this.load()},i.prototype.setCoordinates=function(et){var rt=this;this.coordinates=et;var it=et.map(tt.MercatorCoordinate.fromLngLat);this.tileID=function(et){for(var rt=1/0,it=1/0,nt=-1/0,ot=-1/0,at=0,st=et;at<st.length;at+=1){var ct=st[at];rt=Math.min(rt,ct.x),it=Math.min(it,ct.y),nt=Math.max(nt,ct.x),ot=Math.max(ot,ct.y)}var ht=Math.max(nt-rt,ot-it),dt=Math.max(0,Math.floor(-Math.log(ht)/Math.LN2)),mt=Math.pow(2,dt);return new tt.CanonicalTileID(dt,Math.floor((rt+nt)/2*mt),Math.floor((it+ot)/2*mt))}(it),this.minzoom=this.maxzoom=this.tileID.z;var nt=it.map((function(tt){return rt.tileID.getTilePoint(tt)._round()}));return this._boundsArray=new tt.StructArrayLayout4i8,this._boundsArray.emplaceBack(nt[0].x,nt[0].y,0,0),this._boundsArray.emplaceBack(nt[1].x,nt[1].y,tt.EXTENT,0),this._boundsArray.emplaceBack(nt[3].x,nt[3].y,0,tt.EXTENT),this._boundsArray.emplaceBack(nt[2].x,nt[2].y,tt.EXTENT,tt.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new tt.Event("data",{dataType:"source",sourceDataType:"content"})),this},i.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var et=this.map.painter.context,rt=et.gl;for(var it in this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,Ge.members)),this.boundsSegments||(this.boundsSegments=tt.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new tt.Texture(et,this.image,rt.RGBA),this.texture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE)),this.tiles){var nt=this.tiles[it];"loaded"!==nt.state&&(nt.state="loaded",nt.texture=this.texture)}}},i.prototype.loadTile=function(tt,et){this.tileID&&this.tileID.equals(tt.tileID.canonical)?(this.tiles[String(tt.tileID.wrap)]=tt,tt.buckets={},et(null)):(tt.state="errored",et(null))},i.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},i.prototype.hasTransition=function(){return!1},i}(tt.Evented),Je=function(et){function i(tt,rt,it,nt){et.call(this,tt,rt,it,nt),this.roundZoom=!0,this.type="video",this.options=rt}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.load=function(){var et=this;this._loaded=!1;var rt=this.options;this.urls=[];for(var it=0,nt=rt.urls;it<nt.length;it+=1)this.urls.push(this.map._requestManager.transformRequest(nt[it],tt.ResourceType.Source).url);tt.getVideo(this.urls,(function(rt,it){et._loaded=!0,rt?et.fire(new tt.ErrorEvent(rt)):it&&(et.video=it,et.video.loop=!0,et.video.setAttribute("playsinline",""),et.video.addEventListener("playing",(function(){et.map.triggerRepaint()})),et.map&&et.video.play(),et._finishLoading())}))},i.prototype.pause=function(){this.video&&this.video.pause()},i.prototype.play=function(){this.video&&this.video.play()},i.prototype.seek=function(et){if(this.video){var rt=this.video.seekable;et<rt.start(0)||et>rt.end(0)?this.fire(new tt.ErrorEvent(new tt.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+rt.start(0)+" and "+rt.end(0)+"-second mark."))):this.video.currentTime=et}},i.prototype.getVideo=function(){return this.video},i.prototype.onAdd=function(tt){this.map||(this.map=tt,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},i.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var et=this.map.painter.context,rt=et.gl;for(var it in this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,Ge.members)),this.boundsSegments||(this.boundsSegments=tt.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE),rt.texSubImage2D(rt.TEXTURE_2D,0,0,0,rt.RGBA,rt.UNSIGNED_BYTE,this.video)):(this.texture=new tt.Texture(et,this.video,rt.RGBA),this.texture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE)),this.tiles){var nt=this.tiles[it];"loaded"!==nt.state&&(nt.state="loaded",nt.texture=this.texture)}}},i.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},i.prototype.hasTransition=function(){return this.video&&!this.video.paused},i}(Xe),rr=function(et){function i(rt,it,nt,ot){et.call(this,rt,it,nt,ot),it.coordinates?Array.isArray(it.coordinates)&&4===it.coordinates.length&&!it.coordinates.some((function(tt){return!Array.isArray(tt)||2!==tt.length||tt.some((function(tt){return"number"!=typeof tt}))}))||this.fire(new tt.ErrorEvent(new tt.ValidationError("sources."+rt,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new tt.ErrorEvent(new tt.ValidationError("sources."+rt,null,'missing required property "coordinates"'))),it.animate&&"boolean"!=typeof it.animate&&this.fire(new tt.ErrorEvent(new tt.ValidationError("sources."+rt,null,'optional "animate" property must be a boolean value'))),it.canvas?"string"==typeof it.canvas||it.canvas instanceof tt.window.HTMLCanvasElement||this.fire(new tt.ErrorEvent(new tt.ValidationError("sources."+rt,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 tt.ErrorEvent(new tt.ValidationError("sources."+rt,null,'missing required property "canvas"'))),this.options=it,this.animate=void 0===it.animate||it.animate}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof tt.window.HTMLCanvasElement?this.options.canvas:tt.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new tt.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},i.prototype.getCanvas=function(){return this.canvas},i.prototype.onAdd=function(tt){this.map=tt,this.load(),this.canvas&&this.animate&&this.play()},i.prototype.onRemove=function(){this.pause()},i.prototype.prepare=function(){var et=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,et=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,et=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var rt=this.map.painter.context,it=rt.gl;for(var nt in this.boundsBuffer||(this.boundsBuffer=rt.createVertexBuffer(this._boundsArray,Ge.members)),this.boundsSegments||(this.boundsSegments=tt.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(et||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new tt.Texture(rt,this.canvas,it.RGBA,{premultiply:!0}),this.tiles){var ot=this.tiles[nt];"loaded"!==ot.state&&(ot.state="loaded",ot.texture=this.texture)}}},i.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},i.prototype.hasTransition=function(){return this._playing},i.prototype._hasInvalidDimensions=function(){for(var tt=0,et=[this.canvas.width,this.canvas.height];tt<et.length;tt+=1){var rt=et[tt];if(isNaN(rt)||rt<=0)return!0}return!1},i}(Xe),wr={vector:Rt,raster:Ot,"raster-dem":Zt,geojson:Ze,video:Je,image:Xe,canvas:rr};function B(et,rt){var it=tt.identity([]);return tt.translate(it,it,[1,1,0]),tt.scale(it,it,[.5*et.width,.5*et.height,1]),tt.multiply(it,it,et.calculatePosMatrix(rt.toUnwrapped()))}function O(tt,et,rt,it,nt,ot){var at=function(tt,et,rt){if(tt)for(var it=0,nt=tt;it<nt.length;it+=1){var ot=et[nt[it]];if(ot&&ot.source===rt&&"fill-extrusion"===ot.type)return!0}else for(var at in et){var st=et[at];if(st.source===rt&&"fill-extrusion"===st.type)return!0}return!1}(nt&&nt.layers,et,tt.id),st=ot.maxPitchScaleFactor(),ct=tt.tilesIn(it,st,at);ct.sort(F);for(var ht=[],dt=0,mt=ct;dt<mt.length;dt+=1){var yt=mt[dt];ht.push({wrappedTileID:yt.tileID.wrapped().key,queryResults:yt.tile.queryRenderedFeatures(et,rt,tt._state,yt.queryGeometry,yt.cameraQueryGeometry,yt.scale,nt,ot,st,B(tt.transform,yt.tileID))})}var gt=function(tt){for(var et={},rt={},it=0,nt=tt;it<nt.length;it+=1){var ot=nt[it],at=ot.queryResults,st=ot.wrappedTileID,ct=rt[st]=rt[st]||{};for(var ht in at)for(var dt=at[ht],mt=ct[ht]=ct[ht]||{},yt=et[ht]=et[ht]||[],gt=0,vt=dt;gt<vt.length;gt+=1){var _t=vt[gt];mt[_t.featureIndex]||(mt[_t.featureIndex]=!0,yt.push(_t))}}return et}(ht);for(var vt in gt)gt[vt].forEach((function(et){var rt=et.feature,it=tt.getFeatureState(rt.layer["source-layer"],rt.id);rt.source=rt.layer.source,rt.layer["source-layer"]&&(rt.sourceLayer=rt.layer["source-layer"]),rt.state=it}));return gt}function F(tt,et){var rt=tt.tileID,it=et.tileID;return rt.overscaledZ-it.overscaledZ||rt.canonical.y-it.canonical.y||rt.wrap-it.wrap||rt.canonical.x-it.canonical.x}var U=function(tt,et){this.max=tt,this.onRemove=et,this.reset()};U.prototype.reset=function(){for(var tt in this.data)for(var et=0,rt=this.data[tt];et<rt.length;et+=1){var it=rt[et];it.timeout&&clearTimeout(it.timeout),this.onRemove(it.value)}return this.data={},this.order=[],this},U.prototype.add=function(tt,et,rt){var it=this,nt=tt.wrapped().key;void 0===this.data[nt]&&(this.data[nt]=[]);var ot={value:et,timeout:void 0};if(void 0!==rt&&(ot.timeout=setTimeout((function(){it.remove(tt,ot)}),rt)),this.data[nt].push(ot),this.order.push(nt),this.order.length>this.max){var at=this._getAndRemoveByKey(this.order[0]);at&&this.onRemove(at)}return this},U.prototype.has=function(tt){return tt.wrapped().key in this.data},U.prototype.getAndRemove=function(tt){return this.has(tt)?this._getAndRemoveByKey(tt.wrapped().key):null},U.prototype._getAndRemoveByKey=function(tt){var et=this.data[tt].shift();return et.timeout&&clearTimeout(et.timeout),0===this.data[tt].length&&delete this.data[tt],this.order.splice(this.order.indexOf(tt),1),et.value},U.prototype.getByKey=function(tt){var et=this.data[tt];return et?et[0].value:null},U.prototype.get=function(tt){return this.has(tt)?this.data[tt.wrapped().key][0].value:null},U.prototype.remove=function(tt,et){if(!this.has(tt))return this;var rt=tt.wrapped().key,it=void 0===et?0:this.data[rt].indexOf(et),nt=this.data[rt][it];return this.data[rt].splice(it,1),nt.timeout&&clearTimeout(nt.timeout),0===this.data[rt].length&&delete this.data[rt],this.onRemove(nt.value),this.order.splice(this.order.indexOf(rt),1),this},U.prototype.setMaxSize=function(tt){for(this.max=tt;this.order.length>this.max;){var et=this._getAndRemoveByKey(this.order[0]);et&&this.onRemove(et)}return this},U.prototype.filter=function(tt){var et=[];for(var rt in this.data)for(var it=0,nt=this.data[rt];it<nt.length;it+=1){var ot=nt[it];tt(ot.value)||et.push(ot)}for(var at=0,st=et;at<st.length;at+=1){var ct=st[at];this.remove(ct.value.tileID,ct)}};var N=function(tt,et,rt){this.context=tt;var it=tt.gl;this.buffer=it.createBuffer(),this.dynamicDraw=Boolean(rt),this.context.unbindVAO(),tt.bindElementBuffer.set(this.buffer),it.bufferData(it.ELEMENT_ARRAY_BUFFER,et.arrayBuffer,this.dynamicDraw?it.DYNAMIC_DRAW:it.STATIC_DRAW),this.dynamicDraw||delete et.arrayBuffer};N.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},N.prototype.updateData=function(tt){var et=this.context.gl;this.context.unbindVAO(),this.bind(),et.bufferSubData(et.ELEMENT_ARRAY_BUFFER,0,tt.arrayBuffer)},N.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var Ir={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},q=function(tt,et,rt,it){this.length=et.length,this.attributes=rt,this.itemSize=et.bytesPerElement,this.dynamicDraw=it,this.context=tt;var nt=tt.gl;this.buffer=nt.createBuffer(),tt.bindVertexBuffer.set(this.buffer),nt.bufferData(nt.ARRAY_BUFFER,et.arrayBuffer,this.dynamicDraw?nt.DYNAMIC_DRAW:nt.STATIC_DRAW),this.dynamicDraw||delete et.arrayBuffer};q.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},q.prototype.updateData=function(tt){var et=this.context.gl;this.bind(),et.bufferSubData(et.ARRAY_BUFFER,0,tt.arrayBuffer)},q.prototype.enableAttributes=function(tt,et){for(var rt=0;rt<this.attributes.length;rt++){var it=et.attributes[this.attributes[rt].name];void 0!==it&&tt.enableVertexAttribArray(it)}},q.prototype.setVertexAttribPointers=function(tt,et,rt){for(var it=0;it<this.attributes.length;it++){var nt=this.attributes[it],ot=et.attributes[nt.name];void 0!==ot&&tt.vertexAttribPointer(ot,nt.components,tt[Ir[nt.type]],!1,this.itemSize,nt.offset+this.itemSize*(rt||0))}},q.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var j=function(tt){this.gl=tt.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};j.prototype.get=function(){return this.current},j.prototype.set=function(tt){},j.prototype.getDefault=function(){return this.default},j.prototype.setDefault=function(){this.set(this.default)};var ti=function(et){function i(){et.apply(this,arguments)}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.getDefault=function(){return tt.Color.transparent},i.prototype.set=function(tt){var et=this.current;(tt.r!==et.r||tt.g!==et.g||tt.b!==et.b||tt.a!==et.a||this.dirty)&&(this.gl.clearColor(tt.r,tt.g,tt.b,tt.a),this.current=tt,this.dirty=!1)},i}(j),ni=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.clearDepth(tt),this.current=tt,this.dirty=!1)},e}(j),oi=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.clearStencil(tt),this.current=tt,this.dirty=!1)},e}(j),_i=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(tt){var et=this.current;(tt[0]!==et[0]||tt[1]!==et[1]||tt[2]!==et[2]||tt[3]!==et[3]||this.dirty)&&(this.gl.colorMask(tt[0],tt[1],tt[2],tt[3]),this.current=tt,this.dirty=!1)},e}(j),ji=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.depthMask(tt),this.current=tt,this.dirty=!1)},e}(j),Ki=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.stencilMask(tt),this.current=tt,this.dirty=!1)},e}(j),Ji=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(tt){var et=this.current;(tt.func!==et.func||tt.ref!==et.ref||tt.mask!==et.mask||this.dirty)&&(this.gl.stencilFunc(tt.func,tt.ref,tt.mask),this.current=tt,this.dirty=!1)},e}(j),an=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){var tt=this.gl;return[tt.KEEP,tt.KEEP,tt.KEEP]},e.prototype.set=function(tt){var et=this.current;(tt[0]!==et[0]||tt[1]!==et[1]||tt[2]!==et[2]||this.dirty)&&(this.gl.stencilOp(tt[0],tt[1],tt[2]),this.current=tt,this.dirty=!1)},e}(j),_n=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;tt?et.enable(et.STENCIL_TEST):et.disable(et.STENCIL_TEST),this.current=tt,this.dirty=!1}},e}(j),xn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(tt){var et=this.current;(tt[0]!==et[0]||tt[1]!==et[1]||this.dirty)&&(this.gl.depthRange(tt[0],tt[1]),this.current=tt,this.dirty=!1)},e}(j),En=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;tt?et.enable(et.DEPTH_TEST):et.disable(et.DEPTH_TEST),this.current=tt,this.dirty=!1}},e}(j),Tn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.depthFunc(tt),this.current=tt,this.dirty=!1)},e}(j),Cn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;tt?et.enable(et.BLEND):et.disable(et.BLEND),this.current=tt,this.dirty=!1}},e}(j),Pn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){var tt=this.gl;return[tt.ONE,tt.ZERO]},e.prototype.set=function(tt){var et=this.current;(tt[0]!==et[0]||tt[1]!==et[1]||this.dirty)&&(this.gl.blendFunc(tt[0],tt[1]),this.current=tt,this.dirty=!1)},e}(j),Mn=function(et){function i(){et.apply(this,arguments)}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.getDefault=function(){return tt.Color.transparent},i.prototype.set=function(tt){var et=this.current;(tt.r!==et.r||tt.g!==et.g||tt.b!==et.b||tt.a!==et.a||this.dirty)&&(this.gl.blendColor(tt.r,tt.g,tt.b,tt.a),this.current=tt,this.dirty=!1)},i}(j),Dn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.blendEquation(tt),this.current=tt,this.dirty=!1)},e}(j),Ln=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;tt?et.enable(et.CULL_FACE):et.disable(et.CULL_FACE),this.current=tt,this.dirty=!1}},e}(j),Rn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.cullFace(tt),this.current=tt,this.dirty=!1)},e}(j),Fn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.frontFace(tt),this.current=tt,this.dirty=!1)},e}(j),Gn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.useProgram(tt),this.current=tt,this.dirty=!1)},e}(j),Wn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(tt){(tt!==this.current||this.dirty)&&(this.gl.activeTexture(tt),this.current=tt,this.dirty=!1)},e}(j),Qn=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){var tt=this.gl;return[0,0,tt.drawingBufferWidth,tt.drawingBufferHeight]},e.prototype.set=function(tt){var et=this.current;(tt[0]!==et[0]||tt[1]!==et[1]||tt[2]!==et[2]||tt[3]!==et[3]||this.dirty)&&(this.gl.viewport(tt[0],tt[1],tt[2],tt[3]),this.current=tt,this.dirty=!1)},e}(j),lo=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;et.bindFramebuffer(et.FRAMEBUFFER,tt),this.current=tt,this.dirty=!1}},e}(j),uo=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;et.bindRenderbuffer(et.RENDERBUFFER,tt),this.current=tt,this.dirty=!1}},e}(j),co=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;et.bindTexture(et.TEXTURE_2D,tt),this.current=tt,this.dirty=!1}},e}(j),So=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;et.bindBuffer(et.ARRAY_BUFFER,tt),this.current=tt,this.dirty=!1}},e}(j),zo=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(tt){var et=this.gl;et.bindBuffer(et.ELEMENT_ARRAY_BUFFER,tt),this.current=tt,this.dirty=!1},e}(j),ko=function(tt){function e(et){tt.call(this,et),this.vao=et.extVertexArrayObject}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(tt){this.vao&&(tt!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(tt),this.current=tt,this.dirty=!1)},e}(j),ta=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;et.pixelStorei(et.UNPACK_ALIGNMENT,tt),this.current=tt,this.dirty=!1}},e}(j),ea=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;et.pixelStorei(et.UNPACK_PREMULTIPLY_ALPHA_WEBGL,tt),this.current=tt,this.dirty=!1}},e}(j),ra=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){var et=this.gl;et.pixelStorei(et.UNPACK_FLIP_Y_WEBGL,tt),this.current=tt,this.dirty=!1}},e}(j),ia=function(tt){function e(et,rt){tt.call(this,et),this.context=et,this.parent=rt}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e}(j),na=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(tt){if(tt!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var et=this.gl;et.framebufferTexture2D(et.FRAMEBUFFER,et.COLOR_ATTACHMENT0,et.TEXTURE_2D,tt,0),this.current=tt,this.dirty=!1}},e}(ia),oa=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.set=function(tt){if(tt!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var et=this.gl;et.framebufferRenderbuffer(et.FRAMEBUFFER,et.DEPTH_ATTACHMENT,et.RENDERBUFFER,tt),this.current=tt,this.dirty=!1}},e}(ia),Et=function(tt,et,rt,it){this.context=tt,this.width=et,this.height=rt;var nt=this.framebuffer=tt.gl.createFramebuffer();this.colorAttachment=new na(tt,nt),it&&(this.depthAttachment=new oa(tt,nt))};Et.prototype.destroy=function(){var tt=this.context.gl,et=this.colorAttachment.get();if(et&&tt.deleteTexture(et),this.depthAttachment){var rt=this.depthAttachment.get();rt&&tt.deleteRenderbuffer(rt)}tt.deleteFramebuffer(this.framebuffer)};var It=function(tt,et,rt){this.func=tt,this.mask=et,this.range=rt};It.ReadOnly=!1,It.ReadWrite=!0,It.disabled=new It(519,It.ReadOnly,[0,1]);var Pt=function(tt,et,rt,it,nt,ot){this.test=tt,this.ref=et,this.mask=rt,this.fail=it,this.depthFail=nt,this.pass=ot};Pt.disabled=new Pt({func:519,mask:0},0,0,7680,7680,7680);var St=function(tt,et,rt){this.blendFunction=tt,this.blendColor=et,this.mask=rt};St.disabled=new St(St.Replace=[1,0],tt.Color.transparent,[!1,!1,!1,!1]),St.unblended=new St(St.Replace,tt.Color.transparent,[!0,!0,!0,!0]),St.alphaBlended=new St([1,771],tt.Color.transparent,[!0,!0,!0,!0]);var Ct=function(tt,et,rt){this.enable=tt,this.mode=et,this.frontFace=rt};Ct.disabled=new Ct(!1,1029,2305),Ct.backCCW=new Ct(!0,1029,2305);var zt=function(tt){this.gl=tt,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new ti(this),this.clearDepth=new ni(this),this.clearStencil=new oi(this),this.colorMask=new _i(this),this.depthMask=new ji(this),this.stencilMask=new Ki(this),this.stencilFunc=new Ji(this),this.stencilOp=new an(this),this.stencilTest=new _n(this),this.depthRange=new xn(this),this.depthTest=new En(this),this.depthFunc=new Tn(this),this.blend=new Cn(this),this.blendFunc=new Pn(this),this.blendColor=new Mn(this),this.blendEquation=new Dn(this),this.cullFace=new Ln(this),this.cullFaceSide=new Rn(this),this.frontFace=new Fn(this),this.program=new Gn(this),this.activeTexture=new Wn(this),this.viewport=new Qn(this),this.bindFramebuffer=new lo(this),this.bindRenderbuffer=new uo(this),this.bindTexture=new co(this),this.bindVertexBuffer=new So(this),this.bindElementBuffer=new zo(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ko(this),this.pixelStoreUnpack=new ta(this),this.pixelStoreUnpackPremultiplyAlpha=new ea(this),this.pixelStoreUnpackFlipY=new ra(this),this.extTextureFilterAnisotropic=tt.getExtension("EXT_texture_filter_anisotropic")||tt.getExtension("MOZ_EXT_texture_filter_anisotropic")||tt.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=tt.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=tt.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(tt.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=tt.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=tt.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=tt.getParameter(tt.MAX_TEXTURE_SIZE)};zt.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},zt.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},zt.prototype.createIndexBuffer=function(tt,et){return new N(this,tt,et)},zt.prototype.createVertexBuffer=function(tt,et,rt){return new q(this,tt,et,rt)},zt.prototype.createRenderbuffer=function(tt,et,rt){var it=this.gl,nt=it.createRenderbuffer();return this.bindRenderbuffer.set(nt),it.renderbufferStorage(it.RENDERBUFFER,tt,et,rt),this.bindRenderbuffer.set(null),nt},zt.prototype.createFramebuffer=function(tt,et,rt){return new Et(this,tt,et,rt)},zt.prototype.clear=function(tt){var et=tt.color,rt=tt.depth,it=this.gl,nt=0;et&&(nt|=it.COLOR_BUFFER_BIT,this.clearColor.set(et),this.colorMask.set([!0,!0,!0,!0])),void 0!==rt&&(nt|=it.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(rt),this.depthMask.set(!0)),it.clear(nt)},zt.prototype.setCullFace=function(tt){!1===tt.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(tt.mode),this.frontFace.set(tt.frontFace))},zt.prototype.setDepthMode=function(tt){tt.func!==this.gl.ALWAYS||tt.mask?(this.depthTest.set(!0),this.depthFunc.set(tt.func),this.depthMask.set(tt.mask),this.depthRange.set(tt.range)):this.depthTest.set(!1)},zt.prototype.setStencilMode=function(tt){tt.test.func!==this.gl.ALWAYS||tt.mask?(this.stencilTest.set(!0),this.stencilMask.set(tt.mask),this.stencilOp.set([tt.fail,tt.depthFail,tt.pass]),this.stencilFunc.set({func:tt.test.func,ref:tt.ref,mask:tt.test.mask})):this.stencilTest.set(!1)},zt.prototype.setColorMode=function(et){tt.deepEqual(et.blendFunction,St.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(et.blendFunction),this.blendColor.set(et.blendColor)),this.colorMask.set(et.mask)},zt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var aa=function(et){function i(rt,it,nt){var ot=this;et.call(this),this.id=rt,this.dispatcher=nt,this.on("data",(function(tt){"source"===tt.dataType&&"metadata"===tt.sourceDataType&&(ot._sourceLoaded=!0),ot._sourceLoaded&&!ot._paused&&"source"===tt.dataType&&"content"===tt.sourceDataType&&(ot.reload(),ot.transform&&ot.update(ot.transform))})),this.on("error",(function(){ot._sourceErrored=!0})),this._source=function(et,rt,it,nt){var ot=new wr[rt.type](et,rt,it,nt);if(ot.id!==et)throw new Error("Expected Source id to be "+et+" instead of "+ot.id);return tt.bindAll(["load","abort","unload","serialize","prepare"],ot),ot}(rt,it,nt,this),this._tiles={},this._cache=new U(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new tt.SourceFeatureState}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.onAdd=function(tt){this.map=tt,this._maxTileCacheSize=tt?tt._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(tt)},i.prototype.onRemove=function(tt){this._source&&this._source.onRemove&&this._source.onRemove(tt)},i.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var tt in this._tiles){var et=this._tiles[tt];if("loaded"!==et.state&&"errored"!==et.state)return!1}return!0},i.prototype.getSource=function(){return this._source},i.prototype.pause=function(){this._paused=!0},i.prototype.resume=function(){if(this._paused){var tt=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,tt&&this.reload(),this.transform&&this.update(this.transform)}},i.prototype._loadTile=function(tt,et){return this._source.loadTile(tt,et)},i.prototype._unloadTile=function(tt){if(this._source.unloadTile)return this._source.unloadTile(tt,(function(){}))},i.prototype._abortTile=function(tt){if(this._source.abortTile)return this._source.abortTile(tt,(function(){}))},i.prototype.serialize=function(){return this._source.serialize()},i.prototype.prepare=function(tt){for(var et in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var rt=this._tiles[et];rt.upload(tt),rt.prepare(this.map.style.imageManager)}},i.prototype.getIds=function(){return tt.values(this._tiles).map((function(tt){return tt.tileID})).sort(At).map((function(tt){return tt.key}))},i.prototype.getRenderableIds=function(et){var rt=this,it=[];for(var nt in this._tiles)this._isIdRenderable(nt,et)&&it.push(this._tiles[nt]);return et?it.sort((function(et,it){var nt=et.tileID,ot=it.tileID,at=new tt.Point(nt.canonical.x,nt.canonical.y)._rotate(rt.transform.angle),st=new tt.Point(ot.canonical.x,ot.canonical.y)._rotate(rt.transform.angle);return nt.overscaledZ-ot.overscaledZ||st.y-at.y||st.x-at.x})).map((function(tt){return tt.tileID.key})):it.map((function(tt){return tt.tileID})).sort(At).map((function(tt){return tt.key}))},i.prototype.hasRenderableParent=function(tt){var et=this.findLoadedParent(tt,0);return!!et&&this._isIdRenderable(et.tileID.key)},i.prototype._isIdRenderable=function(tt,et){return this._tiles[tt]&&this._tiles[tt].hasData()&&!this._coveredTiles[tt]&&(et||!this._tiles[tt].holdingForFade())},i.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var tt in this._cache.reset(),this._tiles)"errored"!==this._tiles[tt].state&&this._reloadTile(tt,"reloading")},i.prototype._reloadTile=function(tt,et){var rt=this._tiles[tt];rt&&("loading"!==rt.state&&(rt.state=et),this._loadTile(rt,this._tileLoaded.bind(this,rt,tt,et)))},i.prototype._tileLoaded=function(et,rt,it,nt){if(nt)return et.state="errored",void(404!==nt.status?this._source.fire(new tt.ErrorEvent(nt,{tile:et})):this.update(this.transform));et.timeAdded=tt.browser.now(),"expired"===it&&(et.refreshedUponExpiration=!0),this._setTileReloadTimer(rt,et),"raster-dem"===this.getSource().type&&et.dem&&this._backfillDEM(et),this._state.initializeTileState(et,this.map?this.map.painter:null),this._source.fire(new tt.Event("data",{dataType:"source",tile:et,coord:et.tileID}))},i.prototype._backfillDEM=function(tt){for(var et=this.getRenderableIds(),rt=0;rt<et.length;rt++){var it=et[rt];if(tt.neighboringTiles&&tt.neighboringTiles[it]){var nt=this.getTileByID(it);a(tt,nt),a(nt,tt)}}function a(tt,et){tt.needsHillshadePrepare=!0;var rt=et.tileID.canonical.x-tt.tileID.canonical.x,it=et.tileID.canonical.y-tt.tileID.canonical.y,nt=Math.pow(2,tt.tileID.canonical.z),ot=et.tileID.key;0===rt&&0===it||Math.abs(it)>1||(Math.abs(rt)>1&&(1===Math.abs(rt+nt)?rt+=nt:1===Math.abs(rt-nt)&&(rt-=nt)),et.dem&&tt.dem&&(tt.dem.backfillBorder(et.dem,rt,it),tt.neighboringTiles&&tt.neighboringTiles[ot]&&(tt.neighboringTiles[ot].backfilled=!0)))}},i.prototype.getTile=function(tt){return this.getTileByID(tt.key)},i.prototype.getTileByID=function(tt){return this._tiles[tt]},i.prototype._retainLoadedChildren=function(tt,et,rt,it){for(var nt in this._tiles){var ot=this._tiles[nt];if(!(it[nt]||!ot.hasData()||ot.tileID.overscaledZ<=et||ot.tileID.overscaledZ>rt)){for(var at=ot.tileID;ot&&ot.tileID.overscaledZ>et+1;){var st=ot.tileID.scaledTo(ot.tileID.overscaledZ-1);(ot=this._tiles[st.key])&&ot.hasData()&&(at=st)}for(var ct=at;ct.overscaledZ>et;)if(tt[(ct=ct.scaledTo(ct.overscaledZ-1)).key]){it[at.key]=at;break}}}},i.prototype.findLoadedParent=function(tt,et){if(tt.key in this._loadedParentTiles){var rt=this._loadedParentTiles[tt.key];return rt&&rt.tileID.overscaledZ>=et?rt:null}for(var it=tt.overscaledZ-1;it>=et;it--){var nt=tt.scaledTo(it),ot=this._getLoadedTile(nt);if(ot)return ot}},i.prototype._getLoadedTile=function(tt){var et=this._tiles[tt.key];return et&&et.hasData()?et:this._cache.getByKey(tt.wrapped().key)},i.prototype.updateCacheSize=function(tt){var et=Math.ceil(tt.width/this._source.tileSize)+1,rt=Math.ceil(tt.height/this._source.tileSize)+1,it=Math.floor(et*rt*5),nt="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,it):it;this._cache.setMaxSize(nt)},i.prototype.handleWrapJump=function(tt){var et=Math.round((tt-(void 0===this._prevLng?tt:this._prevLng))/360);if(this._prevLng=tt,et){var rt={};for(var it in this._tiles){var nt=this._tiles[it];nt.tileID=nt.tileID.unwrapTo(nt.tileID.wrap+et),rt[nt.tileID.key]=nt}for(var ot in this._tiles=rt,this._timers)clearTimeout(this._timers[ot]),delete this._timers[ot];for(var at in this._tiles)this._setTileReloadTimer(at,this._tiles[at])}},i.prototype.update=function(et){var rt=this;if(this.transform=et,this._sourceLoaded&&!this._paused){var it;this.updateCacheSize(et),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?it=et.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(et){return new tt.OverscaledTileID(et.canonical.z,et.wrap,et.canonical.z,et.canonical.x,et.canonical.y)})):(it=et.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(it=it.filter((function(tt){return rt._source.hasTile(tt)})))):it=[];var nt=et.coveringZoomLevel(this._source),ot=Math.max(nt-i.maxOverzooming,this._source.minzoom),at=Math.max(nt+i.maxUnderzooming,this._source.minzoom),st=this._updateRetainedTiles(it,nt);if(Mt(this._source.type)){for(var ct={},ht={},dt=0,mt=Object.keys(st);dt<mt.length;dt+=1){var yt=mt[dt],gt=st[yt],vt=this._tiles[yt];if(vt&&!(vt.fadeEndTime&&vt.fadeEndTime<=tt.browser.now())){var _t=this.findLoadedParent(gt,ot);_t&&(this._addTile(_t.tileID),ct[_t.tileID.key]=_t.tileID),ht[yt]=gt}}for(var Rt in this._retainLoadedChildren(ht,nt,at,st),ct)st[Rt]||(this._coveredTiles[Rt]=!0,st[Rt]=ct[Rt])}for(var Ot in st)this._tiles[Ot].clearFadeHold();for(var Zt=0,Ze=tt.keysDifference(this._tiles,st);Zt<Ze.length;Zt+=1){var Ge=Ze[Zt],Xe=this._tiles[Ge];Xe.hasSymbolBuckets&&!Xe.holdingForFade()?Xe.setHoldDuration(this.map._fadeDuration):Xe.hasSymbolBuckets&&!Xe.symbolFadeFinished()||this._removeTile(Ge)}this._updateLoadedParentTileCache()}},i.prototype.releaseSymbolFadeTiles=function(){for(var tt in this._tiles)this._tiles[tt].holdingForFade()&&this._removeTile(tt)},i.prototype._updateRetainedTiles=function(tt,et){for(var rt={},it={},nt=Math.max(et-i.maxOverzooming,this._source.minzoom),ot=Math.max(et+i.maxUnderzooming,this._source.minzoom),at={},st=0,ct=tt;st<ct.length;st+=1){var ht=ct[st],dt=this._addTile(ht);rt[ht.key]=ht,dt.hasData()||et<this._source.maxzoom&&(at[ht.key]=ht)}this._retainLoadedChildren(at,et,ot,rt);for(var mt=0,yt=tt;mt<yt.length;mt+=1){var gt=yt[mt],vt=this._tiles[gt.key];if(!vt.hasData()){if(et+1>this._source.maxzoom){var _t=gt.children(this._source.maxzoom)[0],Rt=this.getTile(_t);if(Rt&&Rt.hasData()){rt[_t.key]=_t;continue}}else{var Ot=gt.children(this._source.maxzoom);if(rt[Ot[0].key]&&rt[Ot[1].key]&&rt[Ot[2].key]&&rt[Ot[3].key])continue}for(var Zt=vt.wasRequested(),Ze=gt.overscaledZ-1;Ze>=nt;--Ze){var Ge=gt.scaledTo(Ze);if(it[Ge.key])break;if(it[Ge.key]=!0,!(vt=this.getTile(Ge))&&Zt&&(vt=this._addTile(Ge)),vt&&(rt[Ge.key]=Ge,Zt=vt.wasRequested(),vt.hasData()))break}}}return rt},i.prototype._updateLoadedParentTileCache=function(){for(var tt in this._loadedParentTiles={},this._tiles){for(var et=[],rt=void 0,it=this._tiles[tt].tileID;it.overscaledZ>0;){if(it.key in this._loadedParentTiles){rt=this._loadedParentTiles[it.key];break}et.push(it.key);var nt=it.scaledTo(it.overscaledZ-1);if(rt=this._getLoadedTile(nt))break;it=nt}for(var ot=0,at=et;ot<at.length;ot+=1)this._loadedParentTiles[at[ot]]=rt}},i.prototype._addTile=function(et){var rt=this._tiles[et.key];if(rt)return rt;(rt=this._cache.getAndRemove(et))&&(this._setTileReloadTimer(et.key,rt),rt.tileID=et,this._state.initializeTileState(rt,this.map?this.map.painter:null),this._cacheTimers[et.key]&&(clearTimeout(this._cacheTimers[et.key]),delete this._cacheTimers[et.key],this._setTileReloadTimer(et.key,rt)));var it=Boolean(rt);return it||(rt=new tt.Tile(et,this._source.tileSize*et.overscaleFactor()),this._loadTile(rt,this._tileLoaded.bind(this,rt,et.key,rt.state))),rt?(rt.uses++,this._tiles[et.key]=rt,it||this._source.fire(new tt.Event("dataloading",{tile:rt,coord:rt.tileID,dataType:"source"})),rt):null},i.prototype._setTileReloadTimer=function(tt,et){var rt=this;tt in this._timers&&(clearTimeout(this._timers[tt]),delete this._timers[tt]);var it=et.getExpiryTimeout();it&&(this._timers[tt]=setTimeout((function(){rt._reloadTile(tt,"expired"),delete rt._timers[tt]}),it))},i.prototype._removeTile=function(tt){var et=this._tiles[tt];et&&(et.uses--,delete this._tiles[tt],this._timers[tt]&&(clearTimeout(this._timers[tt]),delete this._timers[tt]),et.uses>0||(et.hasData()&&"reloading"!==et.state?this._cache.add(et.tileID,et,et.getExpiryTimeout()):(et.aborted=!0,this._abortTile(et),this._unloadTile(et))))},i.prototype.clearTiles=function(){for(var tt in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(tt);this._cache.reset()},i.prototype.tilesIn=function(et,rt,it){var nt=this,ot=[],at=this.transform;if(!at)return ot;for(var st=it?at.getCameraQueryGeometry(et):et,ct=et.map((function(tt){return at.pointCoordinate(tt)})),ht=st.map((function(tt){return at.pointCoordinate(tt)})),dt=this.getIds(),mt=1/0,yt=1/0,gt=-1/0,vt=-1/0,_t=0,Rt=ht;_t<Rt.length;_t+=1){var Ot=Rt[_t];mt=Math.min(mt,Ot.x),yt=Math.min(yt,Ot.y),gt=Math.max(gt,Ot.x),vt=Math.max(vt,Ot.y)}for(var v=function(et){var it=nt._tiles[dt[et]];if(!it.holdingForFade()){var st=it.tileID,_t=Math.pow(2,at.zoom-it.tileID.overscaledZ),Rt=rt*it.queryPadding*tt.EXTENT/it.tileSize/_t,Ot=[st.getTilePoint(new tt.MercatorCoordinate(mt,yt)),st.getTilePoint(new tt.MercatorCoordinate(gt,vt))];if(Ot[0].x-Rt<tt.EXTENT&&Ot[0].y-Rt<tt.EXTENT&&Ot[1].x+Rt>=0&&Ot[1].y+Rt>=0){var Zt=ct.map((function(tt){return st.getTilePoint(tt)})),Ze=ht.map((function(tt){return st.getTilePoint(tt)}));ot.push({tile:it,tileID:st,queryGeometry:Zt,cameraQueryGeometry:Ze,scale:_t})}}},Zt=0;Zt<dt.length;Zt++)v(Zt);return ot},i.prototype.getVisibleCoordinates=function(tt){for(var et=this,rt=this.getRenderableIds(tt).map((function(tt){return et._tiles[tt].tileID})),it=0,nt=rt;it<nt.length;it+=1){var ot=nt[it];ot.posMatrix=this.transform.calculatePosMatrix(ot.toUnwrapped())}return rt},i.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Mt(this._source.type))for(var et in this._tiles){var rt=this._tiles[et];if(void 0!==rt.fadeEndTime&&rt.fadeEndTime>=tt.browser.now())return!0}return!1},i.prototype.setFeatureState=function(tt,et,rt){this._state.updateState(tt=tt||"_geojsonTileLayer",et,rt)},i.prototype.removeFeatureState=function(tt,et,rt){this._state.removeFeatureState(tt=tt||"_geojsonTileLayer",et,rt)},i.prototype.getFeatureState=function(tt,et){return this._state.getState(tt=tt||"_geojsonTileLayer",et)},i.prototype.setDependencies=function(tt,et,rt){var it=this._tiles[tt];it&&it.setDependencies(et,rt)},i.prototype.reloadTilesForDependencies=function(tt,et){for(var rt in this._tiles)this._tiles[rt].hasDependency(tt,et)&&this._reloadTile(rt,"reloading");this._cache.filter((function(rt){return!rt.hasDependency(tt,et)}))},i}(tt.Evented);function At(tt,et){var rt=Math.abs(2*tt.wrap)-+(tt.wrap<0),it=Math.abs(2*et.wrap)-+(et.wrap<0);return tt.overscaledZ-et.overscaledZ||it-rt||et.canonical.y-tt.canonical.y||et.canonical.x-tt.canonical.x}function Mt(tt){return"raster"===tt||"image"===tt||"video"===tt}function Lt(){return new tt.window.Worker(Ec.workerUrl)}aa.maxOverzooming=10,aa.maxUnderzooming=3;var la="mapboxgl_preloaded_worker_pool",kt=function(){this.active={}};kt.prototype.acquire=function(tt){if(!this.workers)for(this.workers=[];this.workers.length<kt.workerCount;)this.workers.push(new Lt);return this.active[tt]=!0,this.workers.slice()},kt.prototype.release=function(tt){delete this.active[tt],0===this.numActive()&&(this.workers.forEach((function(tt){tt.terminate()})),this.workers=null)},kt.prototype.isPreloaded=function(){return!!this.active[la]},kt.prototype.numActive=function(){return Object.keys(this.active).length};var ca,pa=Math.floor(tt.browser.hardwareConcurrency/2);function Ft(){return ca||(ca=new kt),ca}function Ut(et,rt){var it={};for(var nt in et)"ref"!==nt&&(it[nt]=et[nt]);return tt.refProperties.forEach((function(tt){tt in rt&&(it[tt]=rt[tt])})),it}function Nt(tt){tt=tt.slice();for(var et=Object.create(null),rt=0;rt<tt.length;rt++)et[tt[rt].id]=tt[rt];for(var it=0;it<tt.length;it++)"ref"in tt[it]&&(tt[it]=Ut(tt[it],et[tt[it].ref]));return tt}kt.workerCount=Math.max(Math.min(pa,6),1);var ha={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function qt(tt,et,rt){rt.push({command:ha.addSource,args:[tt,et[tt]]})}function jt(tt,et,rt){et.push({command:ha.removeSource,args:[tt]}),rt[tt]=!0}function Vt(tt,et,rt,it){jt(tt,rt,it),qt(tt,et,rt)}function Gt(et,rt,it){var nt;for(nt in et[it])if(et[it].hasOwnProperty(nt)&&"data"!==nt&&!tt.deepEqual(et[it][nt],rt[it][nt]))return!1;for(nt in rt[it])if(rt[it].hasOwnProperty(nt)&&"data"!==nt&&!tt.deepEqual(et[it][nt],rt[it][nt]))return!1;return!0}function Wt(et,rt,it,nt,ot,at){var st;for(st in rt=rt||{},et=et||{})et.hasOwnProperty(st)&&(tt.deepEqual(et[st],rt[st])||it.push({command:at,args:[nt,st,rt[st],ot]}));for(st in rt)rt.hasOwnProperty(st)&&!et.hasOwnProperty(st)&&(tt.deepEqual(et[st],rt[st])||it.push({command:at,args:[nt,st,rt[st],ot]}))}function Xt(tt){return tt.id}function Ht(tt,et){return tt[et.id]=et,tt}var Kt=function(tt,et){this.reset(tt,et)};Kt.prototype.reset=function(tt,et){this.points=tt||[],this._distances=[0];for(var rt=1;rt<this.points.length;rt++)this._distances[rt]=this._distances[rt-1]+this.points[rt].dist(this.points[rt-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(et||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Kt.prototype.lerp=function(et){if(1===this.points.length)return this.points[0];et=tt.clamp(et,0,1);for(var rt=1,it=this._distances[rt],nt=et*this.paddedLength+this.padding;it<nt&&rt<this._distances.length;)it=this._distances[++rt];var ot=rt-1,at=this._distances[ot],st=it-at,ct=st>0?(nt-at)/st:0;return this.points[ot].mult(1-ct).add(this.points[rt].mult(ct))};var Yt=function(tt,et,rt){var it=this.boxCells=[],nt=this.circleCells=[];this.xCellCount=Math.ceil(tt/rt),this.yCellCount=Math.ceil(et/rt);for(var ot=0;ot<this.xCellCount*this.yCellCount;ot++)it.push([]),nt.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=tt,this.height=et,this.xScale=this.xCellCount/tt,this.yScale=this.yCellCount/et,this.boxUid=0,this.circleUid=0};function Jt(et,rt,it,nt,ot){var at=tt.create();return rt?(tt.scale(at,at,[1/ot,1/ot,1]),it||tt.rotateZ(at,at,nt.angle)):tt.multiply(at,nt.labelPlaneMatrix,et),at}function Qt(et,rt,it,nt,ot){if(rt){var at=tt.clone(et);return tt.scale(at,at,[ot,ot,1]),it||tt.rotateZ(at,at,-nt.angle),at}return nt.glCoordMatrix}function $t(et,rt){var it=[et.x,et.y,0,1];ue(it,it,rt);var nt=it[3];return{point:new tt.Point(it[0]/nt,it[1]/nt),signedDistanceFromCamera:nt}}function te(tt,et){return.5+tt/et*.5}function ee(tt,et){var rt=tt[0]/tt[3],it=tt[1]/tt[3];return rt>=-et[0]&&rt<=et[0]&&it>=-et[1]&&it<=et[1]}function ie(et,rt,it,nt,ot,at,st,ct){var ht=nt?et.textSizeData:et.iconSizeData,dt=tt.evaluateSizeForZoom(ht,it.transform.zoom),mt=[256/it.width*2+1,256/it.height*2+1],yt=nt?et.text.dynamicLayoutVertexArray:et.icon.dynamicLayoutVertexArray;yt.clear();for(var gt=et.lineVertexArray,vt=nt?et.text.placedSymbolArray:et.icon.placedSymbolArray,_t=it.transform.width/it.transform.height,Rt=!1,Ot=0;Ot<vt.length;Ot++){var Zt=vt.get(Ot);if(Zt.hidden||Zt.writingMode===tt.WritingMode.vertical&&!Rt)ce(Zt.numGlyphs,yt);else{Rt=!1;var Ze=[Zt.anchorX,Zt.anchorY,0,1];if(tt.transformMat4(Ze,Ze,rt),ee(Ze,mt)){var Ge=te(it.transform.cameraToCenterDistance,Ze[3]),Xe=tt.evaluateSizeForFeature(ht,dt,Zt),Je=st?Xe/Ge:Xe*Ge,rr=new tt.Point(Zt.anchorX,Zt.anchorY),wr=$t(rr,ot).point,Ir={},ti=ae(Zt,Je,!1,ct,rt,ot,at,et.glyphOffsetArray,gt,yt,wr,rr,Ir,_t);Rt=ti.useVertical,(ti.notEnoughRoom||Rt||ti.needsFlipping&&ae(Zt,Je,!0,ct,rt,ot,at,et.glyphOffsetArray,gt,yt,wr,rr,Ir,_t).notEnoughRoom)&&ce(Zt.numGlyphs,yt)}else ce(Zt.numGlyphs,yt)}}nt?et.text.dynamicLayoutVertexBuffer.updateData(yt):et.icon.dynamicLayoutVertexBuffer.updateData(yt)}function oe(tt,et,rt,it,nt,ot,at,st,ct,ht,dt){var mt=st.glyphStartIndex+st.numGlyphs,yt=st.lineStartIndex,gt=st.lineStartIndex+st.lineLength,vt=et.getoffsetX(st.glyphStartIndex),_t=et.getoffsetX(mt-1),Rt=se(tt*vt,rt,it,nt,ot,at,st.segment,yt,gt,ct,ht,dt);if(!Rt)return null;var Ot=se(tt*_t,rt,it,nt,ot,at,st.segment,yt,gt,ct,ht,dt);return Ot?{first:Rt,last:Ot}:null}function re(et,rt,it,nt){return et===tt.WritingMode.horizontal&&Math.abs(it.y-rt.y)>Math.abs(it.x-rt.x)*nt?{useVertical:!0}:(et===tt.WritingMode.vertical?rt.y<it.y:rt.x>it.x)?{needsFlipping:!0}:null}function ae(et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt){var _t,Rt=rt/24,Ot=et.lineOffsetX*Rt,Zt=et.lineOffsetY*Rt;if(et.numGlyphs>1){var Ze=et.glyphStartIndex+et.numGlyphs,Ge=et.lineStartIndex,Xe=et.lineStartIndex+et.lineLength,Je=oe(Rt,ct,Ot,Zt,it,mt,yt,et,ht,at,gt);if(!Je)return{notEnoughRoom:!0};var rr=$t(Je.first.point,st).point,wr=$t(Je.last.point,st).point;if(nt&&!it){var Ir=re(et.writingMode,rr,wr,vt);if(Ir)return Ir}_t=[Je.first];for(var ti=et.glyphStartIndex+1;ti<Ze-1;ti++)_t.push(se(Rt*ct.getoffsetX(ti),Ot,Zt,it,mt,yt,et.segment,Ge,Xe,ht,at,gt));_t.push(Je.last)}else{if(nt&&!it){var ni=$t(yt,ot).point,oi=et.lineStartIndex+et.segment+1,_i=new tt.Point(ht.getx(oi),ht.gety(oi)),ji=$t(_i,ot),Ki=ji.signedDistanceFromCamera>0?ji.point:ne(yt,_i,ni,1,ot),Ji=re(et.writingMode,ni,Ki,vt);if(Ji)return Ji}var an=se(Rt*ct.getoffsetX(et.glyphStartIndex),Ot,Zt,it,mt,yt,et.segment,et.lineStartIndex,et.lineStartIndex+et.lineLength,ht,at,gt);if(!an)return{notEnoughRoom:!0};_t=[an]}for(var _n=0,xn=_t;_n<xn.length;_n+=1){var En=xn[_n];tt.addDynamicAttributes(dt,En.point,En.angle)}return{}}function ne(tt,et,rt,it,nt){var ot=$t(tt.add(tt.sub(et)._unit()),nt).point,at=rt.sub(ot);return rt.add(at._mult(it/at.mag()))}function se(et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt){var gt=nt?et-rt:et+rt,vt=gt>0?1:-1,_t=0;nt&&(vt*=-1,_t=Math.PI),vt<0&&(_t+=Math.PI);for(var Rt=vt>0?ct+st:ct+st+1,Ot=ot,Zt=ot,Ze=0,Ge=0,Xe=Math.abs(gt),Je=[];Ze+Ge<=Xe;){if((Rt+=vt)<ct||Rt>=ht)return null;if(Zt=Ot,Je.push(Ot),void 0===(Ot=yt[Rt])){var rr=new tt.Point(dt.getx(Rt),dt.gety(Rt)),wr=$t(rr,mt);if(wr.signedDistanceFromCamera>0)Ot=yt[Rt]=wr.point;else{var Ir=Rt-vt;Ot=ne(0===Ze?at:new tt.Point(dt.getx(Ir),dt.gety(Ir)),rr,Zt,Xe-Ze+1,mt)}}Ze+=Ge,Ge=Zt.dist(Ot)}var ti=(Xe-Ze)/Ge,ni=Ot.sub(Zt),oi=ni.mult(ti)._add(Zt);oi._add(ni._unit()._perp()._mult(it*vt));var _i=_t+Math.atan2(Ot.y-Zt.y,Ot.x-Zt.x);return Je.push(oi),{point:oi,angle:_i,path:Je}}Yt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Yt.prototype.insert=function(tt,et,rt,it,nt){this._forEachCell(et,rt,it,nt,this._insertBoxCell,this.boxUid++),this.boxKeys.push(tt),this.bboxes.push(et),this.bboxes.push(rt),this.bboxes.push(it),this.bboxes.push(nt)},Yt.prototype.insertCircle=function(tt,et,rt,it){this._forEachCell(et-it,rt-it,et+it,rt+it,this._insertCircleCell,this.circleUid++),this.circleKeys.push(tt),this.circles.push(et),this.circles.push(rt),this.circles.push(it)},Yt.prototype._insertBoxCell=function(tt,et,rt,it,nt,ot){this.boxCells[nt].push(ot)},Yt.prototype._insertCircleCell=function(tt,et,rt,it,nt,ot){this.circleCells[nt].push(ot)},Yt.prototype._query=function(tt,et,rt,it,nt,ot){if(rt<0||tt>this.width||it<0||et>this.height)return!nt&&[];var at=[];if(tt<=0&&et<=0&&this.width<=rt&&this.height<=it){if(nt)return!0;for(var st=0;st<this.boxKeys.length;st++)at.push({key:this.boxKeys[st],x1:this.bboxes[4*st],y1:this.bboxes[4*st+1],x2:this.bboxes[4*st+2],y2:this.bboxes[4*st+3]});for(var ct=0;ct<this.circleKeys.length;ct++){var ht=this.circles[3*ct],dt=this.circles[3*ct+1],mt=this.circles[3*ct+2];at.push({key:this.circleKeys[ct],x1:ht-mt,y1:dt-mt,x2:ht+mt,y2:dt+mt})}return ot?at.filter(ot):at}return this._forEachCell(tt,et,rt,it,this._queryCell,at,{hitTest:nt,seenUids:{box:{},circle:{}}},ot),nt?at.length>0:at},Yt.prototype._queryCircle=function(tt,et,rt,it,nt){var ot=tt-rt,at=tt+rt,st=et-rt,ct=et+rt;if(at<0||ot>this.width||ct<0||st>this.height)return!it&&[];var ht=[];return this._forEachCell(ot,st,at,ct,this._queryCellCircle,ht,{hitTest:it,circle:{x:tt,y:et,radius:rt},seenUids:{box:{},circle:{}}},nt),it?ht.length>0:ht},Yt.prototype.query=function(tt,et,rt,it,nt){return this._query(tt,et,rt,it,!1,nt)},Yt.prototype.hitTest=function(tt,et,rt,it,nt){return this._query(tt,et,rt,it,!0,nt)},Yt.prototype.hitTestCircle=function(tt,et,rt,it){return this._queryCircle(tt,et,rt,!0,it)},Yt.prototype._queryCell=function(tt,et,rt,it,nt,ot,at,st){var ct=at.seenUids,ht=this.boxCells[nt];if(null!==ht)for(var dt=this.bboxes,mt=0,yt=ht;mt<yt.length;mt+=1){var gt=yt[mt];if(!ct.box[gt]){ct.box[gt]=!0;var vt=4*gt;if(tt<=dt[vt+2]&&et<=dt[vt+3]&&rt>=dt[vt+0]&&it>=dt[vt+1]&&(!st||st(this.boxKeys[gt]))){if(at.hitTest)return ot.push(!0),!0;ot.push({key:this.boxKeys[gt],x1:dt[vt],y1:dt[vt+1],x2:dt[vt+2],y2:dt[vt+3]})}}}var _t=this.circleCells[nt];if(null!==_t)for(var Rt=this.circles,Ot=0,Zt=_t;Ot<Zt.length;Ot+=1){var Ze=Zt[Ot];if(!ct.circle[Ze]){ct.circle[Ze]=!0;var Ge=3*Ze;if(this._circleAndRectCollide(Rt[Ge],Rt[Ge+1],Rt[Ge+2],tt,et,rt,it)&&(!st||st(this.circleKeys[Ze]))){if(at.hitTest)return ot.push(!0),!0;var Xe=Rt[Ge],Je=Rt[Ge+1],rr=Rt[Ge+2];ot.push({key:this.circleKeys[Ze],x1:Xe-rr,y1:Je-rr,x2:Xe+rr,y2:Je+rr})}}}},Yt.prototype._queryCellCircle=function(tt,et,rt,it,nt,ot,at,st){var ct=at.circle,ht=at.seenUids,dt=this.boxCells[nt];if(null!==dt)for(var mt=this.bboxes,yt=0,gt=dt;yt<gt.length;yt+=1){var vt=gt[yt];if(!ht.box[vt]){ht.box[vt]=!0;var _t=4*vt;if(this._circleAndRectCollide(ct.x,ct.y,ct.radius,mt[_t+0],mt[_t+1],mt[_t+2],mt[_t+3])&&(!st||st(this.boxKeys[vt])))return ot.push(!0),!0}}var Rt=this.circleCells[nt];if(null!==Rt)for(var Ot=this.circles,Zt=0,Ze=Rt;Zt<Ze.length;Zt+=1){var Ge=Ze[Zt];if(!ht.circle[Ge]){ht.circle[Ge]=!0;var Xe=3*Ge;if(this._circlesCollide(Ot[Xe],Ot[Xe+1],Ot[Xe+2],ct.x,ct.y,ct.radius)&&(!st||st(this.circleKeys[Ge])))return ot.push(!0),!0}}},Yt.prototype._forEachCell=function(tt,et,rt,it,nt,ot,at,st){for(var ct=this._convertToXCellCoord(tt),ht=this._convertToYCellCoord(et),dt=this._convertToXCellCoord(rt),mt=this._convertToYCellCoord(it),yt=ct;yt<=dt;yt++)for(var gt=ht;gt<=mt;gt++)if(nt.call(this,tt,et,rt,it,this.xCellCount*gt+yt,ot,at,st))return},Yt.prototype._convertToXCellCoord=function(tt){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(tt*this.xScale)))},Yt.prototype._convertToYCellCoord=function(tt){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(tt*this.yScale)))},Yt.prototype._circlesCollide=function(tt,et,rt,it,nt,ot){var at=it-tt,st=nt-et,ct=rt+ot;return ct*ct>at*at+st*st},Yt.prototype._circleAndRectCollide=function(tt,et,rt,it,nt,ot,at){var st=(ot-it)/2,ct=Math.abs(tt-(it+st));if(ct>st+rt)return!1;var ht=(at-nt)/2,dt=Math.abs(et-(nt+ht));if(dt>ht+rt)return!1;if(ct<=st||dt<=ht)return!0;var mt=ct-st,yt=dt-ht;return mt*mt+yt*yt<=rt*rt};var fa=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ce(tt,et){for(var rt=0;rt<tt;rt++){var it=et.length;et.resize(it+4),et.float32.set(fa,3*it)}}function ue(tt,et,rt){var it=et[0],nt=et[1];return tt[0]=rt[0]*it+rt[4]*nt+rt[12],tt[1]=rt[1]*it+rt[5]*nt+rt[13],tt[3]=rt[3]*it+rt[7]*nt+rt[15],tt}var he=function(tt,et,rt){void 0===et&&(et=new Yt(tt.width+200,tt.height+200,25)),void 0===rt&&(rt=new Yt(tt.width+200,tt.height+200,25)),this.transform=tt,this.grid=et,this.ignoredGrid=rt,this.pitchfactor=Math.cos(tt._pitch)*tt.cameraToCenterDistance,this.screenRightBoundary=tt.width+100,this.screenBottomBoundary=tt.height+100,this.gridRightBoundary=tt.width+200,this.gridBottomBoundary=tt.height+200};function pe(et,rt,it){return rt*(tt.EXTENT/(et.tileSize*Math.pow(2,it-et.tileID.overscaledZ)))}he.prototype.placeCollisionBox=function(tt,et,rt,it,nt){var ot=this.projectAndGetPerspectiveRatio(it,tt.anchorPointX,tt.anchorPointY),at=rt*ot.perspectiveRatio,st=tt.x1*at+ot.point.x,ct=tt.y1*at+ot.point.y,ht=tt.x2*at+ot.point.x,dt=tt.y2*at+ot.point.y;return!this.isInsideGrid(st,ct,ht,dt)||!et&&this.grid.hitTest(st,ct,ht,dt,nt)?{box:[],offscreen:!1}:{box:[st,ct,ht,dt],offscreen:this.isOffscreen(st,ct,ht,dt)}},he.prototype.placeCollisionCircles=function(et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt){var vt=[],_t=new tt.Point(rt.anchorX,rt.anchorY),Rt=$t(_t,at),Ot=te(this.transform.cameraToCenterDistance,Rt.signedDistanceFromCamera),Zt=(dt?ot/Ot:ot*Ot)/tt.ONE_EM,Ze=$t(_t,st).point,Ge=oe(Zt,nt,rt.lineOffsetX*Zt,rt.lineOffsetY*Zt,!1,Ze,_t,rt,it,st,{}),Xe=!1,Je=!1,rr=!0;if(Ge){for(var wr=.5*yt*Ot+gt,Ir=new tt.Point(-100,-100),ti=new tt.Point(this.screenRightBoundary,this.screenBottomBoundary),ni=new Kt,oi=Ge.first,_i=Ge.last,ji=[],Ki=oi.path.length-1;Ki>=1;Ki--)ji.push(oi.path[Ki]);for(var Ji=1;Ji<_i.path.length;Ji++)ji.push(_i.path[Ji]);var an=2.5*wr;if(ct){var _n=ji.map((function(tt){return $t(tt,ct)}));ji=_n.some((function(tt){return tt.signedDistanceFromCamera<=0}))?[]:_n.map((function(tt){return tt.point}))}var xn=[];if(ji.length>0){for(var En=ji[0].clone(),Tn=ji[0].clone(),Cn=1;Cn<ji.length;Cn++)En.x=Math.min(En.x,ji[Cn].x),En.y=Math.min(En.y,ji[Cn].y),Tn.x=Math.max(Tn.x,ji[Cn].x),Tn.y=Math.max(Tn.y,ji[Cn].y);xn=En.x>=Ir.x&&Tn.x<=ti.x&&En.y>=Ir.y&&Tn.y<=ti.y?[ji]:Tn.x<Ir.x||En.x>ti.x||Tn.y<Ir.y||En.y>ti.y?[]:tt.clipLine([ji],Ir.x,Ir.y,ti.x,ti.y)}for(var Pn=0,Mn=xn;Pn<Mn.length;Pn+=1){var Dn;ni.reset(Mn[Pn],.25*wr),Dn=ni.length<=.5*wr?1:Math.ceil(ni.paddedLength/an)+1;for(var Ln=0;Ln<Dn;Ln++){var Rn=Ln/Math.max(Dn-1,1),Fn=ni.lerp(Rn),Gn=Fn.x+100,Wn=Fn.y+100;vt.push(Gn,Wn,wr,0);var Qn=Gn-wr,lo=Wn-wr,uo=Gn+wr,co=Wn+wr;if(rr=rr&&this.isOffscreen(Qn,lo,uo,co),Je=Je||this.isInsideGrid(Qn,lo,uo,co),!et&&this.grid.hitTestCircle(Gn,Wn,wr,mt)&&(Xe=!0,!ht))return{circles:[],offscreen:!1,collisionDetected:Xe}}}}return{circles:!ht&&Xe||!Je?[]:vt,offscreen:rr,collisionDetected:Xe}},he.prototype.queryRenderedSymbols=function(et){if(0===et.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var rt=[],it=1/0,nt=1/0,ot=-1/0,at=-1/0,st=0,ct=et;st<ct.length;st+=1){var ht=ct[st],dt=new tt.Point(ht.x+100,ht.y+100);it=Math.min(it,dt.x),nt=Math.min(nt,dt.y),ot=Math.max(ot,dt.x),at=Math.max(at,dt.y),rt.push(dt)}for(var mt={},yt={},gt=0,vt=this.grid.query(it,nt,ot,at).concat(this.ignoredGrid.query(it,nt,ot,at));gt<vt.length;gt+=1){var _t=vt[gt],Rt=_t.key;if(void 0===mt[Rt.bucketInstanceId]&&(mt[Rt.bucketInstanceId]={}),!mt[Rt.bucketInstanceId][Rt.featureIndex]){var Ot=[new tt.Point(_t.x1,_t.y1),new tt.Point(_t.x2,_t.y1),new tt.Point(_t.x2,_t.y2),new tt.Point(_t.x1,_t.y2)];tt.polygonIntersectsPolygon(rt,Ot)&&(mt[Rt.bucketInstanceId][Rt.featureIndex]=!0,void 0===yt[Rt.bucketInstanceId]&&(yt[Rt.bucketInstanceId]=[]),yt[Rt.bucketInstanceId].push(Rt.featureIndex))}}return yt},he.prototype.insertCollisionBox=function(tt,et,rt,it,nt){(et?this.ignoredGrid:this.grid).insert({bucketInstanceId:rt,featureIndex:it,collisionGroupID:nt},tt[0],tt[1],tt[2],tt[3])},he.prototype.insertCollisionCircles=function(tt,et,rt,it,nt){for(var ot=et?this.ignoredGrid:this.grid,at={bucketInstanceId:rt,featureIndex:it,collisionGroupID:nt},st=0;st<tt.length;st+=4)ot.insertCircle(at,tt[st],tt[st+1],tt[st+2])},he.prototype.projectAndGetPerspectiveRatio=function(et,rt,it){var nt=[rt,it,0,1];return ue(nt,nt,et),{point:new tt.Point((nt[0]/nt[3]+1)/2*this.transform.width+100,(-nt[1]/nt[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/nt[3]*.5}},he.prototype.isOffscreen=function(tt,et,rt,it){return rt<100||tt>=this.screenRightBoundary||it<100||et>this.screenBottomBoundary},he.prototype.isInsideGrid=function(tt,et,rt,it){return rt>=0&&tt<this.gridRightBoundary&&it>=0&&et<this.gridBottomBoundary},he.prototype.getViewportMatrix=function(){var et=tt.identity([]);return tt.translate(et,et,[-100,-100,0]),et};var de=function(tt,et,rt,it){this.opacity=tt?Math.max(0,Math.min(1,tt.opacity+(tt.placed?et:-et))):it&&rt?1:0,this.placed=rt};de.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var _e=function(tt,et,rt,it,nt){this.text=new de(tt?tt.text:null,et,rt,nt),this.icon=new de(tt?tt.icon:null,et,it,nt)};_e.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var fe=function(tt,et,rt){this.text=tt,this.icon=et,this.skipFade=rt},me=function(){this.invProjMatrix=tt.create(),this.viewportMatrix=tt.create(),this.circles=[]},ge=function(tt,et,rt,it,nt){this.bucketInstanceId=tt,this.featureIndex=et,this.sourceLayerIndex=rt,this.bucketIndex=it,this.tileID=nt},ve=function(tt){this.crossSourceCollisions=tt,this.maxGroupID=0,this.collisionGroups={}};function ye(et,rt,it,nt,ot){var at=tt.getAnchorAlignment(et),st=-(at.horizontalAlign-.5)*rt,ct=-(at.verticalAlign-.5)*it,ht=tt.evaluateVariableOffset(et,nt);return new tt.Point(st+ht[0]*ot,ct+ht[1]*ot)}function xe(et,rt,it,nt,ot,at){var st=et.x1,ct=et.x2,ht=et.y1,dt=et.y2,mt=et.anchorPointX,yt=et.anchorPointY,gt=new tt.Point(rt,it);return nt&&gt._rotate(ot?at:-at),{x1:st+gt.x,y1:ht+gt.y,x2:ct+gt.x,y2:dt+gt.y,anchorPointX:mt,anchorPointY:yt}}ve.prototype.get=function(tt){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[tt]){var et=++this.maxGroupID;this.collisionGroups[tt]={ID:et,predicate:function(tt){return tt.collisionGroupID===et}}}return this.collisionGroups[tt]};var be=function(tt,et,rt,it){this.transform=tt.clone(),this.collisionIndex=new he(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=et,this.retainedQueryData={},this.collisionGroups=new ve(rt),this.collisionCircleArrays={},this.prevPlacement=it,it&&(it.prevPlacement=void 0),this.placedOrientations={}};function we(tt,et,rt,it,nt){tt.emplaceBack(et?1:0,rt?1:0,it||0,nt||0),tt.emplaceBack(et?1:0,rt?1:0,it||0,nt||0),tt.emplaceBack(et?1:0,rt?1:0,it||0,nt||0),tt.emplaceBack(et?1:0,rt?1:0,it||0,nt||0)}be.prototype.getBucketParts=function(et,rt,it,nt){var ot=it.getBucket(rt),at=it.latestFeatureIndex;if(ot&&at&&rt.id===ot.layerIds[0]){var st=it.collisionBoxArray,ct=ot.layers[0].layout,ht=Math.pow(2,this.transform.zoom-it.tileID.overscaledZ),dt=it.tileSize/tt.EXTENT,mt=this.transform.calculatePosMatrix(it.tileID.toUnwrapped()),yt="map"===ct.get("text-pitch-alignment"),gt="map"===ct.get("text-rotation-alignment"),vt=pe(it,1,this.transform.zoom),_t=Jt(mt,yt,gt,this.transform,vt),Rt=null;if(yt){var Ot=Qt(mt,yt,gt,this.transform,vt);Rt=tt.multiply([],this.transform.labelPlaneMatrix,Ot)}this.retainedQueryData[ot.bucketInstanceId]=new ge(ot.bucketInstanceId,at,ot.sourceLayerIndex,ot.index,it.tileID);var Zt={bucket:ot,layout:ct,posMatrix:mt,textLabelPlaneMatrix:_t,labelToScreenMatrix:Rt,scale:ht,textPixelRatio:dt,holdingForFade:it.holdingForFade(),collisionBoxArray:st,partiallyEvaluatedTextSize:tt.evaluateSizeForZoom(ot.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(ot.sourceID)};if(nt)for(var Ze=0,Ge=ot.sortKeyRanges;Ze<Ge.length;Ze+=1){var Xe=Ge[Ze];et.push({sortKey:Xe.sortKey,symbolInstanceStart:Xe.symbolInstanceStart,symbolInstanceEnd:Xe.symbolInstanceEnd,parameters:Zt})}else et.push({symbolInstanceStart:0,symbolInstanceEnd:ot.symbolInstances.length,parameters:Zt})}},be.prototype.attemptAnchorPlacement=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt){var _t,Rt=[mt.textOffset0,mt.textOffset1],Ot=ye(tt,rt,it,Rt,nt),Zt=this.collisionIndex.placeCollisionBox(xe(et,Ot.x,Ot.y,ot,at,this.transform.angle),dt,st,ct,ht.predicate);if(!vt||0!==this.collisionIndex.placeCollisionBox(xe(vt,Ot.x,Ot.y,ot,at,this.transform.angle),dt,st,ct,ht.predicate).box.length)return Zt.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[mt.crossTileID]&&this.prevPlacement.placements[mt.crossTileID]&&this.prevPlacement.placements[mt.crossTileID].text&&(_t=this.prevPlacement.variableOffsets[mt.crossTileID].anchor),this.variableOffsets[mt.crossTileID]={textOffset:Rt,width:rt,height:it,anchor:tt,textBoxScale:nt,prevAnchor:_t},this.markUsedJustification(yt,tt,mt,gt),yt.allowVerticalPlacement&&(this.markUsedOrientation(yt,gt,mt),this.placedOrientations[mt.crossTileID]=gt),{shift:Ot,placedGlyphBoxes:Zt}):void 0},be.prototype.placeLayerBucketPart=function(et,rt,it){var nt=this,ot=et.parameters,at=ot.bucket,st=ot.layout,ct=ot.posMatrix,ht=ot.textLabelPlaneMatrix,dt=ot.labelToScreenMatrix,mt=ot.textPixelRatio,yt=ot.holdingForFade,gt=ot.collisionBoxArray,vt=ot.partiallyEvaluatedTextSize,_t=ot.collisionGroup,Rt=st.get("text-optional"),Ot=st.get("icon-optional"),Zt=st.get("text-allow-overlap"),Ze=st.get("icon-allow-overlap"),Ge="map"===st.get("text-rotation-alignment"),Xe="map"===st.get("text-pitch-alignment"),Je="none"!==st.get("icon-text-fit"),rr="viewport-y"===st.get("symbol-z-order"),wr=Zt&&(Ze||!at.hasIconData()||Ot),Ir=Ze&&(Zt||!at.hasTextData()||Rt);!at.collisionArrays&&gt&&at.deserializeCollisionBoxes(gt);var P=function(et,ot){if(!rt[et.crossTileID])if(yt)nt.placements[et.crossTileID]=new fe(!1,!1,!1);else{var gt,rr=!1,ti=!1,ni=!0,oi=null,_i={box:null,offscreen:null},ji={box:null,offscreen:null},Ki=null,Ji=null,an=0,_n=0,xn=0;ot.textFeatureIndex?an=ot.textFeatureIndex:et.useRuntimeCollisionCircles&&(an=et.featureIndex),ot.verticalTextFeatureIndex&&(_n=ot.verticalTextFeatureIndex);var En=ot.textBox;if(En){var O=function(rt){var it=tt.WritingMode.horizontal;if(at.allowVerticalPlacement&&!rt&&nt.prevPlacement){var ot=nt.prevPlacement.placedOrientations[et.crossTileID];ot&&(nt.placedOrientations[et.crossTileID]=ot,nt.markUsedOrientation(at,it=ot,et))}return it},F=function(rt,it){if(at.allowVerticalPlacement&&et.numVerticalGlyphVertices>0&&ot.verticalTextBox)for(var nt=0,st=at.writingModes;nt<st.length&&(st[nt]===tt.WritingMode.vertical?(_i=it(),ji=_i):_i=rt(),!(_i&&_i.box&&_i.box.length));nt+=1);else _i=rt()};if(st.get("text-variable-anchor")){var Tn=st.get("text-variable-anchor");if(nt.prevPlacement&&nt.prevPlacement.variableOffsets[et.crossTileID]){var Cn=nt.prevPlacement.variableOffsets[et.crossTileID];Tn.indexOf(Cn.anchor)>0&&(Tn=Tn.filter((function(tt){return tt!==Cn.anchor}))).unshift(Cn.anchor)}var Z=function(tt,rt,it){for(var ot=tt.x2-tt.x1,st=tt.y2-tt.y1,ht=et.textBoxScale,dt=Je&&!Ze?rt:null,yt={box:[],offscreen:!1},gt=Zt?2*Tn.length:Tn.length,vt=0;vt<gt;++vt){var Rt=nt.attemptAnchorPlacement(Tn[vt%Tn.length],tt,ot,st,ht,Ge,Xe,mt,ct,_t,vt>=Tn.length,et,at,it,dt);if(Rt&&(yt=Rt.placedGlyphBoxes)&&yt.box&&yt.box.length){rr=!0,oi=Rt.shift;break}}return yt};F((function(){return Z(En,ot.iconBox,tt.WritingMode.horizontal)}),(function(){var rt=ot.verticalTextBox;return at.allowVerticalPlacement&&!(_i&&_i.box&&_i.box.length)&&et.numVerticalGlyphVertices>0&&rt?Z(rt,ot.verticalIconBox,tt.WritingMode.vertical):{box:null,offscreen:null}})),_i&&(rr=_i.box,ni=_i.offscreen);var Pn=O(_i&&_i.box);if(!rr&&nt.prevPlacement){var Mn=nt.prevPlacement.variableOffsets[et.crossTileID];Mn&&(nt.variableOffsets[et.crossTileID]=Mn,nt.markUsedJustification(at,Mn.anchor,et,Pn))}}else{var V=function(tt,rt){var it=nt.collisionIndex.placeCollisionBox(tt,Zt,mt,ct,_t.predicate);return it&&it.box&&it.box.length&&(nt.markUsedOrientation(at,rt,et),nt.placedOrientations[et.crossTileID]=rt),it};F((function(){return V(En,tt.WritingMode.horizontal)}),(function(){var rt=ot.verticalTextBox;return at.allowVerticalPlacement&&et.numVerticalGlyphVertices>0&&rt?V(rt,tt.WritingMode.vertical):{box:null,offscreen:null}})),O(_i&&_i.box&&_i.box.length)}}if(rr=(gt=_i)&&gt.box&&gt.box.length>0,ni=gt&&gt.offscreen,et.useRuntimeCollisionCircles){var Dn=at.text.placedSymbolArray.get(et.centerJustifiedTextSymbolIndex),Ln=tt.evaluateSizeForFeature(at.textSizeData,vt,Dn),Rn=st.get("text-padding");Ki=nt.collisionIndex.placeCollisionCircles(Zt,Dn,at.lineVertexArray,at.glyphOffsetArray,Ln,ct,ht,dt,it,Xe,_t.predicate,et.collisionCircleDiameter,Rn),rr=Zt||Ki.circles.length>0&&!Ki.collisionDetected,ni=ni&&Ki.offscreen}if(ot.iconFeatureIndex&&(xn=ot.iconFeatureIndex),ot.iconBox){var H=function(tt){var et=Je&&oi?xe(tt,oi.x,oi.y,Ge,Xe,nt.transform.angle):tt;return nt.collisionIndex.placeCollisionBox(et,Ze,mt,ct,_t.predicate)};ti=ji&&ji.box&&ji.box.length&&ot.verticalIconBox?(Ji=H(ot.verticalIconBox)).box.length>0:(Ji=H(ot.iconBox)).box.length>0,ni=ni&&Ji.offscreen}var Fn=Rt||0===et.numHorizontalGlyphVertices&&0===et.numVerticalGlyphVertices,Gn=Ot||0===et.numIconVertices;if(Fn||Gn?Gn?Fn||(ti=ti&&rr):rr=ti&&rr:ti=rr=ti&&rr,rr&&gt&&gt.box&&nt.collisionIndex.insertCollisionBox(gt.box,st.get("text-ignore-placement"),at.bucketInstanceId,ji&&ji.box&&_n?_n:an,_t.ID),ti&&Ji&&nt.collisionIndex.insertCollisionBox(Ji.box,st.get("icon-ignore-placement"),at.bucketInstanceId,xn,_t.ID),Ki&&(rr&&nt.collisionIndex.insertCollisionCircles(Ki.circles,st.get("text-ignore-placement"),at.bucketInstanceId,an,_t.ID),it)){var Wn=at.bucketInstanceId,Qn=nt.collisionCircleArrays[Wn];void 0===Qn&&(Qn=nt.collisionCircleArrays[Wn]=new me);for(var lo=0;lo<Ki.circles.length;lo+=4)Qn.circles.push(Ki.circles[lo+0]),Qn.circles.push(Ki.circles[lo+1]),Qn.circles.push(Ki.circles[lo+2]),Qn.circles.push(Ki.collisionDetected?1:0)}nt.placements[et.crossTileID]=new fe(rr||wr,ti||Ir,ni||at.justReloaded),rt[et.crossTileID]=!0}};if(rr)for(var ti=at.getSortedSymbolIndexes(this.transform.angle),ni=ti.length-1;ni>=0;--ni){var oi=ti[ni];P(at.symbolInstances.get(oi),at.collisionArrays[oi])}else for(var _i=et.symbolInstanceStart;_i<et.symbolInstanceEnd;_i++)P(at.symbolInstances.get(_i),at.collisionArrays[_i]);if(it&&at.bucketInstanceId in this.collisionCircleArrays){var ji=this.collisionCircleArrays[at.bucketInstanceId];tt.invert(ji.invProjMatrix,ct),ji.viewportMatrix=this.collisionIndex.getViewportMatrix()}at.justReloaded=!1},be.prototype.markUsedJustification=function(et,rt,it,nt){var ot;ot=nt===tt.WritingMode.vertical?it.verticalPlacedTextSymbolIndex:{left:it.leftJustifiedTextSymbolIndex,center:it.centerJustifiedTextSymbolIndex,right:it.rightJustifiedTextSymbolIndex}[tt.getAnchorJustification(rt)];for(var at=0,st=[it.leftJustifiedTextSymbolIndex,it.centerJustifiedTextSymbolIndex,it.rightJustifiedTextSymbolIndex,it.verticalPlacedTextSymbolIndex];at<st.length;at+=1){var ct=st[at];ct>=0&&(et.text.placedSymbolArray.get(ct).crossTileID=ot>=0&&ct!==ot?0:it.crossTileID)}},be.prototype.markUsedOrientation=function(et,rt,it){for(var nt=rt===tt.WritingMode.horizontal||rt===tt.WritingMode.horizontalOnly?rt:0,ot=rt===tt.WritingMode.vertical?rt:0,at=0,st=[it.leftJustifiedTextSymbolIndex,it.centerJustifiedTextSymbolIndex,it.rightJustifiedTextSymbolIndex];at<st.length;at+=1)et.text.placedSymbolArray.get(st[at]).placedOrientation=nt;it.verticalPlacedTextSymbolIndex&&(et.text.placedSymbolArray.get(it.verticalPlacedTextSymbolIndex).placedOrientation=ot)},be.prototype.commit=function(tt){this.commitTime=tt,this.zoomAtLastRecencyCheck=this.transform.zoom;var et=this.prevPlacement,rt=!1;this.prevZoomAdjustment=et?et.zoomAdjustment(this.transform.zoom):0;var it=et?et.symbolFadeChange(tt):1,nt=et?et.opacities:{},ot=et?et.variableOffsets:{},at=et?et.placedOrientations:{};for(var st in this.placements){var ct=this.placements[st],ht=nt[st];ht?(this.opacities[st]=new _e(ht,it,ct.text,ct.icon),rt=rt||ct.text!==ht.text.placed||ct.icon!==ht.icon.placed):(this.opacities[st]=new _e(null,it,ct.text,ct.icon,ct.skipFade),rt=rt||ct.text||ct.icon)}for(var dt in nt){var mt=nt[dt];if(!this.opacities[dt]){var yt=new _e(mt,it,!1,!1);yt.isHidden()||(this.opacities[dt]=yt,rt=rt||mt.text.placed||mt.icon.placed)}}for(var gt in ot)this.variableOffsets[gt]||!this.opacities[gt]||this.opacities[gt].isHidden()||(this.variableOffsets[gt]=ot[gt]);for(var vt in at)this.placedOrientations[vt]||!this.opacities[vt]||this.opacities[vt].isHidden()||(this.placedOrientations[vt]=at[vt]);rt?this.lastPlacementChangeTime=tt:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=et?et.lastPlacementChangeTime:tt)},be.prototype.updateLayerOpacities=function(tt,et){for(var rt={},it=0,nt=et;it<nt.length;it+=1){var ot=nt[it],at=ot.getBucket(tt);at&&ot.latestFeatureIndex&&tt.id===at.layerIds[0]&&this.updateBucketOpacities(at,rt,ot.collisionBoxArray)}},be.prototype.updateBucketOpacities=function(et,rt,it){var nt=this;et.hasTextData()&&et.text.opacityVertexArray.clear(),et.hasIconData()&&et.icon.opacityVertexArray.clear(),et.hasIconCollisionBoxData()&&et.iconCollisionBox.collisionVertexArray.clear(),et.hasTextCollisionBoxData()&&et.textCollisionBox.collisionVertexArray.clear();var ot=et.layers[0].layout,at=new _e(null,0,!1,!1,!0),st=ot.get("text-allow-overlap"),ct=ot.get("icon-allow-overlap"),ht=ot.get("text-variable-anchor"),dt="map"===ot.get("text-rotation-alignment"),mt="map"===ot.get("text-pitch-alignment"),yt="none"!==ot.get("icon-text-fit"),gt=new _e(null,0,st&&(ct||!et.hasIconData()||ot.get("icon-optional")),ct&&(st||!et.hasTextData()||ot.get("text-optional")),!0);!et.collisionArrays&&it&&(et.hasIconCollisionBoxData()||et.hasTextCollisionBoxData())&&et.deserializeCollisionBoxes(it);for(var _=function(tt,et,rt){for(var it=0;it<et/4;it++)tt.opacityVertexArray.emplaceBack(rt)},f=function(it){var ot=et.symbolInstances.get(it),st=ot.numHorizontalGlyphVertices,ct=ot.numVerticalGlyphVertices,vt=ot.crossTileID,_t=nt.opacities[vt];rt[vt]?_t=at:_t||(nt.opacities[vt]=_t=gt),rt[vt]=!0;var Rt=ot.numIconVertices>0,Ot=nt.placedOrientations[ot.crossTileID],Zt=Ot===tt.WritingMode.vertical,Ze=Ot===tt.WritingMode.horizontal||Ot===tt.WritingMode.horizontalOnly;if(st>0||ct>0){var Ge=De(_t.text);_(et.text,st,Zt?Aa:Ge),_(et.text,ct,Ze?Aa:Ge);var Xe=_t.text.isHidden();[ot.rightJustifiedTextSymbolIndex,ot.centerJustifiedTextSymbolIndex,ot.leftJustifiedTextSymbolIndex].forEach((function(tt){tt>=0&&(et.text.placedSymbolArray.get(tt).hidden=Xe||Zt?1:0)})),ot.verticalPlacedTextSymbolIndex>=0&&(et.text.placedSymbolArray.get(ot.verticalPlacedTextSymbolIndex).hidden=Xe||Ze?1:0);var Je=nt.variableOffsets[ot.crossTileID];Je&&nt.markUsedJustification(et,Je.anchor,ot,Ot);var rr=nt.placedOrientations[ot.crossTileID];rr&&(nt.markUsedJustification(et,"left",ot,rr),nt.markUsedOrientation(et,rr,ot))}if(Rt){var wr=De(_t.icon),Ir=!(yt&&ot.verticalPlacedIconSymbolIndex&&Zt);ot.placedIconSymbolIndex>=0&&(_(et.icon,ot.numIconVertices,Ir?wr:Aa),et.icon.placedSymbolArray.get(ot.placedIconSymbolIndex).hidden=_t.icon.isHidden()),ot.verticalPlacedIconSymbolIndex>=0&&(_(et.icon,ot.numVerticalIconVertices,Ir?Aa:wr),et.icon.placedSymbolArray.get(ot.verticalPlacedIconSymbolIndex).hidden=_t.icon.isHidden())}if(et.hasIconCollisionBoxData()||et.hasTextCollisionBoxData()){var ti=et.collisionArrays[it];if(ti){var ni=new tt.Point(0,0);if(ti.textBox||ti.verticalTextBox){var oi=!0;if(ht){var _i=nt.variableOffsets[vt];_i?(ni=ye(_i.anchor,_i.width,_i.height,_i.textOffset,_i.textBoxScale),dt&&ni._rotate(mt?nt.transform.angle:-nt.transform.angle)):oi=!1}ti.textBox&&we(et.textCollisionBox.collisionVertexArray,_t.text.placed,!oi||Zt,ni.x,ni.y),ti.verticalTextBox&&we(et.textCollisionBox.collisionVertexArray,_t.text.placed,!oi||Ze,ni.x,ni.y)}var ji=Boolean(!Ze&&ti.verticalIconBox);ti.iconBox&&we(et.iconCollisionBox.collisionVertexArray,_t.icon.placed,ji,yt?ni.x:0,yt?ni.y:0),ti.verticalIconBox&&we(et.iconCollisionBox.collisionVertexArray,_t.icon.placed,!ji,yt?ni.x:0,yt?ni.y:0)}}},vt=0;vt<et.symbolInstances.length;vt++)f(vt);if(et.sortFeatures(this.transform.angle),this.retainedQueryData[et.bucketInstanceId]&&(this.retainedQueryData[et.bucketInstanceId].featureSortOrder=et.featureSortOrder),et.hasTextData()&&et.text.opacityVertexBuffer&&et.text.opacityVertexBuffer.updateData(et.text.opacityVertexArray),et.hasIconData()&&et.icon.opacityVertexBuffer&&et.icon.opacityVertexBuffer.updateData(et.icon.opacityVertexArray),et.hasIconCollisionBoxData()&&et.iconCollisionBox.collisionVertexBuffer&&et.iconCollisionBox.collisionVertexBuffer.updateData(et.iconCollisionBox.collisionVertexArray),et.hasTextCollisionBoxData()&&et.textCollisionBox.collisionVertexBuffer&&et.textCollisionBox.collisionVertexBuffer.updateData(et.textCollisionBox.collisionVertexArray),et.bucketInstanceId in this.collisionCircleArrays){var _t=this.collisionCircleArrays[et.bucketInstanceId];et.placementInvProjMatrix=_t.invProjMatrix,et.placementViewportMatrix=_t.viewportMatrix,et.collisionCircleArray=_t.circles,delete this.collisionCircleArrays[et.bucketInstanceId]}},be.prototype.symbolFadeChange=function(tt){return 0===this.fadeDuration?1:(tt-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},be.prototype.zoomAdjustment=function(tt){return Math.max(0,(this.transform.zoom-tt)/1.5)},be.prototype.hasTransitions=function(tt){return this.stale||tt-this.lastPlacementChangeTime<this.fadeDuration},be.prototype.stillRecent=function(tt,et){var rt=this.zoomAtLastRecencyCheck===et?1-this.zoomAdjustment(et):1;return this.zoomAtLastRecencyCheck=et,this.commitTime+this.fadeDuration*rt>tt},be.prototype.setStale=function(){this.stale=!0};var da=Math.pow(2,25),_a=Math.pow(2,24),xa=Math.pow(2,17),ba=Math.pow(2,16),wa=Math.pow(2,9),Sa=Math.pow(2,8),Ia=Math.pow(2,1);function De(tt){if(0===tt.opacity&&!tt.placed)return 0;if(1===tt.opacity&&tt.placed)return 4294967295;var et=tt.placed?1:0,rt=Math.floor(127*tt.opacity);return rt*da+et*_a+rt*xa+et*ba+rt*wa+et*Sa+rt*Ia+et}var Aa=0,Me=function(tt){this._sortAcrossTiles="viewport-y"!==tt.layout.get("symbol-z-order")&&void 0!==tt.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Me.prototype.continuePlacement=function(tt,et,rt,it,nt){for(var ot=this._bucketParts;this._currentTileIndex<tt.length;)if(et.getBucketParts(ot,it,tt[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,nt())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ot.sort((function(tt,et){return tt.sortKey-et.sortKey})));this._currentPartIndex<ot.length;)if(et.placeLayerBucketPart(ot[this._currentPartIndex],this._seenCrossTileIDs,rt),this._currentPartIndex++,nt())return!0;return!1};var Le=function(tt,et,rt,it,nt,ot,at){this.placement=new be(tt,nt,ot,at),this._currentPlacementIndex=et.length-1,this._forceFullPlacement=rt,this._showCollisionBoxes=it,this._done=!1};Le.prototype.isDone=function(){return this._done},Le.prototype.continuePlacement=function(et,rt,it){for(var nt=this,ot=tt.browser.now(),n=function(){var et=tt.browser.now()-ot;return!nt._forceFullPlacement&&et>2};this._currentPlacementIndex>=0;){var at=rt[et[this._currentPlacementIndex]],st=this.placement.collisionIndex.transform.zoom;if("symbol"===at.type&&(!at.minzoom||at.minzoom<=st)&&(!at.maxzoom||at.maxzoom>st)){if(this._inProgressLayer||(this._inProgressLayer=new Me(at)),this._inProgressLayer.continuePlacement(it[at.source],this.placement,this._showCollisionBoxes,at,n))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Le.prototype.commit=function(tt){return this.placement.commit(tt),this.placement};var ka=512/tt.EXTENT/2,ke=function(tt,et,rt){this.tileID=tt,this.indexedSymbolInstances={},this.bucketInstanceId=rt;for(var it=0;it<et.length;it++){var nt=et.get(it),ot=nt.key;this.indexedSymbolInstances[ot]||(this.indexedSymbolInstances[ot]=[]),this.indexedSymbolInstances[ot].push({crossTileID:nt.crossTileID,coord:this.getScaledCoordinates(nt,tt)})}};ke.prototype.getScaledCoordinates=function(et,rt){var it=ka/Math.pow(2,rt.canonical.z-this.tileID.canonical.z);return{x:Math.floor((rt.canonical.x*tt.EXTENT+et.anchorX)*it),y:Math.floor((rt.canonical.y*tt.EXTENT+et.anchorY)*it)}},ke.prototype.findMatches=function(tt,et,rt){for(var it=this.tileID.canonical.z<et.canonical.z?1:Math.pow(2,this.tileID.canonical.z-et.canonical.z),nt=0;nt<tt.length;nt++){var ot=tt.get(nt);if(!ot.crossTileID){var at=this.indexedSymbolInstances[ot.key];if(at)for(var st=this.getScaledCoordinates(ot,et),ct=0,ht=at;ct<ht.length;ct+=1){var dt=ht[ct];if(Math.abs(dt.coord.x-st.x)<=it&&Math.abs(dt.coord.y-st.y)<=it&&!rt[dt.crossTileID]){rt[dt.crossTileID]=!0,ot.crossTileID=dt.crossTileID;break}}}}};var Be=function(){this.maxCrossTileID=0};Be.prototype.generate=function(){return++this.maxCrossTileID};var Oe=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Oe.prototype.handleWrapJump=function(tt){var et=Math.round((tt-this.lng)/360);if(0!==et)for(var rt in this.indexes){var it=this.indexes[rt],nt={};for(var ot in it){var at=it[ot];at.tileID=at.tileID.unwrapTo(at.tileID.wrap+et),nt[at.tileID.key]=at}this.indexes[rt]=nt}this.lng=tt},Oe.prototype.addBucket=function(tt,et,rt){if(this.indexes[tt.overscaledZ]&&this.indexes[tt.overscaledZ][tt.key]){if(this.indexes[tt.overscaledZ][tt.key].bucketInstanceId===et.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(tt.overscaledZ,this.indexes[tt.overscaledZ][tt.key])}for(var it=0;it<et.symbolInstances.length;it++)et.symbolInstances.get(it).crossTileID=0;this.usedCrossTileIDs[tt.overscaledZ]||(this.usedCrossTileIDs[tt.overscaledZ]={});var nt=this.usedCrossTileIDs[tt.overscaledZ];for(var ot in this.indexes){var at=this.indexes[ot];if(Number(ot)>tt.overscaledZ)for(var st in at){var ct=at[st];ct.tileID.isChildOf(tt)&&ct.findMatches(et.symbolInstances,tt,nt)}else{var ht=at[tt.scaledTo(Number(ot)).key];ht&&ht.findMatches(et.symbolInstances,tt,nt)}}for(var dt=0;dt<et.symbolInstances.length;dt++){var mt=et.symbolInstances.get(dt);mt.crossTileID||(mt.crossTileID=rt.generate(),nt[mt.crossTileID]=!0)}return void 0===this.indexes[tt.overscaledZ]&&(this.indexes[tt.overscaledZ]={}),this.indexes[tt.overscaledZ][tt.key]=new ke(tt,et.symbolInstances,et.bucketInstanceId),!0},Oe.prototype.removeBucketCrossTileIDs=function(tt,et){for(var rt in et.indexedSymbolInstances)for(var it=0,nt=et.indexedSymbolInstances[rt];it<nt.length;it+=1)delete this.usedCrossTileIDs[tt][nt[it].crossTileID]},Oe.prototype.removeStaleBuckets=function(tt){var et=!1;for(var rt in this.indexes){var it=this.indexes[rt];for(var nt in it)tt[it[nt].bucketInstanceId]||(this.removeBucketCrossTileIDs(rt,it[nt]),delete it[nt],et=!0)}return et};var Fe=function(){this.layerIndexes={},this.crossTileIDs=new Be,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Fe.prototype.addLayer=function(tt,et,rt){var it=this.layerIndexes[tt.id];void 0===it&&(it=this.layerIndexes[tt.id]=new Oe);var nt=!1,ot={};it.handleWrapJump(rt);for(var at=0,st=et;at<st.length;at+=1){var ct=st[at],ht=ct.getBucket(tt);ht&&tt.id===ht.layerIds[0]&&(ht.bucketInstanceId||(ht.bucketInstanceId=++this.maxBucketInstanceId),it.addBucket(ct.tileID,ht,this.crossTileIDs)&&(nt=!0),ot[ht.bucketInstanceId]=!0)}return it.removeStaleBuckets(ot)&&(nt=!0),nt},Fe.prototype.pruneUnusedLayers=function(tt){var et={};for(var rt in tt.forEach((function(tt){et[tt]=!0})),this.layerIndexes)et[rt]||delete this.layerIndexes[rt]};var Ue=function(et,rt){return tt.emitValidationErrors(et,rt&&rt.filter((function(tt){return"source.canvas"!==tt.identifier})))},La=tt.pick(ha,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Oa=tt.pick(ha,["setCenter","setZoom","setBearing","setPitch"]),ls=function(){var et={},rt=tt.styleSpec.$version;for(var it in tt.styleSpec.$root){var nt,ot=tt.styleSpec.$root[it];ot.required&&null!=(nt="version"===it?rt:"array"===ot.type?[]:{})&&(et[it]=nt)}return et}(),us=function(et){function i(rt,it){var nt=this;void 0===it&&(it={}),et.call(this),this.map=rt,this.dispatcher=new _t(Ft(),this),this.imageManager=new ht,this.imageManager.setEventedParent(this),this.glyphManager=new y(rt._requestManager,it.localIdeographFontFamily),this.lineAtlas=new T(256,512),this.crossTileSymbolIndex=new Fe,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new tt.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",tt.getReferrer());var ot=this;this._rtlTextPluginCallback=i.registerForPluginStateChange((function(et){ot.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:et.pluginStatus,pluginURL:et.pluginURL},(function(et,rt){if(tt.triggerPluginCompletionEvent(et),rt&&rt.every((function(tt){return tt})))for(var it in ot.sourceCaches)ot.sourceCaches[it].reload()}))})),this.on("data",(function(tt){if("source"===tt.dataType&&"metadata"===tt.sourceDataType){var et=nt.sourceCaches[tt.sourceId];if(et){var rt=et.getSource();if(rt&&rt.vectorLayerIds)for(var it in nt._layers){var ot=nt._layers[it];ot.source===rt.id&&nt._validateLayer(ot)}}}}))}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.loadURL=function(et,rt){var it=this;void 0===rt&&(rt={}),this.fire(new tt.Event("dataloading",{dataType:"style"}));var nt="boolean"==typeof rt.validate?rt.validate:!tt.isMapboxURL(et);et=this.map._requestManager.normalizeStyleURL(et,rt.accessToken);var ot=this.map._requestManager.transformRequest(et,tt.ResourceType.Style);this._request=tt.getJSON(ot,(function(et,rt){it._request=null,et?it.fire(new tt.ErrorEvent(et)):rt&&it._load(rt,nt)}))},i.prototype.loadJSON=function(et,rt){var it=this;void 0===rt&&(rt={}),this.fire(new tt.Event("dataloading",{dataType:"style"})),this._request=tt.browser.frame((function(){it._request=null,it._load(et,!1!==rt.validate)}))},i.prototype.loadEmpty=function(){this.fire(new tt.Event("dataloading",{dataType:"style"})),this._load(ls,!1)},i.prototype._load=function(et,rt){if(!rt||!Ue(this,tt.validateStyle(et))){for(var it in this._loaded=!0,this.stylesheet=et,et.sources)this.addSource(it,et.sources[it],{validate:!1});et.sprite?this._loadSprite(et.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(et.glyphs);var nt=Nt(this.stylesheet.layers);this._order=nt.map((function(tt){return tt.id})),this._layers={},this._serializedLayers={};for(var ot=0,at=nt;ot<at.length;ot+=1){var st=at[ot];(st=tt.createStyleLayer(st)).setEventedParent(this,{layer:{id:st.id}}),this._layers[st.id]=st,this._serializedLayers[st.id]=st.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new vt(this.stylesheet.light),this.fire(new tt.Event("data",{dataType:"style"})),this.fire(new tt.Event("style.load"))}},i.prototype._loadSprite=function(et){var rt=this;this._spriteRequest=function(et,rt,it){var nt,ot,at,st=tt.browser.devicePixelRatio>1?"@2x":"",ct=tt.getJSON(rt.transformRequest(rt.normalizeSpriteURL(et,st,".json"),tt.ResourceType.SpriteJSON),(function(tt,et){ct=null,at||(at=tt,nt=et,u())})),ht=tt.getImage(rt.transformRequest(rt.normalizeSpriteURL(et,st,".png"),tt.ResourceType.SpriteImage),(function(tt,et){ht=null,at||(at=tt,ot=et,u())}));function u(){if(at)it(at);else if(nt&&ot){var et=tt.browser.getImageData(ot),rt={};for(var st in nt){var ct=nt[st],ht=ct.width,dt=ct.height,mt=ct.x,yt=ct.y,gt=ct.sdf,vt=ct.pixelRatio,_t=ct.stretchX,Rt=ct.stretchY,Ot=ct.content,Zt=new tt.RGBAImage({width:ht,height:dt});tt.RGBAImage.copy(et,Zt,{x:mt,y:yt},{x:0,y:0},{width:ht,height:dt}),rt[st]={data:Zt,pixelRatio:vt,sdf:gt,stretchX:_t,stretchY:Rt,content:Ot}}it(null,rt)}}return{cancel:function(){ct&&(ct.cancel(),ct=null),ht&&(ht.cancel(),ht=null)}}}(et,this.map._requestManager,(function(et,it){if(rt._spriteRequest=null,et)rt.fire(new tt.ErrorEvent(et));else if(it)for(var nt in it)rt.imageManager.addImage(nt,it[nt]);rt.imageManager.setLoaded(!0),rt._availableImages=rt.imageManager.listImages(),rt.dispatcher.broadcast("setImages",rt._availableImages),rt.fire(new tt.Event("data",{dataType:"style"}))}))},i.prototype._validateLayer=function(et){var rt=this.sourceCaches[et.source];if(rt){var it=et.sourceLayer;if(it){var nt=rt.getSource();("geojson"===nt.type||nt.vectorLayerIds&&-1===nt.vectorLayerIds.indexOf(it))&&this.fire(new tt.ErrorEvent(new Error('Source layer "'+it+'" does not exist on source "'+nt.id+'" as specified by style layer "'+et.id+'"')))}}},i.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var tt in this.sourceCaches)if(!this.sourceCaches[tt].loaded())return!1;return!!this.imageManager.isLoaded()},i.prototype._serializeLayers=function(tt){for(var et=[],rt=0,it=tt;rt<it.length;rt+=1){var nt=this._layers[it[rt]];"custom"!==nt.type&&et.push(nt.serialize())}return et},i.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var tt in this.sourceCaches)if(this.sourceCaches[tt].hasTransition())return!0;for(var et in this._layers)if(this._layers[et].hasTransition())return!0;return!1},i.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},i.prototype.update=function(et){if(this._loaded){var rt=this._changed;if(this._changed){var it=Object.keys(this._updatedLayers),nt=Object.keys(this._removedLayers);for(var ot in(it.length||nt.length)&&this._updateWorkerLayers(it,nt),this._updatedSources){var at=this._updatedSources[ot];"reload"===at?this._reloadSource(ot):"clear"===at&&this._clearSource(ot)}for(var st in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[st].updateTransitions(et);this.light.updateTransitions(et),this._resetUpdates()}var ct={};for(var ht in this.sourceCaches){var dt=this.sourceCaches[ht];ct[ht]=dt.used,dt.used=!1}for(var mt=0,yt=this._order;mt<yt.length;mt+=1){var gt=this._layers[yt[mt]];gt.recalculate(et,this._availableImages),!gt.isHidden(et.zoom)&&gt.source&&(this.sourceCaches[gt.source].used=!0)}for(var vt in ct){var _t=this.sourceCaches[vt];ct[vt]!==_t.used&&_t.fire(new tt.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:vt}))}this.light.recalculate(et),this.z=et.zoom,rt&&this.fire(new tt.Event("data",{dataType:"style"}))}},i.prototype._updateTilesForChangedImages=function(){var tt=Object.keys(this._changedImages);if(tt.length){for(var et in this.sourceCaches)this.sourceCaches[et].reloadTilesForDependencies(["icons","patterns"],tt);this._changedImages={}}},i.prototype._updateWorkerLayers=function(tt,et){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(tt),removedIds:et})},i.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},i.prototype.setState=function(et){var rt=this;if(this._checkLoaded(),Ue(this,tt.validateStyle(et)))return!1;(et=tt.clone$1(et)).layers=Nt(et.layers);var it=function(et,rt){if(!et)return[{command:ha.setStyle,args:[rt]}];var it=[];try{if(!tt.deepEqual(et.version,rt.version))return[{command:ha.setStyle,args:[rt]}];tt.deepEqual(et.center,rt.center)||it.push({command:ha.setCenter,args:[rt.center]}),tt.deepEqual(et.zoom,rt.zoom)||it.push({command:ha.setZoom,args:[rt.zoom]}),tt.deepEqual(et.bearing,rt.bearing)||it.push({command:ha.setBearing,args:[rt.bearing]}),tt.deepEqual(et.pitch,rt.pitch)||it.push({command:ha.setPitch,args:[rt.pitch]}),tt.deepEqual(et.sprite,rt.sprite)||it.push({command:ha.setSprite,args:[rt.sprite]}),tt.deepEqual(et.glyphs,rt.glyphs)||it.push({command:ha.setGlyphs,args:[rt.glyphs]}),tt.deepEqual(et.transition,rt.transition)||it.push({command:ha.setTransition,args:[rt.transition]}),tt.deepEqual(et.light,rt.light)||it.push({command:ha.setLight,args:[rt.light]});var nt={},ot=[];!function(et,rt,it,nt){var ot;for(ot in rt=rt||{},et=et||{})et.hasOwnProperty(ot)&&(rt.hasOwnProperty(ot)||jt(ot,it,nt));for(ot in rt)rt.hasOwnProperty(ot)&&(et.hasOwnProperty(ot)?tt.deepEqual(et[ot],rt[ot])||("geojson"===et[ot].type&&"geojson"===rt[ot].type&&Gt(et,rt,ot)?it.push({command:ha.setGeoJSONSourceData,args:[ot,rt[ot].data]}):Vt(ot,rt,it,nt)):qt(ot,rt,it))}(et.sources,rt.sources,ot,nt);var at=[];et.layers&&et.layers.forEach((function(tt){nt[tt.source]?it.push({command:ha.removeLayer,args:[tt.id]}):at.push(tt)})),it=it.concat(ot),function(et,rt,it){rt=rt||[];var nt,ot,at,st,ct,ht,dt,mt=(et=et||[]).map(Xt),yt=rt.map(Xt),gt=et.reduce(Ht,{}),vt=rt.reduce(Ht,{}),_t=mt.slice(),Rt=Object.create(null);for(nt=0,ot=0;nt<mt.length;nt++)vt.hasOwnProperty(at=mt[nt])?ot++:(it.push({command:ha.removeLayer,args:[at]}),_t.splice(_t.indexOf(at,ot),1));for(nt=0,ot=0;nt<yt.length;nt++)_t[_t.length-1-nt]!==(at=yt[yt.length-1-nt])&&(gt.hasOwnProperty(at)?(it.push({command:ha.removeLayer,args:[at]}),_t.splice(_t.lastIndexOf(at,_t.length-ot),1)):ot++,it.push({command:ha.addLayer,args:[vt[at],ht=_t[_t.length-nt]]}),_t.splice(_t.length-nt,0,at),Rt[at]=!0);for(nt=0;nt<yt.length;nt++)if(st=gt[at=yt[nt]],ct=vt[at],!Rt[at]&&!tt.deepEqual(st,ct))if(tt.deepEqual(st.source,ct.source)&&tt.deepEqual(st["source-layer"],ct["source-layer"])&&tt.deepEqual(st.type,ct.type)){for(dt in Wt(st.layout,ct.layout,it,at,null,ha.setLayoutProperty),Wt(st.paint,ct.paint,it,at,null,ha.setPaintProperty),tt.deepEqual(st.filter,ct.filter)||it.push({command:ha.setFilter,args:[at,ct.filter]}),tt.deepEqual(st.minzoom,ct.minzoom)&&tt.deepEqual(st.maxzoom,ct.maxzoom)||it.push({command:ha.setLayerZoomRange,args:[at,ct.minzoom,ct.maxzoom]}),st)st.hasOwnProperty(dt)&&"layout"!==dt&&"paint"!==dt&&"filter"!==dt&&"metadata"!==dt&&"minzoom"!==dt&&"maxzoom"!==dt&&(0===dt.indexOf("paint.")?Wt(st[dt],ct[dt],it,at,dt.slice(6),ha.setPaintProperty):tt.deepEqual(st[dt],ct[dt])||it.push({command:ha.setLayerProperty,args:[at,dt,ct[dt]]}));for(dt in ct)ct.hasOwnProperty(dt)&&!st.hasOwnProperty(dt)&&"layout"!==dt&&"paint"!==dt&&"filter"!==dt&&"metadata"!==dt&&"minzoom"!==dt&&"maxzoom"!==dt&&(0===dt.indexOf("paint.")?Wt(st[dt],ct[dt],it,at,dt.slice(6),ha.setPaintProperty):tt.deepEqual(st[dt],ct[dt])||it.push({command:ha.setLayerProperty,args:[at,dt,ct[dt]]}))}else it.push({command:ha.removeLayer,args:[at]}),ht=_t[_t.lastIndexOf(at)+1],it.push({command:ha.addLayer,args:[ct,ht]})}(at,rt.layers,it)}catch(tt){console.warn("Unable to compute style diff:",tt),it=[{command:ha.setStyle,args:[rt]}]}return it}(this.serialize(),et).filter((function(tt){return!(tt.command in Oa)}));if(0===it.length)return!1;var nt=it.filter((function(tt){return!(tt.command in La)}));if(nt.length>0)throw new Error("Unimplemented: "+nt.map((function(tt){return tt.command})).join(", ")+".");return it.forEach((function(tt){"setTransition"!==tt.command&&rt[tt.command].apply(rt,tt.args)})),this.stylesheet=et,!0},i.prototype.addImage=function(et,rt){if(this.getImage(et))return this.fire(new tt.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(et,rt),this._afterImageUpdated(et)},i.prototype.updateImage=function(tt,et){this.imageManager.updateImage(tt,et)},i.prototype.getImage=function(tt){return this.imageManager.getImage(tt)},i.prototype.removeImage=function(et){if(!this.getImage(et))return this.fire(new tt.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(et),this._afterImageUpdated(et)},i.prototype._afterImageUpdated=function(et){this._availableImages=this.imageManager.listImages(),this._changedImages[et]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new tt.Event("data",{dataType:"style"}))},i.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},i.prototype.addSource=function(et,rt,it){var nt=this;if(void 0===it&&(it={}),this._checkLoaded(),void 0!==this.sourceCaches[et])throw new Error("There is already a source with this ID");if(!rt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(rt).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(rt.type)>=0&&this._validate(tt.validateStyle.source,"sources."+et,rt,null,it))){this.map&&this.map._collectResourceTiming&&(rt.collectResourceTiming=!0);var ot=this.sourceCaches[et]=new aa(et,rt,this.dispatcher);ot.style=this,ot.setEventedParent(this,(function(){return{isSourceLoaded:nt.loaded(),source:ot.serialize(),sourceId:et}})),ot.onAdd(this.map),this._changed=!0}},i.prototype.removeSource=function(et){if(this._checkLoaded(),void 0===this.sourceCaches[et])throw new Error("There is no source with this ID");for(var rt in this._layers)if(this._layers[rt].source===et)return this.fire(new tt.ErrorEvent(new Error('Source "'+et+'" cannot be removed while layer "'+rt+'" is using it.')));var it=this.sourceCaches[et];delete this.sourceCaches[et],delete this._updatedSources[et],it.fire(new tt.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:et})),it.setEventedParent(null),it.clearTiles(),it.onRemove&&it.onRemove(this.map),this._changed=!0},i.prototype.setGeoJSONSourceData=function(tt,et){this._checkLoaded(),this.sourceCaches[tt].getSource().setData(et),this._changed=!0},i.prototype.getSource=function(tt){return this.sourceCaches[tt]&&this.sourceCaches[tt].getSource()},i.prototype.addLayer=function(et,rt,it){void 0===it&&(it={}),this._checkLoaded();var nt=et.id;if(this.getLayer(nt))this.fire(new tt.ErrorEvent(new Error('Layer with i
3d "'+nt+'" already exists on this map')));else{var ot;if("custom"===et.type){if(Ue(this,tt.validateCustomStyleLayer(et)))return;ot=tt.createStyleLayer(et)}else{if("object"==typeof et.source&&(this.addSource(nt,et.source),et=tt.clone$1(et),et=tt.extend(et,{source:nt})),this._validate(tt.validateStyle.layer,"layers."+nt,et,{arrayIndex:-1},it))return;ot=tt.createStyleLayer(et),this._validateLayer(ot),ot.setEventedParent(this,{layer:{id:nt}}),this._serializedLayers[ot.id]=ot.serialize()}var at=rt?this._order.indexOf(rt):this._order.length;if(rt&&-1===at)this.fire(new tt.ErrorEvent(new Error('Layer with id "'+rt+'" does not exist on this map.')));else{if(this._order.splice(at,0,nt),this._layerOrderChanged=!0,this._layers[nt]=ot,this._removedLayers[nt]&&ot.source&&"custom"!==ot.type){var st=this._removedLayers[nt];delete this._removedLayers[nt],st.type!==ot.type?this._updatedSources[ot.source]="clear":(this._updatedSources[ot.source]="reload",this.sourceCaches[ot.source].pause())}this._updateLayer(ot),ot.onAdd&&ot.onAdd(this.map)}}},i.prototype.moveLayer=function(et,rt){if(this._checkLoaded(),this._changed=!0,this._layers[et]){if(et!==rt){var it=this._order.indexOf(et);this._order.splice(it,1);var nt=rt?this._order.indexOf(rt):this._order.length;
vendor: 12,287 bytes, line 3
3rt&&-1===nt?this.fire(new tt.ErrorEvent(new Error('Layer with id "'+rt+'" does not exist on this map.'))):(this._order.splice(nt,0,et),this._layerOrderChanged=!0)}}else this.fire(new tt.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be moved.")))},i.prototype.removeLayer=function(et){this._checkLoaded();var rt=this._layers[et];if(rt){rt.setEventedParent(null);var it=this._order.indexOf(et);this._order.splice(it,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[et]=rt,delete this._layers[et],delete this._serializedLayers[et],delete this._updatedLayers[et],delete this._updatedPaintProps[et],rt.onRemove&&rt.onRemove(this.map)}else this.fire(new tt.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be removed.")))},i.prototype.getLayer=function(tt){return this._layers[tt]},i.prototype.hasLayer=function(tt){return tt in this._layers},i.prototype.setLayerZoomRange=function(et,rt,it){this._checkLoaded();var nt=this.getLayer(et);nt?nt.minzoom===rt&&nt.maxzoom===it||(null!=rt&&(nt.minzoom=rt),null!=it&&(nt.maxzoom=it),this._updateLayer(nt)):this.fire(new tt.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot have zoom extent.")))},i.prototype.setFilter=function(et,rt,it){void 0===it&&(it={}),this._checkLoaded();var nt=this.getLayer(et);if(nt){if(!tt.deepEqual(nt.filter,rt))return null==rt?(nt.filter=void 0,void this._updateLayer(nt)):void(this._validate(tt.validateStyle.filter,"layers."+nt.id+".filter",rt,null,it)||(nt.filter=tt.clone$1(rt),this._updateLayer(nt)))}else this.fire(new tt.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be filtered.")))},i.prototype.getFilter=function(et){return tt.clone$1(this.getLayer(et).filter)},i.prototype.setLayoutProperty=function(et,rt,it,nt){void 0===nt&&(nt={}),this._checkLoaded();var ot=this.getLayer(et);ot?tt.deepEqual(ot.getLayoutProperty(rt),it)||(ot.setLayoutProperty(rt,it,nt),this._updateLayer(ot)):this.fire(new tt.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")))},i.prototype.getLayoutProperty=function(et,rt){var it=this.getLayer(et);if(it)return it.getLayoutProperty(rt);this.fire(new tt.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style.")))},i.prototype.setPaintProperty=function(et,rt,it,nt){void 0===nt&&(nt={}),this._checkLoaded();var ot=this.getLayer(et);ot?tt.deepEqual(ot.getPaintProperty(rt),it)||(ot.setPaintProperty(rt,it,nt)&&this._updateLayer(ot),this._changed=!0,this._updatedPaintProps[et]=!0):this.fire(new tt.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")))},i.prototype.getPaintProperty=function(tt,et){return this.getLayer(tt).getPaintProperty(et)},i.prototype.setFeatureState=function(et,rt){this._checkLoaded();var it=et.source,nt=et.sourceLayer,ot=this.sourceCaches[it];if(void 0!==ot){var at=ot.getSource().type;"geojson"===at&&nt?this.fire(new tt.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==at||nt?(void 0===et.id&&this.fire(new tt.ErrorEvent(new Error("The feature id parameter must be provided."))),ot.setFeatureState(nt,et.id,rt)):this.fire(new tt.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new tt.ErrorEvent(new Error("The source '"+it+"' does not exist in the map's style.")))},i.prototype.removeFeatureState=function(et,rt){this._checkLoaded();var it=et.source,nt=this.sourceCaches[it];if(void 0!==nt){var ot=nt.getSource().type,at="vector"===ot?et.sourceLayer:void 0;"vector"!==ot||at?rt&&"string"!=typeof et.id&&"number"!=typeof et.id?this.fire(new tt.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):nt.removeFeatureState(at,et.id,rt):this.fire(new tt.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new tt.ErrorEvent(new Error("The source '"+it+"' does not exist in the map's style.")))},i.prototype.getFeatureState=function(et){this._checkLoaded();var rt=et.source,it=et.sourceLayer,nt=this.sourceCaches[rt];if(void 0!==nt){if("vector"!==nt.getSource().type||it)return void 0===et.id&&this.fire(new tt.ErrorEvent(new Error("The feature id parameter must be provided."))),nt.getFeatureState(it,et.id);this.fire(new tt.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new tt.ErrorEvent(new Error("The source '"+rt+"' does not exist in the map's style.")))},i.prototype.getTransition=function(){return tt.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},i.prototype.serialize=function(){return tt.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:tt.mapObject(this.sourceCaches,(function(tt){return tt.serialize()})),layers:this._serializeLayers(this._order)},(function(tt){return void 0!==tt}))},i.prototype._updateLayer=function(tt){this._updatedLayers[tt.id]=!0,tt.source&&!this._updatedSources[tt.source]&&"raster"!==this.sourceCaches[tt.source].getSource().type&&(this._updatedSources[tt.source]="reload",this.sourceCaches[tt.source].pause()),this._changed=!0},i.prototype._flattenAndSortRenderedFeatures=function(tt){for(var et=this,i=function(tt){return"fill-extrusion"===et._layers[tt].type},rt={},it=[],nt=this._order.length-1;nt>=0;nt--){var ot=this._order[nt];if(i(ot)){rt[ot]=nt;for(var at=0,st=tt;at<st.length;at+=1){var ct=st[at][ot];if(ct)for(var ht=0,dt=ct;ht<dt.length;ht+=1)it.push(dt[ht])}}}it.sort((function(tt,et){return et.intersectionZ-tt.intersectionZ}));for(var mt=[],yt=this._order.length-1;yt>=0;yt--){var gt=this._order[yt];if(i(gt))for(var vt=it.length-1;vt>=0;vt--){var _t=it[vt].feature;if(rt[_t.layer.id]<yt)break;mt.push(_t),it.pop()}else for(var Rt=0,Ot=tt;Rt<Ot.length;Rt+=1){var Zt=Ot[Rt][gt];if(Zt)for(var Ze=0,Ge=Zt;Ze<Ge.length;Ze+=1)mt.push(Ge[Ze].feature)}}return mt},i.prototype.queryRenderedFeatures=function(et,rt,it){rt&&rt.filter&&this._validate(tt.validateStyle.filter,"queryRenderedFeatures.filter",rt.filter,null,rt);var nt={};if(rt&&rt.layers){if(!Array.isArray(rt.layers))return this.fire(new tt.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var ot=0,at=rt.layers;ot<at.length;ot+=1){var st=at[ot],ct=this._layers[st];if(!ct)return this.fire(new tt.ErrorEvent(new Error("The layer '"+st+"' does not exist in the map's style and cannot be queried for features."))),[];nt[ct.source]=!0}}var ht=[];for(var dt in rt.availableImages=this._availableImages,this.sourceCaches)rt.layers&&!nt[dt]||ht.push(O(this.sourceCaches[dt],this._layers,this._serializedLayers,et,rt,it));return this.placement&&ht.push(function(tt,et,rt,it,nt,ot,at){for(var st={},ct=ot.queryRenderedSymbols(it),ht=[],dt=0,mt=Object.keys(ct).map(Number);dt<mt.length;dt+=1)ht.push(at[mt[dt]]);ht.sort(F);for(var p=function(){var rt=gt[yt],it=rt.featureIndex.lookupSymbolFeatures(ct[rt.bucketInstanceId],et,rt.bucketIndex,rt.sourceLayerIndex,nt.filter,nt.layers,nt.availableImages,tt);for(var ot in it){var at=st[ot]=st[ot]||[],ht=it[ot];ht.sort((function(tt,et){var it=rt.featureSortOrder;if(it){var nt=it.indexOf(tt.featureIndex);return it.indexOf(et.featureIndex)-nt}return et.featureIndex-tt.featureIndex}));for(var dt=0,mt=ht;dt<mt.length;dt+=1)at.push(mt[dt])}},yt=0,gt=ht;yt<gt.length;yt+=1)p();var f=function(et){st[et].forEach((function(it){var nt=it.feature,ot=rt[tt[et].source].getFeatureState(nt.layer["source-layer"],nt.id);nt.source=nt.layer.source,nt.layer["source-layer"]&&(nt.sourceLayer=nt.layer["source-layer"]),nt.state=ot}))};for(var vt in st)f(vt);return st}(this._layers,this._serializedLayers,this.sourceCaches,et,rt,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(ht)},i.prototype.querySourceFeatures=function(et,rt){rt&&rt.filter&&this._validate(tt.validateStyle.filter,"querySourceFeatures.filter",rt.filter,null,rt);var it=this.sourceCaches[et];return it?function(tt,et){for(var rt=tt.getRenderableIds().map((function(et){return tt.getTileByID(et)})),it=[],nt={},ot=0;ot<rt.length;ot++){var at=rt[ot],st=at.tileID.canonical.key;nt[st]||(nt[st]=!0,at.querySourceFeatures(it,et))}return it}(it,rt):[]},i.prototype.addSourceType=function(tt,et,rt){return i.getSourceType(tt)?rt(new Error('A source type called "'+tt+'" already exists.')):(i.setSourceType(tt,et),et.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:tt,url:et.workerSourceURL},rt):rt(null,null))},i.prototype.getLight=function(){return this.light.getLight()},i.prototype.setLight=function(et,rt){void 0===rt&&(rt={}),this._checkLoaded();var it=this.light.getLight(),nt=!1;for(var ot in et)if(!tt.deepEqual(et[ot],it[ot])){nt=!0;break}if(nt){var at={now:tt.browser.now(),transition:tt.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(et,rt),this.light.updateTransitions(at)}},i.prototype._validate=function(et,rt,it,nt,ot){return void 0===ot&&(ot={}),(!ot||!1!==ot.validate)&&Ue(this,et.call(tt.validateStyle,tt.extend({key:rt,style:this.serialize(),value:it,styleSpec:tt.styleSpec},nt)))},i.prototype._remove=function(){for(var et in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),tt.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[et].setEventedParent(null);for(var rt in this.sourceCaches)this.sourceCaches[rt].clearTiles(),this.sourceCaches[rt].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},i.prototype._clearSource=function(tt){this.sourceCaches[tt].clearTiles()},i.prototype._reloadSource=function(tt){this.sourceCaches[tt].resume(),this.sourceCaches[tt].reload()},i.prototype._updateSources=function(tt){for(var et in this.sourceCaches)this.sourceCaches[et].update(tt)},i.prototype._generateCollisionBoxes=function(){for(var tt in this.sourceCaches)this._reloadSource(tt)},i.prototype._updatePlacement=function(et,rt,it,nt,ot){void 0===ot&&(ot=!1);for(var at=!1,st=!1,ct={},ht=0,dt=this._order;ht<dt.length;ht+=1){var mt=this._layers[dt[ht]];if("symbol"===mt.type){if(!ct[mt.source]){var yt=this.sourceCaches[mt.source];ct[mt.source]=yt.getRenderableIds(!0).map((function(tt){return yt.getTileByID(tt)})).sort((function(tt,et){return et.tileID.overscaledZ-tt.tileID.overscaledZ||(tt.tileID.isLessThan(et.tileID)?-1:1)}))}var gt=this.crossTileSymbolIndex.addLayer(mt,ct[mt.source],et.center.lng);at=at||gt}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((ot=ot||this._layerOrderChanged||0===it)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(tt.browser.now(),et.zoom))&&(this.pauseablePlacement=new Le(et,this._order,ot,rt,it,nt,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ct),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(tt.browser.now()),st=!0),at&&this.pauseablePlacement.placement.setStale()),st||at)for(var vt=0,_t=this._order;vt<_t.length;vt+=1){var Rt=this._layers[_t[vt]];"symbol"===Rt.type&&this.placement.updateLayerOpacities(Rt,ct[Rt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(tt.browser.now())},i.prototype._releaseSymbolFadeTiles=function(){for(var tt in this.sourceCaches)this.sourceCaches[tt].releaseSymbolFadeTiles()},i.prototype.getImages=function(tt,et,rt){this.imageManager.getImages(et.icons,rt),this._updateTilesForChangedImages();var it=this.sourceCaches[et.source];it&&it.setDependencies(et.tileID.key,et.type,et.icons)},i.prototype.getGlyphs=function(tt,et,rt){this.glyphManager.getGlyphs(et.stacks,rt)},i.prototype.getResource=function(et,rt,it){return tt.makeRequest
3(rt,it)},i}(tt.Evented);us.getSourceType=function(tt){return wr[tt]},us.setSourceType=function(tt,et){wr[tt]=et},us.registerForPluginStateChange=tt.registerForPluginStateChange;var cs=tt.createLayout([{name:"a_pos",type:"Int16",components:2}]),ps=gi("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 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\n);}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;}"),hs=gi("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),ms=gi("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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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);}"),_s=gi("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 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
3/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);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,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,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);}"),bs=gi("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);}"),ws=gi("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Ts=gi("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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","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;}"),Is=gi("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),zs=gi("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);}"),Ps=gi("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,0,1);}"),Ms=gi("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),Ds=gi("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Ls=gi("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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;}"),Bs=gi("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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);}"),Rs=gi("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);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;}"),Os=gi("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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixe
3l_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;base=max(0.0,base);height=max(0.0,height);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\n? a_pos\n: 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;}"),Vs=gi("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),Ns=gi("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;\n#define PI 3.141592653589793\nvoid 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),js=gi("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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;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;v_width2=vec2(outset,inset);}"),qs=gi("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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute 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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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;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;v_width2=vec2(outset,inset);}"),Gs=gi("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;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat 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;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;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),Xs=gi("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
3uniform 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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;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;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);}"),Ws=gi("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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),Ks=gi("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 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;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),Ys=gi("#define SDF_PX 8.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),il=gi("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
3gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,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);}");function gi(tt,et){var rt=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,it=et.match(/attribute ([\w]+) ([\w]+)/g),nt=tt.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ot=et.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),at=ot?ot.concat(nt):nt,st={};return{fragmentSource:tt=tt.replace(rt,(function(tt,et,rt,it,nt){return st[nt]=!0,"define"===et?"\n#ifndef HAS_UNIFORM_u_"+nt+"\nvarying "+rt+" "+it+" "+nt+";\n#else\nuniform "+rt+" "+it+" u_"+nt+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+nt+"\n    "+rt+" "+it+" "+nt+" = u_"+nt+";\n#endif\n"})),vertexSource:et=et.replace(rt,(function(tt,et,rt,it,nt){var ot="float"===it?"vec2":"vec4",at=nt.match(/color/)?"color":ot;return st[nt]?"define"===et?"\n#ifndef HAS_UNIFORM_u_"+nt+"\nuniform lowp float u_"+nt+"_t;\nattribute "+rt+" "+ot+" a_"+nt+";\nvarying "+rt+" "+it+" "+nt+";\n#else\nuniform "+rt+" "+it+" u_"+nt+";\n#endif\n":"vec4"===at?"\n#ifndef HAS_UNIFORM_u_"+nt+"\n    "+nt+" = a_"+nt+";\n#else\n    "+rt+" "+it+" "+nt+" = u_"+nt+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+nt+"\n    "+nt+" = unpack_mix_"+at+"(a_"+nt
vendor: 9,771 bytes, line 3
3+", u_"+nt+"_t);\n#else\n    "+rt+" "+it+" "+nt+" = u_"+nt+";\n#endif\n":"define"===et?"\n#ifndef HAS_UNIFORM_u_"+nt+"\nuniform lowp float u_"+nt+"_t;\nattribute "+rt+" "+ot+" a_"+nt+";\n#else\nuniform "+rt+" "+it+" u_"+nt+";\n#endif\n":"vec4"===at?"\n#ifndef HAS_UNIFORM_u_"+nt+"\n    "+rt+" "+it+" "+nt+" = a_"+nt+";\n#else\n    "+rt+" "+it+" "+nt+" = u_"+nt+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+nt+"\n    "+rt+" "+it+" "+nt+" = unpack_mix_"+at+"(a_"+nt+", u_"+nt+"_t);\n#else\n    "+rt+" "+it+" "+nt+" = u_"+nt+";\n#endif\n"})),staticAttributes:it,staticUniforms:at}}var cl=Object.freeze({__proto__:null,prelude:ps,background:hs,backgroundPattern:ms,circle:_s,clippingMask:bs,heatmap:ws,heatmapTexture:Ts,collisionBox:Is,collisionCircle:zs,debug:Ps,fill:Ms,fillOutline:Ds,fillOutlinePattern:Ls,fillPattern:Bs,fillExtrusion:Rs,fillExtrusionPattern:Os,hillshadePrepare:Vs,hillshade:Ns,line:js,lineGradient:qs,linePattern:Gs,lineSDF:Xs,raster:Ws,symbolIcon:Ks,symbolSDF:Ys,symbolTextAndIcon:il}),yi=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function xi(tt){for(var et=[],rt=0;rt<tt.length;rt++)if(null!==tt[rt]){var it=tt[rt].split(" ");et.push(it.pop())}return et}yi.prototype.bind=function(tt,et,rt,it,nt,ot,at,st){this.context=tt;for(var ct=this.boundPaintVertexBuffers.length!==it.length,ht=0;!ct&&ht<it.length;ht++)this.boundPaintVertexBuffers[ht]!==it[ht]&&(ct=!0);tt.extVertexArrayObject&&this.vao&&this.boundProgram===et&&this.boundLayoutVertexBuffer===rt&&!ct&&this.boundIndexBuffer===nt&&this.boundVertexOffset===ot&&this.boundDynamicVertexBuffer===at&&this.boundDynamicVertexBuffer2===st?(tt.bindVertexArrayOES.set(this.vao),at&&at.bind(),nt&&nt.dynamicDraw&&nt.bind(),st&&st.bind()):this.freshBind(et,rt,it,nt,ot,at,st)},yi.prototype.freshBind=function(tt,et,rt,it,nt,ot,at){var st,ct=tt.numAttributes,ht=this.context,dt=ht.gl;if(ht.extVertexArrayObject)this.vao&&this.destroy(),this.vao=ht.extVertexArrayObject.createVertexArrayOES(),ht.bindVertexArrayOES.set(this.vao),st=0,this.boundProgram=tt,this.boundLayoutVertexBuffer=et,this.boundPaintVertexBuffers=rt,this.boundIndexBuffer=it,this.boundVertexOffset=nt,this.boundDynamicVertexBuffer=ot,this.boundDynamicVertexBuffer2=at;else{st=ht.currentNumAttributes||0;for(var mt=ct;mt<st;mt++)dt.disableVertexAttribArray(mt)}et.enableAttributes(dt,tt);for(var yt=0,gt=rt;yt<gt.length;yt+=1)gt[yt].enableAttributes(dt,tt);ot&&ot.enableAttributes(dt,tt),at&&at.enableAttributes(dt,tt),et.bind(),et.setVertexAttribPointers(dt,tt,nt);for(var vt=0,_t=rt;vt<_t.length;vt+=1){var Rt=_t[vt];Rt.bind(),Rt.setVertexAttribPointers(dt,tt,nt)}ot&&(ot.bind(),ot.setVertexAttribPointers(dt,tt,nt)),it&&it.bind(),at&&(at.bind(),at.setVertexAttribPointers(dt,tt,nt)),ht.currentNumAttributes=ct},yi.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var bi=function(tt,et,rt,it,nt,ot){var at=tt.gl;this.program=at.createProgram();for(var st=xi(rt.staticAttributes),ct=it?it.getBinderAttributes():[],ht=st.concat(ct),dt=rt.staticUniforms?xi(rt.staticUniforms):[],mt=it?it.getBinderUniforms():[],yt=[],gt=0,vt=dt.concat(mt);gt<vt.length;gt+=1){var _t=vt[gt];yt.indexOf(_t)<0&&yt.push(_t)}var Rt=it?it.defines():[];ot&&Rt.push("#define OVERDRAW_INSPECTOR;");var Ot=Rt.concat(ps.fragmentSource,rt.fragmentSource).join("\n"),Zt=Rt.concat(ps.vertexSource,rt.vertexSource).join("\n"),Ze=at.createShader(at.FRAGMENT_SHADER);if(at.isContextLost())this.failedToCreate=!0;else{at.shaderSource(Ze,Ot),at.compileShader(Ze),at.attachShader(this.program,Ze);var Ge=at.createShader(at.VERTEX_SHADER);if(at.isContextLost())this.failedToCreate=!0;else{at.shaderSource(Ge,Zt),at.compileShader(Ge),at.attachShader(this.program,Ge),this.attributes={};var Xe={};this.numAttributes=ht.length;for(var Je=0;Je<this.numAttributes;Je++)ht[Je]&&(at.bindAttribLocation(this.program,Je,ht[Je]),this.attributes[ht[Je]]=Je);at.linkProgram(this.program),at.deleteShader(Ge),at.deleteShader(Ze);for(var rr=0;rr<yt.length;rr++){var wr=yt[rr];if(wr&&!Xe[wr]){var Ir=at.getUniformLocation(this.program,wr);Ir&&(Xe[wr]=Ir)}}this.fixedUniforms=nt(tt,Xe),this.binderUniforms=it?it.getUniforms(tt,Xe):[]}}};function wi(tt,et,rt){var it=1/pe(rt,1,et.transform.tileZoom),nt=Math.pow(2,rt.tileID.overscaledZ),ot=rt.tileSize*Math.pow(2,et.transform.tileZoom)/nt,at=ot*(rt.tileID.canonical.x+rt.tileID.wrap*nt),st=ot*rt.tileID.canonical.y;return{u_image:0,u_texsize:rt.imageAtlasTexture.size,u_scale:[it,tt.fromScale,tt.toScale],u_fade:tt.t,u_pixel_coord_upper:[at>>16,st>>16],u_pixel_coord_lower:[65535&at,65535&st]}}bi.prototype.draw=function(tt,et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt,gt,vt,_t){var Rt,Ot=tt.gl;if(!this.failedToCreate){for(var Zt in tt.program.set(this.program),tt.setDepthMode(rt),tt.setStencilMode(it),tt.setColorMode(nt),tt.setCullFace(ot),this.fixedUniforms)this.fixedUniforms[Zt].set(at[Zt]);gt&&gt.setUniforms(tt,this.binderUniforms,mt,{zoom:yt});for(var Ze=(Rt={},Rt[Ot.LINES]=2,Rt[Ot.TRIANGLES]=3,Rt[Ot.LINE_STRIP]=1,Rt)[et],Ge=0,Xe=dt.get();Ge<Xe.length;Ge+=1){var Je=Xe[Ge],rr=Je.vaos||(Je.vaos={});(rr[st]||(rr[st]=new yi)).bind(tt,this,ct,gt?gt.getPaintVertexBuffers():[],ht,Je.vertexOffset,vt,_t),Ot.drawElements(et,Je.primitiveLength*Ze,Ot.UNSIGNED_SHORT,Je.primitiveOffset*Ze*2)}}};var Ti=function(et,rt,it,nt){var ot=rt.style.light,at=ot.properties.get("position"),st=[at.x,at.y,at.z],ct=tt.create$1();"viewport"===ot.properties.get("anchor")&&tt.fromRotation(ct,-rt.transform.angle),tt.transformMat3(st,st,ct);var ht=ot.properties.get("color");return{u_matrix:et,u_lightpos:st,u_lightintensity:ot.properties.get("intensity"),u_lightcolor:[ht.r,ht.g,ht.b],u_vertical_gradient:+it,u_opacity:nt}},Ei=function(et,rt,it,nt,ot,at,st){return tt.extend(Ti(et,rt,it,nt),wi(at,rt,st),{u_height_factor:-Math.pow(2,ot.overscaledZ)/st.tileSize/8})},Ii=function(tt){return{u_matrix:tt}},Pi=function(et,rt,it,nt){return tt.extend(Ii(et),wi(it,rt,nt))},Si=function(tt,et){return{u_matrix:tt,u_world:et}},Ci=function(et,rt,it,nt,ot){return tt.extend(Pi(et,rt,it,nt),{u_world:ot})},zi=function(et,rt,it,nt){var ot,at,st=et.transform;if("map"===nt.paint.get("circle-pitch-alignment")){var ct=pe(it,1,st.zoom);ot=!0,at=[ct,ct]}else ot=!1,at=st.pixelsToGLUnits;return{u_camera_to_center_distance:st.cameraToCenterDistance,u_scale_with_map:+("map"===nt.paint.get("circle-pitch-scale")),u_matrix:et.translatePosMatrix(rt.posMatrix,it,nt.paint.get("circle-translate"),nt.paint.get("circle-translate-anchor")),u_pitch_with_map:+ot,u_device_pixel_ratio:tt.browser.devicePixelRatio,u_extrude_scale:at}},Di=function(tt,et,rt){var it=pe(rt,1,et.zoom),nt=Math.pow(2,et.zoom-rt.tileID.overscaledZ),ot=rt.tileID.overscaleFactor();return{u_matrix:tt,u_camera_to_center_distance:et.cameraToCenterDistance,u_pixels_to_tile_units:it,u_extrude_scale:[et.pixelsToGLUnits[0]/(it*nt),et.pixelsToGLUnits[1]/(it*nt)],u_overscale_factor:ot}},Ai=function(tt,et,rt){return{u_matrix:tt,u_inv_matrix:et,u_camera_to_center_distance:rt.cameraToCenterDistance,u_viewport_size:[rt.width,rt.height]}},Mi=function(tt,et,rt){return void 0===rt&&(rt=1),{u_matrix:tt,u_color:et,u_overlay:0,u_overlay_scale:rt}},Li=function(tt){return{u_matrix:tt}},Ri=function(tt,et,rt,it){return{u_matrix:tt,u_extrude_scale:pe(et,1,rt),u_intensity:it}},ki=function(et,rt,it){var nt=et.transform;return{u_matrix:Ni(et,rt,it),u_ratio:1/pe(rt,1,nt.zoom),u_device_pixel_ratio:tt.browser.devicePixelRatio,u_units_to_pixels:[1/nt.pixelsToGLUnits[0],1/nt.pixelsToGLUnits[1]]}},Bi=function(et,rt,it,nt){return tt.extend(ki(et,rt,it),{u_image:0,u_image_height:nt})},Oi=function(et,rt,it,nt){var ot=et.transform,at=Ui(rt,ot);return{u_matrix:Ni(et,rt,it),u_texsize:rt.imageAtlasTexture.size,u_ratio:1/pe(rt,1,ot.zoom),u_device_pixel_ratio:tt.browser.devicePixelRatio,u_image:0,u_scale:[at,nt.fromScale,nt.toScale],u_fade:nt.t,u_units_to_pixels:[1/ot.pixelsToGLUnits[0],1/ot.pixelsToGLUnits[1]]}},Fi=function(et,rt,it,nt,ot){var at=et.lineAtlas,st=Ui(rt,et.transform),ct="round"===it.layout.get("line-cap"),ht=at.getDash(nt.from,ct),dt=at.getDash(nt.to,ct),mt=ht.width*ot.fromScale,yt=dt.width*ot.toScale;return tt.extend(ki(et,rt,it),{u_patternscale_a:[st/mt,-ht.height/2],u_patternscale_b:[st/yt,-dt.height/2],u_sdfgamma:at.width/(256*Math.min(mt,yt)*tt.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ht.y,u_tex_y_b:dt.y,u_mix:ot.t})};function Ui(tt,et){return 1/pe(tt,1,et.tileZoom)}function Ni(tt,et,rt){return tt.translatePosMatrix(et.tileID.posMatrix,et,rt.paint.get("line-translate"),rt.paint.get("line-translate-anchor"))}var Zi=function(tt,et,rt,it,nt){return{u_matrix:tt,u_tl_parent:et,u_scale_parent:rt,u_buffer_scale:1,u_fade_t:it.mix,u_opacity:it.opacity*nt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:nt.paint.get("raster-brightness-min"),u_brightness_high:nt.paint.get("raster-brightness-max"),u_saturation_factor:(at=nt.paint.get("raster-saturation"),at>0?1-1/(1.001-at):-at),u_contrast_factor:(ot=nt.paint.get("raster-contrast"),ot>0?1/(1-ot):1+ot),u_spin_weights:qi(nt.paint.get("raster-hue-rotate"))};var ot,at};function qi(tt){tt*=Math.PI/180;var et=Math.sin(tt),rt=Math.cos(tt);return[(2*rt+1)/3,(-Math.sqrt(3)*et-rt+1)/3,(Math.sqrt(3)*et-rt+1)/3]}var pl,Vi=function(tt,et,rt,it,nt,ot,at,st,ct,ht){var dt=nt.transform;return{u_is_size_zoom_constant:+("constant"===tt||"source"===tt),u_is_size_feature_constant:+("constant"===tt||"camera"===tt),u_size_t:et?et.uSizeT:0,u_size:et?et.uSize:0,u_camera_to_center_distance:dt.cameraToCenterDistance,u_pitch:dt.pitch/360*2*Math.PI,u_rotate_symbol:+rt,u_aspect_ratio:dt.width/dt.height,u_fade_change:nt.o
vendor: 4,368 bytes, line 3
3ptions.fadeDuration?nt.symbolFadeChange:1,u_matrix:ot,u_label_plane_matrix:at,u_coord_matrix:st,u_is_text:+ct,u_pitch_with_map:+it,u_texsize:ht,u_texture:0}},Gi=function(et,rt,it,nt,ot,at,st,ct,ht,dt,mt){var yt=ot.transform;return tt.extend(Vi(et,rt,it,nt,ot,at,st,ct,ht,dt),{u_gamma_scale:nt?Math.cos(yt._pitch)*yt.cameraToCenterDistance:1,u_device_pixel_ratio:tt.browser.devicePixelRatio,u_is_halo:+mt})},Wi=function(et,rt,it,nt,ot,at,st,ct,ht,dt){return tt.extend(Gi(et,rt,it,nt,ot,at,st,ct,!0,ht,!0),{u_texsize_icon:dt,u_texture_icon:1})},Xi=function(tt,et,rt){return{u_matrix:tt,u_opacity:et,u_color:rt}},Hi=function(et,rt,it,nt,ot,at){return tt.extend(function(tt,et,rt,it){var nt=rt.imageManager.getPattern(tt.from.toString()),ot=rt.imageManager.getPattern(tt.to.toString()),at=rt.imageManager.getPixelSize(),st=at.width,ct=at.height,ht=Math.pow(2,it.tileID.overscaledZ),dt=it.tileSize*Math.pow(2,rt.transform.tileZoom)/ht,mt=dt*(it.tileID.canonical.x+it.tileID.wrap*ht),yt=dt*it.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:nt.tl,u_pattern_br_a:nt.br,u_pattern_tl_b:ot.tl,u_pattern_br_b:ot.br,u_texsize:[st,ct],u_mix:et.t,u_pattern_size_a:nt.displaySize,u_pattern_size_b:ot.displaySize,u_scale_a:et.fromScale,u_scale_b:et.toScale,u_tile_units_to_pixels:1/pe(it,1,rt.transform.tileZoom),u_pixel_coord_upper:[mt>>16,yt>>16],u_pixel_coord_lower:[65535&mt,65535&yt]}}(nt,at,it,ot),{u_matrix:et,u_opacity:rt})},gl={fillExtrusion:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_lightpos:new tt.Uniform3f(et,rt.u_lightpos),u_lightintensity:new tt.Uniform1f(et,rt.u_lightintensity),u_lightcolor:new tt.Uniform3f(et,rt.u_lightcolor),u_vertical_gradient:new tt.Uniform1f(et,rt.u_vertical_gradient),u_opacity:new tt.Uniform1f(et,rt.u_opacity)}},fillExtrusionPattern:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_lightpos:new tt.Uniform3f(et,rt.u_lightpos),u_lightintensity:new tt.Uniform1f(et,rt.u_lightintensity),u_lightcolor:new tt.Uniform3f(et,rt.u_lightcolor),u_vertical_gradient:new tt.Uniform1f(et,rt.u_vertical_gradient),u_height_factor:new tt.Uniform1f(et,rt.u_height_factor),u_image:new tt.Uniform1i(et,rt.u_image),u_texsize:new tt.Uniform2f(et,rt.u_texsize),u_pixel_coord_upper:new tt.Uniform2f(et,rt.u_pixel_coord_upper),u_pixel_coord_lower:new tt.Uniform2f(et,rt.u_pixel_coord_lower),u_scale:new tt.Uniform3f(et,rt.u_scale),u_fade:new tt.Uniform1f(et,rt.u_fade),u_opacity:new tt.Uniform1f(et,rt.u_opacity)}},fill:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix)}},fillPattern:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_image:new tt.Uniform1i(et,rt.u_image),u_texsize:new tt.Uniform2f(et,rt.u_texsize),u_pixel_coord_upper:new tt.Uniform2f(et,rt.u_pixel_coord_upper),u_pixel_coord_lower:new tt.Uniform2f(et,rt.u_pixel_coord_lower),u_scale:new tt.Uniform3f(et,rt.u_scale),u_fade:new tt.Uniform1f(et,rt.u_fade)}},fillOutline:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_world:new tt.Uniform2f(et,rt.u_world)}},fillOutlinePattern:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_world:new tt.Uniform2f(et,rt.u_world),u_image:new tt.Uniform1i(et,rt.u_image),u_texsize:new tt.Uniform2f(et,rt.u_texsize),u_pixel_coord_upper:new tt.Uniform2f(et,rt.u_pixel_coord_upper),u_pixel_coord_lower:new tt.Uniform2f(et,rt.u_pixel_coord_lower),u_scale:new tt.Uniform3f(et,rt.u_scale),u_fade:new tt.Uniform1f(et,rt.u_fade)}},circle:function(et,rt){return{u_camera_to_center_distance:new tt.Uniform1f(et,rt.u_camera_to_center_distance),u_scale_with_map:new tt.Uniform1i(et,rt.u_scale_with_map),u_pitch_with_map:new tt.Uniform1i(et,rt.u_pitch_with_map),u_extrude_scale:new tt.Uniform2f(et,rt.u_extrude_scale),u_device_pixel_ratio:new tt.Uniform1f(et,rt.u_device_pixel_ratio),u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix)}},collisionBox:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_camera_to_center_distance:new tt.Uniform1f(et,rt.u_camera_to_center_distance),u_pixels_to_tile_units:new tt.Uniform1f(et,rt.u_pixels_to_tile_units),u_extrude_scale:new tt.Uniform2f(et,rt.u_extrude_scale),u_overscale_factor:new tt.Uniform1f(et,rt.u_overscale_factor)}},collisionCircle:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_inv_matrix:new tt.UniformMatrix4f(et,rt.u_inv_matrix
3),u_camera_to_center_distance:new tt.Uniform1f(et,rt.u_camera_to_center_distance),u_viewport_size:new tt.Uniform2f(et,rt.u_viewport_size)}},debug:function(et,rt){return{u_color:new tt.UniformColor(et,rt.u_color),u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_overlay:new tt.Uniform1i(et,rt.u_overlay),u_overlay_scale:new tt.Uniform1f(et,rt.u_overlay_scale)}},clippingMask:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix)}},heatmap:function(et,rt){return{u_extrude_scale:new tt.Uniform1f(et,rt.u_extrude_scale),u_intensity:new tt.Uniform1f(et,rt.u_intensity),u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix)}},heatmapTexture:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_world:new tt.Uniform2f(et,rt.u_world),u_image:new tt.Uniform1i(et,rt.u_image),u_color_ramp:new tt.Uniform1i(et,rt.u_color_ramp),u_opacity:new tt.Uniform1f(et,rt.u_opacity)}},hillshade:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_image:new tt.Uniform1i(et,rt.u_image),u_latrange:new tt.Uniform2f(et,rt.u_latrange),u_light:new tt.Uniform2f(et,rt.u_light),u_shadow:new tt.UniformColor(et,rt.u_shadow),u_highlight:new tt.UniformColor(et,rt.u_highlight),u_accent:new tt.UniformColor(et,rt.u_accent)}},hillshadePrepare:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_image:new tt.Uniform1i(et,rt.u_image),u_dimension:new tt.Uniform2f(et,rt.u_dimension),u_zoom:new tt.Uniform1f(et,rt.u_zoom),u_unpack:new tt.Uniform4f(et,rt.u_unpack)}},line:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_ratio:new tt.Uniform1f(et,rt.u_ratio),u_device_pixel_ratio:new tt.Uniform1f(et,rt.u_device_pixel_ratio),u_units_to_pixels:new tt.Uniform2f(et,rt.u_units_to_pixels)}},lineGradient:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_ratio:new tt.Uniform1f(et,rt.u_ratio),u_device_pixel_ratio:new tt.Uniform1f(et,rt.u_device_pixel_ratio),u_units_to_pixels:new tt.Uniform2f(et,rt.u_units_to_pixels),u_image:new tt.Uniform1i(et,rt.u_image),u_image_height:new tt.Uniform1f(et,rt.u_image_height)}},linePattern:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_texsize:new tt.Uniform2f(et,rt.u_texsize),u_ratio:new tt.Uniform1f(et,rt.u_ratio),u_device_pixel_ratio:new tt.Uniform1f(et,rt.u_device_pixel_ratio),u_image:new tt.Uniform1i(et,rt.u_image),u_units_to_pixels:new tt.Uniform2f(et,rt.u_units_to_pixels),u_scale:new tt.Uniform3f(et,rt.u_scale),u_fade:new tt.Uniform1f(et,rt.u_fade)}},lineSDF:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_ratio:new tt.Uniform1f(et,rt.u_ratio),u_device_pixel_ratio:new tt.Uniform1f(et,rt.u_device_pixel_ratio),u_units_to_pixels:new tt.Uniform2f(et,rt.u_units_to_pixels),u_patternscale_a:new tt.Uniform2f(et,rt.u_patternscale_a),u_patternscale_b:new tt.Uniform2f(et,rt.u_patternscale_b),u_sdfgamma:new tt.Uniform1f(et,rt.u_sdfgamma),u_image:new tt.Uniform1i(et,rt.u_image),u_tex_y_a:new tt.Uniform1f(et,rt.u_tex_y_a),u_tex_y_b:new tt.Uniform1f(et,rt.u_tex_y_b),u_mix:new tt.Uniform1f(et,rt.u_mix)}},raster:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_tl_parent:new tt.Uniform2f(et,rt.u_tl_parent),u_scale_parent:new tt.Uniform1f(et,rt.u_scale_parent),u_buffer_scale:new tt.Uniform1f(et,rt.u_buffer_scale),u_fade_t:new tt.Uniform1f(et,rt.u_fade_t),u_opacity:new tt.Uniform1f(et,rt.u_opacity),u_image0:new tt.Uniform1i(et,rt.u_image0),u_image1:new tt.Uniform1i(et,rt.u_image1),u_brightness_low:new tt.Uniform1f(et,rt.u_brightness_low),u_brightness_high:new tt.Uniform1f(et,rt.u_brightness_high),u_saturation_factor:new tt.Uniform1f(et,rt.u_saturation_factor),u_contrast_factor:new tt.Uniform1f(et,rt.u_contrast_factor),u_spin_weights:new tt.Uniform3f(et,rt.u_spin_weights)}},symbolIcon:function(et,rt){return{u_is_size_zoom_constant:new tt.Uniform1i(et,rt.u_is_size_zoom_constant),u_is_size_feature_constant:new tt.Uniform1i(et,rt.u_is_size_feature_constant),u_size_t:new tt.Uniform1f(et,rt.u_size_t),u_size:new tt.Uniform1f(et,rt.u_size),u_camera_to_center_distance:new tt.Uniform1f(et,rt.u_camera_to_center_distance),u_pitch:new tt.Uniform1f(et,rt.u_pitch),u_rotate_symbol:new tt.Uniform1i(et,rt.u_rotate_symbol),u_aspect_ratio:new tt.Uniform1f(et,rt.u_aspect_ratio),u_fade_change:new tt.Uniform1f(et,rt.u_fade_change),u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_label_plane_matrix:new tt.UniformMatrix4f(et,rt.u_label_plane_matrix
vendor: 16,638 bytes, line 3
3),u_coord_matrix:new tt.UniformMatrix4f(et,rt.u_coord_matrix),u_is_text:new tt.Uniform1i(et,rt.u_is_text),u_pitch_with_map:new tt.Uniform1i(et,rt.u_pitch_with_map),u_texsize:new tt.Uniform2f(et,rt.u_texsize),u_texture:new tt.Uniform1i(et,rt.u_texture)}},symbolSDF:function(et,rt){return{u_is_size_zoom_constant:new tt.Uniform1i(et,rt.u_is_size_zoom_constant),u_is_size_feature_constant:new tt.Uniform1i(et,rt.u_is_size_feature_constant),u_size_t:new tt.Uniform1f(et,rt.u_size_t),u_size:new tt.Uniform1f(et,rt.u_size),u_camera_to_center_distance:new tt.Uniform1f(et,rt.u_camera_to_center_distance),u_pitch:new tt.Uniform1f(et,rt.u_pitch),u_rotate_symbol:new tt.Uniform1i(et,rt.u_rotate_symbol),u_aspect_ratio:new tt.Uniform1f(et,rt.u_aspect_ratio),u_fade_change:new tt.Uniform1f(et,rt.u_fade_change),u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_label_plane_matrix:new tt.UniformMatrix4f(et,rt.u_label_plane_matrix),u_coord_matrix:new tt.UniformMatrix4f(et,rt.u_coord_matrix),u_is_text:new tt.Uniform1i(et,rt.u_is_text),u_pitch_with_map:new tt.Uniform1i(et,rt.u_pitch_with_map),u_texsize:new tt.Uniform2f(et,rt.u_texsize),u_texture:new tt.Uniform1i(et,rt.u_texture),u_gamma_scale:new tt.Uniform1f(et,rt.u_gamma_scale),u_device_pixel_ratio:new tt.Uniform1f(et,rt.u_device_pixel_ratio),u_is_halo:new tt.Uniform1i(et,rt.u_is_halo)}},symbolTextAndIcon:function(et,rt){return{u_is_size_zoom_constant:new tt.Uniform1i(et,rt.u_is_size_zoom_constant),u_is_size_feature_constant:new tt.Uniform1i(et,rt.u_is_size_feature_constant),u_size_t:new tt.Uniform1f(et,rt.u_size_t),u_size:new tt.Uniform1f(et,rt.u_size),u_camera_to_center_distance:new tt.Uniform1f(et,rt.u_camera_to_center_distance),u_pitch:new tt.Uniform1f(et,rt.u_pitch),u_rotate_symbol:new tt.Uniform1i(et,rt.u_rotate_symbol),u_aspect_ratio:new tt.Uniform1f(et,rt.u_aspect_ratio),u_fade_change:new tt.Uniform1f(et,rt.u_fade_change),u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_label_plane_matrix:new tt.UniformMatrix4f(et,rt.u_label_plane_matrix),u_coord_matrix:new tt.UniformMatrix4f(et,rt.u_coord_matrix),u_is_text:new tt.Uniform1i(et,rt.u_is_text),u_pitch_with_map:new tt.Uniform1i(et,rt.u_pitch_with_map),u_texsize:new tt.Uniform2f(et,rt.u_texsize),u_texsize_icon:new tt.Uniform2f(et,rt.u_texsize_icon),u_texture:new tt.Uniform1i(et,rt.u_texture),u_texture_icon:new tt.Uniform1i(et,rt.u_texture_icon),u_gamma_scale:new tt.Uniform1f(et,rt.u_gamma_scale),u_device_pixel_ratio:new tt.Uniform1f(et,rt.u_device_pixel_ratio),u_is_halo:new tt.Uniform1i(et,rt.u_is_halo)}},background:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_opacity:new tt.Uniform1f(et,rt.u_opacity),u_color:new tt.UniformColor(et,rt.u_color)}},backgroundPattern:function(et,rt){return{u_matrix:new tt.UniformMatrix4f(et,rt.u_matrix),u_opacity:new tt.Uniform1f(et,rt.u_opacity),u_image:new tt.Uniform1i(et,rt.u_image),u_pattern_tl_a:new tt.Uniform2f(et,rt.u_pattern_tl_a),u_pattern_br_a:new tt.Uniform2f(et,rt.u_pattern_br_a),u_pattern_tl_b:new tt.Uniform2f(et,rt.u_pattern_tl_b),u_pattern_br_b:new tt.Uniform2f(et,rt.u_pattern_br_b),u_texsize:new tt.Uniform2f(et,rt.u_texsize),u_mix:new tt.Uniform1f(et,rt.u_mix),u_pattern_size_a:new tt.Uniform2f(et,rt.u_pattern_size_a),u_pattern_size_b:new tt.Uniform2f(et,rt.u_pattern_size_b),u_scale_a:new tt.Uniform1f(et,rt.u_scale_a),u_scale_b:new tt.Uniform1f(et,rt.u_scale_b),u_pixel_coord_upper:new tt.Uniform2f(et,rt.u_pixel_coord_upper),u_pixel_coord_lower:new tt.Uniform2f(et,rt.u_pixel_coord_lower),u_tile_units_to_pixels:new tt.Uniform1f(et,rt.u_tile_units_to_pixels)}}};function Yi(et,rt,it,nt,ot,at,st){for(var ct=et.context,ht=ct.gl,dt=et.useProgram("collisionBox"),mt=[],yt=0,gt=0,vt=0;vt<nt.length;vt++){var _t=nt[vt],Rt=rt.getTile(_t),Ot=Rt.getBucket(it);if(Ot){var Zt=_t.posMatrix;0===ot[0]&&0===ot[1]||(Zt=et.translatePosMatrix(_t.posMatrix,Rt,ot,at));var Ze=st?Ot.textCollisionBox:Ot.iconCollisionBox,Ge=Ot.collisionCircleArray;if(Ge.length>0){var Xe=tt.create(),Je=Zt;tt.mul(Xe,Ot.placementInvProjMatrix,et.transform.glCoordMatrix),tt.mul(Xe,Xe,Ot.placementViewportMatrix),mt.push({circleArray:Ge,circleOffset:gt,transform:Je,invTransform:Xe}),gt=yt+=Ge.length/4}Ze&&dt.draw(ct,ht.LINES,It.disabled,Pt.disabled,et.colorModeForRenderPass(),Ct.disabled,Di(Zt,et.transform,Rt),it.id,Ze.layoutVertexBuffer,Ze.indexBuffer,Ze.segments,null,et.transform.zoom,null,null,Ze.collisionVertexBuffer)}}if(st&&mt.length){var rr=et.useProgram("collisionCircle"),wr=new tt.StructArrayLayout2f1f2i16;wr.resize(4*yt),wr._trim();for(var Ir=0,ti=0,ni=mt;ti<ni.length;ti+=1)for(var oi=ni[ti],_i=0;_i<oi.circleArray.length/4;_i++){var ji=4*_i,Ki=oi.circleArray[ji+0],Ji=oi.circleArray[ji+1],an=oi.circleArray[ji+2],_n=oi.circleArray[ji+3];wr.emplace(Ir++,Ki,Ji,an,_n,0),wr.emplace(Ir++,Ki,Ji,an,_n,1),wr.emplace(Ir++,Ki,Ji,an,_n,2),wr.emplace(Ir++,Ki,Ji,an,_n,3)}(!pl||pl.length<2*yt)&&(pl=function(et){var rt=2*et,it=new tt.StructArrayLayout3ui6;it.resize(rt),it._trim();for(var nt=0;nt<rt;nt++){var ot=6*nt;it.uint16[ot+0]=4*nt+0,it.uint16[ot+1]=4*nt+1,it.uint16[ot+2]=4*nt+2,it.uint16[ot+3]=4*nt+2,it.uint16[ot+4]=4*nt+3,it.uint16[ot+5]=4*nt+0}return it}(yt));for(var xn=ct.createIndexBuffer(pl,!0),En=ct.createVertexBuffer(wr,tt.collisionCircleLayout.members,!0),Tn=0,Cn=mt;Tn<Cn.length;Tn+=1){var Pn=Cn[Tn],Mn=Ai(Pn.transform,Pn.invTransform,et.transform);rr.draw(ct,ht.TRIANGLES,It.disabled,Pt.disabled,et.colorModeForRenderPass(),Ct.disabled,Mn,it.id,En,xn,tt.SegmentVector.simpleSegment(0,2*Pn.circleOffset,Pn.circleArray.length,Pn.circleArray.length/2),null,et.transform.zoom,null,null,null)}En.destroy(),xn.destroy()}}var _l=tt.identity(new Float32Array(16));function Qi(et,rt,it,nt,ot,at){var st=tt.getAnchorAlignment(et),ct=-(st.horizontalAlign-.5)*rt,ht=-(st.verticalAlign-.5)*it,dt=tt.evaluateVariableOffset(et,nt);return new tt.Point((ct/ot+dt[0])*at,(ht/ot+dt[1])*at)}function $i(et,rt,it,nt,ot,at,st,ct,ht,dt,mt){var yt=et.text.placedSymbolArray,gt=et.text.dynamicLayoutVertexArray,vt=et.icon.dynamicLayoutVertexArray,_t={};gt.clear();for(var Rt=0;Rt<yt.length;Rt++){var Ot=yt.get(Rt),Zt=Ot.hidden||!Ot.crossTileID||et.allowVerticalPlacement&&!Ot.placedOrientation?null:nt[Ot.crossTileID];if(Zt){var Ze=new tt.Point(Ot.anchorX,Ot.anchorY),Ge=$t(Ze,it?ct:st),Xe=te(at.cameraToCenterDistance,Ge.signedDistanceFromCamera),Je=ot.evaluateSizeForFeature(et.textSizeData,dt,Ot)*Xe/tt.ONE_EM;it&&(Je*=et.tilePixelRatio/ht);for(var rr=Qi(Zt.anchor,Zt.width,Zt.height,Zt.textOffset,Zt.textBoxScale,Je),wr=it?$t(Ze.add(rr),st).point:Ge.point.add(rt?rr.rotate(-at.angle):rr),Ir=et.allowVerticalPlacement&&Ot.placedOrientation===tt.WritingMode.vertical?Math.PI/2:0,ti=0;ti<Ot.numGlyphs;ti++)tt.addDynamicAttributes(gt,wr,Ir);mt&&Ot.associatedIconIndex>=0&&(_t[Ot.associatedIconIndex]={shiftedAnchor:wr,angle:Ir})}else ce(Ot.numGlyphs,gt)}if(mt){vt.clear();for(var ni=et.icon.placedSymbolArray,oi=0;oi<ni.length;oi++){var _i=ni.get(oi);if(_i.hidden)ce(_i.numGlyphs,vt);else{var ji=_t[oi];if(ji)for(var Ki=0;Ki<_i.numGlyphs;Ki++)tt.addDynamicAttributes(vt,ji.shiftedAnchor,ji.angle);else ce(_i.numGlyphs,vt)}}et.icon.dynamicLayoutVertexBuffer.updateData(vt)}et.text.dynamicLayoutVertexBuffer.updateData(gt)}function to(tt,et,rt){return rt.iconsInText&&et?"symbolTextAndIcon":tt?"symbolSDF":"symbolIcon"}function eo(et,rt,it,nt,ot,at,st,ct,ht,dt,mt,yt){for(var gt=et.context,vt=gt.gl,_t=et.transform,Rt="map"===ct,Ot="map"===ht,Zt=Rt&&"point"!==it.layout.get("symbol-placement"),Ze=Rt&&!Ot&&!Zt,Ge=void 0!==it.layout.get("symbol-sort-key").constantOr(1),Xe=!1,Je=et.depthModeForSublayer(0,It.ReadOnly),rr=it.layout.get("text-variable-anchor"),wr=[],Ir=0,ti=nt;Ir<ti.length;Ir+=1){var ni=ti[Ir],oi=rt.getTile(ni),_i=oi.getBucket(it);if(_i){var ji=ot?_i.text:_i.icon;if(ji&&ji.segments.get().length){var Ki=ji.programConfigurations.get(it.id),Ji=ot||_i.sdfIcons,an=ot?_i.textSizeData:_i.iconSizeData,_n=Ot||0!==_t.pitch,xn=et.useProgram(to(Ji,ot,_i),Ki),En=tt.evaluateSizeForZoom(an,_t.zoom),Tn=void 0,Cn=[0,0],Pn=void 0,Mn=void 0,Dn=null,Ln=void 0;if(ot)Pn=oi.glyphAtlasTexture,Mn=vt.LINEAR,Tn=oi.glyphAtlasTexture.size,_i.iconsInText&&(Cn=oi.imageAtlasTexture.size,Dn=oi.imageAtlasTexture,Ln=_n||et.options.rotating||et.options.zooming||"composite"===an.kind||"camera"===an.kind?vt.LINEAR:vt.NEAREST);else{var Rn=1!==it.layout.get("icon-size").constantOr(0)||_i.iconsNeedLinear;Pn=oi.imageAtlasTexture,Mn=Ji||et.options.rotating||et.options.zooming||Rn||_n?vt.LINEAR:vt.NEAREST,Tn=oi.imageAtlasTexture.size}var Fn=pe(oi,1,et.transform.zoom),Gn=Jt(ni.posMatrix,Ot,Rt,et.transform,Fn),Wn=Qt(ni.posMatrix,Ot,Rt,et.transform,Fn),Qn=rr&&_i.hasTextData(),lo="none"!==it.layout.get("icon-text-fit")&&Qn&&_i.hasIconData();Zt&&ie(_i,ni.posMatrix,et,ot,Gn,Wn,Ot,dt);var uo=et.translatePosMatrix(ni.posMatrix,oi,at,st),co=Zt||ot&&rr||lo?_l:Gn,So=et.translatePosMatrix(Wn,oi,at,st,!0),zo=Ji&&0!==it.paint.get(ot?"text-halo-width":"icon-halo-width").constantOr(1),ko={program:xn,buffers:ji,uniformValues:Ji?_i.iconsInText?Wi(an.kind,En,Ze,Ot,et,uo,co,So,Tn,Cn):Gi(an.kind,En,Ze,Ot,et,uo,co,So,ot,Tn,!0):Vi(an.kind,En,Ze,Ot,et,uo,co,So,ot,Tn),atlasTexture:Pn,atlasTextureIcon:Dn,atlasInterpolation:Mn,atlasInterpolationIcon:Ln,isSDF:Ji,hasHalo:zo};if(Ge&&_i.canOverlap){Xe=!0;for(var ta=0,ea=ji.segments.get();ta<ea.length;ta+=1){var ra=ea[ta];wr.push({segments:new tt.SegmentVector([ra]),sortKey:ra.sortKey,state:ko})}}else wr.push({segments:ji.segments,sortKey:0,state:ko})}}}Xe&&wr.sort((function(tt,et){return tt.sortKey-et.sortKey}));for(var ia=0,na=wr;ia<na.length;ia+=1){var oa=na[ia],aa=oa.state;if(gt.activeTexture.set(vt.TEXTURE0),aa.atlasTexture.bind(aa.atlasInterpolation,vt.CLAMP_TO_EDGE),aa.atlasTextureIcon&&(gt.activeTexture.set(vt.TEXTURE1),aa.atlasTextureIcon&&aa.atlasTextureIcon.bind(aa.atlasInterpolationIcon,vt.CLAMP_TO_EDGE)),aa.isSDF){var la=aa.uniformValues;aa.hasHalo&&(la.u_is_halo=1,io(aa.buffers,oa.segments,it,et,aa.program,Je,mt,yt,la)),la.u_is_halo=0}io(aa.buffers,oa.segments,it,et,aa.program,Je,mt,yt,aa.uniformValues)}}function io(tt,et,rt,it,nt,ot,at,st,ct){var ht=it.context;nt.draw(ht,ht.gl.TRIANGLES,ot,at,st,Ct.disabled,ct,rt.id,tt.layoutVertexBuffer,tt.indexBuffer,et,rt.paint,it.transform.zoom,tt.programConfigurations.get(rt.id),tt.dynamicLayoutVertexBuffer,tt.opacityVertexBuffer)}function oo(tt,et,rt,it,nt,ot,at){var st,ct,ht,dt,mt,yt=tt.context.gl,gt=rt.paint.get("fill-pattern"),vt=gt&&gt.constantOr(1),_t=rt.getCrossfadeParameters();at?(ct=vt&&!rt.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",st=yt.LINES):(ct=vt?"fillPattern":"fill",st=yt.TRIANGLES);for(var Rt=0,Ot=it;Rt<Ot.length;Rt+=1){var Zt=Ot[Rt],Ze=et.getTile(Zt);if(!vt||Ze.patternsLoaded()){var Ge=Ze.getBucket(rt);if(Ge){var Xe=Ge.programConfigurations.get(rt.id),Je=tt.useProgram(ct,Xe);vt&&(tt.context.activeTexture.set(yt.TEXTURE0),Ze.imageAtlasTexture.bind(yt.LINEAR,yt.CLAMP_TO_EDGE),Xe.updatePaintBuffers(_t));var rr=gt.constantOr(null);if(rr&&Ze.imageAtlas){var wr=Ze.imageAtlas,Ir=wr.patternPositions[rr.to.toString()],ti=wr.patternPositions[rr.from.toString()];Ir&&ti&&Xe.setConstantPatternPositions(Ir,ti)}var ni=tt.translatePosMatrix(Zt.posMatrix,Ze,rt.paint.get("fill-translate"),rt.paint.get("fill-translate-anchor"));if(at){dt=Ge.indexBuffer2,mt=Ge.segments2;var oi=[yt.drawingBufferWidth,yt.drawingBufferHeight];ht="fillOutlinePattern"===ct&&vt?Ci(ni,tt,_t,Ze,oi):Si(ni,oi)}else dt=Ge.indexBuffer,mt=Ge.segments,ht=vt?Pi(ni,tt,_t,Ze):Ii(ni);Je.draw(tt.context,st,nt,tt.stencilModeForClipping(Zt),ot,Ct.disabled,ht,rt.id,Ge.layoutVertexBuffer,dt,mt,rt.paint,tt.transform.zoom,Xe)}}}}function ro(tt,et,rt,it,nt,ot,at){for(var st=tt.context,ct=st.gl,ht=rt.paint.get("fill-extrusion-pattern"),dt=ht.constantOr(1),mt=rt.getCrossfadeParameters(),yt=rt.paint.get("fill-extrusion-opacity"),gt=0,vt=it;gt<vt.length;gt+=1){var _t=vt[gt],Rt=et.getTile(_t),Ot=Rt.getBucket(rt);if(Ot){var Zt=Ot.programConfigurations.get(rt.id),Ze=tt.useProgram(dt?"fillExtrusionPattern":"fillExtrusion",Zt);dt&&(tt.context.activeTexture.set(ct.TEXTURE0),Rt.imageAtlasTexture.bind(ct.LINEAR,ct.CLAMP_TO_EDGE),Zt.updatePaintBuffers(mt));var Ge=ht.constantOr(null);if(Ge&&Rt.imageAtlas){var Xe=Rt.imageAtlas,Je=Xe.patternPositions[Ge.to.toString()],rr=Xe.patternPositions[Ge.from.toString()];Je&&rr&&Zt.setConstantPatternPositions(Je,rr)}var wr=tt.translatePosMatrix(_t.posMatrix,Rt,rt.paint.get("fill-extrusion-translate"),rt.paint.get("fill-extrusion-translate-anchor")),Ir=rt.paint.get("fill-extrusion-vertical-gradient"),ti=dt?Ei(wr,tt,Ir,yt,_t,mt,Rt):Ti(wr,tt,Ir,yt);Ze.draw(st,st.gl.TRIANGLES,nt,ot,at,Ct.backCCW,ti,rt.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,rt.paint,tt.transform.zoom,Zt)}}}function ao(et,rt,it,nt,ot,at){var st=et.context,ct=st.gl,ht=rt.fbo;if(ht){var dt=et.useProgram("hillshade");st.activeTexture.set(ct.TEXTURE0),ct.bindTexture(ct.TEXTURE_2D,ht.colorAttachment.get());var mt=function(et,rt,it){var nt=it.paint.get("hillshade-shadow-color"),ot=it.paint.get("hillshade-highlight-color"),at=it.paint.get("hillshade-accent-color"),st=it.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===it.paint.get("hillshade-illumination-anchor")&&(st-=et.transform.angle);var ct,ht,dt,mt=!et.options.moving;return{u_matrix:et.transform.calculatePosMatrix(rt.tileID.toUnwrapped(),mt),u_image:0,u_latrange:(ct=rt.tileID,ht=Math.pow(2,ct.canonical.z),dt=ct.canonical.y,[new tt.MercatorCoordinate(0,dt/ht).toLngLat().lat,new tt.MercatorCoordinate(0,(dt+1)/ht).toLngLat().lat]),u_light:[it.paint.get("hillshade-exaggeration"),st],u_shadow:nt,u_highlight:ot,u_accent:at}}(et,rt,it);dt.draw(st,ct.TRIANGLES,nt,ot,at,Ct.disabled,mt,it.id,et.rasterBoundsBuffer,et.quadTriangleIndexBuffer,et.rasterBoundsSegments)}}function no(et,rt,it,nt,ot,at){var st=et.context,ct=st.gl,ht=rt.dem;if(ht&&ht.data){var dt=ht.dim,mt=ht.stride,yt=ht.getPixels();if(st.activeTexture.set(ct.TEXTURE1),st.pixelStoreUnpackPremultiplyAlpha.set(!1),rt.demTexture=rt.demTexture||et.getTileTexture(mt),rt.demTexture){var gt=rt.demTexture;gt.update(yt,{premultiply:!1}),gt.bind(ct.NEAREST,ct.CLAMP_TO_EDGE)}else rt.demTexture=new tt.Texture(st,yt,ct.RGBA,{premultiply:!1}),rt.demTexture.bind(ct.NEAREST,ct.CLAMP_TO_EDGE);st.activeTexture.set(ct.TEXTURE0);var vt=rt.fbo;if(!vt){var _t=new tt.Texture(st,{width:dt,height:dt,data:null},ct.RGBA);_t.bind(ct.LINEAR,ct.CLAMP_TO_EDGE),(vt=rt.fbo=st.createFramebuffer(dt,dt,!0)).colorAttachment.set(_t.texture)}st.bindFramebuffer.set(vt.framebuffer),st.viewport.set([0,0,dt,dt]),et.useProgram("hillshadePrepare").draw(st,ct.TRIANGLES,nt,ot,at,Ct.disabled,function(et,rt){var it=rt.stride,nt=tt.create();return tt.ortho(nt,0,tt.EXTENT,-tt.EXTENT,0,0,1),tt.translate(nt,nt,[0,-tt.EXTENT,0]),{u_matrix:nt,u_image:1,u_dimension:[it,it],u_zoom:et.overscaledZ,u_unpack:rt.getUnpackVector()}}(rt.tileID,ht),it.id,et.rasterBoundsBuffer,et.quadTriangleIndexBuffer,et.rasterBoundsSegments),rt.needsHillshadePrepare=!1}}function so(et,rt,it,nt,ot){var at=nt.paint.get("raster-fade-duration");if(at>0){var st=tt.browser.now(),ct=(st-et.timeAdded)/at,ht=rt?(st-rt.timeAdded)/at:-1,dt=it.getSource(),mt=ot.coveringZoomLevel({tileSize:dt.tileSize,roundZoom:dt.roundZoom}),yt=!rt||Math.abs(rt.tileID.overscaledZ-mt)>Math.abs(et.tileID.overscaledZ-mt),gt=yt&&et.refreshedUponExpiration?1:tt.clamp(yt?ct:1-ht,0,1);return et.refreshedUponExpiration&&ct>=1&&(et.refreshedUponExpiration=!1),rt?{opacity:1,mix:1-gt}:{opacity:gt,mix:0}}return{opacity:1,mix:0}}var xl=new tt.Color(1,0,0,1),wl=new tt.Color(0,1,0,1),El=new tt.Color(0,0,1,1),Sl=new tt.Color(1,0,1,1),Il=new tt.Color(0,1,1,1);function _o(tt,et,rt,it){mo(tt,0,et+rt/2,tt.transform.width,rt,it)}function fo(tt,et,rt,it){mo(tt,et-rt/2,0,rt,tt.transform.height,it)}function mo(et,rt,it,nt,ot,at){var st=et.context,ct=st.gl;ct.enable(ct.SCISSOR_TEST),ct.scissor(rt*tt.browser.devicePixelRatio,it*tt.browser.devicePixelRatio,nt*tt.browser.devicePixelRatio,ot*tt.browser.devicePixelRatio),st.clear({color:at}),ct.disable(ct.SCISSOR_TEST)}function go(et,rt,it){var nt=et.context,ot=nt.gl,at=it.posMatrix,st=et.useProgram("debug"),ct=It.disabled,ht=Pt.disabled,dt=et.colorModeForRenderPass();nt.activeTexture.set(ot.TEXTURE0),et.emptyTexture.bind(ot.LINEAR,ot.CLAMP_TO_EDGE),st.draw(nt,ot.LINE_STRIP,ct,ht,dt,Ct.disabled,Mi(at,tt.Color.red),"$debug",et.debugBuffer,et.tileBorderIndexBuffer,et.debugSegments);var mt=rt.getTileByID(it.key).latestRawTileData,yt=Math.floor((mt&&mt.byteLength||0)/1024),gt=rt.getTile(it).tileSize,vt=512/Math.min(gt,512)*(it.overscaledZ/et.transform.zoom)*.5,_t=it.canonical.toString();it.overscaledZ!==it.canonical.z&&(_t+=" =>
3 "+it.overscaledZ),function(tt,et){tt.initDebugOverlayCanvas();var rt=tt.debugOverlayCanvas,it=tt.context.gl,nt=tt.debugOverlayCanvas.getContext("2d");nt.clearRect(0,0,rt.width,rt.height),nt.shadowColor="white",nt.shadowBlur=2,nt.lineWidth=1.5,nt.strokeStyle="white",nt.textBaseline="top",nt.font="bold 36px Open Sans, sans-serif",nt.fillText(et,5,5),nt.strokeText(et,5,5),tt.debugOverlayTexture.update(rt),tt.debugOverlayTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE)}(et,_t+" "+yt+"kb"),st.draw(nt,ot.TRIANGLES,ct,ht,St.alphaBlended,Ct.disabled,Mi(at,tt.Color.transparent,vt),"$debug",et.debugBuffer,et.quadTriangleIndexBuffer,et.debugSegments)}var zl={symbol:function(et,rt,it,nt,ot){if("translucent"===et.renderPass){var at=Pt.disabled,st=et.colorModeForRenderPass();it.layout.get("text-variable-anchor")&&function(et,rt,it,nt,ot,at,st){for(var ct=rt.transform,ht="map"===ot,dt="map"===at,mt=0,yt=et;mt<yt.length;mt+=1){var gt=yt[mt],vt=nt.getTile(gt),_t=vt.getBucket(it);if(_t&&_t.text&&_t.text.segments.get().length){var Rt=tt.evaluateSizeForZoom(_t.textSizeData,ct.zoom),Ot=pe(vt,1,rt.transform.zoom),Zt=Jt(gt.posMatrix,dt,ht,rt.transform,Ot),Ze="none"!==it.layout.get("icon-text-fit")&&_t.hasIconData();if(Rt){var Ge=Math.pow(2,ct.zoom-vt.tileID.overscaledZ);$i(_t,ht,dt,st,tt.symbolSize,ct,Zt,gt.posMatrix,Ge,Rt,Ze)}}}}(nt,et,it,rt,it.layout.get("text-rotation-alignment"),it.layout.get("text-pitch-alignment"),ot),0!==it.paint.get("icon-opacity").constantOr(1)&&eo(et,rt,it,nt,!1,it.paint.get("icon-translate"),it.paint.get("icon-translate-anchor"),it.layout.get("icon-rotation-alignment"),it.layout.get("icon-pitch-alignment"),it.layout.get("icon-keep-upright"),at,st),0!==it.paint.get("text-opacity").constantOr(1)&&eo(et,rt,it,nt,!0,it.paint.get("text-translate"),it.paint.get("text-translate-anchor"),it.layout.get("text-rotation-alignment"),it.layout.get("text-pitch-alignment"),it.layout.get("text-keep-upright"),at,st),rt.map.showCollisionBoxes&&(Yi(et,rt,it,nt,it.paint.get("text-translate"),it.paint.get("text-translate-anchor"),!0),Yi(et,rt,it,nt,it.paint.get("icon-translate"),it.paint.get("icon-translate-anchor"),!1))}},circle:function(et,rt,it,nt){if("translucent"===et.renderPass){var ot=it.paint.get("circle-opacity"),at=it.paint.get("circle-stroke-width"),st=it.paint.get("circle-stroke-opacity"),ct=void 0!==it.layout.get("circle-sort-key").constantOr(1);if(0!==ot.constantOr(1)||0!==at.constantOr(1)&&0!==st.constantOr(1)){for(var ht=et.context,dt=ht.gl,mt=et.depthModeForSublayer(0,It.ReadOnly),yt=Pt.disabled,gt=et.colorModeForRenderPass(),vt=[],_t=0;_t<nt.length;_t++){var Rt=nt[_t],Ot=rt.getTile(Rt),Zt=Ot.getBucket(it);if(Zt){var Ze=Zt.programConfigurations.get(it.id),Ge={programConfiguration:Ze,program:et.useProgram("circle",Ze),layoutVertexBuffer:Zt.layoutVertexBuffer,indexBuffer:Zt.indexBuffer,uniformValues:zi(et,Rt,Ot,it)};if(ct)for(var Xe=0,Je=Zt.segments.get();Xe<Je.length;Xe+=1){var rr=Je[Xe];vt.push({segments:new tt.SegmentVector([rr]),sortKey:rr.sortKey,state:Ge})}else vt.push({segments:Zt.segments,sortKey:0,state:Ge})}}ct&&vt.sort((function(tt,et){return tt.sortKey-et.sortKey}));for(var wr=0,Ir=vt;wr<Ir.length;wr+=1){var ti=Ir[wr],ni=ti.state;ni.program.draw(ht,dt.TRIANGLES,mt,yt,gt,Ct.disabled,ni.uniformValues,it.id,ni.layoutVertexBuffer,ni.indexBuffer,ti.segments,it.paint,et.transform.zoom,ni.programConfiguration)}}}},heatmap:function(et,rt,it,nt){if(0!==it.paint.get("heatmap-opacity"))if("offscreen"===et.renderPass){var ot=et.context,at=ot.gl,st=Pt.disabled,ct=new St([at.ONE,at.ONE],tt.Color.transparent,[!0,!0,!0,!0]);!function(tt,et,rt){var it=tt.gl;tt.activeTexture.set(it.TEXTURE1),tt.viewport.set([0,0,et.width/4,et.height/4]);var nt=rt.heatmapFbo;if(nt)it.bindTexture(it.TEXTURE_2D,nt.colorAttachment.get()),tt.bindFramebuffer.set(nt.framebuffer);else{var ot=it.createTexture();it.bindTexture(it.TEXTURE_2D,ot),it.texParameteri(it.TEXTURE_2D,it.TEXTURE_WRAP_S,it.CLAMP_TO_EDGE),it.texParameteri(it.TEXTURE_2D,it.TEXTURE_WRAP_T,it.CLAMP_TO_EDGE),it.texParameteri(it.TEXTURE_2D,it.TEXTURE_MIN_FILTER,it.LINEAR),it.texParameteri(it.TEXTURE_2D,it.TEXTURE_MAG_FILTER,it.LINEAR),nt=rt.heatmapFbo=tt.createFramebuffer(et.width/4,et.height/4,!1),function(tt,et,rt,it){var nt=tt.gl;nt.texImage2D(nt.TEXTURE_2D,0,nt.RGBA,et.width/4,et.height/4,0,nt.RGBA,tt.extRenderToTextureHalfFloat?tt.extTextureHalfFloat.HALF_FLOAT_OES:nt.UNSIGNED_BYTE,null),it.colorAttachment.set(rt)}(tt,et,ot,nt)}}(ot,et,it),ot.clear({color:tt.Color.transparent});for(var ht=0;ht<nt.length;ht++){var dt=nt[ht];if(!rt.hasRenderableParent(dt)){var mt=rt.getTile(dt),yt=mt.getBucket(it);if(yt){var gt=yt.programConfigurations.get(it.id);et.useProgram("heatmap",gt).draw(ot,at.TRIANGLES,It.disabled,st,ct,Ct.disabled,Ri(dt.posMatrix,mt,et.transform.zoom,it.paint.get("heatmap-intensity")),it.id,yt.layoutVertexBuffer,yt.indexBuffer,yt.segments,it.paint,et.transform.zoom,gt)}}}ot.viewport.set([0,0,et.width,et.height])}else"translucent"===et.renderPass&&(et.context.setColorMode(et.colorModeForRenderPass()),function(et,rt){var it=et.context,nt=it.gl,ot=rt.heatmapFbo;if(ot){it.activeTexture.set(nt.TEXTURE0),nt.bindTexture(nt.TEXTURE_2D,ot.colorAttachment.get()),it.activeTexture.set(nt.TEXTURE1);var at=rt.colorRampTexture;at||(at=rt.colorRampTexture=new tt.Texture(it,rt.colorRamp,nt.RGBA)),at.bind(nt.LINEAR,nt.CLAMP_TO_EDGE),et.useProgram("heatmapTexture").draw(it,nt.TRIANGLES,It.disabled,Pt.disabled,et.colorModeForRenderPass(),Ct.disabled,function(et,rt,it,nt){var ot=tt.create();tt.ortho(ot,0,et.width,et.height,0,0,1);var at=et.context.gl;return{u_matrix:ot,u_world:[at.drawingBufferWidth,at.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:rt.paint.get("heatmap-opacity")}}(et,rt),rt.id,et.viewportBuffer,et.quadTriangleIndexBuffer,et.viewportSegments,rt.paint,et.transform.zoom)}}(et,it))},line:function(et,rt,it,nt){if("translucent"===et.renderPass){var ot=it.paint.get("line-opacity"),at=it.paint.get("line-width");if(0!==ot.constantOr(1)&&0!==at.constantOr(1))for(var st=et.depthModeForSublayer(0,It.ReadOnly),ct=et.colorModeForRenderPass(),ht=it.paint.get("line-dasharray"),dt=it.paint.get("line-pattern"),mt=dt.constantOr(1),yt=it.paint.get("line-gradient"),gt=it.getCrossfadeParameters(),vt=mt?"linePattern":ht?"lineSDF":yt?"lineGradient":"line",_t=et.context,Rt=_t.gl,Ot=!0,Zt=0,Ze=nt;Zt<Ze.length;Zt+=1){var Ge=Ze[Zt],Xe=rt.getTile(Ge);if(!mt||Xe.patternsLoaded()){var Je=Xe.getBucket(it);if(Je){var rr=Je.programConfigurations.get(it.id),wr=et.context.program.get(),Ir=et.useProgram(vt,rr),ti=Ot||Ir.program!==wr,ni=dt.constantOr(null);if(ni&&Xe.imageAtlas){var oi=Xe.imageAtlas,_i=oi.patternPositions[ni.to.toString()],ji=oi.patternPositions[ni.from.toString()];_i&&ji&&rr.setConstantPatternPositions(_i,ji)}var Ki=mt?Oi(et,Xe,it,gt):ht?Fi(et,Xe,it,ht,gt):yt?Bi(et,Xe,it,Je.lineClipsArray.length):ki(et,Xe,it);if(mt)_t.activeTexture.set(Rt.TEXTURE0),Xe.imageAtlasTexture.bind(Rt.LINEAR,Rt.CLAMP_TO_EDGE),rr.updatePaintBuffers(gt);else if(ht&&(ti||et.lineAtlas.dirty))_t.activeTexture.set(Rt.TEXTURE0),et.lineAtlas.bind(_t);else if(yt){var Ji=Je.gradients[it.id],an=Ji.texture;
vendor: 54,082 bytes, line 3
3if(it.gradientVersion!==Ji.version){var _n=256;if(it.stepInterpolant){var xn=rt.getSource().maxzoom,En=Ge.canonical.z===xn?Math.ceil(1<<et.transform.maxZoom-Ge.canonical.z):1;_n=tt.clamp(tt.nextPowerOfTwo(Je.maxLineLength/tt.EXTENT*1024*En),256,_t.maxTextureSize)}Ji.gradient=tt.renderColorRamp({expression:it.gradientExpression(),evaluationKey:"lineProgress",resolution:_n,image:Ji.gradient||void 0,clips:Je.lineClipsArray}),Ji.texture?Ji.texture.update(Ji.gradient):Ji.texture=new tt.Texture(_t,Ji.gradient,Rt.RGBA),Ji.version=it.gradientVersion,an=Ji.texture}_t.activeTexture.set(Rt.TEXTURE0),an.bind(it.stepInterpolant?Rt.NEAREST:Rt.LINEAR,Rt.CLAMP_TO_EDGE)}Ir.draw(_t,Rt.TRIANGLES,st,et.stencilModeForClipping(Ge),ct,Ct.disabled,Ki,it.id,Je.layoutVertexBuffer,Je.indexBuffer,Je.segments,it.paint,et.transform.zoom,rr,Je.layoutVertexBuffer2),Ot=!1}}}}},fill:function(et,rt,it,nt){var ot=it.paint.get("fill-color"),at=it.paint.get("fill-opacity");if(0!==at.constantOr(1)){var st=et.colorModeForRenderPass(),ct=it.paint.get("fill-pattern"),ht=et.opaquePassEnabledForLayer()&&!ct.constantOr(1)&&1===ot.constantOr(tt.Color.transparent).a&&1===at.constantOr(0)?"opaque":"translucent";if(et.renderPass===ht){var dt=et.depthModeForSublayer(1,"opaque"===et.renderPass?It.ReadWrite:It.ReadOnly);oo(et,rt,it,nt,dt,st,!1)}if("translucent"===et.renderPass&&it.paint.get("fill-antialias")){var mt=et.depthModeForSublayer(it.getPaintProperty("fill-outline-color")?2:0,It.ReadOnly);oo(et,rt,it,nt,mt,st,!0)}}},"fill-extrusion":function(tt,et,rt,it){var nt=rt.paint.get("fill-extrusion-opacity");if(0!==nt&&"translucent"===tt.renderPass){var ot=new It(tt.context.gl.LEQUAL,It.ReadWrite,tt.depthRangeFor3D);if(1!==nt||rt.paint.get("fill-extrusion-pattern").constantOr(1))ro(tt,et,rt,it,ot,Pt.disabled,St.disabled),ro(tt,et,rt,it,ot,tt.stencilModeFor3D(),tt.colorModeForRenderPass());else{var at=tt.colorModeForRenderPass();ro(tt,et,rt,it,ot,Pt.disabled,at)}}},hillshade:function(tt,et,rt,it){if("offscreen"===tt.renderPass||"translucent"===tt.renderPass){for(var nt=tt.context,ot=tt.depthModeForSublayer(0,It.ReadOnly),at=tt.colorModeForRenderPass(),st="translucent"===tt.renderPass?tt.stencilConfigForOverlap(it):[{},it],ct=st[0],ht=0,dt=st[1];ht<dt.length;ht+=1){var mt=dt[ht],yt=et.getTile(mt);yt.needsHillshadePrepare&&"offscreen"===tt.renderPass?no(tt,yt,rt,ot,Pt.disabled,at):"translucent"===tt.renderPass&&ao(tt,yt,rt,ot,ct[mt.overscaledZ],at)}nt.viewport.set([0,0,tt.width,tt.height])}},raster:function(tt,et,rt,it){if("translucent"===tt.renderPass&&0!==rt.paint.get("raster-opacity")&&it.length)for(var nt=tt.context,ot=nt.gl,at=et.getSource(),st=tt.useProgram("raster"),ct=tt.colorModeForRenderPass(),ht=at instanceof Xe?[{},it]:tt.stencilConfigForOverlap(it),dt=ht[0],mt=ht[1],yt=mt[mt.length-1].overscaledZ,gt=!tt.options.moving,vt=0,_t=mt;vt<_t.length;vt+=1){var Rt=_t[vt],Ot=tt.depthModeForSublayer(Rt.overscaledZ-yt,1===rt.paint.get("raster-opacity")?It.ReadWrite:It.ReadOnly,ot.LESS),Zt=et.getTile(Rt),Ze=tt.transform.calculatePosMatrix(Rt.toUnwrapped(),gt);Zt.registerFadeDuration(rt.paint.get("raster-fade-duration"));var Ge=et.findLoadedParent(Rt,0),Je=so(Zt,Ge,et,rt,tt.transform),rr=void 0,wr=void 0,Ir="nearest"===rt.paint.get("raster-resampling")?ot.NEAREST:ot.LINEAR;nt.activeTexture.set(ot.TEXTURE0),Zt.texture.bind(Ir,ot.CLAMP_TO_EDGE,ot.LINEAR_MIPMAP_NEAREST),nt.activeTexture.set(ot.TEXTURE1),Ge?(Ge.texture.bind(Ir,ot.CLAMP_TO_EDGE,ot.LINEAR_MIPMAP_NEAREST),rr=Math.pow(2,Ge.tileID.overscaledZ-Zt.tileID.overscaledZ),wr=[Zt.tileID.canonical.x*rr%1,Zt.tileID.canonical.y*rr%1]):Zt.texture.bind(Ir,ot.CLAMP_TO_EDGE,ot.LINEAR_MIPMAP_NEAREST);var ti=Zi(Ze,wr||[0,0],rr||1,Je,rt);at instanceof Xe?st.draw(nt,ot.TRIANGLES,Ot,Pt.disabled,ct,Ct.disabled,ti,rt.id,at.boundsBuffer,tt.quadTriangleIndexBuffer,at.boundsSegments):st.draw(nt,ot.TRIANGLES,Ot,dt[Rt.overscaledZ],ct,Ct.disabled,ti,rt.id,tt.rasterBoundsBuffer,tt.quadTriangleIndexBuffer,tt.rasterBoundsSegments)}},background:function(tt,et,rt){var it=rt.paint.get("background-color"),nt=rt.paint.get("background-opacity");if(0!==nt){var ot=tt.context,at=ot.gl,st=tt.transform,ct=st.tileSize,ht=rt.paint.get("background-pattern");if(!tt.isPatternMissing(ht)){var dt=!ht&&1===it.a&&1===nt&&tt.opaquePassEnabledForLayer()?"opaque":"translucent";if(tt.renderPass===dt){var mt=Pt.disabled,yt=tt.depthModeForSublayer(0,"opaque"===dt?It.ReadWrite:It.ReadOnly),gt=tt.colorModeForRenderPass(),vt=tt.useProgram(ht?"backgroundPattern":"background"),_t=st.coveringTiles({tileSize:ct});ht&&(ot.activeTexture.set(at.TEXTURE0),tt.imageManager.bind(tt.context));for(var Rt=rt.getCrossfadeParameters(),Ot=0,Zt=_t;Ot<Zt.length;Ot+=1){var Ze=Zt[Ot],Ge=tt.transform.calculatePosMatrix(Ze.toUnwrapped()),Xe=ht?Hi(Ge,nt,tt,ht,{tileID:Ze,tileSize:ct},Rt):Xi(Ge,nt,it);vt.draw(ot,at.TRIANGLES,yt,mt,gt,Ct.disabled,Xe,rt.id,tt.tileExtentBuffer,tt.quadTriangleIndexBuffer,tt.tileExtentSegments)}}}}},debug:function(tt,et,rt){for(var it=0;it<rt.length;it++)go(tt,et,rt[it])},custom:function(tt,et,rt){var it=tt.context,nt=rt.implementation;if("offscreen"===tt.renderPass){var ot=nt.prerender;ot&&(tt.setCustomLayerDefaults(),it.setColorMode(tt.colorModeForRenderPass()),ot.call(nt,it.gl,tt.transform.customLayerMatrix()),it.setDirty(),tt.setBaseState())}else if("translucent"===tt.renderPass){tt.setCustomLayerDefaults(),it.setColorMode(tt.colorModeForRenderPass()),it.setStencilMode(Pt.disabled);var at="3d"===nt.renderingMode?new It(tt.context.gl.LEQUAL,It.ReadWrite,tt.depthRangeFor3D):tt.depthModeForSublayer(0,It.ReadOnly);it.setDepthMode(at),nt.render(it.gl,tt.transform.customLayerMatrix()),it.setDirty(),tt.setBaseState(),it.bindFramebuffer.set(null)}}},yo=function(tt,et){this.context=new zt(tt),this.transform=et,this._tileTextures={},this.setup(),this.numSublayers=aa.maxUnderzooming+aa.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Fe,this.gpuTimers={}};yo.prototype.resize=function(et,rt){if(this.width=et*tt.browser.devicePixelRatio,this.height=rt*tt.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var it=0,nt=this.style._order;it<nt.length;it+=1)this.style._layers[nt[it]].resize()},yo.prototype.setup=function(){var et=this.context,rt=new tt.StructArrayLayout2i4;rt.emplaceBack(0,0),rt.emplaceBack(tt.EXTENT,0),rt.emplaceBack(0,tt.EXTENT),rt.emplaceBack(tt.EXTENT,tt.EXTENT),this.tileExtentBuffer=et.createVertexBuffer(rt,cs.members),this.tileExtentSegments=tt.SegmentVector.simpleSegment(0,0,4,2);var it=new tt.StructArrayLayout2i4;it.emplaceBack(0,0),it.emplaceBack(tt.EXTENT,0),it.emplaceBack(0,tt.EXTENT),it.emplaceBack(tt.EXTENT,tt.EXTENT),this.debugBuffer=et.createVertexBuffer(it,cs.members),this.debugSegments=tt.SegmentVector.simpleSegment(0,0,4,5);var nt=new tt.StructArrayLayout4i8;nt.emplaceBack(0,0,0,0),nt.emplaceBack(tt.EXTENT,0,tt.EXTENT,0),nt.emplaceBack(0,tt.EXTENT,0,tt.EXTENT),nt.emplaceBack(tt.EXTENT,tt.EXTENT,tt.EXTENT,tt.EXTENT),this.rasterBoundsBuffer=et.createVertexBuffer(nt,Ge.members),this.rasterBoundsSegments=tt.SegmentVector.simpleSegment(0,0,4,2);var ot=new tt.StructArrayLayout2i4;ot.emplaceBack(0,0),ot.emplaceBack(1,0),ot.emplaceBack(0,1),ot.emplaceBack(1,1),this.viewportBuffer=et.createVertexBuffer(ot,cs.members),this.viewportSegments=tt.SegmentVector.simpleSegment(0,0,4,2);var at=new tt.StructArrayLayout1ui2;at.emplaceBack(0),at.emplaceBack(1),at.emplaceBack(3),at.emplaceBack(2),at.emplaceBack(0),this.tileBorderIndexBuffer=et.createIndexBuffer(at);var st=new tt.StructArrayLayout3ui6;st.emplaceBack(0,1,2),st.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=et.createIndexBuffer(st),this.emptyTexture=new tt.Texture(et,{width:1,height:1,data:new Uint8Array([0,0,0,0])},et.gl.RGBA);var ct=this.context.gl;this.stencilClearMode=new Pt({func:ct.ALWAYS,mask:0},0,255,ct.ZERO,ct.ZERO,ct.ZERO)},yo.prototype.clearStencil=function(){var et=this.context,rt=et.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var it=tt.create();tt.ortho(it,0,this.width,this.height,0,0,1),tt.scale(it,it,[rt.drawingBufferWidth,rt.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(et,rt.TRIANGLES,It.disabled,this.stencilClearMode,St.disabled,Ct.disabled,Li(it),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},yo.prototype._renderTileClippingMasks=function(tt,et){if(this.currentStencilSource!==tt.source&&tt.isTileClipped()&&et&&et.length){this.currentStencilSource=tt.source;var rt=this.context,it=rt.gl;this.nextStencilID+et.length>256&&this.clearStencil(),rt.setColorMode(St.disabled),rt.setDepthMode(It.disabled);var nt=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ot=0,at=et;ot<at.length;ot+=1){var st=at[ot],ct=this._tileClippingMaskIDs[st.key]=this.nextStencilID++;nt.draw(rt,it.TRIANGLES,It.disabled,new Pt({func:it.ALWAYS,mask:0},ct,255,it.KEEP,it.KEEP,it.REPLACE),St.disabled,Ct.disabled,Li(st.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},yo.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var tt=this.nextStencilID++,et=this.context.gl;return new Pt({func:et.NOTEQUAL,mask:255},tt,255,et.KEEP,et.KEEP,et.REPLACE)},yo.prototype.stencilModeForClipping=function(tt){var et=this.context.gl;return new Pt({func:et.EQUAL,mask:255},this._tileClippingMaskIDs[tt.key],0,et.KEEP,et.KEEP,et.REPLACE)},yo.prototype.stencilConfigForOverlap=function(tt){var et,rt=this.context.gl,it=tt.sort((function(tt,et){return et.overscaledZ-tt.overscaledZ})),nt=it[it.length-1].overscaledZ,ot=it[0].overscaledZ-nt+1;if(ot>1){this.currentStencilSource=void 0,this.nextStencilID+ot>256&&this.clearStencil();for(var at={},st=0;st<ot;st++)at[st+nt]=new Pt({func:rt.GEQUAL,mask:255},st+this.nextStencilID,255,rt.KEEP,rt.KEEP,rt.REPLACE);return this.nextStencilID+=ot,[at,it]}return[(et={},et[nt]=Pt.disabled,et),it]},yo.prototype.colorModeForRenderPass=function(){var et=this.context.gl;return this._showOverdrawInspector?new St([et.CONSTANT_COLOR,et.ONE],new tt.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?St.unblended:St.alphaBlended},yo.prototype.depthModeForSublayer=function(tt,et,rt){if(!this.opaquePassEnabledForLayer())return It.disabled;var it=1-((1+this.currentLayer)*this.numSublayers+tt)*this.depthEpsilon;return new It(rt||this.context.gl.LEQUAL,et,[it,it])},yo.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},yo.prototype.render=function(et,rt){var it=this;this.style=et,this.options=rt,this.lineAtlas=et.lineAtlas,this.imageManager=et.imageManager,this.glyphManager=et.glyphManager,this.symbolFadeChange=et.placement.symbolFadeChange(tt.browser.now()),this.imageManager.beginFrame();var nt=this.style._order,ot=this.style.sourceCaches;for(var at in ot){var st=ot[at];st.used&&st.prepare(this.context)}var ct,ht,dt={},mt={},yt={};for(var gt in ot){var vt=ot[gt];dt[gt]=vt.getVisibleCoordinates(),mt[gt]=dt[gt].slice().reverse(),yt[gt]=vt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var _t=0;_t<nt.length;_t++)if(this.style._layers[nt[_t]].is3D()){this.opaquePassCutoff=_t;break}this.renderPass="offscreen";for(var Rt=0,Ot=nt;Rt<Ot.length;Rt+=1){var Zt=this.style._layers[Ot[Rt]];if(Zt.hasOffscreenPass()&&!Zt.isHidden(this.transform.zoom)){var Ze=mt[Zt.source];("custom"===Zt.type||Ze.length)&&this.renderLayer(this,ot[Zt.source],Zt,Ze)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:rt.showOverdrawInspector?tt.Color.black:tt.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=rt.showOverdrawInspector,this.depthRangeFor3D=[0,1-(et._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=nt.length-1;this.currentLayer>=0;this.currentLayer--){var Ge=this.style._layers[nt[this.currentLayer]],Xe=ot[Ge.source],Je=dt[Ge.source];this._renderTileClippingMasks(Ge,Je),this.renderLayer(this,Xe,Ge,Je)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<nt.length;this.currentLayer++){var rr=this.style._layers[nt[this.currentLayer]],wr=ot[rr.source],Ir=("symbol"===rr.type?yt:mt)[rr.source];this._renderTileClippingMasks(rr,dt[rr.source]),this.renderLayer(this,wr,rr,Ir)}this.options.showTileBoundaries&&(tt.values(this.style._layers).forEach((function(tt){tt.source&&!tt.isHidden(it.transform.zoom)&&(tt.source!==(ht&&ht.id)&&(ht=it.style.sourceCaches[tt.source]),(!ct||ct.getSource().maxzoom<ht.getSource().maxzoom)&&(ct=ht))})),ct&&zl.debug(this,ct,ct.getVisibleCoordinates())),this.options.showPadding&&function(tt){var et=tt.transform.padding;_o(tt,tt.transform.height-(et.top||0),3,xl),_o(tt,et.bottom||0,3,wl),fo(tt,et.left||0,3,El),fo(tt,tt.transform.width-(et.right||0),3,Sl);var rt=tt.transform.centerPoint;!function(tt,et,rt,it){mo(tt,et-1,rt-10,2,20,it),mo(tt,et-10,rt-1,20,2,it)}(tt,rt.x,tt.transform.height-rt.y,Il)}(this),this.context.setDefault()},yo.prototype.renderLayer=function(tt,et,rt,it){rt.isHidden(this.transform.zoom)||("background"===rt.type||"custom"===rt.type||it.length)&&(this.id=rt.id,this.gpuTimingStart(rt),zl[rt.type](tt,et,rt,it,this.style.placement.variableOffsets),this.gpuTimingEnd())},yo.prototype.gpuTimingStart=function(tt){if(this.options.gpuTiming){var et=this.context.extTimerQuery,rt=this.gpuTimers[tt.id];rt||(rt=this.gpuTimers[tt.id]={calls:0,cpuTime:0,query:et.createQueryEXT()}),rt.calls++,et.beginQueryEXT(et.TIME_ELAPSED_EXT,rt.query)}},yo.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var tt=this.context.extTimerQuery;tt.endQueryEXT(tt.TIME_ELAPSED_EXT)}},yo.prototype.collectGpuTimers=function(){var tt=this.gpuTimers;return this.gpuTimers={},tt},yo.prototype.queryGpuTimers=function(tt){var et={};for(var rt in tt){var it=tt[rt],nt=this.context.extTimerQuery,ot=nt.getQueryObjectEXT(it.query,nt.QUERY_RESULT_EXT)/1e6;nt.deleteQueryEXT(it.query),et[rt]=ot}return et},yo.prototype.translatePosMatrix=function(et,rt,it,nt,ot){if(!it[0]&&!it[1])return et;var at=ot?"map"===nt?this.transform.angle:0:"viewport"===nt?-this.transform.angle:0;if(at){var st=Math.sin(at),ct=Math.cos(at);it=[it[0]*ct-it[1]*st,it[0]*st+it[1]*ct]}var ht=[ot?it[0]:pe(rt,it[0],this.transform.zoom),ot?it[1]:pe(rt,it[1],this.transform.zoom),0],dt=new Float32Array(16);return tt.translate(dt,et,ht),dt},yo.prototype.saveTileTexture=function(tt){var et=this._tileTextures[tt.size[0]];et?et.push(tt):this._tileTextures[tt.size[0]]=[tt]},yo.prototype.getTileTexture=function(tt){var et=this._tileTextures[tt];return et&&et.length>0?et.pop():null},yo.prototype.isPatternMissing=function(tt){if(!tt)return!1;if(!tt.from||!tt.to)return!0;var et=this.imageManager.getPattern(tt.from.toString()),rt=this.imageManager.getPattern(tt.to.toString());return!et||!rt},yo.prototype.useProgram=function(tt,et){this.cache=this.cache||{};var rt=""+tt+(et?et.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[rt]||(this.cache[rt]=new bi(this.context,tt,cl[tt],et,gl[tt],this._showOverdrawInspector)),this.cache[rt]},yo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},yo.prototype.setBaseState=function(){var tt=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(tt.FUNC_ADD)},yo.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=tt.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new tt.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},yo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var xo=function(tt,et){this.points=tt,this.planes=et};xo.fromInvProjectionMatrix=function(et,rt,it){var nt=Math.pow(2,it),ot=[[-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((function(rt){return tt.transformMat4([],rt,et)})).map((function(et){return tt.scale$1([],et,1/et[3]/rt*nt)})),at=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(et){var rt=tt.sub([],ot[et[0]],ot[et[1]]),it=tt.sub([],ot[et[2]],ot[et[1]]),nt=tt.normalize([],tt.cross([],rt,it)),at=-tt.dot(nt,ot[et[1]]);return nt.concat(at)}));return new xo(ot,at)};var bo=function(et,rt){this.min=et,this.max=rt,this.center=tt.scale$2([],tt.add([],this.min,this.max),.5)};bo.prototype.quadrant=function(et){for(var rt=[et%2==0,et<2],it=tt.clone$2(this.min),nt=tt.clone$2(this.max),ot=0;ot<rt.length;ot++)it[ot]=rt[ot]?this.min[ot]:this.center[ot],nt[ot]=rt[ot]?this.center[ot]:this.max[ot];return nt[2]=this.max[2],new bo(it,nt)},bo.prototype.distanceX=function(tt){return Math.max(Math.min(this.max[0],tt[0]),this.min[0])-tt[0]},bo.prototype.distanceY=function(tt){return Math.max(Math.min(this.max[1],tt[1]),this.min[1])-tt[1]},bo.prototype.intersects=function(et){for(var rt=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],it=!0,nt=0;nt<et.planes.length;nt++){for(var ot=et.planes[nt],at=0,st=0;st<rt.length;st++)at+=tt.dot$1(ot,rt[st])>=0;if(0===at)return 0;at!==rt.length&&(it=!1)}if(it)return 2;for(var ct=0;ct<3;ct++){for(var ht=Number.MAX_VALUE,dt=-Number.MAX_VALUE,mt=0;mt<et.points.length;mt++){var yt=et.points[mt][ct]-this.min[ct];ht=Math.min(ht,yt),dt=Math.max(dt,yt)}if(dt<0||ht>this.max[ct]-this.min[ct])return 0}return 1};var wo=function(tt,et,rt,it){if(void 0===tt&&(tt=0),void 0===et&&(et=0),void 0===rt&&(rt=0),void 0===it&&(it=0),isNaN(tt)||tt<0||isNaN(et)||et<0||isNaN(rt)||rt<0||isNaN(it)||it<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=tt,this.bottom=et,this.left=rt,this.right=it};wo.prototype.interpolate=function(et,rt,it){return null!=rt.top&&null!=et.top&&(this.top=tt.number(et.top,rt.top,it)),null!=rt.bottom&&null!=et.bottom&&(this.bottom=tt.number(et.bottom,rt.bottom,it)),null!=rt.left&&null!=et.left&&(this.left=tt.number(et.left,rt.left,it)),null!=rt.right&&null!=et.right&&(this.right=tt.number(et.right,rt.right,it)),this},wo.prototype.getCenter=function(et,rt){var it=tt.clamp((this.left+et-this.right)/2,0,et),nt=tt.clamp((this.top+rt-this.bottom)/2,0,rt);return new tt.Point(it,nt)},wo.prototype.equals=function(tt){return this.top===tt.top&&this.bottom===tt.bottom&&this.left===tt.left&&this.right===tt.right},wo.prototype.clone=function(){return new wo(this.top,this.bottom,this.left,this.right)},wo.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var To=function(et,rt,it,nt,ot){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===ot||ot,this._minZoom=et||0,this._maxZoom=rt||22,this._minPitch=null==it?0:it,this._maxPitch=null==nt?60:nt,this.setMaxBounds(),this.width=0,this.height=0,this._center=new tt.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new wo,this._posMatrixCache={},this._alignedPosMatrixCache={}},Cl={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};To.prototype.clone=function(){var tt=new To(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return tt.tileSize=this.tileSize,tt.latRange=this.latRange,tt.width=this.width,tt.height=this.height,tt._center=this._center,tt.zoom=this.zoom,tt.angle=this.angle,tt._fov=this._fov,tt._pitch=this._pitch,tt._unmodified=this._unmodified,tt._edgeInsets=this._edgeInsets.clone(),tt._calcMatrices(),tt},Cl.minZoom.get=function(){return this._minZoom},Cl.minZoom.set=function(tt){this._minZoom!==tt&&(this._minZoom=tt,this.zoom=Math.max(this.zoom,tt))},Cl.maxZoom.get=function(){return this._maxZoom},Cl.maxZoom.set=function(tt){this._maxZoom!==tt&&(this._maxZoom=tt,this.zoom=Math.min(this.zoom,tt))},Cl.minPitch.get=function(){return this._minPitch},Cl.minPitch.set=function(tt){this._minPitch!==tt&&(this._minPitch=tt,this.pitch=Math.max(this.pitch,tt))},Cl.maxPitch.get=function(){return this._maxPitch},Cl.maxPitch.set=function(tt){this._maxPitch!==tt&&(this._maxPitch=tt,this.pitch=Math.min(this.pitch,tt))},Cl.renderWorldCopies.get=function(){return this._renderWorldCopies},Cl.renderWorldCopies.set=function(tt){void 0===tt?tt=!0:null===tt&&(tt=!1),this._renderWorldCopies=tt},Cl.worldSize.get=function(){return this.tileSize*this.scale},Cl.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Cl.size.get=function(){return new tt.Point(this.width,this.height)},Cl.bearing.get=function(){return-this.angle/Math.PI*180},Cl.bearing.set=function(et){var rt=-tt.wrap(et,-180,180)*Math.PI/180;this.angle!==rt&&(this._unmodified=!1,this.angle=rt,this._calcMatrices(),this.rotationMatrix=tt.create$2(),tt.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Cl.pitch.get=function(){return this._pitch/Math.PI*180},Cl.pitch.set=function(et){var rt=tt.clamp(et,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==rt&&(this._unmodified=!1,this._pitch=rt,this._calcMatrices())},Cl.fov.get=function(){return this._fov/Math.PI*180},Cl.fov.set=function(tt){tt=Math.max(.01,Math.min(60,tt)),this._fov!==tt&&(this._unmodified=!1,this._fov=tt/180*Math.PI,this._calcMatrices())},Cl.zoom.get=function(){return this._zoom},Cl.zoom.set=function(tt){var et=Math.min(Math.max(tt,this.minZoom),this.maxZoom);this._zoom!==et&&(this._unmodified=!1,this._zoom=et,this.scale=this.zoomScale(et),this.tileZoom=Math.floor(et),this.zoomFraction=et-this.tileZoom,this._constrain(),this._calcMatrices())},Cl.center.get=function(){return this._center},Cl.center.set=function(tt){tt.lat===this._center.lat&&tt.lng===this._center.lng||(this._unmodified=!1,this._center=tt,this._constrain(),this._calcMatrices())},Cl.padding.get=function(){return this._edgeInsets.toJSON()},Cl.padding.set=function(tt){this._edgeInsets.equals(tt)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,tt,1),this._calcMatrices())},Cl.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},To.prototype.isPaddingEqual=function(tt){return this._edgeInsets.equals(tt)},To.prototype.interpolatePadding=function(tt,et,rt){this._unmodified=!1,this._edgeInsets.interpolate(tt,et,rt),this._constrain(),this._calcMatrices()},To.prototype.coveringZoomLevel=function(tt){var et=(tt.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/tt.tileSize));return Math.max(0,et)},To.prototype.getVisibleUnwrappedCoordinates=function(et){var rt=[new tt.UnwrappedTileID(0,et)];if(this._renderWorldCopies)for(var it=this.pointCoordinate(new tt.Point(0,0)),nt=this.pointCoordinate(new tt.Point(this.width,0)),ot=this.pointCoordinate(new tt.Point(this.width,this.height)),at=this.pointCoordinate(new tt.Point(0,this.height)),st=Math.floor(Math.min(it.x,nt.x,ot.x,at.x)),ct=Math.floor(Math.max(it.x,nt.x,ot.x,at.x)),ht=st-1;ht<=ct+1;ht++)0!==ht&&rt.push(new tt.UnwrappedTileID(ht,et));return rt},To.prototype.coveringTiles=function(et){var rt=this.coveringZoomLevel(et),it=rt;if(void 0!==et.minzoom&&rt<et.minzoom)return[];void 0!==et.maxzoom&&rt>et.maxzoom&&(rt=et.maxzoom);var nt=tt.MercatorCoordinate.fromLngLat(this.center),ot=Math.pow(2,rt),at=[ot*nt.x,ot*nt.y,0],st=xo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,rt),ct=et.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(ct=rt);var c=function(tt){return{aabb:new bo([tt*ot,0,0],[(tt+1)*ot,ot,0]),zoom:0,x:0,y:0,wrap:tt,fullyVisible:!1}},ht=[],dt=[],mt=rt,yt=et.reparseOverscaled?it:rt;if(this._renderWorldCopies)for(var gt=1;gt<=3;gt++)ht.push(c(-gt)),ht.push(c(gt));for(ht.push(c(0));ht.length>0;){var vt=ht.pop(),_t=vt.x,Rt=vt.y,Ot=vt.fullyVisible;if(!Ot){var Zt=vt.aabb.intersects(st);if(0===Zt)continue;Ot=2===Zt}var Ze=vt.aabb.distanceX(at),Ge=vt.aabb.distanceY(at),Xe=Math.max(Math.abs(Ze),Math.abs(Ge));if(vt.zoom===mt||Xe>3+(1<<mt-vt.zoom)-2&&vt.zoom>=ct)dt.push({tileID:new tt.OverscaledTileID(vt.zoom===mt?yt:vt.zoom,vt.wrap,vt.zoom,_t,Rt),distanceSq:tt.sqrLen([at[0]-.5-_t,at[1]-.5-Rt])});else for(var Je=0;Je<4;Je++){var rr=(_t<<1)+Je%2,wr=(Rt<<1)+(Je>>1);ht.push({aabb:vt.aabb.quadrant(Je),zoom:vt.zoom+1,x:rr,y:wr,wrap:vt.wrap,fullyVisible:Ot})}}return dt.sort((function(tt,et){return tt.distanceSq-et.distanceSq})).map((function(tt){return tt.tileID}))},To.prototype.resize=function(tt,et){this.width=tt,this.height=et,this.pixelsToGLUnits=[2/tt,-2/et],this._constrain(),this._calcMatrices()},Cl.unmodified.get=function(){return this._unmodified},To.prototype.zoomScale=function(tt){return Math.pow(2,tt)},To.prototype.scaleZoom=function(tt){return Math.log(tt)/Math.LN2},To.prototype.project=function(et){var rt=tt.clamp(et.lat,-this.maxValidLatitude,this.maxValidLatitude);return new tt.Point(tt.mercatorXfromLng(et.lng)*this.worldSize,tt.mercatorYfromLat(rt)*this.worldSize)},To.prototype.unproject=function(et){return new tt.MercatorCoordinate(et.x/this.worldSize,et.y/this.worldSize).toLngLat()},Cl.point.get=function(){return this.project(this.center)},To.prototype.setLocationAtPoint=function(et,rt){var it=this.pointCoordinate(rt),nt=this.pointCoordinate(this.centerPoint),ot=this.locationCoordinate(et),at=new tt.MercatorCoordinate(ot.x-(it.x-nt.x),ot.y-(it.y-nt.y));this.center=this.coordinateLocation(at),this._renderWorldCopies&&(this.center=this.center.wrap())},To.prototype.locationPoint=function(tt){return this.coordinatePoint(this.locationCoordinate(tt))},To.prototype.pointLocation=function(tt){return this.coordinateLocation(this.pointCoordinate(tt))},To.prototype.locationCoordinate=function(et){return tt.MercatorCoordinate.fromLngLat(et)},To.prototype.coordinateLocation=function(tt){return tt.toLngLat()},To.prototype.pointCoordinate=function(et){var rt=[et.x,et.y,0,1],it=[et.x,et.y,1,1];tt.transformMat4(rt,rt,this.pixelMatrixInverse),tt.transformMat4(it,it,this.pixelMatrixInverse);var nt=rt[3],ot=it[3],at=rt[1]/nt,st=it[1]/ot,ct=rt[2]/nt,ht=it[2]/ot,dt=ct===ht?0:(0-ct)/(ht-ct);return new tt.MercatorCoordinate(tt.number(rt[0]/nt,it[0]/ot,dt)/this.worldSize,tt.number(at,st,dt)/this.worldSize)},To.prototype.coordinatePoint=function(et){var rt=[et.x*this.worldSize,et.y*this.worldSize,0,1];return tt.transformMat4(rt,rt,this.pixelMatrix),new tt.Point(rt[0]/rt[3],rt[1]/rt[3])},To.prototype.getBounds=function(){return(new tt.LngLatBounds).extend(this.pointLocation(new tt.Point(0,0))).extend(this.pointLocation(new tt.Point(this.width,0))).extend(this.pointLocation(new tt.Point(this.width,this.height))).extend(this.pointLocation(new tt.Point(0,this.height)))},To.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new tt.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},To.prototype.setMaxBounds=function(tt){tt?(this.lngRange=[tt.getWest(),tt.getEast()],this.latRange=[tt.getSouth(),tt.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},To.prototype.calculatePosMatrix=function(et,rt){void 0===rt&&(rt=!1);var it=et.key,nt=rt?this._alignedPosMatrixCache:this._posMatrixCache;if(nt[it])return nt[it];var ot=et.canonical,at=this.worldSize/this.zoomScale(ot.z),st=ot.x+Math.pow(2,ot.z)*et.wrap,ct=tt.identity(new Float64Array(16));return tt.translate(ct,ct,[st*at,ot.y*at,0]),tt.scale(ct,ct,[at/tt.EXTENT,at/tt.EXTENT,1]),tt.multiply(ct,rt?this.alignedProjMatrix:this.projMatrix,ct),nt[it]=new Float32Array(ct),nt[it]},To.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},To.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var et,rt,it,nt,ot=-90,at=90,st=-180,ct=180,ht=this.size,dt=this._unmodified;if(this.latRange){var mt=this.latRange;ot=tt.mercatorYfromLat(mt[1])*this.worldSize,et=(at=tt.mercatorYfromLat(mt[0])*this.worldSize)-ot<ht.y?ht.y/(at-ot):0}if(this.lngRange){var yt=this.lngRange;st=tt.mercatorXfromLng(yt[0])*this.worldSize,rt=(ct=tt.mercatorXfromLng(yt[1])*this.worldSize)-st<ht.x?ht.x/(ct-st):0}var gt=this.point,vt=Math.max(rt||0,et||0);if(vt)return this.center=this.unproject(new tt.Point(rt?(ct+st)/2:gt.x,et?(at+ot)/2:gt.y)),this.zoom+=this.scaleZoom(vt),this._unmodified=dt,void(this._constraining=!1);if(this.latRange){var _t=gt.y,Rt=ht.y/2;_t-Rt<ot&&(nt=ot+Rt),_t+Rt>at&&(nt=at-Rt)}if(this.lngRange){var Ot=gt.x,Zt=ht.x/2;Ot-Zt<st&&(it=st+Zt),Ot+Zt>ct&&(it=ct-Zt)}void 0===it&&void 0===nt||(this.center=this.unproject(new tt.Point(void 0!==it?it:gt.x,void 0!==nt?nt:gt.y))),this._unmodified=dt,this._constraining=!1}},To.prototype._calcMatrices=function(){if(this.height){var et=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var rt=Math.PI/2+this._pitch,it=this._fov*(.5+et.y/this.height),nt=Math.sin(it)*this.cameraToCenterDistance/Math.sin(tt.clamp(Math.PI-rt-it,.01,Math.PI-.01)),ot=this.point,at=ot.x,st=ot.y,ct=1.01*(Math.cos(Math.PI/2-this._pitch)*nt+this.cameraToCenterDistance),ht=this.height/50,dt=new Float64Array(16);tt.perspective(dt,this._fov,this.width/this.height,ht,ct),dt[8]=2*-et.x/this.width,dt[9]=2*et.y/this.height,tt.scale(dt,dt,[1,-1,1]),tt.translate(dt,dt,[0,0,-this.cameraToCenterDistance]),tt.rotateX(dt,dt,this._pitch),tt.rotateZ(dt,dt,this.angle),tt.translate(dt,dt,[-at,-st,0]),this.mercatorMatrix=tt.scale([],dt,[this.worldSize,this.worldSize,this.worldSize]),tt.scale(dt,dt,[1,1,tt.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=dt,this.invProjMatrix=tt.invert([],this.projMatrix);var mt=this.width%2/2,yt=this.height%2/2,gt=Math.cos(this.angle),vt=Math.sin(this.angle),_t=at-Math.round(at)+gt*mt+vt*yt,Rt=st-Math.round(st)+gt*yt+vt*mt,Ot=new Float64Array(dt);if(tt.translate(Ot,Ot,[_t>.5?_t-1:_t,Rt>.5?Rt-1:Rt,0]),this.alignedProjMatrix=Ot,dt=tt.create(),tt.scale(dt,dt,[this.width/2,-this.height/2,1]),tt.translate(dt,dt,[1,-1,0]),this.labelPlaneMatrix=dt,dt=tt.create(),tt.scale(dt,dt,[1,-1,1]),tt.translate(dt,dt,[-1,-1,0]),tt.scale(dt,dt,[2/this.width,2/this.height,1]),this.glCoordMatrix=dt,this.pixelMatrix=tt.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(dt=tt.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=dt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},To.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var et=this.pointCoordinate(new tt.Point(0,0)),rt=[et.x*this.worldSize,et.y*this.worldSize,0,1];return tt.transformMat4(rt,rt,this.pixelMatrix)[3]/this.cameraToCenterDistance},To.prototype.getCameraPoint=function(){var et=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new tt.Point(0,et))},To.prototype.getCameraQueryGeometry=function(et){var rt=this.getCameraPoint();if(1===et.length)return[et[0],rt];for(var it=rt.x,nt=rt.y,ot=rt.x,at=rt.y,st=0,ct=et;st<ct.length;st+=1){var ht=ct[st];it=Math.min(it,ht.x),nt=Math.min(nt,ht.y),ot=Math.max(ot,ht.x),at=Math.max(at,ht.y)}return[new tt.Point(it,nt),new tt.Point(ot,nt),new tt.Point(ot,at),new tt.Point(it,at),new tt.Point(it,nt)]},Object.defineProperties(To.prototype,Cl);var Io=function(et){var rt,it,nt,ot;this._hashName=et&&encodeURIComponent(et),tt.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(rt=this._updateHashUnthrottled.bind(this),it=!1,nt=null,ot=function(){nt=null,it&&(rt(),nt=setTimeout(ot,300),it=!1)},function(){return it=!0,nt||ot(),nt})};Io.prototype.addTo=function(et){return this._map=et,tt.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Io.prototype.remove=function(){return tt.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Io.prototype.getHashString=function(et){var rt=this._map.getCenter(),it=Math.round(100*this._map.getZoom())/100,nt=Math.ceil((it*Math.LN2+Math.log(512/360/.5))/Math.LN10),ot=Math.pow(10,nt),at=Math.round(rt.lng*ot)/ot,st=Math.round(rt.lat*ot)/ot,ct=this._map.getBearing(),ht=this._map.getPitch(),dt="";if(dt+=et?"/"+at+"/"+st+"/"+it:it+"/"+st+"/"+at,(ct||ht)&&(dt+="/"+Math.round(10*ct)/10),ht&&(dt+="/"+Math.round(ht)),this._hashName){var mt=this._hashName,yt=!1,gt=tt.window.location.hash.slice(1).split("&").map((function(tt){var et=tt.split("=")[0];return et===mt?(yt=!0,et+"="+dt):tt})).filter((function(tt){return tt}));return yt||gt.push(mt+"="+dt),"#"+gt.join("&")}return"#"+dt},Io.prototype._getCurrentHash=function(){var et,rt=this,it=tt.window.location.hash.replace("#","");return this._hashName?(it.split("&").map((function(tt){return tt.split("=")})).forEach((function(tt){tt[0]===rt._hashName&&(et=tt)})),(et&&et[1]||"").split("/")):it.split("/")},Io.prototype._onHashChange=function(){var tt=this._getCurrentHash();if(tt.length>=3&&!tt.some((function(tt){return isNaN(tt)}))){var et=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(tt[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+tt[2],+tt[1]],zoom:+tt[0],bearing:et,pitch:+(tt[4]||0)}),!0}return!1},Io.prototype._updateHashUnthrottled=function(){var et=tt.window.location.href.replace(/(#.+)?$/,this.getHashString());try{tt.window.history.replaceState(tt.window.history.state,null,et)}catch(tt){}};var Al={linearity:.3,easing:tt.bezier(0,0,.3,1)},kl=tt.extend({deceleration:2500,maxSpeed:1400},Al),Pl=tt.extend({deceleration:20,maxSpeed:1400},Al),Ml=tt.extend({deceleration:1e3,maxSpeed:360},Al),Bl=tt.extend({deceleration:1e3,maxSpeed:90},Al),Ao=function(tt){this._map=tt,this.clear()};function Mo(tt,et){(!tt.duration||tt.duration<et.duration)&&(tt.duration=et.duration,tt.easing=et.easing)}function Lo(et,rt,it){var nt=it.maxSpeed,ot=it.linearity,at=it.deceleration,st=tt.clamp(et*ot/(rt/1e3),-nt,nt),ct=Math.abs(st)/(at*ot);return{easing:it.easing,duration:1e3*ct,amount:st*(ct/2)}}Ao.prototype.clear=function(){this._inertiaBuffer=[]},Ao.prototype.record=function(et){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:tt.browser.now(),settings:et})},Ao.prototype._drainInertiaBuffer=function(){for(var et=this._inertiaBuffer,rt=tt.browser.now();et.length>0&&rt-et[0].time>160;)et.shift()},Ao.prototype._onMoveEnd=function(et){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var rt={zoom:0,bearing:0,pitch:0,pan:new tt.Point(0,0),pinchAround:void 0,around:void 0},it=0,nt=this._inertiaBuffer;it<nt.length;it+=1){var ot=nt[it].settings;rt.zoom+=ot.zoomDelta||0,rt.bearing+=ot.bearingDelta||0,rt.pitch+=ot.pitchDelta||0,ot.panDelta&&rt.pan._add(ot.panDelta),ot.around&&(rt.around=ot.around),ot.pinchAround&&(rt.pinchAround=ot.pinchAround)}var at=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,st={};if(rt.pan.mag()){var ct=Lo(rt.pan.mag(),at,tt.extend({},kl,et||{}));st.offset=rt.pan.mult(ct.amount/rt.pan.mag()),st.center=this._map.transform.center,Mo(st,ct)}if(rt.zoom){var ht=Lo(rt.zoom,at,Pl);st.zoom=this._map.transform.zoom+ht.amount,Mo(st,ht)}if(rt.bearing){var dt=Lo(rt.bearing,at,Ml);st.bearing=this._map.transform.bearing+tt.clamp(dt.amount,-179,179),Mo(st,dt)}if(rt.pitch){var mt=Lo(rt.pitch,at,Bl);st.pitch=this._map.transform.pitch+mt.amount,Mo(st,mt)}if(st.zoom||st.bearing){var yt=void 0===rt.pinchAround?rt.around:rt.pinchAround;st.around=yt?this._map.unproject(yt):this._map.getCenter()}return this.clear(),tt.extend(st,{noMoveStart:!0})}};var Rl=function(et){function o(it,nt,ot,at){void 0===at&&(at={});var st=rt.mousePos(nt.getCanvasContainer(),ot),ct=nt.unproject(st);et.call(this,it,tt.extend({point:st,lngLat:ct,originalEvent:ot},at)),this._defaultPrevented=!1,this.target=nt}et&&(o.__proto__=et),(o.prototype=Object.create(et&&et.prototype)).constructor=o;var it={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},it.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,it),o}(tt.Event),Ql=function(et){function o(it,nt,ot){var at="touchend"===it?ot.changedTouches:ot.touches,st=rt.touchPos(nt.getCanvasContainer(),at),ct=st.map((function(tt){return nt.unproject(tt)})),ht=st.reduce((function(tt,et,rt,it){return tt.add(et.div(it.length))}),new tt.Point(0,0)),dt=nt.unproject(ht);et.call(this,it,{points:st,point:ht,lngLats:ct,lngLat:dt,originalEvent:ot}),this._defaultPrevented=!1}et&&(o.__proto__=et),(o.prototype=Object.create(et&&et.prototype)).constructor=o;var it={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},it.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,it),o}(tt.Event),xu=function(tt){function e(et,rt,it){tt.call(this,et,{originalEvent:it}),this._defaultPrevented=!1}tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e;var et={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},et.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,et),e}(tt.Event),Oo=function(tt,et){this._map=tt,this._clickTolerance=et.clickTolerance};Oo.prototype.reset=function(){delete this._mousedownPos},Oo.prototype.wheel=function(tt){return this._firePreventable(new xu(tt.type,this._map,tt))},Oo.prototype.mousedown=function(tt,et){return this._mousedownPos=et,this._firePreventable(new Rl(tt.type,this._map,tt))},Oo.prototype.mouseup=function(tt){this._map.fire(new Rl(tt.type,this._map,tt))},Oo.prototype.click=function(tt,et){this._mousedownPos&&this._mousedownPos.dist(et)>=this._clickTolerance||this._map.fire(new Rl(tt.type,this._map,tt))},Oo.prototype.dblclick=function(tt){return this._firePreventable(new Rl(tt.type,this._map,tt))},Oo.prototype.mouseover=function(tt){this._map.fire(new Rl(tt.type,this._map,tt))},Oo.prototype.mouseout=function(tt){this._map.fire(new Rl(tt.type,this._map,tt))},Oo.prototype.touchstart=function(tt){return this._firePreventable(new Ql(tt.type,this._map,tt))},Oo.prototype.touchmove=function(tt){this._map.fire(new Ql(tt.type,this._map,tt))},Oo.prototype.touchend=function(tt){this._map.fire(new Ql(tt.type,this._map,tt))},Oo.prototype.touchcancel=function(tt){this._map.fire(new Ql(tt.type,this._map,tt))},Oo.prototype._firePreventable=function(tt){if(this._map.fire(tt),tt.defaultPrevented)return{}},Oo.prototype.isEnabled=function(){return!0},Oo.prototype.isActive=function(){return!1},Oo.prototype.enable=function(){},Oo.prototype.disable=function(){};var Fo=function(tt){this._map=tt};Fo.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Fo.prototype.mousemove=function(tt){this._map.fire(new Rl(tt.type,this._map,tt))},Fo.prototype.mousedown=function(){this._delayContextMenu=!0},Fo.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Fo.prototype.contextmenu=function(tt){this._delayContextMenu?this._contextMenuEvent=tt:this._map.fire(new Rl(tt.type,this._map,tt)),this._map.listens("contextmenu")&&tt.preventDefault()},Fo.prototype.isEnabled=function(){return!0},Fo.prototype.isActive=function(){return!1},Fo.prototype.enable=function(){},Fo.prototype.disable=function(){};var Uo=function(tt,et){this._map=tt,this._el=tt.getCanvasContainer(),this._container=tt.getContainer(),this._clickTolerance=et.clickTolerance||1};function No(tt,et){for(var rt={},it=0;it<tt.length;it++)rt[tt[it].identifier]=et[it];return rt}Uo.prototype.isEnabled=function(){return!!this._enabled},Uo.prototype.isActive=function(){return!!this._active},Uo.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Uo.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Uo.prototype.mousedown=function(tt,et){this.isEnabled()&&tt.shiftKey&&0===tt.button&&(rt.disableDrag(),this._startPos=this._lastPos=et,this._active=!0)},Uo.prototype.mousemoveWindow=function(tt,et){if(this._active){var it=et;if(!(this._lastPos.equals(it)||!this._box&&it.dist(this._startPos)<this._clickTolerance)){var nt=this._startPos;this._lastPos=it,this._box||(this._box=rt.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",tt));var ot=Math.min(nt.x,it.x),at=Math.max(nt.x,it.x),st=Math.min(nt.y,it.y),ct=Math.max(nt.y,it.y);rt.setTransform(this._box,"translate("+ot+"px,"+st+"px)"),this._box.style.width=at-ot+"px",this._box.style.height=ct-st+"px"}}},Uo.prototype.mouseupWindow=function(et,it){var nt=this;if(this._active&&0===et.button){var ot=this._startPos,at=it;if(this.reset(),rt.suppressClick(),ot.x!==at.x||ot.y!==at.y)return this._map.fire(new tt.Event("boxzoomend",{originalEvent:et})),{cameraAnimation:function(tt){return tt.fitScreenCoordinates(ot,at,nt._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",et)}},Uo.prototype.keydown=function(tt){this._active&&27===tt.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",tt))},Uo.prototype.blur=function(){this.reset()},Uo.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(rt.remove(this._box),this._box=null),rt.enableDrag(),delete this._startPos,delete this._lastPos},Uo.prototype._fireEvent=function(et,rt){return this._map.fire(new tt.Event(et,{originalEvent:rt}))};var Zo=function(tt){this.reset(),this.numTouches=tt.numTouches};Zo.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Zo.prototype.touchstart=function(et,rt,it){(this.centroid||it.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=et.timeStamp),it.length===this.numTouches&&(this.centroid=function(et){for(var rt=new tt.Point(0,0),it=0,nt=et;it<nt.length;it+=1)rt._add(nt[it]);return rt.div(et.length)}(rt),this.touches=No(it,rt)))},Zo.prototype.touchmove=function(tt,et,rt){if(!this.aborted&&this.centroid){var it=No(rt,et);for(var nt in this.touches){var ot=it[nt];(!ot||ot.dist(this.touches[nt])>30)&&(this.aborted=!0)}}},Zo.prototype.touchend=function(tt,et,rt){if((!this.centroid||tt.timeStamp-this.startTime>500)&&(this.aborted=!0),0===rt.length){var it=!this.aborted&&this.centroid;if(this.reset(),it)return it}};var qo=function(tt){this.singleTap=new Zo(tt),this.numTaps=tt.numTaps,this.reset()};qo.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qo.prototype.touchstart=function(tt,et,rt){this.singleTap.touchstart(tt,et,rt)},qo.prototype.touchmove=function(tt,et,rt){this.singleTap.touchmove(tt,et,rt)},qo.prototype.touchend=function(tt,et,rt){var it=this.singleTap.touchend(tt,et,rt);if(it){var nt=tt.timeStamp-this.lastTime<500,ot=!this.lastTap||this.lastTap.dist(it)<30;if(nt&&ot||this.reset(),this.count++,this.lastTime=tt.timeStamp,this.lastTap=it,this.count===this.numTaps)return this.reset(),it}};var jo=function(){this._zoomIn=new qo({numTouches:1,numTaps:2}),this._zoomOut=new qo({numTouches:2,numTaps:1}),this.reset()};jo.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},jo.prototype.touchstart=function(tt,et,rt){this._zoomIn.touchstart(tt,et,rt),this._zoomOut.touchstart(tt,et,rt)},jo.prototype.touchmove=function(tt,et,rt){this._zoomIn.touchmove(tt,et,rt),this._zoomOut.touchmove(tt,et,rt)},jo.prototype.touchend=function(tt,et,rt){var it=this,nt=this._zoomIn.touchend(tt,et,rt),ot=this._zoomOut.touchend(tt,et,rt);return nt?(this._active=!0,tt.preventDefault(),setTimeout((function(){return it.reset()}),0),{cameraAnimation:function(et){return et.easeTo({duration:300,zoom:et.getZoom()+1,around:et.unproject(nt)},{originalEvent:tt})}}):ot?(this._active=!0,tt.preventDefault(),setTimeout((function(){return it.reset()}),0),{cameraAnimation:function(et){return et.easeTo({duration:300,zoom:et.getZoom()-1,around:et.unproject(ot)},{originalEvent:tt})}}):void 0},jo.prototype.touchcancel=function(){this.reset()},jo.prototype.enable=function(){this._enabled=!0},jo.prototype.disable=function(){this._enabled=!1,this.reset()},jo.prototype.isEnabled=function(){return this._enabled},jo.prototype.isActive=function(){return this._active};var wu={0:1,2:2},Go=function(tt){this.reset(),this._clickTolerance=tt.clickTolerance||1};Go.prototype.blur=function(){this.reset()},Go.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Go.prototype._correctButton=function(tt,et){return!1},Go.prototype._move=function(tt,et){return{}},Go.prototype.mousedown=function(tt,et){if(!this._lastPoint){var it=rt.mouseButton(tt);this._correctButton(tt,it)&&(this._lastPoint=et,this._eventButton=it)}},Go.prototype.mousemoveWindow=function(tt,et){var rt=this._lastPoint;if(rt)if(tt.preventDefault(),function(tt,et){var rt=wu[et];return void 0===tt.buttons||(tt.buttons&rt)!==rt}(tt,this._eventButton))this.reset();else if(this._moved||!(et.dist(rt)<this._clickTolerance))return this._moved=!0,this._lastPoint=et,this._move(rt,et)},Go.prototype.mouseupWindow=function(tt){this._lastPoint&&rt.mouseButton(tt)===this._eventButton&&(this._moved&&rt.suppressClick(),this.reset())},Go.prototype.enable=function(){this._enabled=!0},Go.prototype.disable=function(){this._enabled=!1,this.reset()},Go.prototype.isEnabled=function(){return this._enabled},Go.prototype.isActive=function(){return this._active};var Iu=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.mousedown=function(et,rt){tt.prototype.mousedown.call(this,et,rt),this._lastPoint&&(this._active=!0)},e.prototype._correctButton=function(tt,et){return 0===et&&!tt.ctrlKey},e.prototype._move=function(tt,et){return{around:et,panDelta:et.sub(tt)}},e}(Go),ku=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._correctButton=function(tt,et){return 0===et&&tt.ctrlKey||2===et},e.prototype._move=function(tt,et){var rt=.8*(et.x-tt.x);if(rt)return this._active=!0,{bearingDelta:rt}},e.prototype.contextmenu=function(tt){tt.preventDefault()},e}(Go),Ru=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype._correctButton=function(tt,et){return 0===et&&tt.ctrlKey||2===et},e.prototype._move=function(tt,et){var rt=-.5*(et.y-tt.y);if(rt)return this._active=!0,{pitchDelta:rt}},e.prototype.contextmenu=function(tt){tt.preventDefault()},e}(Go),Ko=function(tt){this._minTouches=1,this._clickTolerance=tt.clickTolerance||1,this.reset()};Ko.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new tt.Point(0,0)},Ko.prototype.touchstart=function(tt,et,rt){return this._calculateTransform(tt,et,rt)},Ko.prototype.touchmove=function(tt,et,rt){if(this._active&&!(rt.length<this._minTouches))return tt.preventDefault(),this._calculateTransform(tt,et,rt)},Ko.prototype.touchend=function(tt,et,rt){this._calculateTransform(tt,et,rt),this._active&&rt.length<this._minTouches&&this.reset()},Ko.prototype.touchcancel=function(){this.reset()},Ko.prototype._calculateTransform=function(et,rt,it){it.length>0&&(this._active=!0);var nt=No(it,rt),ot=new tt.Point(0,0),at=new tt.Point(0,0),st=0;for(var ct in nt){var ht=nt[ct],dt=this._touches[ct];dt&&(ot._add(ht),at._add(ht.sub(dt)),st++,nt[ct]=ht)}if(this._touches=nt,!(st<this._minTouches)&&at.mag()){var mt=at.div(st);if(this._sum._add(mt),!(this._sum.mag()<this._clickTolerance))return{around:ot.div(st),panDelta:mt}}},Ko.prototype.enable=function(){this._enabled=!0},Ko.prototype.disable=function(){this._enabled=!1,this.reset()},Ko.prototype.isEnabled=function(){return this._enabled},Ko.prototype.isActive=function(){return this._active};var Yo=function(){this.reset()};function Jo(tt,et,rt){for(var it=0;it<tt.length;it++)if(tt[it].identifier===rt)return et[it]}function Qo(tt,et){return Math.log(tt/et)/Math.LN2}Yo.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Yo.prototype._start=function(tt){},Yo.prototype._move=function(tt,et,rt){return{}},Yo.prototype.touchstart=function(tt,et,rt){this._firstTwoTouches||rt.length<2||(this._firstTwoTouches=[rt[0].identifier,rt[1].identifier],this._start([et[0],et[1]]))},Yo.prototype.touchmove=function(tt,et,rt){if(this._firstTwoTouches){tt.preventDefault();var it=this._firstTwoTouches,nt=it[1],ot=Jo(rt,et,it[0]),at=Jo(rt,et,nt);if(ot&&at){var st=this._aroundCenter?null:ot.add(at).div(2);return this._move([ot,at],st,tt)}}},Yo.prototype.touchend=function(tt,et,it){if(this._firstTwoTouches){var nt=this._firstTwoTouches,ot=nt[1],at=Jo(it,et,nt[0]),st=Jo(it,et,ot);at&&st||(this._active&&rt.suppressClick(),this.reset())}},Yo.prototype.touchcancel=function(){this.reset()},Yo.prototype.enable=function(tt){this._enabled=!0,this._aroundCenter=!!tt&&"center"===tt.around},Yo.prototype.disable=function(){this._enabled=!1,this.reset()},Yo.prototype.isEnabled=function(){return this._enabled},Yo.prototype.isActive=function(){return this._active};var Fu=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.reset=function(){tt.prototype.reset.call(this),delete this._distance,delete this._startDistance},e.prototype._start=function(tt){this._startDistance=this._distance=tt[0].dist(tt[1])},e.prototype._move=function(tt,et){var rt=this._distance;if(this._distance=tt[0].dist(tt[1]),this._active||!(Math.abs(Qo(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Qo(this._distance,rt),pinchAround:et}},e}(Yo);function tr(tt,et){return 180*tt.angleWith(et)/Math.PI}var tc=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.reset=function(){tt.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},e.prototype._start=function(tt){this._startVector=this._vector=tt[0].sub(tt[1]),this._minDiameter=tt[0].dist(tt[1])},e.prototype._move=function(tt,et){var rt=this._vector;if(this._vector=tt[0].sub(tt[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:tr(this._vector,rt),pinchAround:et}},e.prototype._isBelowThreshold=function(tt){this._minDiameter=Math.min(this._minDiameter,tt.mag());var et=25/(Math.PI*this._minDiameter)*360,rt=tr(tt,this._startVector);return Math.abs(rt)<et},e}(Yo);function ir(tt){return Math.abs(tt.y)>Math.abs(tt.x)}var ec=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e.prototype.reset=function(){tt.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(tt){this._lastPoints=tt,ir(tt[0].sub(tt[1]))&&(this._valid=!1)},e.prototype._move=function(tt,et,rt){var it=tt[0].sub(this._lastPoints[0]),nt=tt[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(it,nt,rt.timeStamp),this._valid)return this._lastPoints=tt,this._active=!0,{pitchDelta:(it.y+nt.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(tt,et,rt){if(void 0!==this._valid)return this._valid;var it=tt.mag()>=2,nt=et.mag()>=2;if(it||nt){if(!it||!nt)return void 0===this._firstMove&&(this._firstMove=rt),rt-this._firstMove<100&&void 0;var ot=tt.y>0==et.y>0;return ir(tt)&&ir(et)&&ot}},e}(Yo),rc={panStep:100,bearingStep:15,pitchStep:10},ar=function(){var tt=rc;this._panStep=tt.panStep,this._bearingStep=tt.bearingStep,this._pitchStep=tt.pitchStep,this._rotationDisabled=!1};function nr(tt){return tt*(2-tt)}ar.prototype.blur=function(){this.reset()},ar.prototype.reset=function(){this._active=!1},ar.prototype.keydown=function(tt){var et=this;if(!(tt.altKey||tt.ctrlKey||tt.metaKey)){var rt=0,it=0,nt=0,ot=0,at=0;switch(tt.keyCode){case 61:case 107:case 171:case 187:rt=1;break;case 189:case 109:case 173:rt=-1;break;case 37:tt.shiftKey?it=-1:(tt.preventDefault(),ot=-1);break;case 39:tt.shiftKey?it=1:(tt.preventDefault(),ot=1);break;case 38:tt.shiftKey?nt=1:(tt.preventDefault(),at=-1);break;case 40:tt.shiftKey?nt=-1:(tt.preventDefault(),at=1);break;default:return}return this._rotationDisabled&&(it=0,nt=0),{cameraAnimation:function(st){var ct=st.getZoom();st.easeTo({duration:300,easeId:"keyboardHandler",easing:nr,zoom:rt?Math.round(ct)+rt*(tt.shiftKey?2:1):ct,bearing:st.getBearing()+it*et._bearingStep,pitch:st.getPitch()+nt*et._pitchStep,offset:[-ot*et._panStep,-at*et._panStep],center:st.getCenter()},{originalEvent:tt})}}}},ar.prototype.enable=function(){this._enabled=!0},ar.prototype.disable=function(){this._enabled=!1,this.reset()},ar.prototype.isEnabled=function(){return this._enabled},ar.prototype.isActive=function(){return this._active},ar.prototype.disableRotation=function(){this._rotationDisabled=!0},ar.prototype.enableRotation=function(){this._rotationDisabled=!1};var sr=function(et,rt){this._map=et,this._el=et.getCanvasContainer(),this._handler=rt,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,tt.bindAll(["_onT
3imeout"],this)};sr.prototype.setZoomRate=function(tt){this._defaultZoomRate=tt},sr.prototype.setWheelZoomRate=function(tt){this._wheelZoomRate=tt},sr.prototype.isEnabled=function(){return!!this._enabled},sr.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},sr.prototype.isZooming=function(){return!!this._zooming},sr.prototype.enable=function(tt){this.isEnabled()||(this._enabled=!0,this._aroundCenter=tt&&"center"===tt.around)},sr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},sr.prototype.wheel=function(et){if(this.isEnabled()){var rt=et.deltaMode===tt.window.WheelEvent.DOM_DELTA_LINE?40*et.deltaY:et.deltaY,it=tt.browser.now(),nt=it-(this._lastWheelEventTime||0);this._lastWheelEventTime=it,0!==rt&&rt%4.000244140625==0?this._type="wheel":0!==rt&&Math.abs(rt)<4?this._type="trackpad":nt>400?(this._type=null,this._lastValue=rt,this._timeout=setTimeout(this._onTimeout,40,et)):this._type||(this._type=Math.abs(nt*rt)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,rt+=this._lastValue)),et.shiftKey&&rt&&(rt/=4),this._type&&(this._lastWheelEvent=et,this._delta-=rt,this._active||this._start(et)),et.preventDefault()}}
vendor: 26,945 bytes, line 3
3,sr.prototype._onTimeout=function(tt){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(tt)},sr.prototype._start=function(et){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var it=rt.mousePos(this._el,et);this._around=tt.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(it)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},sr.prototype.renderFrame=function(){var et=this;if(this._frameId&&(this._frameId=null,this.isActive())){var rt=this._map.transform;if(0!==this._delta){var it="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,nt=2/(1+Math.exp(-Math.abs(this._delta*it)));this._delta<0&&0!==nt&&(nt=1/nt);var ot="number"==typeof this._targetZoom?rt.zoomScale(this._targetZoom):rt.scale;this._targetZoom=Math.min(rt.maxZoom,Math.max(rt.minZoom,rt.scaleZoom(ot*nt))),"wheel"===this._type&&(this._startZoom=rt.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var at,st="number"==typeof this._targetZoom?this._targetZoom:rt.zoom,ct=this._startZoom,ht=this._easing,dt=!1;if("wheel"===this._type&&ct&&ht){var mt=Math.min((tt.browser.now()-this._lastWheelEventTime)/200,1),yt=ht(mt);at=tt.number(ct,st,yt),mt<1?this._frameId||(this._frameId=!0):dt=!0}else at=st,dt=!0;return this._active=!0,dt&&(this._active=!1,this._finishTimeout=setTimeout((function(){et._zooming=!1,et._handler._triggerRenderFrame(),delete et._targetZoom,delete et._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!dt,zoomDelta:at-rt.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},sr.prototype._smoothOutEasing=function(et){var rt=tt.ease;if(this._prevEase){var it=this._prevEase,nt=(tt.browser.now()-it.start)/it.duration,ot=it.easing(nt+.01)-it.easing(nt),at=.27/Math.sqrt(ot*ot+1e-4)*.01,st=Math.sqrt(.0729-at*at);rt=tt.bezier(at,st,.25,1)}return this._prevEase={start:tt.browser.now(),duration:et,easing:rt},rt},sr.prototype.blur=function(){this.reset()},sr.prototype.reset=function(){this._active=!1};var lr=function(tt,et){this._clickZoom=tt,this._tapZoom=et};lr.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},lr.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},lr.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},lr.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var cr=function(){this.reset()};cr.prototype.reset=function(){this._active=!1},cr.prototype.blur=function(){this.reset()},cr.prototype.dblclick=function(tt,et){return tt.preventDefault(),{cameraAnimation:function(rt){rt.easeTo({duration:300,zoom:rt.getZoom()+(tt.shiftKey?-1:1),around:rt.unproject(et)},{originalEvent:tt})}}},cr.prototype.enable=function(){this._enabled=!0},cr.prototype.disable=function(){this._enabled=!1,this.reset()},cr.prototype.isEnabled=function(){return this._enabled},cr.prototype.isActive=function(){return this._active};var ur=function(){this._tap=new qo({numTouches:1,numTaps:1}),this.reset()};ur.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ur.prototype.touchstart=function(tt,et,rt){this._swipePoint||(this._tapTime&&tt.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?rt.length>0&&(this._swipePoint=et[0],this._swipeTouch=rt[0].identifier):this._tap.touchstart(tt,et,rt))},ur.prototype.touchmove=function(tt,et,rt){if(this._tapTime){if(this._swipePoint){if(rt[0].identifier!==this._swipeTouch)return;var it=et[0],nt=it.y-this._swipePoint.y;return this._swipePoint=it,tt.preventDefault(),this._active=!0,{zoomDelta:nt/128}}}else this._tap.touchmove(tt,et,rt)},ur.prototype.touchend=function(tt,et,rt){this._tapTime?this._swipePoint&&0===rt.length&&this.reset():this._tap.touchend(tt,et,rt)&&(this._tapTime=tt.timeStamp)},ur.prototype.touchcancel=function(){this.reset()},ur.prototype.enable=function(){this._enabled=!0},ur.prototype.disable=function(){this._enabled=!1,this.reset()},ur.prototype.isEnabled=function(){return this._enabled},ur.prototype.isActive=function(){return this._active};var hr=function(tt,et,rt){this._el=tt,this._mousePan=et,this._touchPan=rt};hr.prototype.enable=function(tt){this._inertiaOptions=tt||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},hr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},hr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pr=function(tt,et,rt){this._pitchWithRotate=tt.pitchWithRotate,this._mouseRotate=et,this._mousePitch=rt};pr.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pr.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pr.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pr.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var dr=function(tt,et,rt,it){this._el=tt,this._touchZoom=et,this._touchRotate=rt,this._tapDragZoom=it,this._rotationDisabled=!1,this._enabled=!0};dr.prototype.enable=function(tt){this._touchZoom.enable(tt),this._rotationDisabled||this._touchRotate.enable(tt),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},dr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},dr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},dr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},dr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},dr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var _r=function(tt){return tt.zoom||tt.drag||tt.pitch||tt.rotate},ic=function(tt){function e(){tt.apply(this,arguments)}return tt&&(e.__proto__=tt),(e.prototype=Object.create(tt&&tt.prototype)).constructor=e,e}(tt.Event);function mr(tt){return tt.panDelta&&tt.panDelta.mag()||tt.zoomDelta||tt.bearingDelta||tt.pitchDelta}var gr=function(et,it){this._map=et,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ao(et),this._bearingSnap=it.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(it),tt.bindAll(["handleEvent","handleWindowEvent"],this);var nt=this._el;this._listeners=[[nt,"touchstart",{passive:!0}],[nt,"touchmove",{passive:!1}],[nt,"touchend",void 0],[nt,"touchcancel",void 0],[nt,"mousedown",void 0],[nt,"mousemove",void 0],[nt,"mouseup",void 0],[tt.window.document,"mousemove",{capture:!0}],[tt.window.document,"mouseup",void 0],[nt,"mouseover",void 0],[nt,"mouseout",void 0],[nt,"dblclick",void 0],[nt,"click",void 0],[nt,"keydown",{capture:!1}],[nt,"keyup",void 0],[nt,"wheel",{passive:!1}],[nt,"contextmenu",void 0],[tt.window,"blur",void 0]];for(var ot=0,at=this._listeners;ot<at.length;ot+=1){var st=at[ot],ct=st[0];rt.addEventListener(ct,st[1],ct===tt.window.document?this.handleWindowEvent:this.handleEvent,st[2])}};gr.prototype.destroy=function(){for(var et=0,it=this._listeners;et<it.length;et+=1){var nt=it[et],ot=nt[0];rt.removeEventListener(ot,nt[1],ot===tt.window.document?this.handleWindowEvent:this.handleEvent,nt[2])}},gr.prototype._addDefaultHandlers=function(tt){var et=this._map,rt=et.getCanvasContainer();this._add("mapEvent",new Oo(et,tt));var it=et.boxZoom=new Uo(et,tt);this._add("boxZoom",it);var nt=new jo,ot=new cr;et.doubleClickZoom=new lr(ot,nt),this._add("tapZoom",nt),this._add("clickZoom",ot);var at=new ur;this._add("tapDragZoom",at);var st=et.touchPitch=new ec;this._add("touchPitch",st);var ct=new ku(tt),ht=new Ru(tt);et.dragRotate=new pr(tt,ct,ht),this._add("mouseRotate",ct,["mousePitch"]),this._add("mousePitch",ht,["mouseRotate"]);var dt=new Iu(tt),mt=new Ko(tt);et.dragPan=new hr(rt,dt,mt),this._add("mousePan",dt),this._add("touchPan",mt,["touchZoom","touchRotate"]);var yt=new tc,gt=new Fu;et.touchZoomRotate=new dr(rt,gt,yt,at),this._add("touchRotate",yt,["touchPan","touchZoom"]),this._add("touchZoom",gt,["touchPan","touchRotate"]);var vt=et.scrollZoom=new sr(et,this);this._add("scrollZoom",vt,["mousePan"]);var _t=et.keyboard=new ar;this._add("keyboard",_t),this._add("blockableMapEvent",new Fo(et));for(var Rt=0,Ot=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Rt<Ot.length;Rt+=1){var Zt=Ot[Rt];tt.interactive&&tt[Zt]&&et[Zt].enable(tt[Zt])}},gr.prototype._add=function(tt,et,rt){this._handlers.push({handlerName:tt,handler:et,allowed:rt}),this._handlersById[tt]=et},gr.prototype.stop=function(tt){if(!this._updatingCamera){for(var et=0,rt=this._handlers;et<rt.length;et+=1)rt[et].handler.reset();this._inertia.clear(),this._fireEvents({},{},tt),this._changes=[]}},gr.prototype.isActive=function(){for(var tt=0,et=this._handlers;tt<et.length;tt+=1)if(et[tt].handler.isActive())return!0;return!1},gr.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},gr.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},gr.prototype.isMoving=function(){return Boolean(_r(this._eventsInProgress))||this.isZooming()},gr.prototype._blockedByActive=function(tt,et,rt){for(var it in tt)if(it!==rt&&(!et||et.indexOf(it)<0))return!0;return!1},gr.prototype.handleWindowEvent=function(tt){this.handleEvent(tt,tt.type+"Window")},gr.prototype._getMapTouches=function(tt){for(var et=[],rt=0,it=tt;rt<it.length;rt+=1){var nt=it[rt];this._el.contains(nt.target)&&et.push(nt)}return et},gr.prototype.handleEvent=function(tt,et){this._updatingCamera=!0;for(var it="renderFrame"===tt.type?void 0:tt,nt={needsRenderFrame:!1},ot={},at={},st=tt.touches?this._getMapTouches(tt.touches):void 0,ct=st?rt.touchPos(this._el,st):rt.mousePos(this._el,tt),ht=0,dt=this._handlers;ht<dt.length;ht+=1){var mt=dt[ht],yt=mt.handlerName,gt=mt.handler,vt=mt.allowed;if(gt.isEnabled()){var _t=void 0;this._blockedByActive(at,vt,yt)?gt.reset():gt[et||tt.type]&&(_t=gt[et||tt.type](tt,ct,st),this.mergeHandlerResult(nt,ot,_t,yt,it),_t&&_t.needsRenderFrame&&this._triggerRenderFrame()),(_t||gt.isActive())&&(at[yt]=gt)}}var Rt={};for(var Ot in this._previousActiveHandlers)at[Ot]||(Rt[Ot]=it);this._previousActiveHandlers=at,(Object.keys(Rt).length||mr(nt))&&(this._changes.push([nt,ot,Rt]),this._triggerRenderFrame()),(Object.keys(at).length||mr(nt))&&this._map._stop(!0),this._updatingCamera=!1;var Zt=nt.cameraAnimation;Zt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Zt(this._map))},gr.prototype.mergeHandlerResult=function(et,rt,it,nt,ot){if(it){tt.extend(et,it);var at={handlerName:nt,originalEvent:it.originalEvent||ot};void 0!==it.zoomDelta&&(rt.zoom=at),void 0!==it.panDelta&&(rt.drag=at),void 0!==it.pitchDelta&&(rt.pitch=at),void 0!==it.bearingDelta&&(rt.rotate=at)}},gr.prototype._applyChanges=function(){for(var et={},rt={},it={},nt=0,ot=this._changes;nt<ot.length;nt+=1){var at=ot[nt],st=at[0],ct=at[1],ht=at[2];st.panDelta&&(et.panDelta=(et.panDelta||new tt.Point(0,0))._add(st.panDelta)),st.zoomDelta&&(et.zoomDelta=(et.zoomDelta||0)+st.zoomDelta),st.bearingDelta&&(et.bearingDelta=(et.bearingDelta||0)+st.bearingDelta),st.pitchDelta&&(et.pitchDelta=(et.pitchDelta||0)+st.pitchDelta),void 0!==st.around&&(et.around=st.around),void 0!==st.pinchAround&&(et.pinchAround=st.pinchAround),st.noInertia&&(et.noInertia=st.noInertia),tt.extend(rt,ct),tt.extend(it,ht)}this._updateMapTransform(et,rt,it),this._changes=[]},gr.prototype._updateMapTransform=function(tt,et,rt){var it=this._map,nt=it.transform;if(!mr(tt))return this._fireEvents(et,rt,!0);var ot=tt.panDelta,at=tt.zoomDelta,st=tt.bearingDelta,ct=tt.pitchDelta,ht=tt.around,dt=tt.pinchAround;void 0!==dt&&(ht=dt),it._stop(!0),ht=ht||it.transform.centerPoint;var mt=nt.pointLocation(ot?ht.sub(ot):ht);st&&(nt.bearing+=st),ct&&(nt.pitch+=ct),at&&(nt.zoom+=at),nt.setLocationAtPoint(mt,ht),this._map._update(),tt.noInertia||this._inertia.record(tt),this._fireEvents(et,rt,!0)},gr.prototype._fireEvents=function(et,rt,it){var nt=this,ot=_r(this._eventsInProgress),at=_r(et),st={};for(var ct in et)this._eventsInProgress[ct]||(st[ct+"start"]=et[ct].originalEvent),this._eventsInProgress[ct]=et[ct];for(var ht in!ot&&at&&this._fireEvent("movestart",at.originalEvent),st)this._fireEvent(ht,st[ht]);for(var dt in at&&this._fireEvent("move",at.originalEvent),et)this._fireEvent(dt,et[dt].originalEvent);var mt,yt={};for(var gt in this._eventsInProgress){var vt=this._eventsInProgress[gt],_t=vt.handlerName,Rt=vt.originalEvent;this._handlersById[_t].isActive()||(delete this._eventsInProgress[gt],yt[gt+"end"]=mt=rt[_t]||Rt)}for(var Ot in yt)this._fireEvent(Ot,yt[Ot]);var Zt=_r(this._eventsInProgress);if(it&&(ot||at)&&!Zt){this._updatingCamera=!0;var Ze=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),x=function(tt){return 0!==tt&&-nt._bearingSnap<tt&&tt<nt._bearingSnap};Ze?(x(Ze.bearing||this._map.getBearing())&&(Ze.bearing=0),this._map.easeTo(Ze,{originalEvent:mt})):(this._map.fire(new tt.Event("moveend",{originalEvent:mt})),x(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},gr.prototype._fireEvent=function(et,rt){this._map.fire(new tt.Event(et,rt?{originalEvent:rt}:{}))},gr.prototype._requestFrame=function(){var tt=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add((function(et){delete tt._frameId,tt.handleEvent(new ic("renderFrame",{timeStamp:et})),tt._applyChanges()}))},gr.prototype._triggerRenderFrame=function(){void 0===this._frameId&&(this._frameId=this._requestFrame())};var nc=function(et){function i(rt,it){et.call(this),this._moving=!1,this._zooming=!1,this.transform=rt,this._bearingSnap=it.bearingSnap,tt.bindAll(["_renderFrameCallback"],this)}return et&&(i.__proto__=et),(i.prototype=Object.create(et&&et.prototype)).constructor=i,i.prototype.getCenter=function(){return new tt.LngLat(this.transform.center.lng,this.transform.center.lat)},i.prototype.setCenter=function(tt,et){return this.jumpTo({center:tt},et)},i.prototype.panBy=function(et,rt,it){return et=tt.Point.convert(et).mult(-1),this.panTo(this.transform.center,tt.extend({offset:et},rt),it)},i.prototype.panTo=function(et,rt,it){return this.easeTo(tt.extend({center:et},rt),it)},i.prototype.getZoom=function(){return this.transform.zoom},i.prototype.setZoom=function(tt,et){return this.jumpTo({zoom:tt},et),this},i.prototype.zoomTo=function(et,rt,it){return this.easeTo(tt.extend({zoom:et},rt),it)},i.prototype.zoomIn=function(tt,et){return this.zoomTo(this.getZoom()+1,tt,et),this},i.prototype.zoomOut=function(tt,et){return this.zoomTo(this.getZoom()-1,tt,et),this},i.prototype.getBearing=function(){return this.transform.bearing},i.prototype.setBearing=function(tt,et){return this.jumpTo({bearing:tt},et),this},i.prototype.getPadding=function(){return this.transform.padding},i.prototype.setPadding=function(tt,et){return this.jumpTo({padding:tt},et),this},i.prototype.rotateTo=function(et,rt,it){return this.easeTo(tt.extend({bearing:et},rt),it)},i.prototype.resetNorth=function(et,rt){return this.rotateTo(0,tt.extend({duration:1e3},et),rt),this},i.prototype.resetNorthPitch=function(et,rt){return this.easeTo(tt.extend({bearing:0,pitch:0,duration:1e3},et),rt),this},i.prototype.snapToNorth=function(tt,et){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(tt,et):this},i.prototype.getPitch=function(){return this.transform.pitch},i.prototype.setPitch=function(tt,et){return this.jumpTo({pitch:tt},et),this},i.prototype.cameraForBounds=function(et,rt){et=tt.LngLatBounds.convert(et);var it=rt&&rt.bearing||0;return this._cameraForBoxAndBearing(et.getNorthWest(),et.getSouthEast(),it,rt)},i.prototype._cameraForBoxAndBearing=function(et,rt,it,nt){var ot={top:0,bottom:0,right:0,left:0};if("number"==typeof(nt=tt.extend({padding:ot,offset:[0,0],maxZoom:this.transform.maxZoom},nt)).padding){var at=nt.padding;nt.padding={top:at,bottom:at,right:at,left:at}}nt.padding=tt.extend(ot,nt.padding);var st=this.transform,ct=st.padding,ht=st.project(tt.LngLat.convert(et)),dt=st.project(tt.LngLat.convert(rt)),mt=ht.rotate(-it*Math.PI/180),yt=dt.rotate(-it*Math.PI/180),gt=new tt.Point(Math.max(mt.x,yt.x),Math.max(mt.y,yt.y)),vt=new tt.Point(Math.min(mt.x,yt.x),Math.min(mt.y,yt.y)),_t=gt.sub(vt),Rt=(st.width-(ct.left+ct.right+nt.padding.left+nt.padding.right))/_t.x,Ot=(st.height-(ct.top+ct.bottom+nt.padding.top+nt.padding.bottom))/_t.y;if(!(Ot<0||Rt<0)){var Zt=Math.min(st.scaleZoom(st.scale*Math.min(Rt,Ot)),nt.maxZoom),Ze="number"==typeof nt.offset.x?new tt.Point(nt.offset.x,nt.offset.y):tt.Point.convert(nt.offset),Ge=new tt.Point((nt.padding.left-nt.padding.right)/2,(nt.padding.top-nt.padding.bottom)/2).rotate(it*Math.PI/180),Xe=Ze.add(Ge).mult(st.scale/st.zoomScale(Zt));return{center:st.unproject(ht.add(dt).div(2).sub(Xe)),zoom:Zt,bearing:it}}tt.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},i.prototype.fitBounds=function(tt,et,rt){return this._fitInternal(this.cameraForBounds(tt,et),et,rt)},i.prototype.fitScreenCoordinates=function(et,rt,it,nt,ot){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(tt.Point.convert(et)),this.transform.pointLocation(tt.Point.convert(rt)),it,nt),nt,ot)},i.prototype._fitInternal=function(et,rt,it){return et?(delete(rt=tt.extend(et,rt)).padding,rt.linear?this.easeTo(rt,it):this.flyTo(rt,it)):this},i.prototype.jumpTo=function(et,rt){this.stop();var it=this.transform,nt=!1,ot=!1,at=!1;return"zoom"in et&&it.zoom!==+et.zoom&&(nt=!0,it.zoom=+et.zoom),void 0!==et.center&&(it.center=tt.LngLat.convert(et.center)),"bearing"in et&&it.bearing!==+et.bearing&&(ot=!0,it.bearing=+et.bearing),"pitch"in et&&it.pitch!==+et.pitch&&(at=!0,it.pitch=+et.pitch),null==et.padding||it.isPaddingEqual(et.padding)||(it.padding=et.padding),this.fire(new tt.Event("movestart",rt)).fire(new tt.Event("move",rt)),nt&&this.fire(new tt.Event("zoomstart",rt)).fire(new tt.Event("zoom",rt)).fire(new tt.Event("zoomend",rt)),ot&&this.fire(new tt.Event("rotatestart",rt)).fire(new tt.Event("rotate",rt)).fire(new tt.Event("rotateend",rt)),at&&this.fire(new tt.Event("pitchstart",rt)).fire(new tt.Event("pitch",rt)).fire(new tt.Event("pitchend",rt)),this.fire(new tt.Event("moveend",rt))},i.prototype.easeTo=function(et,rt){var it=this;this._stop(!1,et.easeId),(!1===(et=tt.extend({offset:[0,0],duration:500,easing:tt.ease},et)).animate||!et.essential&&tt.browser.prefersReducedMotion)&&(et.duration=0);var nt=this.transform,ot=this.getZoom(),at=this.getBearing(),st=this.getPitch(),ct=this.getPadding(),ht="zoom"in et?+et.zoom:ot,dt="bearing"in et?this._normalizeBearing(et.bearing,at):at,mt="pitch"in et?+et.pitch:st,yt="padding"in et?et.padding:nt.padding,gt=tt.Point.convert(et.offset),vt=nt.centerPoint.add(gt),_t=nt.pointLocation(vt),Rt=tt.LngLat.convert(et.center||_t);this._normalizeCenter(Rt);var Ot,Zt,Ze=nt.project(_t),Ge=nt.project(Rt).sub(Ze),Xe=nt.zoomScale(ht-ot);et.around&&(Ot=tt.LngLat.convert(et.around),Zt=nt.locationPoint(Ot));var Je={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||ht!==ot,this._rotating=this._rotating||at!==dt,this._pitching=this._pitching||mt!==st,this._padding=!nt.isPaddingEqual(yt),this._easeId=et.easeId,this._prepareEase(rt,et.noMoveStart,Je),this._ease((function(et){if(it._zooming&&(nt.zoom=tt.number(ot,ht,et)),it._rotating&&(nt.bearing=tt.number(at,dt,et)),it._pitching&&(nt.pitch=tt.number(st,mt,et)),it._padding&&(nt.interpolatePadding(ct,yt,et),vt=nt.centerPoint.add(gt)),Ot)nt.setLocationAtPoint(Ot,Zt);else{var _t=nt.zoomScale(nt.zoom-ot),Rt=ht>ot?Math.min(2,Xe):Math.max(.5,Xe),Je=Math.pow(Rt,1-et),rr=nt.unproject(Ze.add(Ge.mult(et*Je)).mult(_t));nt.setLocationAtPoint(nt.renderWorldCopies?rr.wrap():rr,vt)}it._fireMoveEvents(rt)}),(function(tt){it._afterEase(rt,tt)}),et),this},i.prototype._prepareEase=function(et,rt,it){void 0===it&&(it={}),this._moving=!0,rt||it.moving||this.fire(new tt.Event("movestart",et)),this._zooming&&!it.zooming&&this.fire(new tt.Event("zoomstart",et)),this._rotating&&!it.rotating&&this.fire(new tt.Event("rotatestart",et)),this._pitching&&!it.pitching&&this.fire(new tt.Event("pitchstart",et))},i.prototype._fireMoveEvents=function(et){this.fire(new tt.Event("move",et)),this._zooming&&this.fire(new tt.Event("zoom",et)),this._rotating&&this.fire(new tt.Event("rotate",et)),this._pitching&&this.fire(new tt.Event("pitch",et))},i.prototype._afterEase=function(et,rt){if(!this._easeId||!rt||this._easeId!==rt){delete this._easeId;var it=this._zooming,nt=this._rotating,ot=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,it&&this.fire(new tt.Event("zoomend",et)),nt&&this.fire(new tt.Event("rotateend",et)),ot&&this.fire(new tt.Event("pitchend",et)),this.fire(new tt.Event("moveend",et))}},i.prototype.flyTo=function(et,rt){var it=this;if(!et.essential&&tt.browser.prefersReducedMotion){var nt=tt.pick(et,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nt,rt)}this.stop(),et=tt.extend({offset:[0,0],speed:1.2,curve:1.42,easing:tt.ease},et);var ot=this.transform,at=this.getZoom(),st=this.getBearing(),ct=this.getPitch(),ht=this.getPadding(),dt="zoom"in et?tt.clamp(+et.zoom,ot.minZoom,ot.maxZoom):at,mt="bearing"in et?this._normalizeBearing(et.bearing,st):st,yt="pitch"in et?+et.pitch:ct,gt="padding"in et?et.padding:ot.padding,vt=ot.zoomScale(dt-at),_t=tt.Point.convert(et.offset),Rt=ot.centerPoint.add(_t),Ot=ot.pointLocation(Rt),Zt=tt.LngLat.convert(et.center||Ot);this._normalizeCenter(Zt);var Ze=ot.project(Ot),Ge=ot.project(Zt).sub(Ze),Xe=et.curve,Je=Math.max(ot.width,ot.height),rr=Je/vt,wr=Ge.mag();if("minZoom"in et){var Ir=tt.clamp(Math.min(et.minZoom,at,dt),ot.minZoom,ot.maxZoom),ti=Je/ot.zoomScale(Ir-at);Xe=Math.sqrt(ti/wr*2)}var ni=Xe*Xe;function C(tt){var et=(rr*rr-Je*Je+(tt?-1:1)*ni*ni*wr*wr)/(2*(tt?rr:Je)*ni*wr);return Math.log(Math.sqrt(et*et+1)-et)}function z(tt){return(Math.exp(tt)-Math.exp(-tt))/2}function D(tt){return(Math.exp(tt)+Math.exp(-tt))/2}var oi=C(0),M=function(tt){return D(oi)/D(oi+Xe*tt)},L=function(tt){return Je*((D(oi)*(z(et=oi+Xe*tt)/D(et))-z(oi))/ni)/wr;var et},_i=(C(1)-oi)/Xe;if(Math.abs(wr)<1e-6||!isFinite(_i)){if(Math.abs(Je-rr)<1e-6)return this.easeTo(et,rt);var ji=rr<Je?-1:1;_i=Math.abs(Math.log(rr/Je))/Xe,L=function(){return 0},M=function(tt){return Math.exp(ji*Xe*tt)}}return et.duration="duration"in et?+et.duration:1e3*_i/("screenSpeed"in et?+et.screenSpeed/Xe:+et.speed),et.maxDuration&&et.duration>et.maxDuration&&(et.duration=0),this._zooming=!0,this._rotating=st!==mt,this._pitching=yt!==ct,this._padding=!ot.isPaddingEqual(gt),this._prepareEase(rt,!1),this._ease((function(et){var nt=et*_i,vt=1/M(nt);ot.zoom=1===et?dt:at+ot.scaleZoom(vt),it._rotating&&(ot.bearing=tt.number(st,mt,et)),it._pitching&&(ot.pitch=tt.number(ct,yt,et)),it._padding&&(ot.interpolatePadding(ht,gt,et),Rt=ot.centerPoint.add(_t));var Ot=1===et?Zt:ot.unproject(Ze.add(Ge.mult(L(nt))).mult(vt));ot.setLocationAtPoint(ot.renderWorldCopies?Ot.wrap():Ot,Rt),it._fireMoveEvents(rt)}),(function(){return it._afterEase(rt)}),et),this},i.prototype.isEasing=function(){return!!this._easeFrameId},i.prototype.stop=function(){return this._stop()},i.prototype._stop=function(tt,et){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var rt=this._onEaseEnd;delete this._onEaseEnd,rt.call(this,et)}if(!tt){var it=this.handlers;it&&it.stop(!1)}return this},i.prototype._ease=function(et,rt,it){!1===it.animate||0===it.duration?(et(1),rt()):(this._easeStart=tt.browser.now(),this._easeOptions=it,this._onEaseFrame=et,this._onEaseEnd=rt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},i.prototype._renderFrameCallback=function(){var et=Math.min((tt.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(et)),et<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},i.prototype._normalizeBearing=function(et,rt){et=tt.wrap(et,-180,180);var it=Math.abs(et-rt);return Math.abs(et-360-rt)<it&&(et-=360),Math.abs(et+360-rt)<it&&(et+=360),et},i.prototype._normalizeCenter=function(tt){var et=this.transform;if(et.renderWorldCopies&&!et.lngRange){var rt=tt.lng-et.center.lng;tt.lng+=rt>180?-360:rt<-180?360:0}},i}(tt.Evented),yr=function(et){void 0===et&&(et={}),this.options=et,tt.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};yr.prototype.getDefaultPosition=function(){return"bottom-right"},yr.prototype.onAdd=function(tt){var et=this.options&&this.options.compact;return this._map=tt,this._container=rt.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=rt.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=rt.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),et&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===et&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},yr.prototype.onRemove=function(){rt.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},yr.prototype._setElementTitle=function(tt,et){var rt=this._map._getUIString("AttributionControl."+et);tt.title=rt,tt.setAttribute("aria-label",rt)},yr.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","fal
3se")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},yr.prototype._updateEditLink=function(){var et=this._editLink;et||(et=this._editLink=this._container.querySelector(".mapbox-improve-map"));var rt=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||tt.config.ACCESS_TOKEN}];if(et){var it=rt.reduce((function(tt,et,it){return et.value&&(tt+=et.key+"="+et.value+(it<rt.length-1?"&":"")),tt}),"?");et.href=tt.config.FEEDBACK_URL+"/"+it+(this._map._hash?this._map._hash.getHashString(!0):""),et.rel="noopener nofollow",this._setElementTitle(et,"MapFeedback")}},yr.prototype._updateData=function(tt){!tt||"metadata"!==tt.sourceDataType&&"visibility"!==tt.sourceDataType&&"style"!==tt.dataType||(this._updateAttributions(),this._updateEditLink())},yr.prototype._updateAttributions=function(){if(this._map.style){var tt=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?tt=tt.concat(this.options.customAttribution.map((function(tt){return"string"!=typeof tt?"":tt}))):"string"==typeof this.options.customAttribution&&tt.push(this.options.customAttribution)),this._map.style.stylesheet){var et=this._map.style.stylesheet;this.styleOwner=et.owner,this.styleId=et.id}var rt=this._map.style.sourceCaches;for(var it in rt){var nt=rt[it];if(nt.used){var ot=nt.getSource();ot.attribution&&tt.indexOf(ot.attribution)<0&&tt.push(ot.attribution)}}tt.sort((function(tt,et){return tt.length-et.length}));var at=(tt=tt.filter((function(et,rt){for(var it=rt+1;it<tt.length;it++)if(tt[it].indexOf(et)>=0)return!1;return!0}))).join(" | ");at!==this._attribHTML&&(this._attribHTML=at,tt.length?(this._innerContainer.innerHTML=at,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},yr.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var xr=function(){tt.bindAll(["_updateLogo"],this),tt.bindAll(["_updateCompact"],this)};xr.prototype.onAdd=function(tt){this._map=tt,this._container=rt.create("div","mapboxgl-ctrl");var et=rt.create("a","mapboxgl-ctrl-logo");return et.target="_blank",et.rel="noopener nofollow",et.href="https://www.mapbox.com/",et.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),et.setAttribute("rel","noopener nofollow"),this._container.appendChild(et),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},xr.prototype.onRemove=function(){rt.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},xr.prototype.getDefaultPosition=function(){return"bottom-left"},xr.prototype._updateLogo=function(tt){tt&&"metadata"!==tt.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},xr.prototype._logoRequired=function(){if(this._map.style){var tt=this._map.style.sourceCaches;for(var et in tt)if(tt[et].getSource().mapbox_logo)return!0;return!1}},xr.prototype._updateCompact=function(){var tt=this._container.children;if(tt.length){var et=tt[0];this._map.getCanvasContainer().offsetWidth<250?et.classList.add("mapboxgl-compact"):et.classList.remove("mapboxgl-compact")}};var br=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};br.prototype.add=function(tt){var et=++this._id;return this._queue.push({callback:tt,id:et,cancelled:!1}),et},br.prototype.remove=function(tt){for(var et=this._currentlyRunning,rt=0,it=et?this._queue.concat(et):this._queue;rt<it.length;rt+=1){var nt=it[rt];if(nt.id===tt)return void(nt.cancelled=!0)}},br.prototype.run=function(tt){void 0===tt&&(tt=0);var et=this._currentlyRunning=this._queue;this._queue=[];for(var rt=0,it=et;rt<it.length;rt+=1){var nt=it[rt];if(!nt.cancelled&&(nt.callback(tt),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},br.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var oc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},ac=tt.window.HTMLImageElement,sc=tt.window.HTMLElement,lc=tt.window.ImageBitmap,uc={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileC
vendor: 16,859 bytes, line 3
3acheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},cc=function(it){function r(et){var rt=this;if(null!=(et=tt.extend({},uc,et)).minZoom&&null!=et.maxZoom&&et.minZoom>et.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=et.minPitch&&null!=et.maxPitch&&et.minPitch>et.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=et.minPitch&&et.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=et.maxPitch&&et.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var nt=new To(et.minZoom,et.maxZoom,et.minPitch,et.maxPitch,et.renderWorldCopies);if(it.call(this,nt,et),this._interactive=et.interactive,this._maxTileCacheSize=et.maxTileCacheSize,this._failIfMajorPerformanceCaveat=et.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=et.preserveDrawingBuffer,this._antialias=et.antialias,this._trackResize=et.trackResize,this._bearingSnap=et.bearingSnap,this._refreshExpiredTiles=et.refreshExpiredTiles,this._fadeDuration=et.fadeDuration,this._crossSourceCollisions=et.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=et.collectResourceTiming,this._renderTaskQueue=new br,this._controls=[],this._mapId=tt.uniqueId(),this._locale=tt.extend({},oc,et.locale),this._clickTolerance=et.clickTolerance,this._requestManager=new tt.RequestManager(et.transformRequest,et.accessToken),"string"==typeof et.container){if(this._container=tt.window.document.getElementById(et.container),!this._container)throw new Error("Container '"+et.container+"' not found.")}else{if(!(et.container instanceof sc))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=et.container}if(et.maxBounds&&this.setMaxBounds(et.maxBounds),tt.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return rt._update(!1)})),this.on("moveend",(function(){return rt._update(!1)})),this.on("zoom",(function(){return rt._update(!0)})),void 0!==tt.window&&(tt.window.addEventListener("online",this._onWindowOnline,!1),tt.window.addEventListener("resize",this._onWindowResize,!1),tt.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new gr(this,et),this._hash=et.hash&&new Io("string"==typeof et.hash&&et.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:et.center,zoom:et.zoom,bearing:et.bearing,pitch:et.pitch}),et.bounds&&(this.resize(),this.fitBounds(et.bounds,tt.extend({},et.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=et.localIdeographFontFamily,et.style&&this.setStyle(et.style,{localIdeographFontFamily:et.localIdeographFontFamily}),et.attributionControl&&this.addControl(new yr({customAttribution:et.customAttribution})),this.addControl(new xr,et.logoPosition),this.on("style.load",(function(){rt.transform.unmodified&&rt.jumpTo(rt.style.stylesheet)})),this.on("data",(function(et){rt._update("style"===et.dataType),rt.fire(new tt.Event(et.dataType+"data",et))})),this.on("dataloading",(function(et){rt.fire(new tt.Event(et.dataType+"dataloading",et))}))}it&&(r.__proto__=it),(r.prototype=Object.create(it&&it.prototype)).constructor=r;var nt={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return r.prototype._getMapId=function(){return this._mapId},r.prototype.addControl=function(et,rt){if(void 0===rt&&(rt=et.getDefaultPosition?et.getDefaultPosition():"top-right"),!et||!et.onAdd)return this.fire(new tt.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var it=et.onAdd(this);this._controls.push(et);var nt=this._controlPositions[rt];return-1!==rt.indexOf("bottom")?nt.insertBefore(it,nt.firstChild):nt.appendChild(it),this},r.prototype.removeControl=function(et){if(!et||!et.onRemove)return this.fire(new tt.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var rt=this._controls.indexOf(et);return rt>-1&&this._controls.splice(rt,1),et.onRemove(this),this},r.prototype.hasControl=function(tt){return this._controls.indexOf(tt)>-1},r.prototype.resize=function(et){var rt=this._containerDimensions(),it=rt[0],nt=rt[1];if(it===this.transform.width&&nt===this.transform.height)return this;this._resizeCanvas(it,nt),this.transform.resize(it,nt),this.painter.resize(it,nt);var ot=!this._moving;return ot&&this.fire(new tt.Event("movestart",et)).fire(new tt.Event("move",et)),this.fire(new tt.Event("resize",et)),ot&&this.fire(new tt.Event("moveend",et)),this},r.prototype.getBounds=function(){return this.transform.getBounds()},r.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},r.prototype.setMaxBounds=function(et){return this.transform.setMaxBounds(tt.LngLatBounds.convert(et)),this._update()},r.prototype.setMinZoom=function(tt){if((tt=null==tt?-2:tt)>=-2&&tt<=this.transform.maxZoom)return this.transform.minZoom=tt,this._update(),this.getZoom()<tt&&this.setZoom(tt),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},r.prototype.getMinZoom=function(){return this.transform.minZoom},r.prototype.setMaxZoom=function(tt){if((tt=null==tt?22:tt)>=this.transform.minZoom)return this.transform.maxZoom=tt,this._update(),this.getZoom()>tt&&this.setZoom(tt),this;throw new Error("maxZoom must be greater than the current minZoom")},r.prototype.getMaxZoom=function(){return this.transform.maxZoom},r.prototype.setMinPitch=function(tt){if((tt=null==tt?0:tt)<0)throw new Error("minPitch must be greater than or equal to 0");if(tt>=0&&tt<=this.transform.maxPitch)return this.transform.minPitch=tt,this._update(),this.getPitch()<tt&&this.setPitch(tt),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},r.prototype.getMinPitch=function(){return this.transform.minPitch},r.prototype.setMaxPitch=function(tt){if((tt=null==tt?60:tt)>60)throw new Error("maxPitch must be less than or equal to 60");if(tt>=this.transform.minPitch)return this.transform.maxPitch=tt,this._update(),this.getPitch()>tt&&this.setPitch(tt),this;throw new Error("maxPitch must be greater than the current minPitch")},r.prototype.getMaxPitch=function(){return this.transform.maxPitch},r.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},r.prototype.setRenderWorldCopies=function(tt){return this.transform.renderWorldCopies=tt,this._update()},r.prototype.project=function(et){return this.transform.locationPoint(tt.LngLat.convert(et))},r.prototype.unproject=function(et){return this.transform.pointLocation(tt.Point.convert(et))},r.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},r.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},r.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},r.prototype._createDelegatedListener=function(tt,et,rt){var it,nt=this;if("mouseenter"===tt||"mouseover"===tt){var ot=!1;return{layer:et,listener:rt,delegates:{mousemove:function(it){var at=nt.getLayer(et)?nt.queryRenderedFeatures(it.point,{layers:[et]}):[];at.length?ot||(ot=!0,rt.call(nt,new Rl(tt,nt,it.originalEvent,{features:at}))):ot=!1},mouseout:function(){ot=!1}}}}if("mouseleave"===tt||"mouseout"===tt){var at=!1;return{layer:et,listener:rt,delegates:{mousemove:function(it){(nt.getLayer(et)?nt.queryRenderedFeatures(it.point,{layers:[et]}):[]).length?at=!0:at&&(at=!1,rt.call(nt,new Rl(tt,nt,it.originalEvent)))},mouseout:function(et){at&&(at=!1,rt.call(nt,new Rl(tt,nt,et.originalEvent)))}}}}return{layer:et,listener:rt,delegates:(it={},it[tt]=function(tt){var it=nt.getLayer(et)?nt.queryRenderedFeatures(tt.point,{layers:[et]}):[];it.length&&(tt.features=it,rt.call(nt,tt),delete tt.features)},it)}},r.prototype.on=function(tt,et,rt){if(void 0===rt)return it.prototype.on.call(this,tt,et);var nt=this._createDelegatedListener(tt,et,rt);for(var ot in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[tt]=this._delegatedListeners[tt]||[],this._delegatedListeners[tt].push(nt),nt.delegates)this.on(ot,nt.delegates[ot]);return this},r.prototype.once=function(tt,et,rt){if(void 0===rt)return it.prototype.once.call(this,tt,et);var nt=this._createDelegatedListener(tt,et,rt);for(var ot in nt.delegates)this.once(ot,nt.delegates[ot]);return this},r.prototype.off=function(tt,et,rt){var nt=this;return void 0===rt?it.prototype.off.call(this,tt,et):(this._delegatedListeners&&this._delegatedListeners[tt]&&function(it){for(var ot=it[tt],at=0;at<ot.length;at++){var st=ot[at];if(st.layer===et&&st.listener===rt){for(var ct in st.delegates)nt.off(ct,st.delegates[ct]);return ot.splice(at,1),nt}}}(this._delegatedListeners),this)},r.prototype.queryRenderedFeatures=function(et,rt){if(!this.style)return[];var it;if(void 0!==rt||void 0===et||et instanceof tt.Point||Array.isArray(et)||(rt=et,et=void 0),rt=rt||{},(et=et||[[0,0],[this.transform.width,this.transform.height]])instanceof tt.Point||"number"==typeof et[0])it=[tt.Point.convert(et)];else{var nt=tt.Point.convert(et[0]),ot=tt.Point.convert(et[1]);it=[nt,new tt.Point(ot.x,nt.y),ot,new tt.Point(nt.x,ot.y),nt]}return this.style.queryRenderedFeatures(it,rt,this.transform)},r.prototype.querySourceFeatures=function(tt,et){return this.style.querySourceFeatures(tt,et)},r.prototype.setStyle=function(et,rt){return!1!==(rt=tt.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},rt)).diff&&rt.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&et?(this._diffStyle(et,rt),this):(this._localIdeographFontFamily=rt.localIdeographFontFamily,this._updateStyle(et,rt))},r.prototype._getUIString=function(tt){var et=this._locale[tt];if(null==et)throw new Error("Missing UI string '"+tt+"'");return et},r.prototype._updateStyle=function(tt,et){return this.style&&(this.style.setEventedParent(null),this.style._remove()),tt?(this.style=new us(this,et||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof tt?this.style.loadURL(tt):this.style.loadJSON(tt),this):(delete this.style,this)},r.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new us(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},r.prototype._diffStyle=function(et,rt){var it=this;if("string"==typeof et){var nt=this._requestManager.normalizeStyleURL(et),ot=this._requestManager.transformRequest(nt,tt.ResourceType.Style);tt.getJSON(ot,(function(et,nt){et?it.fire(new tt.ErrorEvent(et)):nt&&it._updateDiff(nt,rt)}))}else"object"==typeof et&&this._updateDiff(et,rt)},r.prototype._updateDiff=function(et,rt){try{this.style.setState(et)&&this._update(!0)}catch(it){tt.warnOnce("Unable to perform style diff: "+(it.message||it.error||it)+".  Rebuilding the style from scratch."),this._updateStyle(et,rt)}},r.prototype.getStyle=function(){if(this.style)return this.style.serialize()},r.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():tt.warnOnce("There is no style added to the map.")},r.prototype.addSource=function(tt,et){return this._lazyInitEmptyStyle(),this.style.addSource(tt,et),this._update(!0)},r.prototype.isSourceLoaded=function(et){var rt=this.style&&this.style.sourceCaches[et];if(void 0!==rt)return rt.loaded();this.fire(new tt.ErrorEvent(new Error("There is no source with ID '"+et+"'")))},r.prototype.areTilesLoaded=function(){var tt=this.style&&this.style.sourceCaches;for(var et in tt){var rt=tt[et]._tiles;for(var it in rt){var nt=rt[it];if("loaded"!==nt.state&&"errored"!==nt.state)return!1}}return!0},r.prototype.addSourceType=function(tt,et,rt){return this._lazyInitEmptyStyle(),this.style.addSourceType(tt,et,rt)},r.prototype.removeSource=function(tt){return this.style.removeSource(tt),this._update(!0)},r.prototype.getSource=function(tt){return this.style.getSource(tt)},r.prototype.addImage=function(et,rt,it){void 0===it&&(it={});var nt=it.pixelRatio;void 0===nt&&(nt=1);var ot=it.sdf;void 0===ot&&(ot=!1);var at=it.stretchX,st=it.stretchY,ct=it.content;if(this._lazyInitEmptyStyle(),rt instanceof ac||lc&&rt instanceof lc){var ht=tt.browser.getImageData(rt);this.style.addImage(et,{data:new tt.RGBAImage({width:ht.width,height:ht.height},ht.data),pixelRatio:nt,stretchX:at,stretchY:st,content:ct,sdf:ot,version:0})}else{if(void 0===rt.width||void 0===rt.height)return this.fire(new tt.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var dt=rt;this.style.addImage(et,{data:new tt.RGBAImage({width:rt.width,height:rt.height},new Uint8Array(rt.data)),pixelRatio:nt,stretchX:at,stretchY:st,content:ct,sdf:ot,version:0,userImage:dt}),dt.onAdd&&dt.onAdd(this,et)}},r.prototype.updateImage=function(et,rt){var it=this.style.getImage(et);if(!it)return this.fire(new tt.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var nt=rt instanceof ac||lc&&rt instanceof lc?tt.browser.getImageData(rt):rt,ot=nt.width,at=nt.height,st=nt.data;return void 0===ot||void 0===at?this.fire(new tt.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):ot!==it.data.width||at!==it.data.height?this.fire(new tt.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(it.data.replace(st,!(rt instanceof ac||lc&&rt instanceof lc)),void this.style.updateImage(et,it))},r.prototype.hasImage=function(et){return et?!!this.style.getImage(et):(this.fire(new tt.ErrorEvent(new Error("Missing required image id"))),!1)},r.prototype.removeImage=function(tt){this.style.removeImage(tt)},r.prototype.loadImage=function(et,rt){tt.getImage(this._requestManager.transformRequest(et,tt.ResourceType.Image),rt)},r.prototype.listImages=function(){return this.style.listImages()},r.prototype.addLayer=function(tt,et){return this._lazyInitEmptyStyle(),this.style.addLayer(tt,et),this._update(!0)},r.prototype.moveLayer=function(tt,et){return this.style.moveLayer(tt,et),this._update(!0)},r.prototype.removeLayer=function(tt){return this.style.removeLayer(tt),this._update(!0)},r.prototype.getLayer=function(tt){return this.style.getLayer(tt)},r.prototype.setLayerZoomRange=function(tt,et,rt){return this.style.setLayerZoomRange(tt,et,rt),this._update(!0)},r.prototype.setFilter=function(tt,et,rt){return void 0===rt&&(rt={}),this.style.setFilter(tt,et,rt),this._update(!0)},r.prototype.getFilter=function(tt){return this.style.getFilter(tt)},r.prototype.setPaintProperty=function(tt,et,rt,it){return void 0===it&&(it={}),this.style.setPaintProperty(tt,et,rt,it),this._update(!0)},r.prototype.getPaintProperty=function(tt,et){return this.style.getPaintProperty(tt,et)},r.prototype.setLayoutProperty=function(tt,et,rt,it){return void 0===it&&(it={}),this.style.setLayoutProperty(tt,et,rt,it),this._update(!0)},r.prototype.getLayoutProperty=function(tt,et){return this.style.getLayoutProperty(tt,et)},r.prototype.setLight=function(tt,et){return void 0===et&&(et={}),this._lazyInitEmptyStyle(),this.style.setLight(tt,et),this._update(!0)},r.prototype.getLight=function(){return this.style.getLight()},r.prototype.setFeatureState=function(tt,et){return this.style.setFeatureState(tt,et),this._update()},r.prototype.removeFeatureState=function(tt,et){return this.style.removeFeatureState(tt,et),this._update()},r.prototype.getFeatureState=function(tt){return this.style.getFeatureState(tt)},r.prototype.getContainer=function(){return this._container},r.prototype.getCanvasContainer=function(){return this._canvasContainer},r.prototype.getCanvas=function(){return this._canvas},r.prototype._containerDimensions=function(){var tt=0,et=0;return this._container&&(tt=this._container.clientWidth||400,et=this._container.clientHeight||300),[tt,et]},r.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==tt.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&tt.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described 
3in https://www.mapbox.com/mapbox-gl-js/api/.")},r.prototype._setupContainer=function(){var tt=this._container;tt.classList.add("mapboxgl-map"),(this._missingCSSCanary=rt.create("div","mapboxgl-canary",tt)).style.visibility="hidden",this._detectMissingCSS();var et=this._canvasContainer=rt.create("div","mapboxgl-canvas-container",tt);this._interactive&&et.classList.add("mapboxgl-interactive"),this._canvas=rt.create("canvas","mapboxgl-canvas",et),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var it=this._containerDimensions();this._resizeCanvas(it[0],it[1]);var nt=this._controlContainer=rt.create("div","mapboxgl-control-container",tt),ot=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(tt){ot[tt]=rt.create("div","mapboxgl-ctrl-"+tt,nt)})),this._container.addEventListener("scroll",this._onMapScroll,!1)},r.prototype._resizeCanvas=function(et,rt){var it=tt.browser.devicePixelRatio||1;this._canvas.width=it*et,this._canvas.height=it*rt,this._canvas.style.width=et+"px",this._canvas.style.height=rt+"px"},r.prototype._setupPainter=function(){var rt=tt.extend({},et.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),it=this._canvas.getContext("webgl",rt)||this._canvas.getContext("experimental-webgl",rt);it?(this.painter=new yo(it,this.transform),tt.webpSupported.testSupport(it)):this.fire(new tt.ErrorEvent(new Error("Failed to initialize WebGL")))},r.prototype._contextLost=function(et){et.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new tt.Event("webglcontextlost",{originalEvent:et}))},r.prototype._contextRestored=function(et){this._setupPainter(),this.resize(),this._update(),this.fire(new tt.Event("webglcontextrestored",{originalEvent:et}))},r.prototype._onMapScroll=function(tt){if(tt.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},r.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},r.prototype._update=function(tt){return this.style?(this._styleDirty=this._styleDirty||tt,this._sourcesDirty=!0,this.triggerRepaint(),this):this},r.prototype._requestRenderFrame=function(tt){return this._update(),this._renderTaskQueue.add(tt)},r.prototype._cancelRenderFrame=function(tt){this._renderTaskQueue.remove(tt)},r.prototype._render=function(et){var rt,it=this,nt=0,ot=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(rt=ot.createQueryEXT(),ot.beginQueryEXT(ot.TIME_ELAPSED_EXT,rt),nt=tt.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(et),!this._removed){var at=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var st=this.transform.zoom,ct=tt.browser.now();this.style.zoomHistory.update(st,ct);var ht=new tt.EvaluationParameters(st,{now:ct,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),dt=ht.crossFadingFactor();1===dt&&dt===this._crossFadingFactor||(at=!0,this._crossFadingFactor=dt),this.style.update(ht)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new tt.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new tt.Event("load"))),this.style&&(this.style.hasTransitions()||at)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var mt=tt.browser.now()-nt;ot.endQueryEXT(ot.TIME_ELAPSED_EXT,rt),setTimeout((function(){var et=ot.getQueryObjectEXT(rt,ot.QUERY_RESULT_EXT)/1e6;ot.deleteQueryEXT(rt),it.fire(new tt.Event("gpu-timing-frame",{cpuTime:mt,gpuTime:et}))}),50)}if(this.listens("gpu-timing-layer")){var yt=this.painter.collectGpuTimers();setTimeout((function(){var et=it.painter.queryGpuTimers(yt);it.fire(new tt.Event("gpu-timing-layer",{layerTimes:et}))}),50)}var gt=this._sourcesDirty||this._styleDirty||this._placementDirty;return gt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new tt.Event("idle")),!this._loaded||this._fullyLoaded||gt||(this._fullyLoaded=!0),this}},r.prototype.remove=function(){this._hash&&this._hash.remove();for(var et=0,rt=this._controls;et<rt.length;et+=1)rt[et].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==tt.window&&(tt.window.removeEventListener("resize",this._onWindowResize,!1),tt.window.removeEventListener("orientationchange",this._onWindowResize,!1),tt.window.removeEventListener("online",this._onWindowOnline,!1));var it=this.painter.context.gl.getExtension("WEBGL_lose_context");it&&it.loseContext(),Cr(this._canvasContainer),Cr(this._controlContainer),Cr(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new tt.Event("remove"))},r.prototype.triggerRepaint=function(){var et=this;this.style&&!this._frame&&(this._frame=tt.browser.frame((function(tt){et._frame=null,et._render(tt)})))},r.prototype._onWindowOnline=function(){this._update()},r.prototype._onWindowResize=function(tt){this._trackResize&&this.resize({originalEvent:tt})._update()},nt.showTileBoundaries.get=function(){return!!this._showTileBoundaries},nt.showTileBoundaries.set=function(tt){this._showTileBoundaries!==tt&&(this._showTileBoundaries=tt,this._update())},nt.showPadding.get=function(){return!!this._showPadding},nt.showPadding.set=function(tt){this._showPadding!==tt&&(this._showPadding=tt,this._update())},nt.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},nt.showCollisionBoxes.set=function(tt){this._showCollisionBoxes!==tt&&(this._showCollisionBoxes=tt,tt?this.style._generateCollisionBoxes():this._update())},nt.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},nt.showOverdrawInspector.set=function(tt){this._showOverdrawInspector!==tt&&(this._showOverdrawInspector=tt,this._update())},nt.repaint.get=function(){return!!this._repaint},nt.repaint.set=function(tt){this._repaint!==tt&&(this._repaint=tt,this.triggerRepaint())},nt.vertices.get=function(){return!!this._vertices}
vendor: 18,682 bytes, line 3
3,nt.vertices.set=function(tt){this._vertices=tt,this._update()},r.prototype._setCacheLimits=function(et,rt){tt.setCacheLimits(et,rt)},nt.version.get=function(){return tt.version},Object.defineProperties(r.prototype,nt),r}(nc);function Cr(tt){tt.parentNode&&tt.parentNode.removeChild(tt)}var pc={showCompass:!0,showZoom:!0,visualizePitch:!1},Dr=function(et){var it=this;this.options=tt.extend({},pc,et),this._container=rt.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(tt){return tt.preventDefault()})),this.options.showZoom&&(tt.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(function(tt){return it._map.zoomIn({},{originalEvent:tt})})),rt.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(function(tt){return it._map.zoomOut({},{originalEvent:tt})})),rt.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(tt.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(function(tt){it.options.visualizePitch?it._map.resetNorthPitch({},{originalEvent:tt}):it._map.resetNorth({},{originalEvent:tt})})),this._compassIcon=rt.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Dr.prototype._updateZoomButtons=function(){var tt=this._map.getZoom(),et=tt===this._map.getMaxZoom(),rt=tt===this._map.getMinZoom();this._zoomInButton.disabled=et,this._zoomOutButton.disabled=rt,this._zoomInButton.setAttribute("aria-disabled",et.toString()),this._zoomOutButton.setAttribute("aria-disabled",rt.toString())},Dr.prototype._rotateCompassArrow=function(){var tt=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=tt},Dr.prototype.onAdd=function(tt){return this._map=tt,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 Ar(this._map,this._compass,this.options.visualizePitch)),this._container},Dr.prototype.onRemove=function(){rt.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},Dr.prototype._createButton=function(tt,et){var it=rt.create("button",tt,this._container);return it.type="button",it.addEventListener("click",et),it},Dr.prototype._setButtonTitle=function(tt,et){var rt=this._map._getUIString("NavigationControl."+et);tt.title=rt,tt.setAttribute("aria-label",rt)};var Ar=function(et,it,nt){void 0===nt&&(nt=!1),this._clickTolerance=10,this.element=it,this.mouseRotate=new ku({clickTolerance:et.dragRotate._mouseRotate._clickTolerance}),this.map=et,nt&&(this.mousePitch=new Ru({clickTolerance:et.dragRotate._mousePitch._clickTolerance})),tt.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),rt.addEventListener(it,"mousedown",this.mousedown),rt.addEventListener(it,"touchstart",this.touchstart,{passive:!1}),rt.addEventListener(it,"touchmove",this.touchmove),rt.addEventListener(it,"touchend",this.touchend),rt.addEventListener(it,"touchcancel",this.reset)};function Mr(et,rt,it){if(et=new tt.LngLat(et.lng,et.lat),rt){var nt=new tt.LngLat(et.lng-360,et.lat),ot=new tt.LngLat(et.lng+360,et.lat),at=it.locationPoint(et).distSqr(rt);it.locationPoint(nt).distSqr(rt)<at?et=nt:it.locationPoint(ot).distSqr(rt)<at&&(et=ot)}for(;Math.abs(et.lng-it.center.lng)>180;){var st=it.locationPoint(et);if(st.x>=0&&st.y>=0&&st.x<=it.width&&st.y<=it.height)break;et.lng>it.center.lng?et.lng-=360:et.lng+=360}return et}Ar.prototype.down=function(tt,et){this.mouseRotate.mousedown(tt,et),this.mousePitch&&this.mousePitch.mousedown(tt,et),rt.disableDrag()},Ar.prototype.move=function(tt,et){var rt=this.map,it=this.mouseRotate.mousemoveWindow(tt,et);if(it&&it.bearingDelta&&rt.setBearing(rt.getBearing()+it.bearingDelta),this.mousePitch){var nt=this.mousePitch.mousemoveWindow(tt,et);nt&&nt.pitchDelta&&rt.setPitch(rt.getPitch()+nt.pitchDelta)}},Ar.prototype.off=function(){var tt=this.element;rt.removeEventListener(tt,"mousedown",this.mousedown),rt.removeEventListener(tt,"touchstart",this.touchstart,{passive:!1}),rt.removeEventListener(tt,"touchmove",this.touchmove),rt.removeEventListener(tt,"touchend",this.touchend),rt.removeEventListener(tt,"touchcancel",this.reset),this.offTemp()},Ar.prototype.offTemp=function(){rt.enableDrag(),rt.removeEventListener(tt.window,"mousemove",this.mousemove),rt.removeEventListener(tt.window,"mouseup",this.mouseup)},Ar.prototype.mousedown=function(et){this.down(tt.extend({},et,{ctrlKey:!0,preventDefault:function(){return et.preventDefault()}}),rt.mousePos(this.element,et)),rt.addEventListener(tt.window,"mousemove",this.mousemove),rt.addEventListener(tt.window,"mouseup",this.mouseup)},Ar.prototype.mousemove=function(tt){this.move(tt,rt.mousePos(this.element,tt))},Ar.prototype.mouseup=function(tt){this.mouseRotate.mouseupWindow(tt),this.mousePitch&&this.mousePitch.mouseupWindow(tt),this.offTemp()},Ar.prototype.touchstart=function(tt){1!==tt.targetTouches.length?this.reset():(this._startPos=this._lastPos=rt.touchPos(this.element,tt.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return tt.preventDefault()}},this._startPos))},Ar.prototype.touchmove=function(tt){1!==tt.targetTouches.length?this.reset():(this._lastPos=rt.touchPos(this.element,tt.targetTouches)[0],this.move({preventDefault:function(){return tt.preventDefault()}},this._lastPos))},Ar.prototype.touchend=function(tt){0===tt.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Ar.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var hc={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 Rr(tt,et,rt){var it=tt.classList;for(var nt in hc)it.remove("mapboxgl-"+rt+"-anchor-"+nt);it.add("mapboxgl-"+rt+"-anchor-"+et)}var fc,dc=function(et){function o(it,nt){if(et.call(this),(it instanceof tt.window.HTMLElement||nt)&&(it=tt.extend({element:it},nt)),tt.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=it&&it.anchor||"center",this._color=it&&it.color||"#3FB1CE",this._scale=it&&it.scale||1,this._draggable=it&&it.draggable||!1,this._clickTolerance=it&&it.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=it&&it.rotation||0,this._rotationAlignment=it&&it.rotationAlignment||"auto",this._pitchAlignment=it&&it.pitchAlignment&&"auto"!==it.pitchAlignment?it.pitchAlignment:this._rotationAlignment,it&&it.element)this._element=it.element,this._offset=tt.Point.convert(it&&it.offset||[0,0]);else{this._defaultMarker=!0,this._element=rt.create("div"),this._element.setAttribute("aria-label","Map marker");var ot=rt.createNS("http://www.w3.org/2000/svg","svg");ot.setAttributeNS(null,"display","block"),ot.setAttributeNS(null,"height","41px"),ot.setAttributeNS(null,"width","27px"),ot.setAttributeNS(null,"viewBox","0 0 27 41");var at=rt.createNS("http://www.w3.org/2000/svg","g");at.setAttributeNS(null,"stroke","none"),at.setAttributeNS(null,"stroke-width","1"),at.setAttributeNS(null,"fill","none"),at.setAttributeNS(null,"fill-rule","evenodd");var st=rt.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"fill-rule","nonzero");var ct=rt.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ct.setAttributeNS(null,"fill","#000000");for(var ht=0,dt=[{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"}];ht<dt.length;ht+=1){var mt=dt[ht],yt=rt.createNS("http://www.w3.org/2000/svg","ellipse");yt.setAttributeNS(null,"opacity","0.04"),yt.setAttributeNS(null,"cx","10.5"),yt.setAttributeNS(null,"cy","5.80029008"),yt.setAttributeNS(null,"rx",mt.rx),yt.setAttributeNS(null,"ry",mt.ry),ct.appendChild(yt)}var gt=rt.createNS("http://www.w3.org/2000/svg","g");gt.setAttributeNS(null,"fill",this._color);var vt=rt.createNS("http://www.w3.org/2000/svg","path");vt.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"),gt.appendChild(vt);var _t=rt.createNS("http://www.w3.org/2000/svg","g");_t.setAttributeNS(null,"opacity","0.25"),_t.setAttributeNS(null,"fill","#000000");var Rt=rt.createNS("http://www.w3.org/2000/svg","path");Rt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),_t.appendChild(Rt);var Ot=rt.createNS("http://www.w3.org/2000/svg","g");Ot.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ot.setAttributeNS(null,"fill","#FFFFFF");var Zt=rt.createNS("http://www.w3.org/2000/svg","g");Zt.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Ze=rt.createNS("http://www.w3.org/2000/svg","circle");Ze.setAttributeNS(null,"fill","#000000"),Ze.setAttributeNS(null,"opacity","0.25"),Ze.setAttributeNS(null,"cx","5.5"),Ze.setAttributeNS(null,"cy","5.5"),Ze.setAttributeNS(null,"r","5.4999962");var Ge=rt.createNS("http://www.w3.org/2000/svg","circle");Ge.setAttributeNS(null,"fill","#FFFFFF"),Ge.setAttributeNS(null,"cx","5.5"),Ge.setAttributeNS(null,"cy","5.5"),Ge.setAttributeNS(null,"r","5.4999962"),Zt.appendChild(Ze),Zt.appendChild(Ge),st.appendChild(ct),st.appendChild(gt),st.appendChild(_t),st.appendChild(Ot),st.appendChild(Zt),ot.appendChild(st),ot.setAttributeNS(null,"height",41*this._scale+"px"),ot.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(ot),this._offset=tt.Point.convert(it&&it.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(function(tt){tt.preventDefault()})),this._element.addEventListener("mousedown",(function(tt){tt.preventDefault()})),Rr(this._element,this._anchor,"marker"),this._popup=null}return et&&(o.__proto__=et),(o.prototype=Object.create(et&&et.prototype)).constructor=o,o.prototype.addTo=function(tt){return this.remove(),this._map=tt,tt.getCanvasContainer().appendChild(this._element),tt.on("move",this._update),tt.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},o.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),rt.remove(this._element),this._popup&&this._popup.remove(),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(et){return this._lngLat=tt.LngLat.convert(et),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},o.prototype.getElement=function(){return this._element},o.prototype.setPopup=function(tt){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),tt){if(!("offset"in tt.options)){var et=Math.sqrt(Math.pow(13.5,2)/2);tt.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[et,-1*(24.6+et)],"bottom-right":[-et,-1*(24.6+et)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=tt,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},o.prototype._onKeyPress=function(tt){var et=tt.code,rt=tt.charCode||tt.keyCode;"Space"!==et&&"Enter"!==et&&32!==rt&&13!==rt||this.togglePopup()},o.prototype._onMapClick=function(tt){var et=tt.originalEvent.target,rt=this._element;this._popup&&(et===rt||rt.contains(et))&&this.togglePopup()},o.prototype.getPopup=function(){return this._popup},o.prototype.togglePopup=function(){var tt=this._popup;return tt?(tt.isOpen()?tt.remove():tt.addTo(this._map),this):this},o.prototype._update=function(tt){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Mr(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var et="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?et="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(et="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var it="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?it="rotateX(0deg)":"map"===this._pitchAlignment&&(it="rotateX("+this._map.getPitch()+"deg)"),tt&&"moveend"!==tt.type||(this._pos=this._pos.round()),rt.setTransform(this._element,hc[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+it+" "+et)}},o.prototype.getOffset=function(){return this._offset},o.prototype.setOffset=function(et){return this._offset=tt.Point.convert(et),this._update(),this},o.prototype._onMove=function(et){if(!this._isDragging){var rt=this._clickTolerance||this._map._clickTolerance;this._isDragging=et.point.dist(this._pointerdownPos)>=rt}this._isDragging&&(this._pos=et.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new tt.Event("dragstart"))),this.fire(new tt.Event("drag")))},o.prototype._onUp=function(){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),"active"===this._state&&this.fire(new tt.Event("dragend")),this._state="inactive"},o.prototype._addDragHandler=function(tt){this._element.contains(tt.originalEvent.target)&&(tt.preventDefault(),this._positionDelta=tt.point.sub(this._pos).add(this._offset),this._pointerdownPos=tt.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))},o.prototype.setDraggable=function(tt){return this._draggable=!!tt,this._map&&(tt?(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},o.prototype.isDraggable=function(){return this._draggable},o.prototype.setRotation=function(tt){return this._rotation=tt||0,this._update(),this},o.prototype.getRotation=function(){return this._rotation},o.prototype.setRotationAlignment=function(tt){return this._rotationAlignment=tt||"auto",this._update(),this},o.prototype.getRotationAlignment=function(){return this._rotationAlignment},o.prototype.setPitchAlignment=function(tt){return this._pitchAlignment=tt&&"auto"!==tt?tt:this._rotationAlignment,this._update(),this},o.prototype.getPitchAlignment=function(){return this._pitchAlignment},o}(tt.Evented),mc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},yc=0,gc=!1,vc=function(et){function o(rt){et.call(this),this.options=tt.extend({},mc,rt),tt.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return et&&(o.__proto__=et),(o.prototype=Object.create(et&&et.prototype)).constructor=o,o.prototype.onAdd=function(et){var it;return this._map=et,this._container=rt.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),it=this._setupUI,void 0!==fc?it(fc):void 0!==tt.window.navigator.permissions?tt.window.navigator.permissions.query({name:"geolocation"}).then((function(tt){it(fc="denied"!==tt.state)})):it(fc=!!tt.window.navigator.geolocation),this._container},o.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(tt.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(),rt.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,yc=0,gc=!1},o.prototype._isOutOfMapMaxBounds=function(tt){var et=this._map.getMaxBounds(),rt=tt.coords;return et&&(rt.longitude<et.getWest()||rt.longitude>et.getEast()||rt.latitude<et.getSouth()||rt.latitude>et.getNorth())},o.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
3RROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},o.prototype._onSuccess=function(et){if(this._map){if(this._isOutOfMapMaxBounds(et))return this._setErrorState(),this.fire(new tt.Event("outofmaxbounds",et)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=et,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(et),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(et),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new tt.Event("geolocate",et)),this._finish()}},o.prototype._updateCamera=function(et){var rt=new tt.LngLat(et.coords.longitude,et.coords.latitude),it=et.coords.accuracy,nt=this._map.getBearing(),ot=tt.extend({bearing:nt},this.options.fitBoundsOptions);this._map.fitBounds(rt.toBounds(it),ot,{geolocateSource:!0})},o.prototype._updateMarker=function(et){if(et){var rt=new tt.LngLat(et.coords.longitude,et.coords.latitude);this._accuracyCircleMarker.setLngLat(rt).addTo(this._map),this._userLocationDotMarker.setLngLat(rt).addTo(this._map),this._accuracy=et.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},o.prototype._updateCircleRadius=function(){var tt=this._map._container.clientHeight/2,et=this._map.unproject([0,tt]),rt=this._map.unproject([1,tt]),it=et.distanceTo(rt),nt=Math.ceil(2*this._accuracy/it);this._circleElement.style.width=nt+"px",this._circleElement.style.height=nt+"px"},o.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},o.prototype._onError=function(et){if(this._map){if(this.options.trackUserLocation)if(1===et.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var rt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=rt,this._geolocateButton.setAttribute("aria-label",rt),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===et.code&&gc)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new tt.Event("error",et)),this._finish()}},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(et){var it=this;if(this._container.addEventListener("contextmenu",(function(tt){return tt.preventDefault()})),this._geolocateButton=rt.create("button","mapboxgl-ctrl-geolocate",this._container),rt.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===et){tt.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var nt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=nt,this._geolocateButton.setAttribute("aria-label",nt)}
vendor: 14,982 bytes, line 3
3else{var ot=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ot,this._geolocateButton.setAttribute("aria-label",ot)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=rt.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new dc(this._dotElement),this._circleElement=rt.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new dc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(et){et.geolocateSource||"ACTIVE_LOCK"!==it._watchState||et.originalEvent&&"resize"===et.originalEvent.type||(it._watchState="BACKGROUND",it._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),it._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),it.fire(new tt.Event("trackuserlocationend")))}))},o.prototype.trigger=function(){if(!this._setup)return tt.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new tt.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":yc--,gc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new tt.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new tt.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var et;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++yc>1?(et={maximumAge:6e5,timeout:0},gc=!0):(et=this.options.positionOptions,gc=!1),this._geolocationWatchID=tt.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,et)}}else tt.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},o.prototype._clearWatch=function(){tt.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},o}(tt.Evented),_c={maxWidth:100,unit:"metric"},qr=function(et){this.options=tt.extend({},_c,et),tt.bindAll(["_onMove","setUnit"],this)};function jr(tt,et,rt){var it=rt&&rt.maxWidth||100,nt=tt._container.clientHeight/2,ot=tt.unproject([0,nt]),at=tt.unproject([it,nt]),st=ot.distanceTo(at);if(rt&&"imperial"===rt.unit){var ct=3.2808*st;ct>5280?Vr(et,it,ct/5280,tt._getUIString("ScaleControl.Miles")):Vr(et,it,ct,tt._getUIString("ScaleControl.Feet"))}else rt&&"nautical"===rt.unit?Vr(et,it,st/1852,tt._getUIString("ScaleControl.NauticalMiles")):st>=1e3?Vr(et,it,st/1e3,tt._getUIString("ScaleControl.Kilometers")):Vr(et,it,st,tt._getUIString("ScaleControl.Meters"))}function Vr(tt,et,rt,it){var nt,ot,at,st=(nt=rt,(ot=Math.pow(10,(""+Math.floor(nt)).length-1))*(at=(at=nt/ot)>=10?10:at>=5?5:at>=3?3:at>=2?2:at>=1?1:function(tt){var et=Math.pow(10,Math.ceil(-Math.log(tt)/Math.LN10));return Math.round(tt*et)/et}(at)));tt.style.width=et*(st/rt)+"px",tt.innerHTML=st+"&nbsp;"+it}qr.prototype.getDefaultPosition=function(){return"bottom-left"},qr.prototype._onMove=function(){jr(this._map,this._container,this.options)},qr.prototype.onAdd=function(tt){return this._map=tt,this._container=rt.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",tt.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},qr.prototype.onRemove=function(){rt.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},qr.prototype.setUnit=function(tt){this.options.unit=tt,jr(this._map,this._container,this.options)};var Gr=function(et){this._fullscreen=!1,et&&et.container&&(et.container instanceof tt.window.HTMLElement?this._container=et.container:tt.warnOnce("Full screen control 'container' must be a DOM element.")),tt.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in tt.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in tt.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in tt.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in tt.window.document&&(this._fullscreenchange="MSFullscreenChange")};Gr.prototype.onAdd=function(et){return this._map=et,this._container||(this._container=this._map.getContainer()),this._controlContainer=rt.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",tt.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Gr.prototype.onRemove=function(){rt.remove(this._controlContainer),this._map=null,tt.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Gr.prototype._checkFullscreenSupport=function(){return!!(tt.window.document.fullscreenEnabled||tt.window.document.mozFullScreenEnabled||tt.window.document.msFullscreenEnabled||tt.window.document.webkitFullscreenEnabled)},Gr.prototype._setupUI=function(){var et=this._fullscreenButton=rt.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);rt.create("span","mapboxgl-ctrl-icon",et).setAttribute("aria-hidden",!0),et.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),tt.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Gr.prototype._updateTitle=function(){var tt=this._getTitle();this._fullscreenButton.setAttribute("aria-label",tt),this._fullscreenButton.title=tt},Gr.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Gr.prototype._isFullscreen=function(){return this._fullscreen},Gr.prototype._changeIcon=function(){(tt.window.document.fullscreenElement||tt.window.document.mozFullScreenElement||tt.window.document.webkitFullscreenElement||tt.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Gr.prototype._onClickFullscreen=function(){this._isFullscreen()?tt.window.document.exitFullscreen?tt.window.document.exitFullscreen():tt.window.document.mozCancelFullScreen?tt.window.document.mozCancelFullScreen():tt.window.document.msExitFullscreen?tt.window.document.msExitFullscreen():tt.window.document.webkitCancelFullScreen&&tt.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var xc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},bc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),wc=function(et){function o(rt){et.call(this),this.options=tt.extend(Object.create(xc),rt),tt.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return et&&(o.__proto__=et),(o.prototype=Object.create(et&&et.prototype)).constructor=o,o.prototype.addTo=function(et){return this._map&&this.remove(),this._map=et,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("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new tt.Event("open")),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&rt.remove(this._content),this._container&&(rt.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new tt.Event("close")),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(et){return this._lngLat=tt.LngLat.convert(et),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},o.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},o.prototype.getElement=function(){return this._container},o.prototype.setText=function(et){return this.setDOMContent(tt.window.document.createTextNode(et))},o.prototype.setHTML=function(et){var rt,it=tt.window.document.createDocumentFragment(),nt=tt.window.document.createElement("body");for(nt.innerHTML=et;rt=nt.firstChild;)it.appendChild(rt);return this.setDOMContent(it)},o.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},o.prototype.setMaxWidth=function(tt){return this.options.maxWidth=tt,this._update(),this},o.prototype.setDOMContent=function(tt){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=rt.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(tt),this._createCloseButton(),this._update(),this._focusFirstElement(),this},o.prototype.addClassName=function(tt){this._container&&this._container.classList.add(tt)},o.prototype.removeClassName=function(tt){this._container&&this._container.classList.remove(tt)},o.prototype.setOffset=function(tt){return this.options.offset=tt,this._update(),this},o.prototype.toggleClassName=function(tt){if(this._container)return this._container.classList.toggle(tt)},o.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=rt.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},o.prototype._onMouseUp=function(tt){this._update(tt.point)},o.prototype._onMouseMove=function(tt){this._update(tt.point)},o.prototype._onDrag=function(tt){this._update(tt.point)},o.prototype._update=function(et){var it=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=rt.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=rt.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(tt){return it._container.classList.add(tt)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Mr(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||et)){var nt=this._pos=this._trackPointer&&et?et:this._map.project(this._lngLat),ot=this.options.anchor,at=function e(et){if(et){if("number"==typeof et){var rt=Math.round(Math.sqrt(.5*Math.pow(et,2)));return{center:new tt.Point(0,0),top:new tt.Point(0,et),"top-left":new tt.Point(rt,rt),"top-right":new tt.Point(-rt,rt),bottom:new tt.Point(0,-et),"bottom-left":new tt.Point(rt,-rt),"bottom-right":new tt.Point(-rt,-rt),left:new tt.Point(et,0),right:new tt.Point(-et,0)}}if(et instanceof tt.Point||Array.isArray(et)){var it=tt.Point.convert(et);return{center:it,top:it,"top-left":it,"top-right":it,bottom:it,"bottom-left":it,"bottom-right":it,left:it,right:it}}return{center:tt.Point.convert(et.center||[0,0]),top:tt.Point.convert(et.top||[0,0]),"top-left":tt.Point.convert(et["top-left"]||[0,0]),"top-right":tt.Point.convert(et["top-right"]||[0,0]),bottom:tt.Point.convert(et.bottom||[0,0]),"bottom-left":tt.Point.convert(et["bottom-left"]||[0,0]),"bottom-right":tt.Point.convert(et["bottom-right"]||[0,0]),left:tt.Point.convert(et.left||[0,0]),right:tt.Point.convert(et.right||[0,0])}}return e(new tt.Point(0,0))}(this.options.offset);if(!ot){var st,ct=this._container.offsetWidth,ht=this._container.offsetHeight;
3st=nt.y+at.bottom.y<ht?["top"]:nt.y>this._map.transform.height-ht?["bottom"]:[],nt.x<ct/2?st.push("left"):nt.x>this._map.transform.width-ct/2&&st.push("right"),ot=0===st.length?"bottom":st.join("-")}var dt=nt.add(at[ot]).round();rt.setTransform(this._container,hc[ot]+" translate("+dt.x+"px,"+dt.y+"px)"),Rr(this._container,ot,"popup")}},o.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var tt=this._container.querySelector(bc);tt&&tt.focus()}},o.prototype._onClose=function(){this.remove()},o}(tt.Evented),Ec={version:tt.version,supported:et,setRTLTextPlugin:tt.setRTLTextPlugin,getRTLTextPluginStatus:tt.getRTLTextPluginStatus,Map:cc,NavigationControl:Dr,GeolocateControl:vc,AttributionControl:yr,ScaleControl:qr,FullscreenControl:Gr,Popup:wc,Marker:dc,Style:us,LngLat:tt.LngLat,LngLatBounds:tt.LngLatBounds,Point:tt.Point,MercatorCoordinate:tt.MercatorCoordinate,Evented:tt.Evented,config:tt.config,prewarm:function(){Ft().acquire(la)},clearPrewarmedResources:function(){var tt=ca;tt&&(tt.isPreloaded()&&1===tt.numActive()?(tt.release(la),ca=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return tt.config.ACCESS_TOKEN},set accessToken(et){tt.config.ACCESS_TOKEN=et},get baseApiUrl(){return tt.config.API_URL},set baseApiUrl(et){tt.config.API_URL=et},get workerCount(){return kt.workerCount},set workerCount(tt){kt.workerCount=tt},get maxParallelImageRequests(){return tt.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(et){tt.config.MAX_PARALLEL_IMAGE_REQUESTS=et},clearStorage:function(et){tt.clearTileCache(et)},workerUrl:""};return Ec}));return rt}))})(rt);var it=et;function getElement(tt){if("string"===typeof tt){var et=tt;tt=document.getElementById(tt);if(!tt)throw new Error("No element with id "+et)}return tt}function validateColor(tt){if(!/^#([0-9a-f]{3}){1,2}$/i.test(tt)&&!/^[a-z]+$/i.test(tt))throw new Error("Invalid color")}function createMarkerImage(tt,et){var rt=41;var it=27;var nt=2;var ot=(new tt.Marker)._element.querySelector("svg");ot.removeAttribute("display");ot.setAttribute("xmlns","http://www.w3.org/2000/svg");ot.setAttribute("height",rt);ot.setAttribute("width",it);ot.setAttribute("viewBox","0 0 "+it+" "+rt);validateColor(et);ot.querySelector("*[fill='#3FB1CE']").setAttribute("fill",et);var at=ot.querySelectorAll("circle");var st=at[at.length-1];if(1==at.length){var ct=st.cloneNode();ct.setAttribute("fill","#000000");ct.setAttribute("opacity",.25);st.parentNode.insertBefore(ct,st)}st.setAttribute("r",4.5);var ht=new Image(it*nt,rt*nt);ht.src="data:image/svg+xml;utf8,"+encodeURIComponent(ot.outerHTML);return ht}var nt={};var ot=function BaseMap(tt,et,rt,it){var ot=this;ct.library||"undefined"===typeof window||(ct.library=window.mapboxgl||window.maplibregl||null);var at=ct.library;if(!at)throw new Error("No mapping library found");var st;var ht={};var dt={};var mt=[];var yt=0;tt=getElement(tt);tt.id&&(nt[tt.id]=this);function getJSON(tt,et,rt){var it=new XMLHttpRequest;it.open("GET",et,true);it.setRequestHeader("Content-Type","application/json");it.onload=function(){200===it.status?rt(JSON.parse(it.responseText)):showError(tt,it.statusText)};it.send()}function onMapLoad(tt){st.loaded()?tt():st.on("load",tt)}function toTimestamp(tt){return"number"===typeof tt?tt:new Date(tt).getTime()/1e3}function generateReplayMap(tt,et,rt){for(var it=0;
3it<et.length;it++){var nt=et[it];var ot=toTimestamp(nt.time);if(ot){dt[ot]||(dt[ot]=[]);dt[ot].push(nt);Zt.extend(rowCoordinates(nt))}}for(var at in dt)Object.prototype.hasOwnProperty.call(dt,at)&&mt.push(parseInt(at));mt.sort();generateMap(tt,dt[mt[yt]],rt);onMapLoad((function(){setTimeout((function(){nextFrame(tt,rt)}),100)}))}function nextFrame(tt,et){yt++;updateMap(tt,dt[mt[yt]],et);yt<mt.length-1&&setTimeout((function(){nextFrame(tt,et)}),100)}function showError(tt,et){tt.textContent=et}function errorCatcher(tt,et,rt,it){try{it(tt,et,rt)}catch(et){showError(tt,et.message);throw et}}function fetchData(tt,et,rt,it){"string"===typeof et?getJSON(tt,et,(function(et){errorCatcher(tt,et,rt,it)})):"function"===typeof et?et((function(et){errorCatcher(tt,et,rt,it)}),(function(et){showError(tt,et)})):errorCatcher(tt,et,rt,it)}function updateMap(tt,et,rt){onLayersReady((function(){if(rt.trail){recordTrails(et,rt.trail);st.getSource("trails").setData(generateTrailsGeoJSON(et))}st.getSource("objects").setData(generateGeoJSON(et,rt))}))}var gt=new window.Map;function generateGeoJSON(tt,et){var rt={type:"FeatureCollection",features:[]};for(var nt=0;nt<tt.length;nt++){var ot=tt[nt];var at=Object.assign({},ot);var st=void 0;if("point"===it){at.icon||(at.icon=et.defaultIcon||"mapkick");at.mapkickIconSize="mapkick"===at.icon?.5:1;at.mapkickIconAnchor="mapkick"===at.icon?"bottom":"center";at.mapkickIconOffset="mapkick"===at.icon?[0,10]:[0,0];if("mapkick"===at.icon){var ct=at.color||Ot.color||"#f84d4d";var ht=gt.get(ct);if(void 0===ht){ht=gt.size;validateColor(ct);gt.set(ct,ht)}at.icon="mapkick-"+ht}var dt=rowCoordinates(ot);if(!dt[1])throw new Error("missing latitude (index: "+nt+")");if(!dt[0])throw new Error("missing longitude (index: "+nt+")");st={type:"Point",coordinates:dt}}else{st=ot.geometry;if(!st)throw new Error("missing geometry (index: "+nt+")");delete at.geometry;at.mapkickColor=at.color||Ot.color||"#0090ff"}rt.features.push({type:"Feature",id:nt,geometry:st,properties:at})}return rt}function rowCoordinates(tt){return[tt.longitude||tt.lng||tt.lon,tt.latitude||tt.lat]}function getTrailId(tt){return tt.id}function recordTrails(tt,et){for(var rt=0;rt<tt.length;rt++){var it=tt[rt];var nt=getTrailId(it);ht[nt]||(ht[nt]=[]);ht[nt].push(rowCoordinates(it));et&&et.len&&ht[nt].length>et.len&&ht[nt].shift()}}function generateTrailsGeoJSON(tt){var et={type:"FeatureCollection",features:[]};for(var rt=0;rt<tt.length;rt++){var it=tt[rt];et.features.push({type:"Feature",geometry:{type:"LineString",coordinates:ht[getTrailId(it)]}})}return et}function generateLabelGeoJSON(tt){var et={type:"FeatureCollection",features:[]};for(var rt=0;rt<tt.features.length;rt++){var it=tt.features[rt];var nt=void 0;var ot=new at.LngLatBounds;extendBounds(ot,it.geometry);if(!ot.isEmpty()){var st=ot.getCenter();nt=[st.lng,st.lat]}nt&&et.features.push({type:"Feature",id:rt,geometry:{type:"Point",coordinates:nt},properties:it.properties})}return et}function layerBeforeFill(tt){var et=tt.getStyle().layers;var rt;for(var it=et.length-1;it>=0;it--){var nt=et[it];if(!(nt.metadata&&"place-labels"===nt.metadata["mapbox:featureComponent"]))break;rt=nt.id}return rt}function addLayer(tt,et){var rt={};st.addSource(tt,{type:"geojson",data:et});if("point"===it){st.addLayer({id:tt+"-text",source:tt,type:"symbol",layout:{"text-field":"{label}","text-size":11,"text-anchor":"top","text-offset":[0,1]},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}});st.addLayer({id:tt,source:tt,type:"symbol",layout:{"icon-image":"{icon}-15","icon-allow-overlap":true,"icon-size":{type:"identity",property:"mapkickIconSize"},"icon-anchor":{type:"identity",property:"mapkickIconAnchor"},"icon-offset":{type:"identity",property:"mapkickIconOffset"}}})}else{var nt=layerBeforeFill(st);var ot=tt+"-outline";st.addLayer({id:ot,source:tt,type:"line",paint:{"line-color":{type:"identity",property:"mapkickColor"},"line-opacity":.7,"line-width":1}},nt);st.addLayer({id:tt,source:tt,type:"fill",paint:{"fill-color":{type:"identity",property:"mapkickColor"},"fill-opacity":.3}},ot);var ct=tt+"-text";var ht=generateLabelGeoJSON(et);for(var dt=0;dt<ht.features.length;dt++){var mt=ht.features[dt];rt[mt.id]=mt.geometry.coordinates}st.addSource(ct,{type:"geojson",data:ht});st.addLayer({id:tt+"-text",source:ct,type:"symbol",layout:{"text-field":"{label}","text-size":11},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}})}var yt=!("hover"in Rt)||Rt.hover;var gt={closeButton:false,closeOnClick:false};yt||(gt.anchor="bottom");var vt=new at.Popup(gt);var panMap=function(tt,et){var rt=window.getComputedStyle(et.getElement());var it=new DOMMatrixReadOnly(rt.transform);var nt=5;var ot=5;var at=it.m42;var st=it.m41;(at<nt||st<nt)&&tt.panBy([Math.min(st-nt-ot,0),Math.min(at-nt-ot,0)])};var showPopup=function(tt){var et=selectedFeature(tt);var nt=et.properties.tooltip;if(nt){"point"===it&&et.properties.icon.startsWith("mapkick-")?vt.options.offset={top:[0,14],"top-left":[0,14],"top-right":[0,14],bottom:[
30,-44],"bottom-left":[0,-44],"bottom-right":[0,-44],left:[14,0],right:[-14,0]}:vt.options.offset=14;var ot;ot="point"===it?et.geometry.coordinates:rt[et.id];vt.setLngLat(ot);Rt.html?vt.setHTML(nt):vt.setText(nt);vt.addTo(st);vt._container.offsetWidth%2!==0&&(vt._container.style.width=vt._container.offsetWidth+1+"px");"area"!==it&&panMap(st,vt)}};var getLatitude=function(tt){return tt.geometry.coordinates[1]};var selectedFeature=function(tt){var et=tt.features;var rt=et[0];for(var it=1;it<et.length;it++){var nt=et[it];getLatitude(nt)<getLatitude(rt)&&(rt=nt)}return rt};if(!yt){var _t=null;st.on("click",tt,(function(tt){var et=selectedFeature(tt).id;if(et!==_t){showPopup(tt);_t=et;tt.mapkickPopupOpened=true}}));st.on("click",(function(tt){if(!tt.mapkickPopupOpened){vt.remove();_t=null}}))}st.on("mouseenter",tt,(function(tt){var et=selectedFeature(tt).properties.tooltip;if(et){st.getCanvas().style.cursor="pointer";yt&&showPopup(tt)}}));st.on("mouseleave",tt,(function(){st.getCanvas().style.cursor="";yt&&vt.remove()}))}function extendBounds(tt,et){if("Point"===et.type)tt.extend(et.coordinates);else if("Polygon"===et.type){var rt=et.coordinates[0];for(var it=0;
3it<rt.length;it++)tt.extend(rt[it])}else if("MultiPolygon"===et.type){var nt=et.coordinates;for(var ot=0;ot<nt.length;ot++){var at=nt[ot][0];for(var st=0;st<at.length;st++)tt.extend(at[st])}}}var generateMap=function(tt,et,rt){var it=generateGeoJSON(et,rt);rt=rt||{};for(var nt=0;nt<it.features.length;nt++)extendBounds(Zt,it.features[nt].geometry);tt.textContent="";var ct=rt.style;if(!ct){var ht=!("accessToken"in at)||/^1\.1[45]/.test(at.version);if(ht)throw new Error("style required for MapLibre");ct="mapbox://styles/mapbox/streets-v12"}var dt=rt.zoom;var mt=rt.center;if(!mt)if(Zt.isEmpty()){mt=[0,0];dt||(dt=1)}else mt=Zt.getCenter();dt||(dt=15);var yt={container:tt,style:ct,dragRotate:false,touchZoomRotate:false,center:mt,zoom:dt};rt.style||(yt.projection="mercator");rt.accessToken&&(yt.accessToken=rt.accessToken);rt.library&&Object.assign(yt,rt.library);st=new at.Map(yt);rt.controls&&st.addControl(new at.NavigationControl({showCompass:false}));if(!rt.zoom){st.style.stylesheet||(st.style.stylesheet={});Zt.isEmpty()||st.getZoom()!==dt||st.fitBounds(Zt,{padding:40,animate:false,maxZoom:15})}ot.map=st;onMapLoad((function(){if(rt.trail){recordTrails(et);st.addSource("trails",{type:"geojson",data:generateTrailsGeoJSON([])});st.addLayer({id:"trails",source:"trails",type:"line",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#888","line-width":2}})}var tt=gt.size;function checkReady(){if(0===tt){addLayer("objects",it);vt=true;var et;while(et=_t.shift())et()}else tt--}gt.forEach((function(tt,et){var rt=createMarkerImage(at,et);rt.addEventListener("load",(function(){st.addImage("mapkick-"+tt+"-15",rt);checkReady()}))}));checkReady()}))};var vt=false;var _t=[];function onLayersReady(tt){vt?tt():_t.push(tt)}rt=rt||{};rt=Object.assign({},ct.options,rt);var Rt=rt.tooltips||{};var Ot=rt.markers||{};var Zt=new at.LngLatBounds;if(rt.replay)fetchData(tt,et,rt,generateReplayMap);else{fetchData(tt,et,rt,generateMap);rt.refresh&&(this.intervalId=setInterval((function(){fetchData(tt,et,rt,updateMap)}),1e3*rt.refresh))}};ot.prototype.getMapObject=function getMapObject(){return this.map};ot.prototype.destroy=function destroy(){this.stopRefresh();if(this.map){this.map.remove();this.map=null}};ot.prototype.stopRefresh=function stopRefresh(){if(this.intervalId){clearInterval(this.intervalId);this.intervalId=null}};var at=function(tt){function Map(et,rt,it){tt.call(this,et,rt,it,"point")}tt&&(Map.__proto__=tt);Map.prototype=Object.create(tt&&tt.prototype);Map.prototype.constructor=Map;return Map}(ot);var st=function(tt){function AreaMap(et,rt,it){tt.call(this,et,rt,it,"area")}tt&&(AreaMap.__proto__=tt);AreaMap.prototype=Object.create(tt&&tt.prototype);AreaMap.prototype.constructor=AreaMap;return AreaMap}(ot);var ct={Map:at,AreaMap:st,maps:nt,options:{},library:null};ct.use=function(tt){ct.library=tt};if("undefined"!==typeof window&&!window.Mapkick){window.Mapkick=ct;setTimeout((function(){window.dispatchEvent(new Event("mapkick:load"))}),0)}ct.use(it);return ct}));
4

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.