azure-maps-control 3.0.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atlas-core-bare-snr-min.js +1 -1
- package/dist/atlas-core-bare-snr.js +177 -187
- package/dist/atlas-core-bare.js +346 -300
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +177 -187
- package/dist/atlas-core.js +346 -300
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas-esm.js +2220 -673
- package/dist/atlas-esm.min.js +4 -4
- package/dist/atlas.js +2220 -673
- package/dist/atlas.min.js +4 -4
- package/package.json +12 -12
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +75 -0
|
@@ -52,4 +52,4 @@ Elle s’applique également, même si Microsoft connaissait ou devrait connaît
|
|
|
52
52
|
EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
|
|
53
53
|
*/
|
|
54
54
|
|
|
55
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("azuremaps-maplibre-gl")):"function"==typeof define&&define.amd?define(["exports","azuremaps-maplibre-gl"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).atlas=t.atlas||{},t.maplibregl)}(this,function(u,D){"use strict";var R="atlas.microsoft.com",B="atlas.microsoft.com",F="styling",N="2023-01-01",Z="api-version",q="Authorization",H="{{azMapsDomain}}",U="{azMapsDomain}",W="{{azMapsView}}",G="view",V="{{azMapsLanguage}}",K="{{azMapsStylingPath}}",Y="{{azMapsStylePath}}",J="styling",$="styles",X="2.0",Q="x-ms-client-id",tt=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},t=(et.prototype.merge=function(){for(var e,t,o,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{for(var i=tt(n),s=i.next();!s.done;s=i.next()){var a=s.value;if(a)for(var c in a)a.hasOwnProperty(c)&&this.hasOwnProperty(c)&&(void 0!==a[c]&&null!=a[c]?this[c]instanceof et?this[c].merge(a[c]):this[c]=a[c]:(o=o||new(Object.getPrototypeOf(this).constructor),this[c]=o[c]))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return this},et);function et(){}var ot,nt,rt=window&&window.__extends||(ot=function(t,e){return(ot=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ot(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),it=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},st=(rt(at,nt=t),at);function at(){var t=null!==nt&&nt.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}lt.prototype.get=function(){return fetch(this.toString(),{method:"GET",mode:"cors",headers:new Headers(this.options.headers)}).then(function(t){if(t.ok)return t.json();throw new Error("HTTP ".concat(t.status,": ").concat(t.statusText))})},lt.prototype.toString=function(){var t=this,e=Object.entries(t.options.queryParams).map(function(t){var t=it(t,2),e=t[0],t=t[1];return"".concat(e,"=").concat(t)}).join("&"),o=[],n=t.options.path||"";return lt.protoRegEx.test(n)?o.push(n):(t.options.domain&&(lt.protoRegEx.test(t.options.domain)||(o.push("".concat(t.options.protocol,"://")),o.push(t.options.subdomain?"".concat(t.options.subdomain,"."):"")),o.push(t.options.domain)),o.push(t.options.path?"/".concat(n):"")),o.push(e?"?".concat(e):""),o.join("")},lt.protoRegEx=new RegExp(/^(((file|http|https):\/\/)|blob:)/i);var ct=lt;function lt(t){this.options=(new st).merge(t)}var ut="3.0.3",pt=(ht.getFullVersion=function(){return ut},ht.getEndpointVersion=function(){var t=ut.indexOf(".");return-1===(t=ut.indexOf(".",t+1))?ut:ut.substring(0,t)},ht);function ht(){}function _(t){var e=document.createElement("span");return e.innerText=t,e.classList.add("tooltiptext"),-1!=navigator.userAgent.indexOf("Edg")?e.classList.add("edge"):-1!=navigator.userAgent.indexOf("Chrome")?e.classList.add("chrome"):-1!=navigator.userAgent.indexOf("Safari")?e.classList.add("safari"):-1!=navigator.userAgent.indexOf("Firefox")&&e.classList.add("firefox"),-1!=navigator.userAgent.indexOf("Windows")?e.classList.add("win"):-1!=navigator.userAgent.indexOf("Macintosh")&&e.classList.add("mac"),e}function b(r,i,s){function t(t){var e=i.getBoundingClientRect(),o=r.getBoundingClientRect(),n=e.x+o.width>window.innerWidth?window.innerWidth-o.width:e.x,o=e.y+e.height+o.height+4>window.innerHeight?e.y-o.height-4:e.y+e.height+4;s&&i.parentElement&&(e=i.parentElement?i.parentElement.getBoundingClientRect():null,r.style.position="absolute",n-=e.x,o-=e.y),r.style.transform="translate(".concat(n,"px, ").concat(o,"px)"),r.style.display="block"}void 0===s&&(s=!1),i.addEventListener("mouseover",t),i.addEventListener("focusin",t),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||"block"!==r.style.display||(t.stopPropagation(),r.style.display="none")})}var dt,ft,rt=window&&window.__extends||(dt=function(t,e){return(dt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}dt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),yt=(u.ControlPosition=void 0,(jt=u.ControlPosition||(u.ControlPosition={})).TopLeft="top-left",jt.TopRight="top-right",jt.BottomLeft="bottom-left",jt.BottomRight="bottom-right",jt.NonFixed="non-fixed",rt(mt,ft=t),mt);function mt(){var t=null!==ft&&ft.apply(this,arguments)||this;return t.position=u.ControlPosition.NonFixed,t}vt.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],o=0;o<t.length;o++){var n=t[o]/255;e[o]=n<=.03928?n/12.92:Math.pow((.055+n)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},vt.prototype.getRBGA=function(t){var e=document.createElement("canvas").getContext("2d"),t=(e.globalAlpha=1,e.fillStyle=t,e.fillRect(0,0,1,1),e.getImageData(0,0,1,1).data);return[t[0],t[1],t[2],t[3]]};var gt=vt;function vt(t){var e;t&&(e=void 0,3<=(e="string"==typeof t?this.getRBGA(t):t).length)&&(this.r=e[0],this.g=e[1],this.b=e[2],3<e.length)&&(this.a=e[3])}u.ControlStyle=void 0,(jt=u.ControlStyle||(u.ControlStyle={})).light="light",jt.dark="dark",jt.auto="auto";var wt=Map,_t=(bt.prototype._addEventListener=function(t,e,o){this.listeners.has(t)||this.listeners.set(t,new wt),this.listeners.get(t).set(e,o)},bt.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},bt.prototype._invokeEvent=function(o,n){var r=this;this.listeners.has(o)&&this.listeners.get(o).forEach(function(t,e){t&&r._removeEventListener(o,e);try{e(n)}catch(t){console.error(t)}})},bt);function bt(){this.listeners=new wt}var xt,St,rt=Object.freeze({__proto__:null,EventEmitter:_t}),Ot=((window&&window.__extends||(xt=function(t,e){return(xt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ct,St=_t),Ct.prototype.onRemove=function(){this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.events.remove("stylechanged",this._onStyleChange),delete this._map),this._observer&&(this._observer.disconnect(),delete this._observer),delete this._theme},Ct.prototype.buildContainer=function(t,e,o,n){return this._map=t,this._container=document.createElement(n||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof o&&this._container.setAttribute("aria-label",o),e.toLowerCase()===u.ControlStyle.auto?this._map&&this._map.events.add("stylechanged",this._onStyleChange):this._container.classList.add(e),this._container},Ct.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},Ct.activateClickDelay=100,Ct);function Ct(){var e=null!==St&&St.apply(this,arguments)||this;return e._onStyleChange=function(){e._map.getStyle().style.toLowerCase().startsWith("blank")?e._observer||(e._onBackgroundChange(),e._observer=new MutationObserver(e._onBackgroundChange),e._observer.observe(e._map.getMapContainer(),{attributes:!0,attributeFilter:["style"]})):(e._observer&&(e._observer.disconnect(),delete e._observer),e._map.styles.getThemeAsync(e._map.getStyle()).then(function(t){e._setTheme(t)}))},e._onBackgroundChange=function(){var t=new gt(e._map.getMapContainer().style.backgroundColor).getLuminosity(),t=isNaN(t)||.5<t?u.ControlStyle.light:u.ControlStyle.dark;e._setTheme(t)},e}(window&&window.__extends||(Pt=function(t,e){return(Pt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Pt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Mt,Lt=t);var Pt,Lt,kt=Mt;function Mt(){var t=null!==Lt&&Lt.apply(this,arguments)||this;return t.rotationDegreesDelta=15,t.style=u.ControlStyle.light,t.inverted=!1,t}(window&&window.__extends||(At=function(t,e){return(At=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}At(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(It,Et=Ot),It.prototype.onAdd=function(t,e){var o=this,n=this.buildContainer(t,this.options.style,"Rotation Control"),r=this.constructRotationButton(t),i=this.constructRotationGrid(t,e),s=_("Reset to Default Rotation");return n.addEventListener("mouseover",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasMouse=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasFocus=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse)||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||(t.stopPropagation(),r.focus(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),r.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||null==n||!n.classList.contains("in-use")||"none"!==(null==s?void 0:s.style.display)||(t.stopPropagation(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&It.InvertOrderPositions.includes(e.position)?(n.appendChild(i),n.appendChild(r),n.appendChild(s),b(s,r)):(n.appendChild(r),n.appendChild(s),b(s,r),n.appendChild(i)),n},It.prototype.constructRotationGrid=function(t,e){var o=document.createElement("div"),n=(o.classList.add("sub-container"),o.classList.add("hidden-accessible-element"),this.constructRightRotationButton(t)),t=this.constructLeftRotationButton(t),r=_("Rotate Left"),i=_("Rotate Right");return e&&It.InvertOrderPositions.includes(e.position)?(o.appendChild(n),o.appendChild(i),b(i,n),o.appendChild(t),o.appendChild(r),b(r,t)):(o.appendChild(t),o.appendChild(r),b(r,t),o.appendChild(n),o.appendChild(i),b(i,n)),o},It.prototype.constructRotationButton=function(e){var o=this,t=document.createElement("button"),n=(t.classList.add("azure-maps-control-button"),t.classList.add("rotation"),t.setAttribute("aria-label","Reset to Default Rotation"),t.setAttribute("alt","Reset to Default Rotation"),t.setAttribute("type","button"),document.createElement("div"));return t.appendChild(n),t.addEventListener("click",function(t){t.timeStamp-o.lastActiveTime>Ot.activateClickDelay&&e.setCamera({bearing:It.DefaultRotation},!0)}),e.events.add("rotate",function(t){n.style.transform="rotate(".concat(-t.map.getCamera().bearing,"deg)")}),t},It.prototype.constructRightRotationButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("rotation-right"),o.setAttribute("aria-label","Rotate Right"),o.setAttribute("alt","Rotate Right"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing-(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:It.RotationDuration,type:"ease"},!0)}),o},It.prototype.constructLeftRotationButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("rotation-left"),o.setAttribute("aria-label","Rotate Left"),o.setAttribute("alt","Rotate Left"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing+(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:It.RotationDuration,type:"ease"},!0)}),o},It.DefaultRotation=0,It.RotationDuration=100,It.InvertOrderPositions=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight];var At,Et,jt=It;function It(t){var e=Et.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new kt).merge(t),e}(window&&window.__extends||(Tt=function(t,e){return(Tt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Tt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Rt,zt=t);var Tt,zt,Dt=Rt;function Rt(){var t=null!==zt&&zt.apply(this,arguments)||this;return t.pitchDegreesDelta=10,t.style=u.ControlStyle.light,t.inverted=!1,t}(window&&window.__extends||(Bt=function(t,e){return(Bt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Bt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Zt,Ft=Ot),Zt.prototype.onAdd=function(t,e){var o=this,n=this.buildContainer(t,this.options.style,"Pitch Control"),r=this.constructPitchButton(t),i=this.constructPitchGrid(t,e),s=_("Reset to Default Pitch");return n.addEventListener("mouseover",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasMouse=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasFocus=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse)||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||(t.stopPropagation(),r.focus(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),r.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||null==n||!n.classList.contains("in-use")||"none"!==(null==s?void 0:s.style.display)||(t.stopPropagation(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&Zt.INVERT_ORDER_POSITIONS.includes(e.position)?(n.appendChild(i),n.appendChild(r),n.appendChild(s),b(s,n)):(n.appendChild(r),n.appendChild(s),b(s,n),n.appendChild(i)),this.map=t,this.container=n,this.pitchButton=r,t.events.add("pitch",this.pitchChanged),this.updatePitchButtonsState(),n},Zt.prototype.onRemove=function(){this.container&&(this.container.remove(),this.container=null,this.pitchButton=null,this.pitchIncrementButton=null,this.pitchDecrementButton=null),this.map&&(this.map.events.remove("pitch",this.pitchChanged),this.map=null)},Zt.prototype.constructPitchGrid=function(t,e){var o=document.createElement("div"),t=(o.classList.add("sub-container"),o.classList.add("hidden-accessible-element"),this.pitchIncrementButton=this.constructPitchIncrementButton(t),this.pitchDecrementButton=this.constructPitchDecrementButton(t),_("Increase Pitch")),n=_("Decrease Pitch");return e&&Zt.INVERT_ORDER_POSITIONS.includes(e.position)?(o.appendChild(this.pitchDecrementButton),o.appendChild(n),b(n,this.pitchDecrementButton),o.appendChild(this.pitchIncrementButton),o.appendChild(t),b(t,this.pitchIncrementButton)):(o.appendChild(this.pitchIncrementButton),o.appendChild(t),b(t,this.pitchIncrementButton),o.appendChild(this.pitchDecrementButton),o.appendChild(n),b(n,this.pitchDecrementButton)),o},Zt.prototype.constructPitchButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch"),o.setAttribute("aria-label","Reset to Default Pitch"),o.setAttribute("alt","Reset to Default Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){event.timeStamp-e.lastActiveTime>Ot.activateClickDelay&&t.setCamera({pitch:Zt.DEFAULT_PITCH},!0)}),o},Zt.prototype.constructPitchDecrementButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch-down"),o.setAttribute("aria-label","Decrease Pitch"),o.setAttribute("alt","Decrease Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch-(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:Zt.PITCH_DURATION_MS,type:"ease"},!0)}),o},Zt.prototype.constructPitchIncrementButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch-up"),o.setAttribute("aria-label","Increase Pitch"),o.setAttribute("alt","Increase Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch+(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:Zt.PITCH_DURATION_MS,type:"ease"},!0)}),o},Zt.PITCH_DURATION_MS=100,Zt.DEFAULT_PITCH=0,Zt.INVERT_ORDER_POSITIONS=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight];var Bt,Ft,Nt=Zt;function Zt(t){var o=Ft.call(this)||this;return o.container=null,o.map=null,o.pitchButton=null,o.pitchIncrementButton=null,o.pitchDecrementButton=null,o.hasMouse=!1,o.hasFocus=!1,o.pitchChanged=function(t){return o.updatePitchButtonsState()},o.updatePitchButtonsState=function(){var t=o.map.getCamera().pitch<=0,e=60<=o.map.getCamera().pitch;o.hasFocus&&o.pitchButton&&(t||e)&&o.pitchButton.focus(),o.options.inverted?(o.pitchIncrementButton&&o.pitchIncrementButton.disabled!=t&&(o.pitchIncrementButton.disabled=t),o.pitchDecrementButton&&o.pitchDecrementButton.disabled!=e&&(o.pitchDecrementButton.disabled=e)):(o.pitchIncrementButton&&o.pitchIncrementButton.disabled!=e&&(o.pitchIncrementButton.disabled=e),o.pitchDecrementButton&&o.pitchDecrementButton.disabled!=t&&(o.pitchDecrementButton.disabled=t))},o.options=(new Dt).merge(t),o}var qt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ht(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ut(o){var e,n;return o.__esModule?o:("function"==typeof(e=o.default)?(n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:n={},Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(o).forEach(function(t){var e=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(n,t,e.get?e:{enumerable:!0,get:function(){return o[t]}})}),n)}function Wt(t,e){return t===e||t!=t&&e!=e}var Gt=Wt;function Vt(t,e){for(var o=t.length;o--;)if(Gt(t[o][0],e))return o;return-1}var Kt=Vt,Yt=Array.prototype.splice;var Jt=Vt;var $t=Vt;var Xt=Vt;function Qt(t){var e=this.__data__;return!((t=Kt(e,t))<0||(t==e.length-1?e.pop():Yt.call(e,t,1),--this.size,0))}function te(t){var e=this.__data__;return(t=Jt(e,t))<0?void 0:e[t][1]}function ee(t){return-1<$t(this.__data__,t)}function oe(t,e){var o=this.__data__,n=Xt(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this}function ne(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=Qt,ne.prototype.get=te,ne.prototype.has=ee,ne.prototype.set=oe;var re=ne,ie=re;function se(){this.__data__=new ie,this.size=0}function ae(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}function ce(t){return this.__data__.get(t)}function le(t){return this.__data__.has(t)}var qt="object"==typeof qt&&qt&&qt.Object===Object&&qt,e="object"==typeof self&&self&&self.Object===Object&&self,e=qt||e||Function("return this")(),ue=e.Symbol,o=Object.prototype,pe=o.hasOwnProperty,he=o.toString,de=ue?ue.toStringTag:void 0;var fe=Object.prototype.toString;var ye=function(t){var e=pe.call(t,de),o=t[de];try{var n=!(t[de]=void 0)}catch(t){}var r=he.call(t);return n&&(e?t[de]=o:delete t[de]),r},me=function(t){return fe.call(t)},ge=ue?ue.toStringTag:void 0;function ve(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(ge&&ge in Object(t)?ye:me)(t)}function we(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var _e=ve,be=we;function xe(t){return!!be(t)&&("[object Function]"==(t=_e(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var o=e["__core-js_shared__"],Se=(o=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var Oe=Function.prototype.toString;function Ce(t){if(null!=t){try{return Oe.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Pe=xe,Le=function(t){return!!Se&&Se in t},ke=we,Me=Ce,Ae=/^\[object .+?Constructor\]$/,o=Function.prototype,Ee=Object.prototype,o=o.toString,Ee=Ee.hasOwnProperty,je=RegExp("^"+o.call(Ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ie=function(t){return!(!ke(t)||Le(t))&&(Pe(t)?je:Ae).test(Me(t))},Te=function(t,e){return null==t?void 0:t[e]};function ze(t,e){return t=Te(t,e),Ie(t)?t:void 0}var o=ze(e,"Map"),Ee=ze(Object,"create"),De=Ee;var Re=Ee,Be=Object.prototype.hasOwnProperty;var Fe=Ee,Ne=Object.prototype.hasOwnProperty;var Ze=Ee;function qe(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function He(t){var e,o=this.__data__;return Re?"__lodash_hash_undefined__"===(e=o[t])?void 0:e:Be.call(o,t)?o[t]:void 0}function Ue(t){var e=this.__data__;return Fe?void 0!==e[t]:Ne.call(e,t)}function We(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=Ze&&void 0===e?"__lodash_hash_undefined__":e,this}function Ge(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}Ge.prototype.clear=function(){this.__data__=De?De(null):{},this.size=0},Ge.prototype.delete=qe,Ge.prototype.get=He,Ge.prototype.has=Ue,Ge.prototype.set=We;var Ve=Ge,Ke=re,Ye=o;var Je=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};function $e(t,e){return t=t.__data__,Je(e)?t["string"==typeof e?"string":"hash"]:t.map}var Xe=$e;var Qe=$e;var to=$e;var eo=$e;function oo(t){return t=Xe(this,t).delete(t),this.size-=t?1:0,t}function no(t){return Qe(this,t).get(t)}function ro(t){return to(this,t).has(t)}function io(t,e){var o=eo(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this}function so(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}so.prototype.clear=function(){this.size=0,this.__data__={hash:new Ve,map:new(Ye||Ke),string:new Ve}},so.prototype.delete=oo,so.prototype.get=no,so.prototype.has=ro,so.prototype.set=io;var Ee=so,ao=re,co=o,lo=Ee;function uo(t,e){var o=this.__data__;if(o instanceof ao){var n=o.__data__;if(!co||n.length<199)return n.push([t,e]),this.size=++o.size,this;o=this.__data__=new lo(n)}return o.set(t,e),this.size=o.size,this}var po=re,re=ae,ho=ce,fo=le;function yo(t){t=this.__data__=new po(t);this.size=t.size}yo.prototype.clear=se,yo.prototype.delete=re,yo.prototype.get=ho,yo.prototype.has=fo,yo.prototype.set=uo;re=yo;function mo(t,e){for(var o=-1,n=null==t?0:t.length;++o<n&&!1!==e(t[o],o,t););return t}var go=ze,ho=function(){try{var t=go(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),vo=ho;function wo(t,e,o){"__proto__"==e&&vo?vo(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}var _o=wo,bo=Wt,xo=Object.prototype.hasOwnProperty;function So(t,e,o){var n=t[e];xo.call(t,e)&&bo(n,o)&&(void 0!==o||e in t)||_o(t,e,o)}var Oo=So,Co=wo;function Po(t,e,o,n){for(var r=!o,i=(o=o||{},-1),s=e.length;++i<s;){var a=e[i],c=n?n(o[a],t[a],a,o,t):void 0;void 0===c&&(c=t[a]),(r?Co:Oo)(o,a,c)}return o}function Lo(t,e){for(var o=-1,n=Array(t);++o<t;)n[o]=e(o);return n}function ko(t){return null!=t&&"object"==typeof t}var Mo=ve,Ao=ko;var fo=function(t){return Ao(t)&&"[object Arguments]"==Mo(t)},Eo=ko,jo=Object.prototype,Io=jo.hasOwnProperty,To=jo.propertyIsEnumerable,jo=fo(function(){return arguments}())?fo:function(t){return Eo(t)&&Io.call(t,"callee")&&!To.call(t,"callee")},fo=Array.isArray,zo={exports:{}};i=(i=(r=zo).exports)&&!i.nodeType&&i,Do=(Do=i&&r&&!r.nodeType&&r)&&Do.exports===i?e.Buffer:void 0,i=Do?Do.isBuffer:void 0,r.exports=i||function(){return!1};var Do=zo.exports,Ro=/^(?:0|[1-9]\d*)$/;function Bo(t,e){var o=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==o||"symbol"!=o&&Ro.test(t))&&-1<t&&t%1==0&&t<e}function Fo(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}var No=ve,Zo=Fo,qo=ko,n={};n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1;function Ho(t){return qo(t)&&Zo(t.length)&&!!n[No(t)]}function Uo(e){return function(t){return e(t)}}var Wo,Go,r={exports:{}},qt=(zo=(zo=(i=r).exports)&&!zo.nodeType&&zo,Wo=zo&&i&&!i.nodeType&&i,Go=Wo&&Wo.exports===zo&&qt.process,zo=function(){try{var t=Wo&&Wo.require&&Wo.require("util").types;return t?t:Go&&Go.binding&&Go.binding("util")}catch(t){}}(),i.exports=zo,r.exports),i=Ho,zo=Uo,r=qt&&qt.isTypedArray,zo=r?zo(r):i,Vo=Lo,Ko=jo,Yo=fo,Jo=Do,$o=Bo,Xo=zo,Qo=Object.prototype.hasOwnProperty;function tn(t,e){var o,n=Yo(t),r=!n&&Ko(t),i=!n&&!r&&Jo(t),s=!n&&!r&&!i&&Xo(t),a=n||r||i||s,c=a?Vo(t.length,String):[],l=c.length;for(o in t)!e&&!Qo.call(t,o)||a&&("length"==o||i&&("offset"==o||"parent"==o)||s&&("buffer"==o||"byteLength"==o||"byteOffset"==o)||$o(o,l))||c.push(o);return c}var en=Object.prototype;function on(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||en)}function nn(e,o){return function(t){return e(o(t))}}var r=nn(Object.keys,Object),rn=on,sn=r,an=Object.prototype.hasOwnProperty;var cn=xe,ln=Fo;function un(t){return null!=t&&ln(t.length)&&!cn(t)}var pn=tn,hn=function(t){if(!rn(t))return sn(t);var e,o=[];for(e in Object(t))an.call(t,e)&&"constructor"!=e&&o.push(e);return o},dn=un;function fn(t){return(dn(t)?pn:hn)(t)}var yn=Po,mn=fn;function gn(t,e){return t&&yn(e,mn(e),t)}var vn=we,wn=on,_n=function(t){var e=[];if(null!=t)for(var o in Object(t))e.push(o);return e},bn=Object.prototype.hasOwnProperty;var xn=tn,Sn=function(t){if(!vn(t))return _n(t);var e,o=wn(t),n=[];for(e in t)("constructor"!=e||!o&&bn.call(t,e))&&n.push(e);return n},On=un;function Cn(t){return On(t)?xn(t,!0):Sn(t)}var Pn=Po,Ln=Cn;function kn(t,e){return t&&Pn(e,Ln(e),t)}var Mn,i={exports:{}},An=(An=(An=(r=i).exports)&&!An.nodeType&&An,s=(s=An&&r&&!r.nodeType&&r)&&s.exports===An?e.Buffer:void 0,Mn=s?s.allocUnsafe:void 0,r.exports=function(t,e){return e?t.slice():(e=t.length,e=Mn?Mn(e):new t.constructor(e),t.copy(e),e)},i.exports);function En(t,e){var o=-1,n=t.length;for(e=e||Array(n);++o<n;)e[o]=t[o];return e}function jn(){return[]}var In=function(t,e){for(var o=-1,n=null==t?0:t.length,r=0,i=[];++o<n;){var s=t[o];e(s,o,t)&&(i[r++]=s)}return i},Tn=Object.prototype.propertyIsEnumerable,zn=Object.getOwnPropertySymbols,s=zn?function(e){return null==e?[]:(e=Object(e),In(zn(e),function(t){return Tn.call(e,t)}))}:jn,Dn=Po,Rn=s;function Bn(t,e){return Dn(t,Rn(t),e)}function Fn(t,e){for(var o=-1,n=e.length,r=t.length;++o<n;)t[r+o]=e[o];return t}var r=nn(Object.getPrototypeOf,Object),Nn=Fn,Zn=r,qn=s,i=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Nn(e,qn(t)),t=Zn(t);return e}:jn,Hn=Po,Un=i;function Wn(t,e){return Hn(t,Un(t),e)}var Gn=Fn,Vn=fo;function Kn(t,e,o){return e=e(t),Vn(t)?e:Gn(e,o(t))}var Yn=Kn,Jn=s,$n=fn;function Xn(t){return Yn(t,$n,Jn)}var Qn=Kn,tr=i,er=Cn;function or(t){return Qn(t,er,tr)}var s=ze(e,"DataView"),i=o,o=ze(e,"Promise"),nr=ze(e,"Set"),rr=ze(e,"WeakMap"),ir=ve,sr=Ce,ar="[object Map]",cr="[object Promise]",lr="[object Set]",ur="[object WeakMap]",pr="[object DataView]",hr=sr(s),dr=sr(i),fr=sr(o),yr=sr(nr),mr=sr(rr),a=ir,s=a=s&&a(new s(new ArrayBuffer(1)))!=pr||i&&a(new i)!=ar||o&&a(o.resolve())!=cr||nr&&a(new nr)!=lr||rr&&a(new rr)!=ur?function(t){var e=ir(t),t="[object Object]"==e?t.constructor:void 0,t=t?sr(t):"";if(t)switch(t){case hr:return pr;case dr:return ar;case fr:return cr;case yr:return lr;case mr:return ur}return e}:a,gr=Object.prototype.hasOwnProperty;function vr(t){var e=t.length,o=new t.constructor(e);return e&&"string"==typeof t[0]&&gr.call(t,"index")&&(o.index=t.index,o.input=t.input),o}var i=e.Uint8Array,wr=i;function _r(t){var e=new t.constructor(t.byteLength);return new wr(e).set(new wr(t)),e}var br=_r;var xr=/\w*$/;var o=ue?ue.prototype:void 0,Sr=o?o.valueOf:void 0;var Or=_r;function Cr(t,e){return e=e?Or(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var Pr=_r,Lr=function(t,e){return e=e?br(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)},kr=function(t){var e=new t.constructor(t.source,xr.exec(t));return e.lastIndex=t.lastIndex,e},Mr=function(t){return Sr?Object(Sr.call(t)):{}},Ar=Cr;function Er(t,e,o){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Pr(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return Lr(t,o);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ar(t,o);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return kr(t);case"[object Set]":return new n;case"[object Symbol]":return Mr(t)}}var jr=we,Ir=Object.create;function Tr(){}var zr=function(t){if(!jr(t))return{};if(Ir)return Ir(t);Tr.prototype=t;t=new Tr;return Tr.prototype=void 0,t},Dr=r,Rr=on;function Br(t){return"function"!=typeof t.constructor||Rr(t)?{}:zr(Dr(t))}var Fr=s,Nr=ko;function Zr(t){return Nr(t)&&"[object Map]"==Fr(t)}var nr=Uo,rr=qt&&qt.isMap,a=rr?nr(rr):Zr,qr=s,Hr=ko;function Ur(t){return Hr(t)&&"[object Set]"==qr(t)}var e=Uo,o=qt&&qt.isSet,nr=o?e(o):Ur,Wr=re,Gr=mo,Vr=So,Kr=gn,Yr=kn,Jr=An,$r=En,Xr=Bn,Qr=Wn,ti=Xn,ei=or,oi=s,ni=vr,ri=Er,ii=Br,si=fo,ai=Do,ci=a,li=we,ui=nr,pi=fn,hi=Cn,di="[object Arguments]",fi="[object Function]",yi="[object Object]",d={};d[di]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object DataView]"]=d["[object Boolean]"]=d["[object Date]"]=d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d["[object Map]"]=d["[object Number]"]=d[yi]=d["[object RegExp]"]=d["[object Set]"]=d["[object String]"]=d["[object Symbol]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d["[object Error]"]=d[fi]=d["[object WeakMap]"]=!1;function mi(o,n,r,t,e,i){var s,a=1&n,c=2&n,l=4&n;if(void 0===(s=r?e?r(o,t,e,i):r(o):s)){if(!li(o))return o;if(t=si(o)){if(s=ni(o),!a)return $r(o,s)}else{var u=oi(o),p=u==fi||"[object GeneratorFunction]"==u;if(ai(o))return Jr(o,a);if(u==yi||u==di||p&&!e){if(s=c||p?{}:ii(o),!a)return c?Qr(o,Yr(s,o)):Xr(o,Kr(s,o))}else{if(!d[u])return e?o:{};s=ri(o,u,a)}}if(p=(i=i||new Wr).get(o))return p;i.set(o,s),ui(o)?o.forEach(function(t){s.add(mi(t,n,r,t,o,i))}):ci(o)&&o.forEach(function(t,e){s.set(e,mi(t,n,r,e,o,i))});var h=t?void 0:(l?c?ei:ti:c?hi:pi)(o);Gr(h||o,function(t,e){h&&(t=o[e=t]),Vr(s,e,mi(t,n,r,e,o,i))})}return s}var gi=mi;var c=Ht(function(t){return gi(t,5)}),vi=wo,wi=Wt;function _i(t,e,o){(void 0===o||wi(t[e],o))&&(void 0!==o||e in t)||vi(t,e,o)}var rr=function(c){return function(t,e,o){for(var n=-1,r=Object(t),i=o(t),s=i.length;s--;){var a=i[c?s:++n];if(!1===e(r[a],a,r))break}return t}}(),bi=un,xi=ko;function Si(t){return xi(t)&&bi(t)}var Oi=ve,Ci=r,Pi=ko,qt=Function.prototype,e=Object.prototype,Li=qt.toString,ki=e.hasOwnProperty,Mi=Li.call(Object);function Ai(t){return!(!Pi(t)||"[object Object]"!=Oi(t))&&(null===(t=Ci(t))||"function"==typeof(t=ki.call(t,"constructor")&&t.constructor)&&t instanceof t&&Li.call(t)==Mi)}function Ei(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var ji=Po,Ii=Cn;var Ti=_i,zi=An,Di=Cr,Ri=En,Bi=Br,Fi=jo,Ni=fo,Zi=Si,qi=Do,Hi=xe,Ui=we,Wi=Ai,Gi=zo,Vi=Ei,Ki=function(t){return ji(t,Ii(t))};var Yi=re,Ji=_i,$i=rr,Xi=function(t,e,o,n,r,i,s){var a,c,l,u=Vi(t,o),p=Vi(e,o),h=s.get(p);h||((e=void 0===(h=i?i(u,p,o+"",t,e,s):void 0))&&(c=!(a=Ni(p))&&qi(p),l=!a&&!c&&Gi(p),h=p,a||c||l?h=Ni(u)?u:Zi(u)?Ri(u):c?zi(p,!(e=!1)):l?Di(p,!(e=!1)):[]:Wi(p)||Fi(p)?Fi(h=u)?h=Ki(u):Ui(u)&&!Hi(u)||(h=Bi(p)):e=!1),e&&(s.set(p,h),r(h,p,n,i,s),s.delete(p))),Ti(t,o,h)},Qi=we,ts=Cn,es=Ei;function os(t){return t}var ns=function(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)},rs=Math.max;var is=function(t){return function(){return t}},ss=ho,as=Date.now;var o=function(o){var n=0,r=0;return function(){var t=as(),e=16-(t-r);if(r=t,0<e){if(800<=++n)return arguments[0]}else n=0;return o.apply(void 0,arguments)}}(ss?function(t,e){return ss(t,"toString",{configurable:!0,enumerable:!1,value:is(e),writable:!0})}:os),cs=os,ls=function(i,s,a){return s=rs(void 0===s?i.length-1:s,0),function(){for(var t=arguments,e=-1,o=rs(t.length-s,0),n=Array(o);++e<o;)n[e]=t[s+e];for(var e=-1,r=Array(s+1);++e<s;)r[e]=t[e];return r[s]=a(n),ns(i,this,r)}},us=o;var ps=Wt,hs=un,ds=Bo,fs=we;var ys=function(t,e){return us(ls(t,e,cs),t+"")},ms=function(t,e,o){var n;return!!fs(o)&&!!("number"==(n=typeof e)?hs(o)&&ds(e,o.length):"string"==n&&e in o)&&ps(o[e],t)};var gs,vs,ws=function n(r,i,s,a,c){r!==i&&$i(i,function(t,e){var o;c=c||new Yi,Qi(t)?Xi(r,i,e,s,n,a,c):(o=a?a(es(r,e),t,e+"",r,i,c):void 0,Ji(r,e,o=void 0===o?t:o))},ts)},_s=Ht(function(a){return ys(function(t,e){var o=-1,n=e.length,r=1<n?e[n-1]:void 0,i=2<n?e[2]:void 0,r=3<a.length&&"function"==typeof r?(n--,r):void 0;for(i&&ms(e[0],e[1],i)&&(r=n<3?void 0:r,n=1),t=Object(t);++o<n;){var s=e[o];s&&a(t,s,o,r)}return t})}(function(t,e,o){ws(t,e,o)})),bs=((window&&window.__extends||(gs=function(t,e){return(gs=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}gs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(xs,vs=t),xs);function xs(){var t=null!==vs&&vs.apply(this,arguments)||this;return t.layout="icons",t.mapStyles=["road","grayscale_light","grayscale_dark","night","road_shaded_relief"],t.style=u.ControlStyle.light,t.autoSelectionMode=!0,t}var Ss,Os,a=window&&window.__extends||(Ss=function(t,e){return(Ss=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ss(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Cs=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},Ps=window&&window.__generator||function(n,r){var i,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(o){return function(t){var e=[o,t];if(i)throw new TypeError("Generator is already executing.");for(;c=l&&e[l=0]?0:c;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,s=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))c.label=e[1];else if(6===e[0]&&c.label<a[1])c.label=a[1],a=e;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(e)}}e=r.call(n,c)}catch(t){e=[6,t],s=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},Ls=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},nr=(a(l,Os=Ot),l.prototype.onAdd=function(t,e){var o=this,n=(this.map=t,this.buildContainer(t,this.options.style,"Map Style Control")),r=this.buildStyleOpsGrid(),i=(this.styleOpsGrid=r,this.buildCurrStyleBtn()),t=_("Select Style");return r.classList.add(e&&e.position||"top-right"),n.addEventListener("mouseover",function(){o.hasMouse=!0,n.classList.add(l.Css.inUse),r.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(){o.hasFocus=!0,n.classList.add(l.Css.inUse),r.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(n.classList.remove(l.Css.inUse),r.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.target===i&&Array.from(r.children).forEach(function(t){return t.removeAttribute("tabIndex")}),t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse)||(n.classList.remove(l.Css.inUse),r.classList.add("hidden-accessible-element"))}),r.addEventListener("keydown",function(t){27===t.keyCode&&(t.stopPropagation(),i.focus(),Array.from(r.children).forEach(function(t){return t.setAttribute("tabIndex","-1")}),n.classList.contains(l.Css.inUse))&&(n.classList.remove(l.Css.inUse),r.classList.add("hidden-accessible-element"))}),i.addEventListener("click",function(t){n.classList.contains(l.Css.inUse)?(n.classList.remove(l.Css.inUse),r.classList.add("hidden-accessible-element")):(n.classList.add(l.Css.inUse),r.classList.remove("hidden-accessible-element"),r.firstElementChild&&r.firstElementChild.focus())}),e&&l.InvertOrderPositions.includes(e.position)?(n.appendChild(r),n.appendChild(i),n.appendChild(t),b(t,i)):(n.appendChild(i),n.appendChild(t),b(t,i),n.appendChild(r)),n},l.prototype.onRemove=function(){Os.prototype.onRemove.call(this),this.styleOpsGrid=null,this.styleButtons.clear(),this.thumbnailCache.response.clear(),this.thumbnailCache.blob.clear(),this.thumbnailCache.assumedConfiguration=void 0,this.map.events.remove("stylechanged",this.onStyleChange),this.map.events.remove("mapconfigurationchanged",this.onMapConfigurationChange)},l.prototype.setSelectedStyle=function(o){var e,t,n=this;this.styleIcons.has(o)&&(e=this.currStyleImage,t=this.styleIcons.get(o),e.src!==t&&(e.src=t),Object.entries(this.styleButtons).forEach(function(t){var t=Ls(t,2),e=t[0];return t[1].setAttribute("aria-current",e===o?"true":"false")}),this.map.styles.definitions().then(function(t){t=n.mapToFriendlyStyleName(o,t);e.alt!==t&&(e.alt=t),e.parentElement.lastChild instanceof Text&&(e.parentElement.lastChild.textContent=t)}))},l.prototype.disableStyle=function(t){t=this.styleButtons[t];t&&t.setAttribute("disabled","true")},l.prototype.enableStyle=function(t){t=this.styleButtons[t];t&&t.removeAttribute("disabled")},l.prototype.buildSelectStyleBtn=function(o,t,e){var n=this,r=document.createElement("button"),i=this.mapToFriendlyStyleName(o,t),s=(r.setAttribute("aria-label",i),r.setAttribute("type","button"),new Image),t=(e.then(function(t){var e;return n.thumbnailCache.blob.has(t.url)?n.thumbnailCache.blob.get(t.url):(e=t.clone().blob(),n.thumbnailCache.blob.set(t.url,e),e)}).then(function(t){t=URL.createObjectURL(t);s.src=t,o===n.map.getStyle().style&&(n.currStyleImage.src=t,n.currStyleImage.alt=i,n.currStyleImage.parentElement.lastChild.nodeType==Node.TEXT_NODE?n.currStyleImage.parentElement.lastChild.textContent=i:n.currStyleImage.parentElement.appendChild(document.createTextNode(i))),n.styleIcons.set(o,t)}),s.setAttribute("aria-hidden","true"),r.appendChild(s),"icons"===this.options.layout?r.classList.add(l.Css.button):(r.classList.add(l.Css.listButton),r.classList.add(l.Css.expanded),r.appendChild(document.createTextNode(i))),r.addEventListener("click",function(){n.hasMouse=!1,n.hasFocus=!1;var t=n.styleButtons[o];t&&!t.hasAttribute("disabled")&&(n._invokeEvent("styleselected",o),n.options.autoSelectionMode&&n.map.setStyle({style:o}),Object.entries(n.styleButtons).forEach(function(t){var t=Ls(t,2),e=t[0];return t[1].setAttribute("aria-current",e===o?"true":"false")}))}),document.createElement("div"));return t.classList.add("selected-icon"),r.appendChild(t),r},l.prototype.buildCurrStyleBtn=function(){var t=document.createElement("button"),e=("icons"==this.options.layout?t.classList.add(l.Css.button):t.classList.add(l.Css.listButton),t.classList.add(l.Css.currentStyle),t.setAttribute("aria-label","Select Style"),t.setAttribute("tabindex","-1"),this.currStyleImage=new Image,t.appendChild(this.currStyleImage),document.createElement("div"));return e.classList.add("icon"),t.appendChild(e),t},l.prototype.buildStyleOpsGrid=function(){var t=this,e=document.createElement("div");return e.classList.add(l.Css.styleOptions),"icons"===this.options.layout?e.classList.add(this.options.layout):e.classList.add(l.Css.dropdown),e.setAttribute("aria-label","Style Options"),e.classList.add("hidden-accessible-element"),this.map.styles.definitions().then(function(e){return Cs(t,void 0,void 0,function(){return Ps(this,function(t){return this.onMapConfigurationChange(e),this.map.events.add("stylechanged",this.onStyleChange),[2]})})}),this.map.events.add("mapconfigurationchanged",this.onMapConfigurationChange),e},l.prototype.populateOpsGridFromDefinitions=function(r){var t,o,i=this;this.styleOpsGrid&&(t=r.configurations,(t=Array.isArray(this.options.mapStyles)?t.filter(function(t){return i.options.mapStyles.includes(t.name.split("_indoor")[0])}):t).forEach(function(t){var e,o={url:t.thumbnail},n=(t.thumbnail&&i.map.styles._transformStyleRequest(t.thumbnail,o),i.map.getServiceOptions()),n=(n.transformRequest&&_s(o,n.transformRequest(o.url,"Thumbnail")),i.thumbnailCache.response.has(o.url)?e=Promise.resolve(i.thumbnailCache.response.get(o.url)):(e=fetch(o.url,{headers:o.headers}),i.thumbnailCache.response.set(o.url,e)),i.buildSelectStyleBtn(t.name,r,e));i.styleOpsGrid.appendChild(n),i.styleButtons[t.name]=n,"icons"===i.options.layout&&(o=_(i.mapToFriendlyStyleName(t.name,r)),i.styleOpsGrid.appendChild(o),b(o,n))}),o=this.map.getStyle().style,Object.entries(this.styleButtons).forEach(function(t){var t=Ls(t,2),e=t[0];return t[1].setAttribute("aria-current",e===o?"true":"false")}))},l.InvertOrderPositions=[u.ControlPosition.TopRight,u.ControlPosition.BottomRight],l.Css={button:"azure-maps-control-button",listButton:"azure-maps-control-list-button",expanded:"expanded",currentStyle:"curr-style",inUse:"in-use",styleOptions:"style-options",dropdown:"azure-maps-control-dropdown"},l);function l(t){var e=Os.call(this)||this;return e.styleOpsGrid=null,e.hasMouse=!1,e.hasFocus=!1,e.styleButtons=new wt,e.styleIcons=new wt,e.thumbnailCache={assumedConfiguration:void 0,response:new wt,blob:new wt},e.onStyleChange=function(){var t;e.options.autoSelectionMode&&(t=e.map.getStyle().style,e.setSelectedStyle(t))},e.onMapConfigurationChange=function(t){!e.styleOpsGrid||0<e.styleOpsGrid.children.length&&e.thumbnailCache.assumedConfiguration===t||(e.thumbnailCache.assumedConfiguration=t,Array.from(e.styleOpsGrid.children).forEach(function(t){return t.remove()}),e.styleButtons.clear(),e.populateOpsGridFromDefinitions(t))},e.mapToFriendlyStyleName=function(e,t){t=t.configurations.find(function(t){return t.name===e});return(null==t?void 0:t.displayName)||e},e.options=(new bs).merge(c(t)),e}(window&&window.__extends||(ks=function(t,e){return(ks=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ks(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Es,Ms=t);var ks,Ms,As=Es;function Es(){var t=null!==Ms&&Ms.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}(window&&window.__extends||(js=function(t,e){return(js=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}js(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(zs,Is=As);var js,Is,Ts=zs;function zs(){var t=null!==Is&&Is.apply(this,arguments)||this;return t.isActive=!1,t.style=u.ControlStyle.light,t}(window&&window.__extends||(Ds=function(t,e){return(Ds=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ds(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Fs,Rs=Ot),Object.defineProperty(Fs.prototype,"isActive",{get:function(){var t;return!!this.map&&("none"!==(t=this.map.getTraffic()).flow||t.incidents)},set:function(t){this.map&&this.map.setTraffic({flow:t?this.options.flow:"none",incidents:!!t&&this.options.incidents})},enumerable:!1,configurable:!0}),Fs.prototype.onAdd=function(t){(this.map=t).getTraffic(),void 0!==this.initIsActive&&(this.isActive=this.initIsActive),this.container=this.buildContainer(t,this.style,"Traffic Control"),this.container.style.flexDirection="column";var t=this.constructTrafficButton(t),e=(this.container.appendChild(t),_("Toggle Traffic Display"));return this.container.appendChild(e),b(e,t),this.container},Fs.prototype.onRemove=function(){Rs.prototype.onRemove.call(this),this.map=null},Fs.prototype.getOptions=function(){return(new Ts).merge({isActive:this.isActive,flow:this.options.flow,incidents:this.options.incidents,style:this.style})},Fs.prototype.updateButtonState=function(){this.trafficButton&&(this.isActive?(this.container.classList.add("in-use"),this.trafficButton.setAttribute("aria-description","Traffic is displayed")):(this.container.classList.remove("in-use"),this.trafficButton.removeAttribute("aria-description")),this.trafficButton.setAttribute("aria-pressed",this.isActive?"true":"false"))},Fs.prototype.constructTrafficButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("traffic"),o.setAttribute("aria-label","Toggle Traffic Display"),o.setAttribute("alt","Toggle Traffic Display"),o.setAttribute("type","button"),this.trafficButton=o,this.updateButtonState(),o.addEventListener("click",function(){e.isActive=!e.isActive}),o};var Ds,Rs,Bs=Fs;function Fs(t){var e,o=this;return(o=Rs.call(this)||this).hasMouse=!1,o.hasFocus=!1,o.options=(new As).merge({flow:"relative",incidents:!0}),o.style=u.ControlStyle.light,o.container=null,o.trafficButton=null,o.map=null,t&&(o.initIsActive=null!=(e=t.isActive)&&e,o.options.flow=t.flow||"relative",o.options.incidents=null==(e=t.incidents)||e,o.style=t.style||u.ControlStyle.light),o}var Ns,Zs,r=window&&window.__extends||(Ns=function(t,e){return(Ns=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ns(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),qs=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qt=(r(Hs,Zs=Ot),Hs.prototype.onAdd=function(t){this.map=t;var e=this.buildContainer(t,u.ControlStyle.auto,"Traffic Legend"),t=this.buildTrafficLegendDiv(t);return e.setAttribute("role","definition"),e.appendChild(t),e},Hs.prototype.onRemove=function(){Zs.prototype.onRemove.call(this),this.syncHiddenState&&(this.map.events.remove("styledata",this.syncHiddenState),this.syncHiddenState=null),this.map=null},Hs.prototype.buildTrafficLegendDiv=function(e){var o,t,n,r,i=document.createElement("div"),s=(i.classList.add("traffic-legend","hidden"),i.setAttribute("alt","Traffic Legend"),document.createElement("table")),a=document.createElement("tr"),c=document.createElement("td"),l=(c.setAttribute("alt","Traffic"),c.appendChild(document.createTextNode("Traffic")),_("Traffic")),u=(c.classList.add("traffic-legend-title"),c.colSpan=6,a.appendChild(c),a.appendChild(l),b(l,c),s.appendChild(a),document.createElement("tr"));try{for(var p=qs(this.table),h=p.next();!h.done;h=p.next()){var d=h.value,f=document.createElement("td");if("Fast"===d||"Slow"===d)f.setAttribute("alt",d),f.appendChild(document.createTextNode(d)),f.classList.add("traffic-legend-text");else{f.classList.add("traffic-legend-colors"),f.setAttribute("aria-label","Traffic Legend"),f.setAttribute("role","img");try{n=void 0;for(var y=qs(d),m=y.next();!m.done;m=y.next()){var g=m.value,v=document.createElement("div");v.classList.add(g),f.appendChild(v)}}catch(t){n={error:t}}finally{try{m&&!m.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}}u.appendChild(f);var w=_(d instanceof Array?"Traffic Legend":d);u.appendChild(w),b(w,f)}}catch(t){o={error:t}}finally{try{h&&!h.done&&(t=p.return)&&t.call(p)}finally{if(o)throw o.error}}return s.appendChild(u),i.appendChild(s),this.syncHiddenState=function(t){"style"===t.dataType&&((t=e.getTraffic()).flow&&"none"!==t.flow?i.classList.remove("hidden"):i.classList.add("hidden"))},this.syncHiddenState({dataType:"style"}),e.events.add("styledata",this.syncHiddenState),i},Hs);function Hs(){var t=Zs.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t.map=null,t.syncHiddenState=null,t}function Us(t){return this.__data__.has(t)}var Ws=Ee;function Gs(t){var e=-1,o=null==t?0:t.length;for(this.__data__=new Ws;++e<o;)this.add(t[e])}Gs.prototype.add=Gs.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Gs.prototype.has=Us;var Vs=Gs,Ks=function(t,e){for(var o=-1,n=null==t?0:t.length;++o<n;)if(e(t[o],o,t))return!0;return!1},Ys=function(t,e){return t.has(e)};function Js(t,e,o,n,r,i){var s=1&o,a=t.length,c=e.length;if(a!=c&&!(s&&a<c))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var u=-1,p=!0,h=2&o?new Vs:void 0;for(i.set(t,e),i.set(e,t);++u<a;){var d,f=t[u],y=e[u];if(void 0!==(d=n?s?n(y,f,u,e,t,i):n(f,y,u,t,e,i):d)){if(d)continue;p=!1;break}if(h){if(!Ks(e,function(t,e){if(!Ys(h,e)&&(f===t||r(f,t,o,n,i)))return h.push(e)})){p=!1;break}}else if(f!==y&&!r(f,y,o,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p}function $s(t){var o=-1,n=Array(t.size);return t.forEach(function(t,e){n[++o]=[e,t]}),n}function Xs(t){var e=-1,o=Array(t.size);return t.forEach(function(t){o[++e]=t}),o}var Qs=i,ta=Wt,ea=Js,e=ue?ue.prototype:void 0,oa=e?e.valueOf:void 0;var na=Xn,ra=Object.prototype.hasOwnProperty;var ia=re,sa=Js,aa=function(t,e,o,n,r,i,s){switch(o){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return t.byteLength==e.byteLength&&i(new Qs(t),new Qs(e))?!0:!1;case"[object Boolean]":case"[object Date]":case"[object Number]":return ta(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=$s;case"[object Set]":a=a||Xs;if(t.size!=e.size&&!(1&n))return!1;var c=s.get(t);if(c)return c==e;n|=2,s.set(t,e);c=ea(a(t),a(e),n,r,i,s);return s.delete(t),c;case"[object Symbol]":if(oa)return oa.call(t)==oa.call(e)}return!1},ca=function(t,e,o,n,r,i){var s=1&o,a=na(t),c=a.length;if(c!=na(e).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in e:ra.call(e,u)))return!1}var p=i.get(t),h=i.get(e);if(p&&h)return p==e&&h==t;for(var d=!0,f=(i.set(t,e),i.set(e,t),s);++l<c;){var y,m=t[u=a[l]],g=e[u];if(!(void 0===(y=n?s?n(g,m,u,e,t,i):n(m,g,u,t,e,i):y)?m===g||r(m,g,o,n,i):y)){d=!1;break}f=f||"constructor"==u}return d&&!f&&(p=t.constructor)!=(h=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof p&&p instanceof p&&"function"==typeof h&&h instanceof h)&&(d=!1),i.delete(t),i.delete(e),d},la=s,ua=fo,pa=Do,ha=zo,da="[object Arguments]",fa="[object Array]",ya="[object Object]",ma=Object.prototype.hasOwnProperty;var ga=function(t,e,o,n,r,i){var s=ua(t),a=ua(e),c=s?fa:la(t),a=a?fa:la(e),l=(c=c==da?ya:c)==ya,u=(a=a==da?ya:a)==ya;if((a=c==a)&&pa(t)){if(!pa(e))return!1;l=!(s=!0)}if(a&&!l)return i=i||new ia,s||ha(t)?sa(t,e,o,n,r,i):aa(t,e,c,o,n,r,i);if(!(1&o)){s=l&&ma.call(t,"__wrapped__"),c=u&&ma.call(e,"__wrapped__");if(s||c)return r(s?t.value():t,c?e.value():e,o,n,i=i||new ia)}return a&&(i=i||new ia,ca(t,e,o,n,r,i))},va=ko;var wa=function t(e,o,n,r,i){return e===o||(null==e||null==o||!va(e)&&!va(o)?e!=e&&o!=o:ga(e,o,n,r,t,i))};var _a=Ht(function(t,e){return wa(t,e)});for(var ba,xa,An={exports:{}},jo=Ut(Object.freeze({__proto__:null,default:{}})),rr=An,Sa=0,Oa=[],Ca=0;Ca<256;Ca++)Oa[Ca]=(Ca+256).toString(16).substr(1);function Pa(){t=16,(!ba||La.BUFFER_SIZE<Sa+t)&&(Sa=0,ba=La.randomBytes(La.BUFFER_SIZE));var t=ba.slice(Sa,Sa+=t);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}function La(){var t=Pa();return Oa[t[0]]+Oa[t[1]]+Oa[t[2]]+Oa[t[3]]+"-"+Oa[t[4]]+Oa[t[5]]+"-"+Oa[t[6]]+Oa[t[7]]+"-"+Oa[t[8]]+Oa[t[9]]+"-"+Oa[t[10]]+Oa[t[11]]+Oa[t[12]]+Oa[t[13]]+Oa[t[14]]+Oa[t[15]]}La.BUFFER_SIZE=4096,La.bin=Pa,La.clearBuffer=function(){ba=null,Sa=0},La.test=function(t){return"string"==typeof t&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)},"undefined"!=typeof crypto?xa=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(xa=window.msCrypto),xa=xa||jo,(rr.exports=La).randomBytes=function(){if(xa){if(xa.randomBytes)return xa.randomBytes;if(xa.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){t=new Uint8Array(t);return xa.getRandomValues(t),Array.from(t)}:function(t){t=new Uint8Array(t);return xa.getRandomValues(t),t}}return function(t){for(var e=[],o=0;o<t;o++)e.push(Math.floor(256*Math.random()));return e}}();var ka=Ht(An.exports),Ma=(Aa.TYPE="Feature",Aa);function Aa(t,e,o,n){this.type="Feature",this.type=Aa.TYPE,this.properties=e||{},this.id=o,this.geometry=t,this.bbox=n}var Ea,ja,ho=window&&window.__extends||(Ea=function(t,e){return(Ea=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ea(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ia=(ja=Array,ho(p,ja),p.fromData=function(o){var n=NaN,r=NaN,i=new Set(["y"]),s=new Set(["x"]);return Object.keys(o).forEach(function(t){var e=t.toLowerCase();isNaN(n)&&i.has(e)&&"number"==typeof o[t]?n=o[t]:isNaN(r)&&s.has(e)&&"number"==typeof o[t]&&(r=o[t])}),isNaN(n)||isNaN(r)?null:new p(n,r)},p.getX=function(t){return 0<t.length?t[0]:NaN},p.getY=function(t){return 1<t.length?t[1]:NaN},p.getDestination=function(t,e,o){return new p(p.getX(t)+o*Math.cos((e+270)*Math.PI/180),p.getY(t)+o*Math.sin((e+270)*Math.PI/180))},p.getDistance=function(t,e){var o=p.getX(t)-p.getX(e),t=p.getY(t)-p.getY(e);return Math.sqrt(o*o+t*t)},p.getHeading=function(t,e){var o=p.getX(e)-p.getX(t),t=p.getY(t)-p.getY(e);return 180*(2.5*Math.PI-Math.atan2(t,o))/Math.PI%360},p);function p(t,e){return ja.call(this,t,e)||this}za.TYPE="Point";var Ta=za;function za(t){this.type="Point",this.type=za.TYPE,this.coordinates=t}var h,f,y,m,g,Da=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Ra=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ba=6378137,Fa=Math.PI/180,Na=180/Math.PI,Za=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],qa=85.0511;function Ha(t){return t*Fa}function Ua(t){return t*Na}function Wa(t,e,o){return Math.min(Math.max(t,e),o)}function Ga(t,e){var o=Ha(e[1]-t[1]),n=Ha(e[0]-t[0]),o=Math.pow(Math.sin(o/2),2)+Math.cos(Ha(t[1]))*Math.cos(Ha(e[1]))*Math.pow(Math.sin(n/2),2),t=2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o));return Math.round(Ba*t*100)/100}function Va(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return f.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return f.kilometers;case"miles":case"mile":case"mi":return f.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return f.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return f.yards;default:return f.meters}return f.meters}function Ka(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return g.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return g.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return g.knotsPerSecond;case"standardgravity":case"g":return g.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return g.feetPerSecondSquared;case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return g.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return g.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return g.kilometersPerHourSecond;default:return g.metersPerSecondSquared}return g.metersPerSecondSquared}function Ya(t){if(t)switch(t){case"acres":case"ac":return h.acres;case"hectares":case"ha":return h.hectares;case"squareFeet":case"ft^2":case"ft2":return h.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return h.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return h.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return h.squareMiles;default:return h.squareMeters}return h.squareMeters}function Ja(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return m.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return m.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return m.knots;case"mach":case"m":return m.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return m.kilometersPerHour;default:return m.metersPerSecond}return m.metersPerSecond}function $a(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return y.ms;case"minutes":case"minute":case"mins":case"min":return y.minutes;case"hours":case"hour":case"hr":case"h":return y.hours;case"days":case"day":case"d":return y.days;default:return y.seconds}return y.seconds}function Xa(t){var e=0;if(t&&0<t.length)for(var e=Math.abs(Qa(t[0])),o=1,n=t.length;o<n;o++)e-=Math.abs(Qa(t[o]));return e}function Qa(t){var e=0;if(3<=t.length){for(var o=void 0,n=void 0,r=0,i=t.length;r<i;r++)e+=(Ha(t[r===i-2?(o=i-2,n=i-1,0):r===i-1?(o=i-1,n=0,1):(n=(o=r)+1,r+2)][0])-Ha(t[o][0]))*Math.sin(Ha(t[n][1]));e=e*Ba*Ba/2}return e}function tc(t,e,o){return(t[0]-o[0])*(e[1]-o[1])-(t[1]-o[1])*(e[0]-o[0])}function ec(t,e,o){if(2<=o.length){for(var n,r,i,s=1/0,a=null,c=gc(o,22),l=0,u=c.length-1;l<u;l++)r=function(t,e,o){if(e[0]===o[0]&&e[1]===o[1])return e;var n=t[0]-e[0],t=t[1]-e[1],r=o[0]-e[0],i=o[1]-e[1],n=(r*n+i*t)/(r*r+i*i);return n<0?e:1<n?o:[e[0]+r*n,e[1]+i*n]}(e,c[l],c[l+1]),(n=Ia.getDistance(e,r))<s&&(s=n,a=r);if(a)return i=mc([a],22)[0],new Ma(new Ta(i),{distance:ic(t,i)})}else if(1===o.length)return new Ma(new Ta(o[0]),{distance:ic(t,o[0])});return null}function oc(t,e){var o;return!isNaN(t)&&"number"==typeof e&&0<=e&&(o=void 0,o=e<Za.length?Za[e]:Math.pow(10,e),t=Math.round(t*o)/o),t}function nc(t,e,o,n){switch(Va(e)){case f.meters:t/=1e3;break;case f.feet:t/=3280.8399;break;case f.miles:t/=.62137119;break;case f.yards:t/=1093.6133;break;case f.nauticalMiles:t/=.5399568;break;case f.kilometers:}switch(Va(o)){case f.meters:t*=1e3;break;case f.feet:t*=3280.8399;break;case f.miles:t*=.62137119;break;case f.yards:t*=1093.6133;break;case f.nauticalMiles:t*=.5399568;break;case f.kilometers:}return"number"==typeof n&&0<=n&&(e=Math.pow(10,n),t=Math.round(t*e)/e),t}function rc(t,e,o,n){n=n||"meters",t=Lc(t);var n=sc(n),r=Ha(t[1]),t=Ha(t[0]),e=e*Fa,o=o/n,n=Math.asin(Math.sin(r)*Math.cos(o)+Math.cos(r)*Math.sin(o)*Math.cos(e)),t=t+Math.atan2(Math.sin(e)*Math.sin(o)*Math.cos(r),Math.cos(o)-Math.sin(r)*Math.sin(n)),e=Wa(v(n*Na),-85,85);return[w(t*Na),e]}function ic(t,e,o){t=Ga(t=Lc(t),e=Lc(e));return"meters"===o?t:nc(t,"meters",o||"meters")}function sc(t){t=Va(t);return nc(Ba,f.meters,t)}function ac(t,e,o){for(var n=[],r=Ha(t[1]),i=Ha(t[0]),s=Ha(e[1]),a=Ha(e[0]),c=2*Math.asin(Math.sqrt(Math.pow(Math.sin((r-s)/2),2)+Math.cos(r)*Math.cos(s)*Math.pow(Math.sin((i-a)/2),2))),l=0;l<=o;l++){var u=l/o,p=Math.sin((1-u)*c)/Math.sin(c),u=Math.sin(u*c)/Math.sin(c),h=p*Math.cos(r)*Math.cos(i)+u*Math.cos(s)*Math.cos(a),d=p*Math.cos(r)*Math.sin(i)+u*Math.cos(s)*Math.sin(a),p=p*Math.sin(r)+u*Math.sin(s),u=Math.atan2(p,Math.sqrt(Math.pow(h,2)+Math.pow(d,2))),p=Math.atan2(d,h),u=Wa(u*Na,-85,85);n.push([p*=Na,u])}return n}function cc(t){return(Array.isArray(t)?t:t.coordinates).reduce(function(t,e){var o=0<t.length?t[t.length-1]:null;return o&&180<Math.abs(e[0]-o[0])?(o=o[0]<0?e[0]-360:e[0]+360,t.push([o,e[1]])):t.push(e),t},[])}function lc(t){for(var e,o,n,r,i,s=Array.isArray(t)?t:t.coordinates,a=[],c=[],l=0;l<s.length;l++)a.push(s[l]),l+1>=s.length||(e=(o=Da(s[l],2))[0],o=o[1],r=(i=Da(s[l+1],2))[0],i=i[1],180<Math.abs(r-e)&&(n=0<e?180:-180,r=Math.abs((0<e?r+360:r-360)-e),i=o+(i-o)*(Math.abs(n-e)/r),a.push([n,i]),c.push(a),a=[[-n,i]]));return c.push(a),c}function uc(t,e){var o,n;return t=Lc(t),e=Lc(e),t&&2<=t.length&&e&&2<=e.length?(n=Ha(t[1]),o=Ha(e[1]),e=Ha(e[0]-t[0]),t=Math.sin(e)*Math.cos(o),n=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(e),(Ua(Math.atan2(t,n))+360)%360):NaN}function pc(t,e){var o,n=0;Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var r=0,i=o.length-1;r<i;r++)n+=Ga(o[r],o[r+1]);return nc(n,"meters",e||"meters")}function hc(t,e,o){o=o||"meters";var n,r=0;if(Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates),2<=n.length){for(var i,s,a=n.length,c=1;c<a;c++){if(e<=r+(s=ic(n[c-1],n[c],o)))return i=uc(n[c-1],n[c]),rc(n[c-1],i,e-r,o);r+=s}return r<=e?n[a-1]:n[0]}return null}function dc(t,e,o,n,r){n=n||"meters",r=r||0,t=Lc(t);for(var i=[],s=360/o,a=0;a<=o;a++)i.push(rc(t,(a*s+r)%360,e,n));return i}function fc(t,e,o,n,r){return cc(dc(t,e,o,n,r))}function v(t){return 90<t?180<(t=(t+90)%360)?90-(t-180):t-90:t<-90?(t=(t-90)%360)<-180?-90-(t+180):t+90:t}function w(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function yc(t,e,o){if(0===o)return Object.assign({},t);e=Lc(e);for(var n,r,i=[],s=0,a=t.length;s<a;s++)n=ic(e,t[s]),r=uc(e,t[s]),i.push(rc(e,r+o,n));return i}function mc(t,e){for(var o,n,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)o=t[s][0]/r-.5,n=.5-t[s][1]/r,i.push([360*o,90-360*Math.atan(Math.exp(2*-n*Math.PI))/Math.PI]);return i}function gc(t,e){for(var o,n,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)n=Math.sin(t[s][1]*Math.PI/180),o=(t[s][0]+180)/360,n=.5-Math.log((1+n)/(1-n))/(4*Math.PI),i.push([Math.round(o*r),Math.round(n*r)]);return i}function vc(t,e,o,n){switch(Ka(e)){case g.kilometersPerHourSecond:t/=3.6;break;case g.milesPerHourSecond:t/=2.236936292054;break;case g.knotsPerSecond:t/=1.943844492441;break;case g.standardGravity:t/=.1019716212978;break;case g.kilometersPerSecondSquared:t/=.001;break;case g.milesPerSecondSquared:t/=.000621371192;break;case g.feetPerSecondSquared:t/=3.280839895012;break;case g.yardsPerSecondSquared:t/=1.093613298338;break;case g.metersPerSecondSquared:}switch(Ka(o)){case g.kilometersPerHourSecond:t*=3.6;break;case g.milesPerHourSecond:t*=2.236936292054;break;case g.knotsPerSecond:t*=1.943844492441;break;case g.standardGravity:t*=.1019716212978;break;case g.kilometersPerSecondSquared:t*=.001;break;case g.milesPerSecondSquared:t*=.000621371192;break;case g.feetPerSecondSquared:t*=3.280839895012;break;case g.yardsPerSecondSquared:t*=1.093613298338;break;case g.metersPerSecondSquared:}return oc(t,n)}function wc(t,e,o,n){switch(Ya(e)){case h.acres:t*=4046.8564224;break;case h.hectares:t*=1e4;break;case h.squareFeet:t*=.09290304;break;case h.squareKilometers:t*=1e6;break;case h.squareMiles:t*=259e4;break;case h.squareYards:t*=.83612736;break;case h.squareMeters:}switch(Ya(o)){case h.acres:t/=4046.8564224;break;case h.hectares:t/=1e4;break;case h.squareFeet:t/=.09290304;break;case h.squareKilometers:t/=1e6;break;case h.squareMiles:t/=259e4;break;case h.squareYards:t/=.83612736;break;case h.squareMeters:}return oc(t,n)}function _c(t,e,o,n){switch(Ja(e)){case m.feetPerSecond:t*=1.09728;break;case m.milesPerHour:t*=1.6093;break;case m.knots:t*=1.852;break;case m.metersPerSecond:t*=3.6;break;case m.mach:t*=1234.8;break;case m.kilometersPerHour:}switch(Ja(o)){case m.feetPerSecond:t/=1.09728;break;case m.milesPerHour:t/=1.6093;break;case m.knots:t/=1.852;break;case m.metersPerSecond:t/=3.6;break;case m.mach:t/=1234.8;break;case m.kilometersPerHour:}return oc(t,n)}function bc(t,e,o,n){switch($a(e)){case y.ms:t/=1e3;break;case y.hours:t*=3600;break;case y.minutes:t*=60;break;case y.days:t*=86400;break;case y.seconds:}switch($a(o)){case y.ms:t*=1e3;break;case y.hours:t/=3600;break;case y.minutes:t/=60;break;case y.days:t/=86400;break;case y.seconds:}return oc(t,n)}function xc(t,e,o,n,r,i,s,a){e=nc(e,r,f.meters),r=bc(o,i,y.seconds);return vc(2*(e-_c(t,n,m.metersPerSecond)*r)/(r*r),g.metersPerSecondSquared,s,a)}function Sc(t,e,o,n,r,i,s){t=_c(t,n,m.metersPerSecond);return vc((_c(e,n,m.metersPerSecond)-t)/bc(o,r,y.seconds),g.metersPerSecondSquared,i,s)}function Oc(t,e,o,n){t=Cc(t),e=Cc(e);return null!=t&&null!=e?bc(e.getTime()-t.getTime(),y.ms,o,n):NaN}function Cc(t){if("[object Date]"===Object.prototype.toString.call(t))return t;if("string"==typeof t){var e=Date.parse(t);if(!isNaN(e))return new Date(e);if(0<=t.indexOf("Date("))return e=(e=0)<(t=t.replace("/Date(","").replace(")/","")).indexOf("+")?parseInt(t.substr(0,t.indexOf("+")),10):0<t.indexOf("-")?parseInt(t.substr(0,t.indexOf("-")),10):parseInt(t,10),new Date(e)}else if("number"==typeof t)return new Date(t);return null}function Pc(t){var e=[],o=null,n=null;if(Array.isArray(t)&&0<t.length)if(Array.isArray(t[0])&&"number"==typeof t[0][0])e=t;else for(var r=t.length,i=0;i<r;i++)e=e.concat(Pc(t[i]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":e=t.coordinates;break;case"Polygon":o=t.coordinates;break;case"MultiPoint":e=t.coordinates;break;case"MultiLineString":o=t.coordinates;break;case"MultiPolygon":n=t.coordinates;break;case"Feature":var s=t,e=x._isCircle(s)?x._getCirclePositions(s):Pc(s.geometry);break;case"FeatureCollection":e=Pc(t.features);break;case"GeometryCollection":e=Pc(t.geometries)}else if(t instanceof x)return Pc(t.toJson());if(o)for(r=o.length,i=0;i<r;i++)e=e.concat(o[i]);else if(n)for(var a=n.length,i=0;i<a;i++)for(var c=n[i].length,l=0;l<c;l++)e=e.concat(n[i][l]);return e}function Lc(t){if(Array.isArray(t)&&"number"==typeof t[0])return t;if(t.type){if("Point"===t.type)return t.coordinates;if("Feature"===t.type&&"Point"===t.geometry.type)return t.geometry.coordinates}else if(t instanceof x&&"Point"===t.getType())return t.getCoordinates();return null}function kc(t,e,o){o=o||"meters";var n,r=0;if(Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates),2<=n.length){for(var i,s,a,c=n.length,l=1;l<c;l++){if(e<=r+(a=ic(n[l-1],n[l],o)))return i=uc(n[l-1],n[l]),s=rc(n[l-1],i,e-r,o),new Ma(new Ta(s),{heading:i});r+=a}return r<=e?new Ma(new Ta(n[c-1]),{heading:uc(n[c-2],n[c-1])}):new Ma(new Ta(n[0]),{heading:uc(n[0],n[1])})}return null}(o=h=h||{}).squareMeters="squareMeters",o.acres="acres",o.hectares="hectares",o.squareFeet="squareFeet",o.squareKilometers="squareKilometers",o.squareMiles="squareMiles",o.squareYards="squareYards",(a=f=f||{}).meters="meters",a.kilometers="kilometers",a.feet="feet",a.miles="miles",a.nauticalMiles="nauticalMiles",a.yards="yards",(r=y=y||{}).seconds="seconds",r.hours="hours",r.ms="ms",r.minutes="minutes",r.days="days",(Ee=m=m||{}).metersPerSecond="metersPerSecond",Ee.kilometersPerHour="kilometersPerHour",Ee.feetPerSecond="feetPerSecond",Ee.milesPerHour="milesPerHour",Ee.knots="knots",Ee.mach="mach",(i=g=g||{}).milesPerSecondSquared="milesPerSecondSquared",i.kilometersPerSecondSquared="kilometersPerSecondSquared",i.knotsPerSecond="knotsPerSecond",i.standardGravity="standardGravity",i.feetPerSecondSquared="feetPerSecondSquared",i.yardsPerSecondSquared="yardsPerSecondSquared",i.milesPerHourSecond="milesPerHourSecond",i.kilometersPerHourSecond="kilometersPerHourSecond",i.metersPerSecondSquared="metersPerSecondSquared";var Mc,Ac,ue=window&&window.__extends||(Mc=function(t,e){return(Mc=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Mc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ec=(Ac=Array,ue(jc,Ac),jc.fromPosition=function(t){return 2===t.length?new jc(t[0],t[1]):2<t.length?new jc(t[0],t[1],t[2]):null},jc.areEqual=function(t,e,o){var n,r;return void 0===o&&(o=6),!!(t&&2<=t.length&&e&&2<=e.length)&&(o=Math.pow(10,o),r=v(t[1]),n=v(e[1]),t=w(t[0]),e=w(e[0]),0==Math.round((r-n)*o)/o)&&(0==(r=Math.round((t-e)*o)/o)||360==r)},jc.fromLatLng=function(r,t,e){var i,s,a,c,l,u,o=[];return"number"==typeof r?(o.push(r),"number"==typeof t&&o.push(t),"number"==typeof e&&o.push(e)):Array.isArray(r)?2<=r.length&&"number"==typeof r[0]&&"number"==typeof r[1]&&(3<=r.length&&"number"==typeof r[2]?o.push(r[0],r[1],r[2]):o.push(r[0],r[1])):"object"==typeof r&&(i=["lat","latitude","y"],s=["lng","longitude","lon","x"],a=["elv","elevation","alt","altitude","z"],u=l=c=NaN,Object.keys(r).forEach(function(t,e,o){var n=t.toLowerCase();isNaN(c)&&0<=i.indexOf(n)&&"number"==typeof r[t]?c=r[t]:isNaN(l)&&0<=s.indexOf(n)&&"number"==typeof r[t]?l=r[t]:isNaN(u)&&0<=a.indexOf(n)&&"number"==typeof r[t]&&(u=r[t])}),isNaN(c)||isNaN(l)||(o.push(l,c),isNaN(u))||o.push(u)),2<=o.length?o:null},jc.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var o=0,n=t.length;o<n;o++){var r=jc.fromLatLng(t[o]);r&&e.push(r)}return e},jc._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},jc);function jc(t,e,o){return o?Ac.call(this,t,e,o)||this:Ac.call(this,t,e)||this}Tc.TYPE="Polygon";var Ic=Tc;function Tc(t,e){this.type="Polygon",this.type=Tc.TYPE,1===Ec._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var zc,Dc,e=window&&window.__extends||(zc=function(t,e){return(zc=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}zc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Rc=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},x=(e(S,Dc=_t),S.prototype.addProperty=function(t,e){_a(this.data.properties[t],e)||(this.data.properties[t]=c(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},S.prototype.getBounds=function(){var e,t,o,n,r,i=this.getCoordinates(),s=this.getType();if("Point"===s)r=this.circlePolygon?(a=this.circlePolygon.geometry.coordinates,O.fromPositions(a[0])):new O(a=i,a);else if("MultiPoint"===s||"LineString"===s){var a=i;r=O.fromPositions(a)}else if("Polygon"===s){a=i;r=O.fromPositions(a[0])}else if("MultiLineString"===s){a=i;try{for(var c=Rc(a),l=c.next();!l.done;l=c.next()){var u=l.value;r=O.merge(r,O.fromPositions(u))}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}}else if("MultiPolygon"===s){a=i;try{for(var p=Rc(a),h=p.next();!h.done;h=p.next()){var d=h.value;r=O.merge(r,O.fromPositions(d[0]))}}catch(t){o={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(o)throw o.error}}}return r},S.prototype.getCoordinates=function(){return c(this.data.geometry.coordinates)},S.prototype.getCircleCoordinates=function(){return this.circlePolygon?c(this.circlePolygon.geometry.coordinates[0]):null},S.prototype.getId=function(){return this.data.id},S.prototype.getProperties=function(){return c(this.data.properties)},S.prototype.getType=function(){return this.data.geometry.type},S.prototype.isCircle=function(){return S._isCircle(this.data)},S.prototype.isRectangle=function(){return S._isRectangle(this.data)},S.prototype.setCoordinates=function(t){t="Polygon"===this.getType()&&1===Ec._getDimensions(t)?[t]:t;_a(this.data.geometry.coordinates,t)||(this.data.geometry.coordinates=c(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},S.prototype.setProperties=function(t){t[S._shapeIdPropName]=this.data.id,_a(this.data.properties,t)||(this.data.properties=c(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},S.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},S.prototype._toJson=function(){return this.circlePolygon||this.data},S.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},S.prototype._handleCircle=function(){var t;this.isCircle()?(t=S._getCirclePositions(this.data),this.circlePolygon=new Ma(new Ic([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"):delete this.circlePolygon},S._isCircle=function(t){return t&&t.geometry&&"Point"===t.geometry.type&&t.geometry.coordinates&&t.properties&&"string"==typeof t.properties.subType&&"circle"===t.properties.subType.toLowerCase()&&"number"==typeof t.properties.radius},S._isRectangle=function(t){if("Polygon"===t.geometry.type&&t.geometry.coordinates&&"string"==typeof t.properties.subType&&"rectangle"===t.properties.subType.toLowerCase()){t=t.geometry.coordinates;if(1===t.length){t=t[0];if(5===t.length)return t[0][0]===t[4][0]&&t[0][1]===t[4][1];if(4===t.length)return!0}}return!1},S._getCirclePositions=function(t){return fc(t.geometry.coordinates,t.properties.radius,72,"meters")},S._shapeIdPropName="_azureMapsShapeId",S);function S(t,e,o){var n,r,i=Dc.call(this)||this;return"Feature"===t.type?(r=c((n=t).geometry),o=n.properties?c(n.properties):{},e=null==n.id||""===n.id?ka():n.id):(r=c(t),e=null==e||""===e?ka():e,o=o?c(o):{}),o[S._shapeIdPropName]=e,i.data=new Ma(r,o,e),i._handleCircle(),i}var Bc,Fc,re=window&&window.__extends||(Bc=function(t,e){return(Bc=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Bc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Nc=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},O=(Fc=Array,re(C,Fc),C.fromBoundingBox=function(t){var e=C.getWest(t),o=C.getSouth(t),n=C.getEast(t),t=C.getNorth(t);return new C([e,o,n,t])},C.fromDimensions=function(t,e,o){var n=t[0],t=t[1],r=Math.min(Math.max(t+o/2,-85.5),85.5),t=Math.min(Math.max(t-o/2,-85.5),85.5),o=w(n+e/2);return new C([w(n-e/2),t,o,r])},C.fromEdges=function(t,e,o,n){return new C([t,e,o,n])},C.containsPosition=function(t,e){var o=C.getCenter(t),n=Math.abs(o[1]-e[1]),o=Math.abs(o[0]-e[0]),e=(180<o&&(o=360-o),C.getHeight(t)),t=C.getWidth(t);return n<=e/2+1e-8&&o<=t/2+1e-8},C.containsBoundingBox=function(t,e){var o=t&&4===t.length,n=e&&4===e.length;return!(!o||!n)&&C.getWest(t)<C.getWest(e)&&C.getWest(e)<C.getEast(t)&&C.getWest(t)<C.getEast(e)&&C.getEast(e)<C.getEast(t)&&C.getSouth(t)<C.getSouth(e)&&C.getSouth(e)<C.getNorth(t)&&C.getSouth(t)<C.getNorth(e)&&C.getNorth(e)<C.getNorth(t)},C.crossesAntimeridian=function(t){return w(C.getEast(t))-w(C.getWest(t))<0||C.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)||C.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)},C.getCenter=function(t){var e=w(C.getEast(t)),o=w(C.getWest(t)),o=(e<o&&(e+=360),w((o+e)/2)),e=v(C.getSouth(t)),t=v(C.getNorth(t));return[o,v((e+t)/2)]},C.getHeight=function(t){t=v(C.getNorth(t))-v(C.getSouth(t));return isNaN(t)?0:t},C.getWidth=function(t){t=w(C.getEast(t))-w(C.getWest(t));return isNaN(t)?0:t<0?t+360:t},C.getSouthWest=function(t){var e=this.getSouth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},C.getNorthEast=function(t){var e=this.getNorth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},C.getNorthWest=function(t){var e=this.getNorth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},C.getSouthEast=function(t){var e=this.getSouth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},C.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},C.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},C.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},C.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},C.intersect=function(t,e){var o=C.getCenter(t),n=C.getCenter(e),r=Math.abs(o[1]-n[1]),o=Math.abs(o[0]-n[0]),n=(180<o&&(o=360-o),C.getHeight(t)),t=C.getWidth(t),i=C.getHeight(e),e=C.getWidth(e);return r<=n/2+i/2&&o<=t/2+e/2},C.merge=function(t,e){var o=t&&4===t.length,n=e&&4===e.length;if(o&&!n)return t;if(n&&!o)return e;if(!o&&!n)return null;for(var o=Math.max(v(C.getNorth(t)),v(C.getNorth(e))),n=Math.min(v(C.getSouth(t)),v(C.getSouth(e))),r=[t,e],i=[],s=0,s=0;s<r.length;s++){var a=r[s],c=w(C.getWest(a)),l=w(C.getEast(a));C.crossesAntimeridian(a)?(i.push([c,180]),i.push([-180,l])):i.push([c,l])}i.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var u=[],p=i[0];for(s=1;s<i.length;){var h=i[s];p[1]>=h[0]?p[1]=Math.max(p[1],h[1]):(u.push(p),p=h),s++}u.push(p);var d=u.length,f=u[0][0]+360-u[d-1][1],y=[u[d-1][1],u[0][0]];for(s=1;s<d;s++){var m=u[s][0]-u[s-1][1];f<m&&(f=m,y=[u[s-1][1],u[s][0]])}return new C([y[1],n],[y[0],o])},C.fromPositions=function(t){for(var e,o,n=NaN,r=NaN,i=NaN,s=NaN,a=t.length,c=new Array(a),l=0;a--;)(o=t[a])&&2<=o.length&&(e=v(o[1]),n=isNaN(n)?e:Math.max(n,e),r=isNaN(r)?e:Math.min(r,e),c[l++]=w(o[0]));if(l){c.length=l,c.sort(function(t,e){return t-e});for(var u=c[0]+360-c[l-1],p=0,a=1;a<l;a++){var h=c[a]-c[a-1];u<h&&(u=h,p=a)}i=c[p],s=c[(p||l)-1]}return isNaN(i)||isNaN(r)||isNaN(s)||isNaN(n)?null:new C([i,r,s,n])},C.fromLatLngs=function(t){return C.fromPositions(Ec.fromLatLngs(t))},C.fromData=function(t){var e,o,n=null;if(Array.isArray(t)&&0<t.length){try{for(var r=Nc(t),i=r.next();!i.done;i=r.next()){var s,a=i.value;null!=(s=C.fromData(a))&&(n=null===n?s:C.merge(n,s))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n}if(t instanceof x)return t.getBounds();if(t&&t.type){var c=t;if(c.bbox&&4===c.bbox.length)return c.bbox;switch(c.type){case"FeatureCollection":return C.fromData(c.features);case"Feature":return x._isCircle(c)?C.fromPositions(x._getCirclePositions(c)):C.fromData(c.geometry);case"GeometryCollection":return C.fromData(c.geometries);case"Point":var l=c.coordinates;if(l&&2<=l.length)return[l[0],l[1],l[0],l[1]];break;case"LineString":case"MultiPoint":return C.fromPositions(c.coordinates);case"Polygon":case"MultiLineString":var u=c.coordinates;if(u&&0<u.length){for(var p=0,h=u.length;p<h;p++)null!=(s=C.fromPositions(u[p]))&&(n=null===n?s:C.merge(n,s));if(null!=n)return n}break;case"MultiPolygon":var d=c.coordinates;if(d&&0<d.length){for(p=0,h=d.length;p<h;p++)for(var f=0,y=d[p].length;f<y;f++)null!=(s=C.fromPositions(d[p][f]))&&(n=null===n?s:C.merge(n,s));return n}}}return null},C.splitOnAntimeridian=function(t){var e,o,n,r,i,s,a=[];return C.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)?[[-180,t[1],t[2],180,t[4],t[5]]]:C.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)?[[-180,t[1],180,t[3]]]:(C.crossesAntimeridian(t)?(s=e=void 0,o=w(C.getWest(t)),n=w(C.getEast(t)),r=v(C.getNorth(t)),i=v(C.getSouth(t)),s=6<=t.length?(e=[o,i,t[2],180,r,t[5]],[-180,i,t[2],n,r,t[5]]):(e=[o,i,180,r],[-180,i,n,r]),a.push(e,s)):a.push(t),a)},C.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe=function(t){return 6<=t.length&&360<t[3]-t[0]},C.isBoundingBoxWithLessThanSixElementsLargerThanGlobe=function(t){return t.length<6&&360<t[2]-t[0]},C);function C(t,e){var o,n=this;return t&&e?n=(o=t)[2]&&e[2]?Fc.call(this,o[0],o[1],o[2]||0,e[0],e[1],e[2]||0)||this:Fc.call(this,o[0],o[1],e[0],e[1])||this:t&&(o=t)&&(4===o.length?n=Fc.call(this,o[0],o[1],o[2],o[3])||this:6<=o.length&&(n=Fc.call(this,o[0],o[1],o[2],o[3],o[4],o[5])||this)),n}qc.TYPE="FeatureCollection";var Zc=qc;function qc(t,e){this.type="FeatureCollection",this.type=qc.TYPE,this.features=t,this.bbox=e}Hc.TYPE="GeometryCollection";s=Hc;function Hc(t){this.type="GeometryCollection",this.type=Hc.TYPE,this.geometries=t}Uc.TYPE="LineString";fo=Uc;function Uc(t,e){this.type="LineString",this.type=Uc.TYPE,this.coordinates=t,this.bbox=e}Wc.TYPE="MultiLineString";Do=Wc;function Wc(t,e){this.type="MultiLineString",this.type=Wc.TYPE,this.coordinates=t,this.bbox=e}Gc.TYPE="MultiPoint";zo=Gc;function Gc(t,e){this.type="MultiPoint",this.type=Gc.TYPE,this.coordinates=t,this.bbox=e}Vc.TYPE="MultiPolygon";jo=Vc;function Vc(t,e){this.type="MultiPolygon",this.type=Vc.TYPE,this.coordinates=t,this.bbox=e}var Kc,Yc,rr=window&&window.__extends||(Kc=function(t,e){return(Kc=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Kc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),An=(Yc=Array,rr(P,Yc),P.fromPosition=function(t){return 2<=t.length?new P((180+t[0])/360,P._latToMercatorY(t[1]),3<=t.length?P._altitudeToMercatorZ(t[2],t[1]):0):[0,0,0]},P.fromPositions=function(t){for(var e=[],o=0,n=t.length;o<n;o++)e.push(this.fromPosition(t[o]));return e},P.toFloat32Array=function(t){for(var e=new Float32Array(3*t.length),o=0,n=t.length;o<n;o++){var r=3*o,i=t[o];e[r]=(180+i[0])/360,e[1+r]=P._latToMercatorY(i[1]),e[2+r]=3<=i.length?P._altitudeToMercatorZ(i[2],i[1]):0}return e},P.toPosition=function(t){var e;return 2<=t.length?(e=360/Math.PI*Math.atan(Math.exp((180-360*t[1])*Math.PI/180))-90,new Ec(360*t[0]-180,e,3<=t.length?P._mercatorZToAltitude(t[2],t[1]):0)):[0,0,0]},P.toPositions=function(t){for(var e=[],o=0,n=t.length;o<n;o++)e.push(this.toPosition(t[o]));return e},P.mercatorScale=function(t){return 1/Math.cos(t*Math.PI/180)},P.meterInMercatorUnits=function(t){return 1/P.earthCircumference*P.mercatorScale(P._latToMercatorY(t))},P._circumferenceAtLatitude=function(t){return P.earthCircumference*Math.cos(t*Math.PI/180)},P._altitudeToMercatorZ=function(t,e){return t/P._circumferenceAtLatitude(e)},P._mercatorZToAltitude=function(t,e){return t*P._circumferenceAtLatitude(P._latToMercatorY(e))},P._latToMercatorY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360},P.earthCircumference=2*Math.PI*sc(),P);function P(t,e,o){return Yc.call(this,t,e,o||0)||this}ho=Object.freeze({__proto__:null,BoundingBox:O,Feature:Ma,FeatureCollection:Zc,GeometryCollection:s,LineString:fo,MercatorPoint:An,MultiLineString:Do,MultiPoint:zo,MultiPolygon:jo,Point:Ta,Polygon:Ic,Position:Ec});function Jc(t,e){return t*t+e*e}function $c(t,e){for(var o,n,r,i=t[0],s=[i],a=1,c=t.length;a<c;a++)o=t[a],r=i,Jc((n=o)[0]-r[0],n[1]-r[1])>e&&(s.push(o),i=o);return i!==o&&s.push(o),s}function Xc(t,e,o,n,r){for(var i,s,a,c,l,u,p,h=n,d=e+1;d<o;d++){s=t[d],a=t[e],f=t[o],p=u=l=c=void 0,l=a[0],a=a[1],u=f[0]-l,p=f[1]-a,0==u&&0==p||(1<(c=((s[0]-l)*u+(s[1]-a)*p)/Jc(u,p))?(l=f[0],a=f[1]):0<c&&(l+=u*c,a+=p*c));var f=Jc(s[0]-l,s[1]-a);h<f&&(i=d,h=f)}n<h&&(1<i-e&&Xc(t,e,i,n,r),r.push(t[i]),1<o-i)&&Xc(t,i,o,n,r)}var Qc=function(t,e,o){var n,r;return void 0===e&&(e=1),void 0===o&&(o=!1),t.length<=2||(e=e*e,t=o?t:$c(t,e),n=(o=t).length-1,r=[o[0]],Xc(o,0,n,e,r),r.push(o[n]),t=r),t};var tl=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},el=(ol.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},ol.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},ol.prototype.transformArray=function(t,e,o){var n,r;if(t&&Array.isArray(t)&&Array.isArray(t[0])){var i=[];try{for(var s=tl(t),a=s.next();!a.done;a=s.next()){var c=a.value;i.push(this.transform(c,e,o))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i}return null},ol.prototype.transform=function(t,e,o){var n=t[0]*e[0][3]+t[1]*e[1][3]+e[2][3],t=t[0]*e[0][4]+t[1]*e[1][4]+e[2][4];return"number"==typeof o&&0<=o?[oc(n,o),oc(t,o)]:[oc(n,6),oc(t,6)]},ol._calculateAffineTransform=function(t,e){if(t.length!==e.length||t.length<1)throw new Error("Error: source and target arrays must have the same length.");var o=Math.min(t[0].length,e[0].length),n=o+1;if(t.length<o)throw new Error("Erorr: At least "+o+" reference points required.");for(var r=[],i=[],s=0;s<n;s++){i[s]=[];for(var a=0;a<n;a++){a<o&&(r[a]=0);for(var c=i[s][a]=0;c<t.length;c++)a<o&&(r[a]+=s<o?t[c][s]*e[c][a]:e[c][a]),i[s][a]+=o<=s&&o<=a?1:o<=s?t[c][a]:o<=a?t[c][s]:t[c][s]*t[c][a]}i[s]=i[s].concat(r)}if(this._gaussJordanElimination(i))return i;throw new Error("Error: Singular matrix. Points are likely coplanar.")},ol._gaussJordanElimination=function(t){for(var e,o=t.length,n=2*o-1,r=0;r<o;r++){for(var i=r,s=r+1;s<o;s++)Math.abs(t[s][r])>Math.abs(t[i][r])&&(i=s);if(e=t[i],t[i]=t[r],t[r]=e,Math.abs(t[r][r])<=1e-12)return!1;for(var a=r+1;a<o;a++)for(var c=t[a][r]/t[r][r],l=r;l<n;l++)t[a][l]-=t[r][l]*c}for(r=o-1;-1<r;r--){c=t[r][r];for(s=0;s<r;s++)for(var u=n-1;r-1<u;u--)t[s][u]-=t[r][u]*t[s][r]/c;t[r][r]/=c;for(var p=o;p<n;p++)t[r][p]/=c}return!0},ol);function ol(t,e){this.M=ol._calculateAffineTransform(t,e),this.inverseM=ol._calculateAffineTransform(e,t)}var nl,rl,o=Object.freeze({__proto__:null,get AccelerationUnits(){return g},AffineTransform:el,get AreaUnits(){return h},get DistanceUnits(){return f},get SpeedUnits(){return m},get TimeUnits(){return y},WEBMERCATOR_MAXLAT:qa,_precision:oc,boundingBoxToPolygon:function(t){var e=w(O.getWest(t)),o=w(O.getEast(t)),n=v(O.getNorth(t)),r=v(O.getSouth(t)),t=O.getCenter(t),r=[[e,n],[e,r],[t[0],r],[o,r],[o,n],[t[0],n],[e,n]];return new Ic([r])},convertAcceleration:vc,convertArea:wc,convertDistance:nc,convertSpeed:_c,convertTimespan:bc,getAcceleration:xc,getAccelerationFromFeatures:function(t,e,o,n,r,i,s){if("string"==typeof o&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){o=Oc(t.properties[o],e.properties[o],y.seconds);if(!isNaN(o)){var a=0;if(n&&"string"==typeof n){var c=t.properties[n],n=e.properties[n];if("number"==typeof c&&(a=c,"number"==typeof n))return Sc(c,n,o,r,y.seconds,i,s)}return xc(a,ic(t.geometry.coordinates,e.geometry.coordinates,f.meters),o,r,f.meters,y.seconds,i,s)}}return NaN},getAccelerationFromSpeeds:Sc,getArea:function t(e,o,n){if(e){var r=0;switch((e=e instanceof x?e.toJson():e).type){case"Feature":var i=e;if(i.geometry)return t(i.geometry,o,n);break;case"Polygon":(i=e).coordinates&&(r=Xa(i.coordinates));break;case"MultiPolygon":var s=e;if(s.coordinates)for(var a=0,c=s.coordinates.length;a<c;a++)r+=Xa(s.coordinates[a])}return wc(r,h.squareMeters,o,n)}return 0},getCardinalSpline:function(t,e,o,n){if(!t||t.length<=2)return c;"number"!=typeof e&&(e=.5),("number"!=typeof o||o<=0)&&(o=15);var r,i,s,a=t.length,c=t.slice(0),l=(n?(Ec.areEqual(c[0],c[a-1])&&(c.pop(),a--),c.unshift(t[a-1]),c.push(t[0]),c.push(t[1]),a++):(c.unshift(t[0]),c.push(t[a-1])),[]);l.push([1,0,0,0]);for(var u=1;u<o-1;u++)l.push([2*(s=(r=u/o)*(i=r*r))-3*i+1,-2*s+3*i,s-2*i+r,s-i]);l.push([0,1,0,0]);for(var p,h,d,f,y,m,g=[],u=1;u<a;u++)for(p=e*(c[u+1][0]-c[u-1][0]),h=e*(c[u+1][1]-c[u-1][1]),d=e*(c[u+2][0]-c[u][0]),f=e*(c[u+2][1]-c[u][1]),r=0;r<o;r++)m=(y=l[r])[0]*c[u][0]+y[1]*c[u+1][0]+y[2]*p+y[3]*d,y=Wa(y[0]*c[u][1]+y[1]*c[u+1][1]+y[2]*h+y[3]*f,-85,85),g.push([m,y]);return g},getClosestPointOnGeometry:function t(e,o,n,r){var i=Lc(e),s=gc([i],22)[0],a=null,c=1/0;switch((o=o instanceof x?o.toJson():o).type){case"Feature":return t(e,o.geometry,n);case"Point":f=[[o.coordinates]];break;case"MultiPoint":for(var l,u=o.coordinates,p=0,h=u.length;p<h;p++)(l=ic(i,u[p]))<c&&(c=l,a=new Ma(new Ta(u[p]),{distance:l}));break;case"LineString":f=[o.coordinates];break;case"Polygon":case"MultiLineString":f=o.coordinates;break;case"MultiPolygon":var d=o.coordinates;if(0<d.length)for(var f=d[0],p=1,h=d.length;p<h;p++)f=f.concat(d[p])}if(f)for(var y,p=0,h=f.length;p<h;p++)(y=ec(i,s,f[p]))&&y.properties.distance<c&&(c=y.properties.distance,a=y);return a&&(a.properties.distance=nc(a.properties.distance,"meters",n,r)),a},getConvexHull:function(t){var e,o,n=Pc(t).map(function(t){return[w(t[0]),v(t[1])]}),r=(n.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}),[]);try{for(var i=Ra(n),s=i.next();!s.done;s=i.next()){for(var a=s.value;2<=r.length&&tc(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}for(var c=[],l=n.length-1;0<=l;l--){for(;2<=c.length&&tc(c[c.length-2],c[c.length-1],n[l])<=0;)c.pop();c.push(n[l])}return new Ic([r.concat(c)])},getDestination:rc,getDistanceTo:ic,getEarthRadius:sc,getGeodesicPath:function(t,e){(!e||e<=0)&&(e=15),Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var o,n=o.length-1,r=[],i=0;i<n;i++)r=r.concat(ac(o[i],o[i+1],e));return cc(r)},getGeodesicPaths:function(t,e){(!e||e<=0)&&(e=15),Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var o,n=o.length-1,r=[],i=[],s=0;s<n;s++)for(var a,c,l,u,p,h=ac(o[s],o[s+1],e),d=0;d<h.length;d++)r.push(h[d]),d+1>=h.length||(a=(c=Da(h[d],2))[0],c=c[1],u=(p=Da(h[d+1],2))[0],p=p[1],180<Math.abs(u-a)&&(l=0<a?180:-180,u=Math.abs((0<a?u+360:u-360)-a),p=c+(p-c)*(Math.abs(l-a)/u),r.push([l,p]),i.push(r),r=[[-l,p]]));return i.push(r),i},getHeading:uc,getLengthOfPath:pc,getPathDenormalizedAtAntimerian:cc,getPathSplitByAntimeridian:lc,getPixelHeading:function(t,e){t=Lc(t),e=Lc(e);var e=(t=Da(gc([t,e],21),2))[0],o=(t=t[1])[0]-e[0],e=e[1]-t[1];return(2.5*Math.PI-Math.atan2(e,o))*Na%360},getPointWithHeadingAlongPath:kc,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var o=[],n=pc(t,f.meters)/(e-1),r=0;r<e;r++){var i=kc(t,n*r,f.meters);null!=i&&o.push(i)}return o},getPosition:Lc,getPositionAlongPath:hc,getPositions:Pc,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var o=[],n=pc(t,f.meters)/(e-1),r=0;r<e;r++){var i=hc(t,n*r,f.meters);null!=i&&o.push(i)}return o},getRegularPolygonPath:fc,getRegularPolygonPaths:function(t,e,o,n,r){return lc(dc(t,e,o,n,r))},getSpeed:function(t,e,o,n,r,i){return t=Lc(t),e=Lc(e),t&&e?(o=bc(o,n,y.seconds),_c(ic(t,e,f.meters)/o,m.metersPerSecond,r,i)):0},getSpeedFromFeatures:function(t,e,o,n,r){if("string"==typeof o&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){o=Oc(t.properties[o],e.properties[o],y.seconds);if(!isNaN(o))return _c(ic(t.geometry.coordinates,e.geometry.coordinates,f.meters)/o,m.metersPerSecond,n,r)}return NaN},getTimespan:Oc,getTravelDistance:function(t,e,o,n,r,i,s,a){return e=bc(e,r,y.seconds),r=(o=_c(o,i,m.metersPerSecond))*e,"number"==typeof n&&(r+=.5*vc(n,s,g.metersPerSecondSquared)*e*e),nc(r,f.meters,t,a)},interpolate:function(t,e,o){o=void 0===o?.5:o;var n=ic(t=Lc(t),e=Lc(e),"kilometers");return rc(t,uc(t,e),n*o,"kilometers")},mercatorPixelsToPositions:mc,mercatorPositionsToPixels:gc,normalizeLatitude:v,normalizeLongitude:w,parseTimestamp:Cc,rotatePositions:yc,simplify:function(t,e){return Qc(t,e,!0)}}),il=((window&&window.__extends||(nl=function(t,e){return(nl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}nl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(sl,rl=t),sl);function sl(){var t=null!==rl&&rl.apply(this,arguments)||this;return t.zoomDelta=1,t.style=u.ControlStyle.light,t}(window&&window.__extends||(al=function(t,e){return(al=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}al(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ll,cl=Ot),ll.prototype.onAdd=function(t){this.container=this.buildContainer(t,this.options.style,"Zoom Control"),this.container.style.flexDirection="column",this.zoomInButton=this.constructZoomInButton(t),this.zoomOutButton=this.constructZoomOutButton(t);var e=_("Zoom In"),o=_("Zoom Out");return this.container.appendChild(this.zoomInButton),this.container.appendChild(e),this.container.appendChild(this.zoomOutButton),this.container.appendChild(o),b(e,this.zoomInButton),b(o,this.zoomOutButton),t.events.add("zoom",this.zoomChanged),t.events.add("minzoomchanged",this.minZoomChanged),t.events.add("maxzoomchanged",this.maxZoomChanged),this.map=t,this.container},ll.prototype.onRemove=function(){cl.prototype.onRemove.call(this),this.map&&(this.map.events.remove("zoom",this.zoomChanged),this.map.events.remove("minzoomchanged",this.minZoomChanged),this.map.events.remove("maxzoomchanged",this.maxZoomChanged),this.map=null),this.container&&(this.container.remove(),this.container=null,this.zoomInButton=null,this.zoomOutButton=null)},ll.prototype.updateZoomButtonsState=function(){var t=this.map.getCamera().zoom>=this.map._getMap().getMaxZoom(),e=O.getSouth(this.map.getCamera().bounds)<=-qa&&O.getNorth(this.map.getCamera().bounds)>=qa,e=this.map.getCamera().zoom<=this.map._getMap().getMinZoom()||e;this.zoomInButton&&this.zoomInButton.disabled!=t&&(this.zoomInButton.disabled=t,this.zoomInButton.setAttribute("aria-label",t?"Zoom In disabled":"Zoom In")),this.zoomOutButton&&this.zoomOutButton.disabled!=e&&(this.zoomOutButton.disabled=e,this.zoomOutButton.setAttribute("aria-label",t?"Zoom Out disabled":"Zoom Out"))},ll.prototype.constructZoomInButton=function(e){var o=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("zoom-in"),t.setAttribute("aria-label","Zoom In"),t.setAttribute("alt","Zoom In"),t.setAttribute("type","button"),t.addEventListener("click",function(){var t;e.setCamera({maxBounds:null==(t=e._getMap().getMaxBounds())?void 0:t.toArray().flat(),zoom:e.getCamera().zoom+o.options.zoomDelta,duration:ll.ZOOM_DURATION_MS,type:"ease"},!0)}),t},ll.prototype.constructZoomOutButton=function(e){var o=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("zoom-out"),t.setAttribute("aria-label","Zoom Out"),t.setAttribute("alt","Zoom Out"),t.setAttribute("type","button"),t.addEventListener("click",function(){var t;e.setCamera({maxBounds:null==(t=e._getMap().getMaxBounds())?void 0:t.toArray().flat(),zoom:e.getCamera().zoom-o.options.zoomDelta,duration:ll.ZOOM_DURATION_MS,type:"ease"},!0)}),t},ll.ZOOM_DURATION_MS=200;var al,cl,a=ll;function ll(t){var e=cl.call(this)||this;return e.container=null,e.zoomInButton=null,e.zoomOutButton=null,e.zoomChanged=function(t){return e.updateZoomButtonsState()},e.minZoomChanged=function(t){return e.updateZoomButtonsState()},e.maxZoomChanged=function(t){return e.updateZoomButtonsState()},e.options=(new il).merge(t),e}var r=Object.freeze({__proto__:null,CompassControl:jt,ControlBase:Ot,PitchControl:Nt,StyleControl:nr,TrafficControl:Bs,TrafficLegendControl:qt,ZoomControl:a}),ul=mi;var L=Ht(function(t,e){return ul(t,5,e="function"==typeof e?e:void 0)}),pl=(hl.Css={hidden:"hidden-accessible-element"},hl);function hl(t){var e=this;this.attach=function(t){e.map!==t&&(e.map&&e.detachFromCurrentMap(),e.map=t,e.map.indicators._getCollectionDiv().appendChild(e.element),e.map.indicators.add(e))},this.remove=function(){e.detachFromCurrentMap(),e.element.remove()},this.getElement=function(){return e.element},this.detachFromCurrentMap=function(){e.map&&(e.map.indicators.remove(e),delete e.map)},this.element=document.createElement("div"),this.element.setAttribute("tabindex","0"),this.element.setAttribute("role","option"),null!=t&&t.setSize&&this.element.setAttribute("aria-setsize",t.setSize.toString()),null!=t&&t.positionInSet&&this.element.setAttribute("aria-posinset",t.positionInSet.toString()),this.element.setAttribute("aria-label","data point"),this.element.classList.add(hl.Css.hidden)}(window&&window.__extends||(dl=function(t,e){return(dl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}dl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ml,fl=t);var dl,fl,yl=ml;function ml(){var t=null!==fl&&fl.apply(this,arguments)||this;return t.buffer=128,t.maxZoom=18,t.cluster=!1,t.clusterRadius=50,t.clusterMaxZoom=void 0,t.clusterProperties=void 0,t.lineMetrics=!1,t.tolerance=.375,t.clusterMinPoints=2,t.generateId=!1,t.promoteId=void 0,t.filter=void 0,t}(window&&window.__extends||(gl=function(t,e){return(gl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}gl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(wl,vl=_t),wl.prototype.getId=function(){return this.id},wl.prototype._setMap=function(t,e){var o;void 0===e&&(e=!0),null==t||void 0===t?(o=this.map,delete this.map,e&&(this._invokeEvent("sourceremoved",this),o)&&o.events.invoke("sourceremoved",this)):(this.map=t,e&&(this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this)))};var gl,vl,k=wl;function wl(t){var e=vl.call(this)||this;return e.id=t||ka(),e}var _l,bl,Ee=window&&window.__extends||(_l=function(t,e){return(_l=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}_l(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),xl=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Sl=(Ee(M,bl=k),M.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},M.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},M.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},M.prototype.getClusterExpansionZoom=function(e){var r=this;return new Promise(function(o,n){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterExpansionZoom(e,function(t,e){t?n(t):"number"==typeof e&&o(e)}):n("The DataSource hasn't been added to a map.")})},M.prototype.getClusterChildren=function(e){var r=this;return new Promise(function(o,n){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterChildren(e,function(t,e){t?n(t):e&&o(r.map.sources._mapFeaturesToShapes(e,!1,r))}):n("The DataSource hasn't been added to a map.")})},M.prototype.getClusterLeaves=function(e,r,i){var s=this;return new Promise(function(o,n){var t;s.map?(t=s.map._getMap().getSource(s.getId()))&&"geojson"===t.type&&t.getClusterLeaves(e,r,i,function(t,e){t?n(t):e&&o(s.map.sources._mapFeaturesToShapes(e,!1,s))}):n("The DataSource hasn't been added to a map.")})},M.prototype.getOptions=function(){return c(this.options)},M.prototype.getShapes=function(){return Array.from(this.shapes)},M.prototype.importDataFromUrl=function(t){var e=this;return fetch(t,{method:"GET",mode:"cors"}).then(function(t){if(t.ok)return t.json();throw new Error("HTTP ".concat(t.status,": ").concat(t.statusText))}).then(function(t){e.add(t)})},M.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},M.prototype.remove=function(t){var e,o,t=Array.isArray(t)?t:[t];try{for(var n=xl(t),r=n.next();!r.done;r=n.next()){var i=r.value;"number"==typeof i?this._removeByIndex(i):this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}this._updateSource()},M.prototype.removeById=function(t){var e,o,t=Array.isArray(t)?t:[t];try{for(var n=xl(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}this._updateSource()},M.prototype.setOptions=function(t){t=(new yl).merge(this.options,c(t));_a(this.options,t)||(this._invokeEvent("datasourceupdated",this),this.options=t,this.map&&this.map._rebuildStyle())},M.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},M.prototype.toJson=function(){return new Zc(this.shapes.map(function(t){return t.toJson()}))},M.prototype._toJson=function(){return new Zc(this.shapes.map(function(t){return t._toJson()}))},M.prototype._buildSource=function(){var t={type:"geojson",data:this._toJson(),maxzoom:this.options.maxZoom,cluster:this.options.cluster,clusterRadius:this.options.clusterRadius,tolerance:this.options.tolerance,lineMetrics:this.options.lineMetrics,clusterProperties:this.options.clusterProperties,buffer:this.options.buffer,clusterMinPoints:this.options.clusterMinPoints,generateId:this.options.generateId,promoteId:this.options.promoteId,filter:this.options.filter};return"number"==typeof this.options.clusterMaxZoom&&(t.clusterMaxZoom=this.options.clusterMaxZoom),t},M.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this._buildSource(),t=t._buildSource(),e.type===t.type)&&e.maxzoom===t.maxzoom&&e.cluster===t.cluster&&e.clusterRadius===t.clusterRadius&&e.tolerance===t.tolerance&&e.lineMetrics===t.lineMetrics&&JSON.stringify(e.clusterProperties)===JSON.stringify(t.clusterProperties)&&e.buffer===t.buffer&&e.clusterMinPoints===t.clusterMinPoints&&e.generateId===t.generateId&&e.promoteId===t.promoteId&&e.filter===t.filter},M.prototype._addNoUpdate=function(t,e){var o;t instanceof x?(this._addToSources(t,e),o=[t]):Array.isArray(t)?(o=t.map(function(t){return t instanceof x?t:new x(t)}),this._addToSources(o,e)):"FeatureCollection"===t.type?(o=t.features.map(function(t){return new x(t)}),this._addToSources(o,e)):"GeometryCollection"===t.type?(o=t.geometries.map(function(t){return new x(t)}),this._addToSources(o,e)):(t=new x(t),this._addToSources(t,e),o=[t]),this._invokeEvent("dataadded",o)},M.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new wt,t&&0<t.length&&this._invokeEvent("dataremoved",t)},M.prototype._updateSource=function(){var t=this;void 0===this.requestId&&(this.requestId=requestAnimationFrame(function(){t._updateMboxSource(),t.requestId=void 0}))},M.prototype._addToSources=function(t,e){var o,n,r,i;if(t=Array.isArray(t)?t:[t],"number"!=typeof e)try{for(var s=xl(t),a=s.next();!a.done;a=s.next()){var c=a.value;this.shapes.push(c),this.shapesMap.set(c.getId(),this.shapes.length-1)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}else for(var l=t.length-1;0<=l;l--)this.shapes.splice(e,0,t[l]),this._updateShapesMap(e);try{for(var u=xl(t),p=u.next();!p.done;p=u.next())(c=p.value)._setDataSource(this)}catch(t){r={error:t}}finally{try{p&&!p.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}},M.prototype._removeById=function(t){var t=t instanceof x?t.getId():"string"==typeof t||"number"==typeof t?t:t.id,e=this.shapes[this.shapesMap.get(t)];e&&(e._setDataSource(null),this.shapes.splice(this.shapesMap.get(t),1),this._updateShapesMap(this.shapesMap.get(t)),this.shapesMap.delete(t),this._invokeEvent("dataremoved",[e]))},M.prototype._removeByIndex=function(t){var e;if(t>=this.shapes.length)throw new Error("The specified remove index '".concat(t,"' ")+"is greater than the maximum possible index '".concat(this.shapes.length-1,"'"));e=this.shapes[t],this.shapesMap.delete(e.getId()),e._setDataSource(null),this.shapes.splice(t,1),this._updateShapesMap(t),this._invokeEvent("dataremoved",[e])},M.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},M.prototype._updateMboxSource=function(){var t;this.map&&this.map._getMap()&&(t=this.map._getMap().getSource(this.getId()))&&"geojson"===t.type&&t.setData(this._toJson())},M);function M(t,e){t=bl.call(this,t)||this;return t.requestId=void 0,t.options=(new yl).merge(c(e)),t.shapes=[],t.shapesMap=new wt,t}(window&&window.__extends||(Ol=function(t,e){return(Ol=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ol(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ll,Cl=t);var Ol,Cl,Pl=Ll;function Ll(){var t=null!==Cl&&Cl.apply(this,arguments)||this;return t.bounds=void 0,t.minZoom=0,t.maxZoom=22,t.isTMS=!1,t.tiles=void 0,t.url=void 0,t}(window&&window.__extends||(kl=function(t,e){return(kl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}kl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Al,Ml=k),Al.prototype.getOptions=function(){return c(this.options)},Al.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},Al.prototype._buildSource=function(){var t={type:"vector"};return this.options.bounds&&(t.bounds=this.options.bounds),this.options.tiles?(t.tiles=this.options.tiles,t.minzoom=this.options.minZoom,t.maxzoom=this.options.maxZoom):this.options.url&&(t.url=this.options.url),this.options.isTMS&&(t.scheme="tms"),t},Al.prototype._isDeepEqual=function(t){var e,o;return this.constructor===t.constructor&&(e=this._buildSource(),o=t._buildSource(),e.type===o.type)&&e.url===o.url&&(void 0===e.tiles&&void 0===o.tiles||e.tiles&&o.tiles&&e.tiles.length===o.tiles.length&&e.tiles.every(function(t,e){return t===o.tiles[e]}))&&e.minzoom===o.minzoom&&e.maxzoom===o.maxzoom&&e.bounds===o.bounds&&e.attribution===o.attribution&&e.promoteId===o.promoteId&&e.scheme===o.scheme};var kl,Ml,i=Al;function Al(t,e){t=Ml.call(this,t)||this;return t.options=(new Pl).merge(c(e)),t}(window&&window.__extends||(El=function(t,e){return(El=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}El(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Tl,jl=k),Tl.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this.source,t=t.source,e.type===t.type)&&e.canvas===t.canvas&&JSON.stringify(e.coordinates)===JSON.stringify(t.coordinates)&&e.animate===t.animate},Tl.prototype._buildSource=function(){return this.source};var El,jl,Il=Tl;function Tl(t,e,o){t=jl.call(this,t)||this;return t.source=e,t}(window&&window.__extends||(zl=function(t,e){return(zl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}zl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Bl,Dl=k),Bl.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this.source,t=t.source,e.type===t.type)},Bl.prototype._buildSource=function(){return this.source};var zl,Dl,Rl=Bl;function Bl(t,e,o){t=Dl.call(this,t)||this;return t.source=e,t}(window&&window.__extends||(Fl=function(t,e){return(Fl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Fl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ql,Nl=k),ql.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this.source,t=t.source,e.type===t.type)&&JSON.stringify(e.coordinates)===JSON.stringify(t.coordinates)&&e.url===t.url},ql.prototype._buildSource=function(){return this.source};var Fl,Nl,Zl=ql;function ql(t,e,o){t=Nl.call(this,t)||this;return t.source=e,t}(window&&window.__extends||(Hl=function(t,e){return(Hl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Hl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Gl,Ul=k),Gl.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this.source,t=t.source,e.type===t.type)&&JSON.stringify(e.coordinates)===JSON.stringify(t.coordinates)&&e.urls===t.urls},Gl.prototype._buildSource=function(){return this.source};var Hl,Ul,Wl=Gl;function Gl(t,e,o){t=Ul.call(this,t)||this;return t.source=e,t}(window&&window.__extends||(Vl=function(t,e){return(Vl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Vl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Yl,Kl=Pl);var Vl,Kl,ue=Yl;function Yl(){var t=null!==Kl&&Kl.apply(this,arguments)||this;return t.tileSize=512,t}(window&&window.__extends||(Jl=function(t,e){return(Jl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Jl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ql,$l=ue);var Jl,$l,Xl=Ql;function Ql(){var t=null!==$l&&$l.apply(this,arguments)||this;return t.encoding=void 0,t}var tu,eu,e=window&&window.__extends||(tu=function(t,e){return(tu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}tu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ou=window&&window.__assign||function(){return(ou=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},re=(e(nu,eu=k),nu.prototype.getOptions=function(){return c(this.options)},nu.prototype._buildSource=function(){return ou({type:"raster-dem",bounds:this.options.bounds,minzoom:this.options.minZoom,maxzoom:this.options.maxZoom,tileSize:this.options.tileSize,encoding:this.options.encoding},this.options.tiles?{tiles:this.options.tiles}:{url:this.options.url})},nu.prototype._isDeepEqual=function(t){return this.constructor===t.constructor&&(t=t.getOptions(),this.options.url===t.url)&&this.options.tiles===t.tiles&&this.options.bounds===t.bounds&&this.options.minZoom===t.minZoom&&this.options.maxZoom===t.maxZoom&&this.options.tileSize===t.tileSize&&this.options.encoding===t.encoding},nu);function nu(t,e){t=eu.call(this,t)||this;return t.options=(new Xl).merge(c(e)),t}var ru,iu,rr=Object.freeze({__proto__:null,CanvasSource:Il,DataSource:Sl,ElevationTileSource:re,ImageSource:Zl,Source:k,UnknownSource:Rl,VectorTileSource:i,VideoSource:Wl}),A=((window&&window.__extends||(ru=function(t,e){return(ru=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ru(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(su,iu=_t),su.prototype.getId=function(){return this.id},su.prototype.getMap=function(){return this.map||null},su.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},su.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},su._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},su.prototype._updateBaseProperties=function(t,e){this._updateFilter(t.filter,e.filter),this._updateZoomRange(t.minZoom,e.minZoom,t.maxZoom,e.maxZoom),this._updateLayoutProperty("visibility",t.visible,e.visible,t.visible?"visible":"none")},su.prototype._updateFilter=function(t,e){_a(t,e)||this.map._getMap().setFilter(this.id,t)},su.prototype._updatePaintProperty=function(t,e,o,n){_a(e,o)||this.map._getMap().setPaintProperty(this.id,t,n||e)},su.prototype._updateLayoutProperty=function(t,e,o,n){_a(e,o)||this.map._getMap().setLayoutProperty(this.id,t,n||e)},su.prototype._updateZoomRange=function(t,e,o,n){t===e&&n===o||this.map._getMap().setLayerZoomRange(this.id,t,o)},su.LayerEvents={layeradded:void 0,layerremoved:void 0,focusin:void 0,focusout:void 0},su);function su(t){var e=iu.call(this)||this;return e.id=t||ka(),e}(window&&window.__extends||(au=function(t,e){return(au=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}au(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(lu,cu=t),lu._cloneCustomizer=function(t){if(t instanceof k)return t};var au,cu,s=lu;function lu(){var t=null!==cu&&cu.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}(window&&window.__extends||(uu=function(t,e){return(uu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}uu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(du,pu=s);var uu,pu,hu=du;function du(){var t=null!==pu&&pu.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color="#1A73AA",t.blur=0,t.opacity=1,t.strokeColor="#FFFFFF",t.strokeOpacity=1,t.strokeWidth=2,t.pitchAlignment="viewport",t.radius=8,t.createIndicators=!1,t.accessibilityIdKey=void 0,t}var fu,yu,fo=window&&window.__extends||(fu=function(t,e){return(fu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}fu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),mu=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},gu=window&&window.__generator||function(n,r){var i,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(o){return function(t){var e=[o,t];if(i)throw new TypeError("Generator is already executing.");for(;c=l&&e[l=0]?0:c;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,s=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))c.label=e[1];else if(6===e[0]&&c.label<a[1])c.label=a[1],a=e;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(e)}}e=r.call(n,c)}catch(t){e=[6,t],s=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},vu=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},wu=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},_u=(fo(bu,yu=A),bu.prototype.getOptions=function(){return L(this.options,hu._cloneCustomizer)},bu.prototype.getSource=function(){return this.options.source},bu.prototype.setOptions=function(t){t=(new hu).merge(this.options,L(t,hu._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("circle-blur",t.blur,this.options.blur),this._updatePaintProperty("circle-color",t.color,this.options.color),this._updatePaintProperty("circle-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("circle-radius",t.radius,this.options.radius),this._updatePaintProperty("circle-stroke-color",t.strokeColor,this.options.strokeColor),this._updatePaintProperty("circle-stroke-opacity",t.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("circle-stroke-width",t.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("circle-pitch-alignment",t.pitchAlignment,this.options.pitchAlignment)}this.options=t},bu.prototype.onAdd=function(e){var t,o,n=this;yu.prototype.onAdd.call(this,e),this.options.createIndicators&&(e.events.addOnce("idle",this._setAccessibleIndicator),e.events.add("moveend",this._setAccessibleIndicator),(t=this._getDataSource())?e.events.add("dataadded",t,function(){e.events.addOnce("idle",n._setAccessibleIndicator)}):(o="string"==typeof this.options.source?this.options.source:this.options.source.getId(),e.events.add("sourcedata",function(t){(null==(t=t.source)?void 0:t.getId())===o&&e._getMap().isSourceLoaded(o)&&(t=n._getSourceDataEventCacheKey())!==n.sourceDataEventCacheKey&&(n._setAccessibleIndicator(),n.sourceDataEventCacheKey=t)})))},bu.prototype.onRemove=function(){var t;this.options.createIndicators&&(this.map.events.remove("idle",this._setAccessibleIndicator),this.map.events.remove("moveend",this._setAccessibleIndicator),(t=this._getDataSource())?this.map.events.remove("dataadded",t,this._setAccessibleIndicator):this.map.events.remove("sourcedata",this._setAccessibleIndicator)),yu.prototype.onRemove.call(this)},bu.prototype._getSourceDataEventCacheKey=function(){var t;if(this.map)return t=this.map.getServiceOptions().mapConfiguration,wu(wu([],vu(this.map.getCamera().bounds),!1),[this.map.getCamera().zoom,this.map.getCamera().pitch,this.map.getStyle().style,t instanceof Object?t.id:t],!1).join(",")},bu.prototype._getDataSource=function(){var t="string"==typeof this.options.source?this.map.sources.getById(this.options.source):this.options.source;if(t instanceof Sl)return t},bu.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof k?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"circle-color":this.options.color,"circle-blur":this.options.blur,"circle-opacity":this.options.opacity,"circle-stroke-color":this.options.strokeColor,"circle-stroke-opacity":this.options.strokeOpacity,"circle-stroke-width":this.options.strokeWidth,"circle-pitch-alignment":this.options.pitchAlignment,"circle-radius":this.options.radius},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},bu.prototype._getLayerIds=function(){return[this.id]},bu.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof k?t.add(this.options.source.getId()):t.add(this.options.source),t},bu.prototype.getFirstCoordinate=function(t){return Array.isArray(t[0])?this.getFirstCoordinate(t[0]):t},bu);function bu(t,e,o){var n=yu.call(this,e)||this;return n.accessibleIndicator=[],n._setAccessibleIndicator=function(){return mu(n,void 0,void 0,function(){var e,c,l,u,p,h,d=this;return gu(this,function(t){return this.accessibleIndicator.forEach(function(t){return t.remove()}),this.accessibleIndicator=[],e=this.map.layers.getRenderedShapes(this.map.getCamera().bounds,this),c=this.options.accessibilityIdKey||(this._getDataSource()?x._shapeIdPropName:void 0),l=function(e,o){var n=e[o],r=n instanceof x?n.toJson():n,i=new pl({positionInSet:o+1,setSize:e.length}),s=i.getElement(),a=vu(d.map.positionsToPixels([d.getFirstCoordinate(r.geometry.coordinates)]),1)[0];return s.addEventListener("focusin",function(t){d.accessibleIndicator.filter(function(t){return t!==i}).forEach(function(t){return t.remove()}),0<=o-1&&u(i,l(e,o-1)),o+1<e.length&&h(l(e,o+1)),2<=o&&o==e.length-1&&p(l(e,0)),0==o&&2<=e.length&&h(l(e,e.length-1)),void 0!==c&&d.map._getMap().setPaintProperty(d.id,"circle-stroke-color",["case",["==",["get",c],r.properties[c]],"#000000",d.options.strokeColor]);t={target:s,type:"focusin",map:d.map,shape:n,originalEvent:t,pixel:a};d._invokeEvent("focusin",t)}),s.addEventListener("focusout",function(t){void 0!==c&&d.map._getMap().setPaintProperty(d.id,"circle-stroke-color",["case",["==",["get",c],r.properties[c]],d.options.strokeColor,d.options.strokeColor]);t={target:s,type:"focusout",map:d.map,shape:n,originalEvent:t,pixel:a};d._invokeEvent("focusout",t)}),d.accessibleIndicator.push(i),i},u=function(t,e){e.attach(d.map);e=e.getElement(),t=t.getElement();t.parentElement.insertBefore(e,t)},p=function(t){t.attach(d.map);var t=t.getElement(),e=t.parentElement;e.insertBefore(t,e.firstElementChild)},h=function(t){t.attach(d.map)},0<e.length&&h(l(e,0)),1<e.length&&h(l(e,e.length-1)),[2]})})},n.options=(new hu).merge(L(o,hu._cloneCustomizer)),n.options.source=t||n.options.source,n}(window&&window.__extends||(xu=function(t,e){return(xu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Cu,Su=s),Cu._cloneCustomizer=function(t){if(t instanceof k)return t};var xu,Su,Ou=Cu;function Cu(){var t=null!==Su&&Su.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color=["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],t.intensity=1,t.opacity=1,t.radius=30,t.weight=1,t}(window&&window.__extends||(Pu=function(t,e){return(Pu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Pu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ku,Lu=A),ku.prototype.getOptions=function(){return L(this.options,Ou._cloneCustomizer)},ku.prototype.getSource=function(){return this.options.source},ku.prototype.setOptions=function(t){t=(new Ou).merge(this.options,L(t,Ou._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("heatmap-color",t.color,this.options.color),this._updatePaintProperty("heatmap-intensity",t.intensity,this.options.intensity),this._updatePaintProperty("heatmap-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("heatmap-radius",t.radius,this.options.radius),this._updatePaintProperty("heatmap-weight",t.weight,this.options.weight)}this.options=t},ku.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof k?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"heatmap-color":this.options.color,"heatmap-intensity":this.options.intensity,"heatmap-opacity":this.options.opacity,"heatmap-radius":this.options.radius,"heatmap-weight":this.options.weight},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},ku.prototype._getLayerIds=function(){return[this.id]},ku.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof k?t.add(this.options.source.getId()):t.add(this.options.source),t};var Pu,Lu,An=ku;function ku(t,e,o){e=Lu.call(this,e)||this;return e.options=(new Ou).merge(L(o,Ou._cloneCustomizer)),e.options.source=t||e.options.source,e}(window&&window.__extends||(Mu=function(t,e){return(Mu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Mu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Eu,Au=s);var Mu,Au,Do=Eu;function Eu(){var t=null!==Au&&Au.apply(this,arguments)||this;return t.contrast=0,t.fadeDuration=300,t.hueRotation=0,t.maxBrightness=1,t.minBrightness=0,t.opacity=1,t.saturation=0,t}(window&&window.__extends||(ju=function(t,e){return(ju=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ju(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(zu,Iu=Do),zu._cloneCustomizer=function(t){if(t instanceof k)return t};var ju,Iu,Tu=zu;function zu(){var t=null!==Iu&&Iu.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}(window&&window.__extends||(Du=function(t,e){return(Du=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Du(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Fu,Ru=A),Fu.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},Fu.prototype.onAdd=function(t){Ru.prototype.onAdd.call(this,t)};var Du,Ru,Bu=Fu;function Fu(){return null!==Ru&&Ru.apply(this,arguments)||this}(window&&window.__extends||(Nu=function(t,e){return(Nu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Nu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(qu,Zu=Bu),qu.prototype.getOptions=function(){return L(this.options,Tu._cloneCustomizer)},qu.prototype.setOptions=function(t){var e,o=(new Tu).merge(this.options,L(t,Tu._cloneCustomizer)),n="string"==typeof t.url&&t.url!==this.getOptions().url,t=void 0!==t.coordinates&&t.coordinates!==this.getOptions().coordinates;this.map&&(this._updateBaseProperties(o,this.options),this._updatePaintProperty("raster-contrast",o.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",o.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",o.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",o.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",o.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",o.saturation,this.options.saturation),e=this.map._getMap().getSource(this._getSourceId()))&&e.updateImage(o),this.options=o,n?this.reloadImage():t&&this.updateTransform()},qu.prototype.getPositions=function(e){return this.transform.then(function(t){return t.toTarget(e)})},qu.prototype.getPixels=function(e){return this.transform.then(function(t){return t.toSource(e)})},qu.getCoordinatesFromRefPoints=function(t,e,o,n){return new el(o,n).toTarget([[0,0],[t,0],[t,e],[0,e]])},qu.getCoordinatesFromEdges=function(t,e,o,n,r){"number"!=typeof r&&(r=0);e=[Math.min(n,o),e,Math.max(n,o),t],n=O.getCenter(e);return yc([O.getNorthWest(e),O.getNorthEast(e),O.getSouthEast(e),O.getSouthWest(e)],n,r)},qu.prototype._buildLayers=function(){var t={id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-opacity":this.options.opacity,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-min":this.options.minBrightness,"raster-brightness-max":this.options.maxBrightness,"raster-saturation":this.options.saturation,"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),[t]},qu.prototype._getLayerIds=function(){return[this.id]},qu.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},qu.prototype._getSourceId=function(){return"".concat(this.getId(),"-ImageSource")},qu.prototype.reloadImage=function(){var o=this;this.options.url&&(this.transform=new Promise(function(e,t){o.img.onload=function(){var t=[[0,0],[o.img.width,0],[o.img.width,o.img.height],[0,o.img.height]];e(new el(t,o.options.coordinates)),o.isLoading=!1},o.img.onerror=o.img.onabort=function(){t("Failed to load image")},o.isLoading=!0,o.img.src=o.options.url}))},qu.prototype.updateTransform=function(){var t;this.isLoading||(t=[[0,0],[this.img.width,0],[this.img.width,this.img.height],[0,this.img.height]],this.transform=Promise.resolve(new el(t,this.options.coordinates)))},qu.prototype._getSourceWrapper=function(){var t=this._getSourceId(),e=this._buildSource();return new Zl(t,e)};var Nu,Zu,zo=qu;function qu(t,e){e=Zu.call(this,e)||this;return e.isLoading=!1,e.options=(new Tu).merge(L(t,Tu._cloneCustomizer)),e.img=new Image,e.reloadImage(),e}(window&&window.__extends||(Hu=function(t,e){return(Hu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Hu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Gu,Uu=s);var Hu,Uu,Wu=Gu;function Gu(){var t=null!==Uu&&Uu.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.lineCap="round",t.lineJoin="round",t.blur=0,t.strokeColor="#1E90FF",t.strokeDashArray=void 0,t.strokeGradient=void 0,t.offset=0,t.strokeOpacity=1,t.translate=new Ia(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var Vu,Ku,jo=window&&window.__extends||(Vu=function(t,e){return(Vu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Vu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Yu=window&&window.__assign||function(){return(Yu=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Ju=(jo($u,Ku=A),$u.prototype.getOptions=function(){return L(this.options,Wu._cloneCustomizer)},$u.prototype.getSource=function(){return this.options.source},$u.prototype.setOptions=function(t){t=(new Wu).merge(this.options,L(t,Wu._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("line-blur",t.blur,this.options.blur),this._updateLayoutProperty("line-cap",t.lineCap,this.options.lineCap),this._updateLayoutProperty("line-join",t.lineJoin,this.options.lineJoin),this._updatePaintProperty("line-offset",t.offset,this.options.offset),this._updatePaintProperty("line-color",t.strokeColor,this.options.strokeColor),this._updatePaintProperty("line-dasharray",t.strokeDashArray,this.options.strokeDashArray),this._updatePaintProperty("line-gradient",t.strokeGradient,this.options.strokeGradient),this._updatePaintProperty("line-opacity",t.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("line-width",t.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("line-translate",t.translate,this.options.translate),this._updatePaintProperty("line-translate-anchor",t.translateAnchor,this.options.translateAnchor)}this.options=t},$u.prototype._buildLayers=function(){return[Yu(Yu(Yu(Yu({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof k?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none","line-cap":this.options.lineCap,"line-join":this.options.lineJoin},paint:Yu(Yu(Yu({"line-blur":this.options.blur,"line-color":this.options.strokeColor},this.options.strokeDashArray?{"line-dasharray":this.options.strokeDashArray}:{}),this.options.strokeGradient?{"line-gradient":this.options.strokeGradient}:{}),{"line-offset":this.options.offset,"line-opacity":this.options.strokeOpacity,"line-translate":this.options.translate,"line-translate-anchor":this.options.translateAnchor,"line-width":this.options.strokeWidth})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},$u.prototype._getLayerIds=function(){return[this.id]},$u.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof k?t.add(this.options.source.getId()):t.add(this.options.source),t},$u);function $u(t,e,o){e=Ku.call(this,e)||this;return e.options=(new Wu).merge(L(o,Wu._cloneCustomizer)),e.options.source=t||e.options.source,e}(window&&window.__extends||(Xu=function(t,e){return(Xu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Xu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ep,Qu=s);var Xu,Qu,tp=ep;function ep(){var t=null!==Qu&&Qu.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.base=0,t.fillColor="#1E90FF",t.height=0,t.fillOpacity=1,t.fillPattern=void 0,t.translate=new Ia(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var op,np,jt=window&&window.__extends||(op=function(t,e){return(op=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}op(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),rp=window&&window.__assign||function(){return(rp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Nt=(jt(ip,np=A),ip.prototype.getOptions=function(){return L(this.options,tp._cloneCustomizer)},ip.prototype.getSource=function(){return this.options.source},ip.prototype.setOptions=function(t){t=(new tp).merge(this.options,L(t,tp._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("fill-extrusion-base",t.base,this.options.base),this._updatePaintProperty("fill-extrusion-color",t.fillColor,this.options.fillColor),this._updatePaintProperty("fill-extrusion-height",t.height,this.options.height),this._updatePaintProperty("fill-extrusion-opacity",t.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-extrusion-pattern",t.fillPattern,this.options.fillPattern),this._updatePaintProperty("fill-extrusion-translate",t.translate,this.options.translate),this._updatePaintProperty("fill-extrusion-translate-anchor",t.translateAnchor,this.options.translateAnchor),this._updatePaintProperty("fill-extrusion-vertical-gradient",t.verticalGradient,this.options.verticalGradient)}this.options=t},ip.prototype._buildLayers=function(){return[rp(rp(rp(rp({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof k?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:rp(rp({"fill-extrusion-base":this.options.base,"fill-extrusion-height":this.options.height,"fill-extrusion-opacity":this.options.fillOpacity},this.options.fillPattern?{"fill-extrusion-pattern":this.options.fillPattern}:{"fill-extrusion-color":this.options.fillColor}),{"fill-extrusion-translate":this.options.translate,"fill-extrusion-translate-anchor":this.options.translateAnchor,"fill-extrusion-vertical-gradient":this.options.verticalGradient})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},ip.prototype._getLayerIds=function(){return[this.id]},ip.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof k?t.add(this.options.source.getId()):t.add(this.options.source),t},ip);function ip(t,e,o){e=np.call(this,e)||this;return e.options=(new tp).merge(L(o,tp._cloneCustomizer)),e.options.source=t||e.options.source,e}var sp,ap,nr=window&&window.__extends||(sp=function(t,e){return(sp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}sp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),cp=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lp=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},up=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},pp=(nr(hp,ap=s),hp.prototype.merge=function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var n=!1,r=!1;try{for(var i=cp(t),s=i.next();!s.done;s=i.next()){var a=s.value;a&&(a.hasOwnProperty("fillColor")?r=!(n=!0):a.hasOwnProperty("fillPattern")&&(n=!(r=!0)))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(c=i.return)&&c.call(i)}finally{if(e)throw e.error}}var c=ap.prototype.merge.apply(this,up([],lp(t),!1));return n?c.fillPattern=void 0:r&&(c.fillColor=void 0),c},hp);function hp(){var t=null!==ap&&ap.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=void 0,t}(window&&window.__extends||(dp=function(t,e){return(dp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}dp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(mp,fp=A),mp.prototype.getOptions=function(){return L(this.options,pp._cloneCustomizer)},mp.prototype.getSource=function(){return this.options.source},mp.prototype.setOptions=function(t){t=(new pp).merge(this.options,L(t,pp._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("fill-color",t.fillColor,this.options.fillColor),this._updatePaintProperty("fill-opacity",t.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-pattern",t.fillPattern,this.options.fillPattern)}this.options=t},mp.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof k?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"fill-opacity":this.options.fillOpacity},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),this.options.fillPattern?t.paint["fill-pattern"]=this.options.fillPattern:t.paint["fill-color"]=this.options.fillColor,[t]},mp.prototype._getLayerIds=function(){return[this.id]},mp.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof k?t.add(this.options.source.getId()):t.add(this.options.source),t};var dp,fp,yp=mp;function mp(t,e,o){e=fp.call(this,e)||this;return e.options=(new pp).merge(L(o,pp._cloneCustomizer)),e.options.source=t||e.options.source,e}(window&&window.__extends||(gp=function(t,e){return(gp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}gp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(_p,vp=t);var gp,vp,wp=_p;function _p(){var t=null!==vp&&vp.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new Ia(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}(window&&window.__extends||(bp=function(t,e){return(bp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}bp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Op,xp=t);var bp,xp,Sp=Op;function Op(){var t=null!==xp&&xp.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="center",t.textField=void 0,t.font=["StandardFont-Regular"],t.ignorePlacement=!1,t.justify="center",t.offset=new Ia(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.radialOffset=void 0,t.rotation=0,t.rotationAlignment="auto",t.variableAnchor=void 0,t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}(window&&window.__extends||(Cp=function(t,e){return(Cp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Cp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(kp,Pp=s);var Cp,Pp,Lp=kp;function kp(){var t=null!==Pp&&Pp.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new wp,t.textOptions=new Sp,t.placement="point",t.sortKey=void 0,t.zOrder="auto",t.lineSpacing=250,t}var Mp,Ap,qt=window&&window.__extends||(Mp=function(t,e){return(Mp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Mp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ep=window&&window.__assign||function(){return(Ep=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},jp=(qt(Ip,Ap=A),Ip.prototype.getOptions=function(){return L(this.options,Lp._cloneCustomizer)},Ip.prototype.getSource=function(){return this.options.source},Ip.prototype.setOptions=function(t){t=(new Lp).merge(this.options,L(t,Lp._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);var e=this.options,o=t.iconOptions,n=e.iconOptions,r=t.textOptions,i=e.textOptions;this._updateBaseProperties(t,e),this._updateLayoutProperty("symbol-spacing",t.lineSpacing,e.lineSpacing),this._updateLayoutProperty("symbol-placement",t.placement,e.placement),this._updateLayoutProperty("symbol-sort-key",t.sortKey,e.sortKey),this._updateLayoutProperty("symbol-z-order",t.zOrder,e.zOrder),this._updateLayoutProperty("icon-allow-overlap",o.allowOverlap,n.allowOverlap),this._updateLayoutProperty("icon-anchor",o.anchor,n.anchor),this._updateLayoutProperty("icon-ignore-placement",o.ignorePlacement,n.ignorePlacement),this._updateLayoutProperty("icon-image",o.image,n.image),this._updateLayoutProperty("icon-offset",o.offset,n.offset),this._updatePaintProperty("icon-opacity",o.opacity,n.opacity),this._updateLayoutProperty("icon-optional",o.optional,n.optional),this._updateLayoutProperty("icon-padding",o.padding,n.padding),this._updateLayoutProperty("icon-pitch-alignment",o.pitchAlignment,n.pitchAlignment),this._updateLayoutProperty("icon-rotate",o.rotation,n.rotation),this._updateLayoutProperty("icon-rotation-alignment",o.rotationAlignment,n.rotationAlignment),this._updateLayoutProperty("icon-size",o.size,n.size),this._updateLayoutProperty("text-allow-overlap",r.allowOverlap,i.allowOverlap),this._updateLayoutProperty("text-anchor",r.anchor,i.anchor),this._updatePaintProperty("text-color",r.color,i.color),this._updateLayoutProperty("text-font",r.font,i.font),this._updateLayoutProperty("text-ignore-placement",r.ignorePlacement,i.ignorePlacement),this._updateLayoutProperty("text-justify",r.justify,i.justify),this._updatePaintProperty("text-halo-blur",r.haloBlur,i.haloBlur),this._updatePaintProperty("text-halo-color",r.haloColor,i.haloColor),this._updatePaintProperty("text-halo-width",r.haloWidth,i.haloWidth),this._updateLayoutProperty("text-offset",r.offset,i.offset),this._updatePaintProperty("text-opacity",r.opacity,i.opacity),this._updateLayoutProperty("text-optional",r.optional,i.optional),this._updateLayoutProperty("text-padding",r.padding,i.padding),this._updateLayoutProperty("text-pitch-alignment",r.pitchAlignment,i.pitchAlignment),this._updateLayoutProperty("text-radial-offset",r.radialOffset,i.radialOffset),this._updateLayoutProperty("text-rotate",r.rotation,i.rotation),this._updateLayoutProperty("text-rotation-alignment",r.rotationAlignment,i.rotationAlignment),this._updateLayoutProperty("text-size",r.size,i.size),this._updateLayoutProperty("text-variable-anchor",r.variableAnchor,i.variableAnchor),this._updateLayoutProperty("text-field",r.textField,i.textField)}this.options=t},Ip.prototype._buildLayers=function(){var t=Ep(Ep(Ep(Ep({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof k?this.options.source.getId():this.options.source,layout:Ep(Ep({visibility:this.options.visible?"visible":"none","symbol-placement":this.options.placement,"symbol-spacing":this.options.lineSpacing,"symbol-z-order":this.options.zOrder,"text-allow-overlap":this.options.textOptions.allowOverlap,"text-anchor":this.options.textOptions.anchor},this.options.textOptions.textField&&{"text-field":this.options.textOptions.textField}),{"text-font":this.options.textOptions.font,"text-ignore-placement":this.options.textOptions.ignorePlacement,"text-justify":this.options.textOptions.justify,"text-offset":this.options.textOptions.offset,"text-optional":this.options.textOptions.optional,"text-padding":this.options.textOptions.padding,"text-pitch-alignment":this.options.textOptions.pitchAlignment,"text-rotate":this.options.textOptions.rotation,"text-rotation-alignment":this.options.textOptions.rotationAlignment,"text-size":this.options.textOptions.size,"icon-allow-overlap":this.options.iconOptions.allowOverlap,"icon-anchor":this.options.iconOptions.anchor,"icon-ignore-placement":this.options.iconOptions.ignorePlacement,"icon-image":this.options.iconOptions.image,"icon-offset":this.options.iconOptions.offset,"icon-optional":this.options.iconOptions.optional,"icon-padding":this.options.iconOptions.padding,"icon-pitch-alignment":this.options.iconOptions.pitchAlignment,"icon-rotate":this.options.iconOptions.rotation,"icon-rotation-alignment":this.options.iconOptions.rotationAlignment,"icon-size":this.options.iconOptions.size}),paint:{"text-color":this.options.textOptions.color,"text-halo-blur":this.options.textOptions.haloBlur,"text-halo-color":this.options.textOptions.haloColor,"text-halo-width":this.options.textOptions.haloWidth,"text-opacity":this.options.textOptions.opacity,"icon-opacity":this.options.iconOptions.opacity}}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom});return void 0!==this.options.sortKey&&(t.layout["symbol-sort-key"]=this.options.sortKey),void 0!==this.options.textOptions.radialOffset&&(t.layout["text-radial-offset"]=this.options.textOptions.radialOffset),void 0!==this.options.textOptions.variableAnchor&&(t.layout["text-variable-anchor"]=this.options.textOptions.variableAnchor),[t]},Ip.prototype._getLayerIds=function(){return[this.id]},Ip.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof k?t.add(this.options.source.getId()):t.add(this.options.source),t},Ip);function Ip(t,e,o){e=Ap.call(this,e)||this;return e.options=(new Lp).merge(L(o,Lp._cloneCustomizer)),e.options.source=t||e.options.source,e}var Tp,zp,a=window&&window.__extends||(Tp=function(t,e){return(Tp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Tp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Dp=window&&window.__assign||function(){return(Dp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Rp=(a(Bp,zp=k),Bp.prototype._buildSource=function(){return this.source},Bp.prototype._isDeepEqual=function(t){var o,e,n,r;return this.constructor===t.constructor&&(r=this.source,o=t.source,t=r.type===o.type&&r.url===o.url&&(void 0===r.tiles&&void 0===o.tiles||r.tiles&&o.tiles&&r.tiles.length===o.tiles.length&&r.tiles.every(function(t,e){return t===o.tiles[e]}))&&r.minzoom===o.minzoom&&r.maxzoom===o.maxzoom&&r.bounds===o.bounds&&r.attribution===o.attribution,e="raster"!==r.type||"raster"===r.type&&r.type===o.type&&r.tileSize===o.tileSize&&r.scheme===o.scheme,n="raster-dem"!==r.type||"raster-dem"===r.type&&r.type===o.type&&r.tileSize===o.tileSize&&r.encoding===o.encoding,r="vector"!==r.type||"vector"===r.type&&r.type===o.type&&r.promoteId===o.promoteId&&r.scheme===o.scheme,t)&&e&&n&&r},Bp.prototype._modifySource=function(t,e){if("raster"!==t.type&&"raster-dem"!==t.type&&"vector"!==t.type||!t.tiles){if("raster"!==t.type&&"raster-dem"!==t.type&&"vector"!==t.type||!t.url)throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");t.url="string"==typeof t.url?t.url:new ct({domain:H,path:t.url.path,queryParams:Dp(Dp({},e),t.url.queryParams)}).toString()}else{var o=t.tiles.map(function(t){return"string"==typeof t?t:new ct({domain:H,path:t.path,queryParams:Dp(Dp({},e),t.queryParams)}).toString()});t.tiles=o}return t},Bp);function Bp(t,e,o){t=zp.call(this,t)||this;return t.source=t._modifySource(e,o),t}(window&&window.__extends||(Fp=function(t,e){return(Fp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Fp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(qp,Np=Do);var Fp,Np,Zp=qp;function qp(){var t=null!==Np&&Np.apply(this,arguments)||this;return t.bounds=[-180,-85.0511,180,85.0511],t.minSourceZoom=0,t.maxSourceZoom=22,t.tileSize=512,t.isTMS=!1,t.subdomains=void 0,t.tileUrl=void 0,t}var Hp,Up,Ee=window&&window.__extends||(Hp=function(t,e){return(Hp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Hp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Wp=window&&window.__assign||function(){return(Wp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Gp=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vp=(Ee(Kp,Up=Bu),Kp.prototype.getOptions=function(){return L(this.options,Zp._cloneCustomizer)},Kp.prototype.setOptions=function(t){t=(new Zp).merge(this.options,L(t,Zp._cloneCustomizer));if(this.map){if(!_a(t.bounds,this.options.bounds)||t.isTMS!==this.options.isTMS||t.maxSourceZoom!==this.options.maxSourceZoom||t.minSourceZoom!==this.options.minSourceZoom||!_a(t.subdomains,this.options.subdomains)||t.tileSize!==this.options.tileSize||t.tileUrl!==this.options.tileUrl)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("raster-contrast",t.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",t.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",t.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",t.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",t.saturation,this.options.saturation)}this.options=t},Kp.prototype._setOptionsNoUpdate=function(t){this.options=(new Zp).merge(this.options,L(t,Zp._cloneCustomizer))},Kp.prototype._buildLayers=function(){return[Wp(Wp({id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-max":this.options.maxBrightness,"raster-brightness-min":this.options.minBrightness,"raster-opacity":this.options.opacity,"raster-saturation":this.options.saturation}},this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},Kp.prototype._getLayerIds=function(){return[this.id]},Kp.prototype._buildSource=function(){var e,t;if(this.options.tileUrl){if(-1===this.options.tileUrl.indexOf("{"))return{type:"raster",url:this.options.tileUrl};if(-1!==this.options.tileUrl.indexOf("{subdomain}")){if(!(this.options.subdomains&&0<this.options.subdomains.length))throw new Error("The {subdomain} placeholder was included in the tileUrl but no subdomains were specified");var o=[];try{for(var n=Gp(this.options.subdomains),r=n.next();!r.done;r=n.next()){var i=r.value;o.push(this.options.tileUrl.replace(/{subdomain}/g,i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}t=o}else t=[this.options.tileUrl]}return Wp({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},t&&{tiles:t})},Kp.prototype._getSourceId=function(){return"".concat(this.getId(),"-RasterSource")},Kp.prototype._getSourceWrapper=function(){var t=this._getSourceId(),e=this._buildSource();return new Rp(t,{name:t,tiles:e.tiles,type:e.type,url:e.url})},Kp);function Kp(t,e){e=Up.call(this,e)||this;return t&&e.setOptions(t),e}(window&&window.__extends||(Yp=function(t,e){return(Yp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Yp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Xp,Jp=s);var Yp,Jp,$p=Xp;function Xp(){var t=null!==Jp&&Jp.apply(this,arguments)||this;return t.renderer=void 0,t}(window&&window.__extends||(Qp=function(t,e){return(Qp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Qp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(oh,th=A),oh.prototype.getOptions=function(){return L(this.options,$p._cloneCustomizer)},oh.prototype.setOptions=function(t){t=(new $p).merge(this.options,L(t,$p._cloneCustomizer));this.map&&this.map.triggerRepaint(),this.options=t},oh.prototype.onAdd=function(t){var e,o;th.prototype.onAdd.call(this,t),this.map.events.add("stylechanged",this._onStyleChange),this.options.renderer&&this.glContext&&null!=(o=(e=this.options.renderer).onAdd)&&o.call(e,t,this.glContext)},oh.prototype.onRemove=function(){var t,e;this.options.renderer&&this.glContext&&null!=(e=(t=this.options.renderer).onRemove)&&e.call(t,this.map,this.glContext),this.map.events.remove("stylechanged",this._onStyleChange),this.glContext=null,th.prototype.onRemove.call(this)},oh.prototype._buildLayers=function(){var r=this;if(this.options.renderer)return[{id:this.id,type:"custom",renderingMode:this.options.renderer.renderingMode,onAdd:function(t,e){r.glContext=e},onRemove:function(t,e){},prerender:function(t,e){var o,n;r._shouldRender()&&null!=(n=(o=r.options.renderer).prerender)&&n.call(o,t,e)},render:function(t,e){r._shouldRender()&&r.options.renderer.render(t,e)}}];throw new Error("Cannot build the WebGL layer because renderer was not set.")},oh.prototype._getLayerIds=function(){return[this.id]},oh.prototype._getSourceIds=function(){return(new Set).add(this.source.getId())},oh.prototype._shouldRender=function(){var t;return!!this.map&&(t=this.map.getCamera().zoom,this.options.visible)&&this.options.minZoom<=t&&this.options.maxZoom>t};var Qp,th,eh=oh;function oh(t,e){var o=th.call(this,t)||this;return o._onStyleChange=function(){var t,e;o.map._getMap().getLayer(o.id)||(t=o.map,e=null==(e=o.map.layers._getUserLayers().find(function(t){return t.layer.getId()==o.id}))?void 0:e.before,t.layers.remove(o),t.layers.add(o,e))},o.options=(new $p).merge(L(e,$p._cloneCustomizer)),o.source=new Sl,o}var ue=Object.freeze({__proto__:null,BubbleLayer:_u,HeatMapLayer:An,ImageLayer:zo,Layer:A,LineLayer:Ju,PolygonExtrusionLayer:Nt,PolygonLayer:yp,SymbolLayer:jp,TileLayer:Vp,WebGLLayer:eh}),nh=(rh.convertHtmlString=function(t){var e;return"string"==typeof t?((e=document.createElement("div")).innerHTML=t,e):t},rh.parseWithFilter=function(t,e,o,n){var r=this;if(void 0===e&&(e=function(t){return!0}),void 0===o&&(o=function(t){return t}),void 0===n&&(n=function(){return document.createElement("div")}),"string"==typeof t){var i=(new DOMParser).parseFromString(t,"text/html").body;if(0==i.children.length)return o(i.innerHTML);var s,i=1==i.children.length&&1==i.childNodes.length?i.children[0]:(s=n(),Array.from(i.childNodes).map(function(t){return s.append(t)}),s)}else i=t;return Array.from(i.children).forEach(function(t){return r.parseWithFilter(t,e,o)}),e(i)?o(i):(i.parentNode&&i.parentNode.removeChild(i),null)},rh);function rh(){}var ih=ko,sh=Ai;var ah,ch,lh=Ht(function(t){return ih(t)&&1===t.nodeType&&!sh(t)}),uh=((window&&window.__extends||(ah=function(t,e){return(ah=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ah(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ph,ch=t),ph._cloneCustomizer=function(t){if(lh(t))return t},ph);function ph(){var t=null!==ch&&ch.apply(this,arguments)||this;return t.anchor="none",t.draggable=!1,t.closeButton=!0,t.content=document.createElement("span"),t.fillColor="#FFFFFF",t.pixelOffset=new Ia(0,0),t.position=new Ec(0,0),t.showPointer=!0,t}var hh,dh,e=window&&window.__extends||(hh=function(t,e){return(hh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}hh(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),fh=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},yh=(e(E,dh=_t),E.prototype.setPopupOptions=function(t){this.setOptions(t)},E.prototype.setOptions=function(t){var e,t=(new uh).merge(this.options,L(t,uh._cloneCustomizer));t.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(t),this.contentDiv.prepend(this.htmlContent)):t.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,t.draggable),t.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn),e=_("close"),this.contentDiv.appendChild(e),b(e,this.closeBtn,!0)):!t.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn),t.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!t.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv),t.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=t.fillColor,this.contentDiv.style.backgroundColor=t.fillColor),this.marker&&(t.anchor!==this.options.anchor?"none"===this.options.anchor?(this.autoAnchor!==t.anchor&&this._replaceMarker(this.map,t),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,t),"none"===t.anchor&&this.map.events.add("move",this._onMove)):(_a(t.position,this.options.position)||this.marker.setLngLat(t.position),_a(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset))),this.options=t},E.prototype.getPopupOptions=function(){return this.getOptions()},E.prototype.getOptions=function(){return L(this.options,uh._cloneCustomizer)},E.prototype.getPopupContainer=function(){return this.containerDiv},E.prototype._dragToPixel=function(t){this.dragging||(this.dragging=!0,this.contentDiv.style.pointerEvents="none",this._invokeEvent("dragstart",{type:"dragstart",target:this}));t=[t[0]+this.dragOffset[0],t[1]+this.dragOffset[1]],t=fh(this.map.pixelsToPositions([t]),1)[0];this.options.position=t,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},E.prototype._onUp=function(){this.dragging&&(this.contentDiv.style.pointerEvents="",this._invokeEvent("dragend",{type:"dragend",target:this}),"none"===this.options.anchor)&&this._onMove(),delete this.dragOffset,delete this.dragging},E.prototype._createContainerDiv=function(t){var e=this,o=document.createElement("div"),n=(o.classList.add(E.Css.container),o.classList.add(E.Css.hidden),o.style.borderColor=t.fillColor,o.setAttribute("role","dialog"),o.setAttribute("aria-label","Map Information Window"),!1);return o.addEventListener("keydown",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(n=!0)}),o.addEventListener("keyup",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(n=!1)}),o.addEventListener("focusin",function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement)&&t.target.focus()}),o.addEventListener("focusout",function(t){n&&t.relatedTarget instanceof Node&&!o.contains(t.relatedTarget)&&(n=!1,e.isOpen())&&e.close()}),o},E.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(E.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},E.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(E.Css.arrow),t},E.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(E.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("tabindex","0"),t.innerHTML="×",t},E.prototype._createHtmlContent=function(t){var e=nh.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},E.prototype._createMarker=function(t,e){var o=this.marker?this.marker.getLngLat():t.position,e=("none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new D.Marker({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset})):(this.containerDiv.classList.add(t.anchor),new D.Marker({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}))).setLngLat(o);return e},E.prototype._getAutoAnchor=function(t,e){var o,n,r=this.containerDiv.offsetWidth,i=this.containerDiv.offsetHeight,s=[];return(n=this.marker?(o=(n=t._getMap().project(this.marker.getLngLat())).x,n.y):(n=fh(t.positionsToPixels([e.position]),1),o=(e=fh(n[0],2))[0],e[1]))<i?s.push("top"):n>t.getCanvas().offsetHeight-i&&s.push("bottom"),o<r/2?s.push("left"):o>t.getCanvas().offsetWidth-r/2&&s.push("right"),0<s.length?s.join("-"):"bottom"},E.prototype._replaceMarker=function(t,e,o){var n=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,o),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,n||null)},E.prototype._setDraggable=function(t,e){e?(t.addEventListener("mousedown",this._onDown),t.addEventListener("touchstart",this._onDown),t.addEventListener("dragstart",this._onDragStart)):(t.removeEventListener("mousedown",this._onDown),t.removeEventListener("touchstart",this._onDown),t.removeEventListener("dragstart",this._onDragStart))},E.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},E);function E(t){var o=dh.call(this)||this;return o.attach=function(t){o.map!==t&&(o.map&&o.remove(),o.map=t,o.marker=o._createMarker(o.options),o.marker.addTo(o.map._getMap()),o.map.popups._getCollectionDiv().appendChild(o.containerDiv),o.map.popups.add(o))},o.open=function(t){if(!t&&!o.map)throw new Error("Must specify a map to open on or attach to a map in advance");o.attach(t||o.map),o.containerDiv.classList.remove(E.Css.hidden),o.map.events.add("move",o._onMove),o._onMove(),o._invokeEvent("open",{target:o,type:"open"})},o.close=function(){o.map&&o.map.events.remove("move",o._onMove),o.containerDiv.classList.add(E.Css.hidden),o._invokeEvent("close",{target:o,type:"close"})},o.remove=function(){o.map&&(o.marker.remove(),o.containerDiv.classList.remove(o.autoAnchor||o.options.anchor),o.map.events.remove("move",o._onMove),o.map.popups.remove(o),delete o.map,delete o.marker,delete o.autoAnchor)},o.isOpen=function(){return o.map&&!o.containerDiv.classList.contains(E.Css.hidden)},o._onMove=function(){var t=o._getAutoAnchor(o.map,o.options);t!==o.autoAnchor&&(o._replaceMarker(o.map,o.options,t),o.map.events.add("move",o._onMove))},o._onDown=function(t){o.map.popups._addDraggedPopup(o);var e=fh(o.map.positionsToPixels([o.options.position]),1)[0];"mousedown"===t.type?o.dragOffset=[e[0]-t.clientX,e[1]-t.clientY]:"touchstart"===t.type&&(o.dragOffset=[e[0]-t.touches[0].clientX,e[1]-t.touches[0].clientY])},o._onDragStart=function(t){t.preventDefault()},o.options=(new uh).merge(L(t,uh._cloneCustomizer)),o.containerDiv=o._createContainerDiv(o.options),o.contentDiv=o._createContentDiv(o.options),o.containerDiv.appendChild(o.contentDiv),o.options.showPointer&&(o.arrowDiv=o._createArrowDiv(),o.containerDiv.appendChild(o.arrowDiv)),o.options.closeButton&&(o.closeBtn=o._createCloseButton(),o.contentDiv.appendChild(o.closeBtn),t=_("close"),o.contentDiv.appendChild(t),b(t,o.closeBtn,!0)),o}(window&&window.__extends||(mh=function(t,e){return(mh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}mh(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(wh,gh=t),wh._cloneCustomizer=function(t){if(t instanceof yh||lh(t))return t};var mh,gh,vh=wh;function wh(){var t=null!==gh&&gh.apply(this,arguments)||this;return t.anchor="bottom",t.color="#1A73AA",t.draggable=!1,t.htmlContent='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.5 36.5" id="marker_'.concat(ka(),'" width="24.5" height="36.5" display="block"><path d="M12.25.25a12.2543,12.2543,0,0,0-12,12.4937c0,6.4436,6.4879,12.1093,11.059,22.5641.5493,1.2563,1.3327,1.2563,1.882,0C17.7621,24.8529,24.25,19.1857,24.25,12.7437A12.2543,12.2543,0,0,0,12.25.25Z" fill="{color}" stroke="{secondaryColor}" stroke-width="0.5"/><text style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; fill: white;" text-anchor="middle" x="12" y="18">{text}</text></svg>'),t.pixelOffset=new Ia(0,0),t.position=new Ec(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}(window&&window.__extends||(_h=function(t,e){return(_h=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}_h(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(j,bh=_t),j.prototype.getOptions=function(){return L(this.options,vh._cloneCustomizer)},j.prototype.getElement=function(){return this.marker.getElement()},j.prototype.setOptions=function(t){t=(new vh).merge(this.options,L(t,vh._cloneCustomizer));_a(t.htmlContent,this.options.htmlContent)&&t.anchor===this.options.anchor?("string"!=typeof t.htmlContent||t.color===this.options.color&&t.text===this.options.text&&t.secondaryColor===this.options.secondaryColor||(this.element.innerHTML=this._getSubbedHtmlString(t)||""),t.draggable!==this.options.draggable&&(this._setDraggable(t.draggable),this.marker.setDraggable(t.draggable)),_a(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset),_a(t.position,this.options.position)||this.marker.setLngLat(t.position),t.visible!==this.options.visible&&(t.visible?this.element.classList.remove(j.hiddenClass):this.element.classList.add(j.hiddenClass))):(this.marker.remove(),this._buildMarker(t),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=t},j.prototype.togglePopup=function(){if(this.options.popup)if(this.options.popup.isOpen())this.options.popup.close();else{if(!this.map)throw new Error("The marker must be added to a map before calling togglePopup().");this.options.popup.setOptions({position:this.options.position}),this.options.popup.open(this.map)}},j.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=c(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},j.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},j.prototype._getId=function(){if(this.element)return("string"==typeof this.options.htmlContent?this.element.firstChild:this.element).id},j.prototype._buildMarker=function(t){var e;"string"==typeof t.htmlContent?(e=this._getSubbedHtmlString(t)||"",this.element=nh.convertHtmlString(e)):this.element=t.htmlContent,this.element.classList.add(j.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(j.hiddenClass),this.marker=new D.Marker({element:this.element,offset:t.pixelOffset,draggable:t.draggable,anchor:t.anchor}).setLngLat(t.position),this.marker.on("drag",this._onDrag),this.marker.on("dragstart",this._onDragStart),this.marker.on("dragend",this._onDragEnd),this.element.addEventListener("click",this._bubbleElementEvent),this.element.addEventListener("dblclick",this._bubbleElementEvent),this.element.addEventListener("contextmenu",this._bubbleElementEvent),this.element.addEventListener("keydown",this._bubbleElementEvent),this.element.addEventListener("keypress",this._bubbleElementEvent),this.element.addEventListener("keyup",this._bubbleElementEvent),this.element.addEventListener("mousedown",this._bubbleElementEvent),this.element.addEventListener("mouseenter",this._bubbleElementEvent),this.element.addEventListener("mouseleave",this._bubbleElementEvent),this.element.addEventListener("mousemove",this._bubbleElementEvent),this.element.addEventListener("mouseout",this._bubbleElementEvent),this.element.addEventListener("mouseover",this._bubbleElementEvent),this.element.addEventListener("mouseup",this._bubbleElementEvent)},j.prototype._getSubbedHtmlString=function(t){return"string"==typeof t.htmlContent?t.htmlContent.replace(/{color}/gi,t.color||"").replace(/{secondaryColor}/gi,t.secondaryColor||"").replace(/{text}/gi,t.text||""):null},j.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector(".".concat(j.collectionContainerClass));return t||((t=document.createElement("div")).classList.add(j.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},j.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},j.collectionContainerClass="marker-collection-container",j.hiddenClass="hidden-accessible-element",j.containerClass="marker-container";var _h,bh,xh=j;function j(t){var e=bh.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new Ec(t.lng,t.lat),e._invokeEvent("drag",{type:"drag",target:e})},e._onDragStart=function(){e._invokeEvent("dragstart",{type:"dragstart",target:e})},e._onDragEnd=function(){e._invokeEvent("dragend",{type:"dragend",target:e})},e._bubbleElementEvent=function(t){e._invokeEvent(t.type,{type:t.type,target:e})},e._onEleDragStart=function(t){t.preventDefault()},e.options=(new vh).merge(L(t,vh._cloneCustomizer)),e._buildMarker(e.options),e}Oh.parse=function(t){var e=(t=t.toLowerCase()).lastIndexOf("-");return-1!==e?{code:t,language:t.substring(0,e),region:t.substring(e+1)}:{code:t,language:t}};var Sh=Oh;function Oh(){}var Ch={localizationsPath:"locs/mapcontrol/2019-3-12",sensitiveUserRegions:["il","kr","pk","in","cn","ar","bh","eg","jo","sa","kw","om","qa","ma","ae"],locales:{defaultLanguage:{defaultRegion:{code:"NGT",strings:"en/resource.json"},latn:{code:"NGT-Latn",strings:"en/resource.json"}},ar:{defaultRegion:{code:"ar",strings:"ar-sa/resource.json"}},bg:{defaultRegion:{code:"bg-BG",strings:"bg-bg/resource.json"}},cs:{defaultRegion:{code:"cs-CZ",strings:"cs-cz/resource.json"}},da:{defaultRegion:{code:"da-DK",strings:"da-dk/resource.json"}},de:{defaultRegion:{code:"de-DE",strings:"de-de/resource.json"}},el:{defaultRegion:{code:"el-GR",strings:"el-gr/resource.json"}},en:{defaultRegion:{code:"en",strings:"en/resource.json"},us:{code:"en-US",strings:"en/resource.json"},au:{code:"en-AU",strings:"en/resource.json"},gb:{code:"en-GB",strings:"en/resource.json"},nz:{code:"en-NZ",strings:"en/resource.json"}},es:{defaultRegion:{code:"es-ES",strings:"es-es/resource.json"},mx:{code:"es-MX",strings:"es-mx/resource.json"}},fi:{defaultRegion:{code:"fi-FI",strings:"fi-fi/resource.json"}},fr:{defaultRegion:{code:"fr-FR",strings:"fr-fr/resource.json"}},hu:{defaultRegion:{code:"hu-HU",strings:"hu-hu/resource.json"}},id:{defaultRegion:{code:"id-ID",strings:"id-id/resource.json"}},it:{defaultRegion:{code:"it-IT",strings:"it-it/resource.json"}},ko:{defaultRegion:{code:"ko-KR",strings:"ko-kr/resource.json"}},lt:{defaultRegion:{code:"lt-LT",strings:"lt-lt/resource.json"}},ms:{defaultRegion:{code:"ms-MY",strings:"ms-my/resource.json"}},nb:{defaultRegion:{code:"nb-NO",strings:"nb-no/resource.json"}},nl:{defaultRegion:{code:"nl-NL",strings:"nl-nl/resource.json"}},pl:{defaultRegion:{code:"pl-PL",strings:"pl-pl/resource.json"}},pt:{defaultRegion:{code:"pt-PT",strings:"pt-pt/resource.json"},br:{code:"pt-BR",strings:"pt-br/resource.json"}},ru:{defaultRegion:{code:"ru-RU",strings:"ru-ru/resource.json"}},sk:{defaultRegion:{code:"sk-SK",strings:"sk-sk/resource.json"}},sl:{defaultRegion:{code:"sl-SL",strings:"sl-sl/resource.json"}},sv:{defaultRegion:{code:"sv-SE",strings:"sv-se/resource.json"}},th:{defaultRegion:{code:"th-TH",strings:"th-th/resource.json"}},tr:{defaultRegion:{code:"tr-TR",strings:"tr-tr/resource.json"}},zh:{defaultRegion:{code:"zh",strings:"en/resource.json"}},"zh-hans":{defaultRegion:{code:"zh-Hans",strings:"zh-cn/resource.json"},cn:{code:"zh-Hans-CN",strings:"zh-cn/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"en/resource.json"},tw:{code:"zh-Hant-TW",strings:"zh-tw/resource.json"}}}},Ph=function(){this.Unknown="Unknown",this.Accident="Accident",this.Fog="Fog",this.Danger="Danger",this.Rain="Rain",this.Ice="Ice",this.Jam="Jam",this.LaneClosed="Lane Closed",this.RoadClosed="Road Closed",this.RoadWorks="Road Works",this.Wind="Wind",this.Flood="Flood",this.Detour="Detour"},Lh=(kh.getCode=function(t){var e=Sh.parse(t);return-1===Ch.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},kh.getStrings=function(t){t=this.getLocaleData(t);return Ch.locales.defaultLanguage.defaultRegion.code===t.code?new Promise(function(t){t(new Ph)}):new ct({domain:B,path:"".concat(Ch.localizationsPath,"/").concat(t.strings)}).get().then(function(t){return t},function(){return new Ph})},kh.getLocaleData=function(t){if("string"==typeof t&&(t=Sh.parse(t)),Ch.locales[t.code])return Ch.locales[t.code].defaultRegion;var e;if(Ch.locales[t.language])e=Ch.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=Ch.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},kh);function kh(){}Ah.getEdgeOrIEVersion=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");return 0<e?parseInt(t.substring(e+5,t.indexOf(".",e)),10):0<t.indexOf("Trident/")?(e=t.indexOf("rv:"),parseInt(t.substring(e+3,t.indexOf(".",e)),10)):0<(e=t.indexOf("Edge/"))?parseInt(t.substring(e+5,t.indexOf(".",e)),10):-1},Ah.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},Ah.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11};var Mh=Ah;function Ah(){}var Eh,i,jh,Ih,re=window&&window.__extends||(Eh=function(t,e){return(Eh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Eh(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Th=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},zh=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Dh=(u.AuthenticationType=void 0,(i=u.AuthenticationType||(u.AuthenticationType={})).subscriptionKey="subscriptionKey",i.aad="aad",i.anonymous="anonymous",i.sas="sas",re(Rh,jh=t),Rh.prototype.setSubscriptionKey=function(t){this.authType=u.AuthenticationType.subscriptionKey,this.subscriptionKey=t},Rh.prototype.setAadProperties=function(t,e,o,n,r){this.authType=u.AuthenticationType.aad,this.authContext=r||this.authContext,this.aadInstance=n||this.aadInstance,this.clientId=t,this.aadAppId=e,this.aadTenant=o},Rh.prototype.setTokenCallbackFunction=function(t){this.authType=u.AuthenticationType.anonymous,this.getToken=t},Rh.prototype.setSasCallbackFunction=function(t){this.authType=u.AuthenticationType.sas,this.getToken=t},Rh.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=jh.prototype.merge.apply(this,zh([],Th(t),!1));return o.authType===u.AuthenticationType.subscriptionKey?o.authContext=o.aadAppId=o.getToken=void 0:o.authType===u.AuthenticationType.aad?o.subscriptionKey=o.getToken=void 0:o.authType===u.AuthenticationType.anonymous?o.subscriptionKey=o.authContext=o.aadAppId=void 0:o.authType===u.AuthenticationType.sas&&(o.authContext=o.subscriptionKey=o.aadAppId=void 0),o},Rh);function Rh(){var t=null!==jh&&jh.apply(this,arguments)||this;return t.authType=void 0,t.subscriptionKey=void 0,t.clientId=void 0,t.aadAppId=void 0,t.aadTenant=void 0,t.aadInstance=void 0,t.getToken=void 0,t.sasToken=void 0,t.authContext=void 0,t}var Bh="NGT",Fh=ka(),Nh=R,Zh=B,qh=F,Hh=N,Uh=X,Wh=new Dh,Gh=!1,Vh=!1,Kh=!1,Yh=!1,Jh=!1,$h=!1,Xh=!1,Qh=!1,td=!1;function ed(){return Object.assign({},Wh)}function od(){return Zh}function nd(){return Nh}function rd(){return qh}function id(){return Hh}function sd(){return Uh}function ad(){return D.workerCount}function cd(){return D.maxParallelImageRequests}function ld(){return Bh}function ud(){return Fh}function pd(){return Wh.authType===u.AuthenticationType.subscriptionKey?Wh.subscriptionKey:void 0}function hd(){return Ih}function dd(t){Wh=(new Dh).merge(Wh,t),td=!0}function fd(t){Nh=t,Vh=!0}function yd(t){qh=t,Kh=!0}function md(t){0<t&&(D.workerCount=t,Jh=!0)}function gd(t){0<t&&(D.maxParallelImageRequests=t,$h=!0)}function vd(t){Bh=Lh.getCode(t),Xh=!0}function wd(t){Fh=t,Qh=!0}function _d(t){Wh.setSubscriptionKey(t),td=!0}function bd(t){Ih=t,Gh=!0}function xd(t,e){if(e=Math.abs(e||1),"string"==typeof t&&Ed[t.toLowerCase()]){for(var o=Ed[t.toLowerCase()],n=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,r=o,i=n.exec(o);i;)r=r.replace(i[0],parseFloat(i[1])*e+""),i=n.exec(o);return r=r.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function Sd(){return td}function Od(){return Vh}function Cd(){return Kh}function Pd(){return Jh}function Ld(){return $h}function kd(){return Xh}function Md(){return Qh}function Ad(){return Gh}var Ed={marker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 26 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><text x="12.5" y="17.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:2"/><text x="12.5" y="18.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-circle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><circle cx="12.5" cy="12.5" r="9" fill="{secondaryColor}"/><text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',pin:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(24 * {scale})" height="calc(28 * {scale})" viewBox="0 0 24 28"><path d="m11.988 16.615a5.15 5.15 0 0 1-2.268-.525 4.909 4.909 0 0 1-2.805-4.442 5.019 5.019 0 0 1 5.072-4.936h.012a5.03 5.03 0 0 1 5.085 4.961 4.907 4.907 0 0 1-.549 2.224 5.114 5.114 0 0 1-4.548 2.718zm0-8.06a3.173 3.173 0 0 0-3.226 3.099 3.081 3.081 0 0 0 1.77 2.782 3.299 3.299 0 0 0 4.365-1.386 3.049 3.049 0 0 0 .342-1.381 3.184 3.184 0 0 0-3.239-3.114h-.012z" fill="{secondaryColor}"/><path d="m11.999.922a10.908 10.908 0 0 0-11.076 10.732 10.639 10.639 0 0 0 4.418 8.598l6.658 6.464 6.658-6.463a10.537 10.537 0 0 0 2.198-15.041 11.182 11.182 0 0 0-8.856-4.289zm1.873 14.341a4.221 4.221 0 0 1-5.589-1.789 3.945 3.945 0 0 1-.445-1.8 4.164 4.164 0 0 1 8.323-.037 4.028 4.028 0 0 1-2.289 3.626Z" fill="{color}"/><path d="m11.999 28-7.256-7.044a11.611 11.611 0 0 1-4.743-9.303 11.844 11.844 0 0 1 11.988-11.652.102 .102 0 0 1 .02 0 12.164 12.164 0 0 1 9.577 4.647 11.357 11.357 0 0 1 2.299 8.614 11.521 11.521 0 0 1-4.63 7.695zm-.01-26.157a9.997 9.997 0 0 0-10.143 9.812 9.769 9.769 0 0 0 4.04 7.853l.099.083 6.014 5.838 6.113-5.922a9.7 9.7 0 0 0 3.945-6.505 9.533 9.533 0 0 0-1.933-7.229 10.305 10.305 0 0 0-8.116-3.931h-.021zm.021 14.772a5.11 5.11 0 0 1-4.547-2.718 4.868 4.868 0 0 1 .932-5.743 5.118 5.118 0 0 1 3.58-1.46h.024a5.031 5.031 0 0 1 5.084 4.938 4.92 4.92 0 0 1-2.805 4.457h0a5.152 5.152 0 0 1-2.269.525zm-.011-8.079h-.015a3.277 3.277 0 0 0-2.295.933 3.029 3.029 0 0 0-.587 3.58 3.297 3.297 0 0 0 4.364 1.386h0a3.092 3.092 0 0 0 1.772-2.795 3.185 3.185 0 0 0-3.239-3.105z" fill="{secondaryColor}"/><text x="12" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"pin-round":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25 * {scale})" height="calc(25 * {scale})" viewBox="0 0 25 25"><g transform="translate(0 1)"><circle cx="12.25" cy="11.5833" r="11" fill="{color}"/><path d="m12.25 23.583a12 12 0 1 1 12-12 12 12 0 0 1-12 12zm0-22a10 10 0 1 0 10 10 10 10 0 0 0-10-10z" fill="{secondaryColor}"/><circle cx="12.25" cy="11.5833" r="4.2386" fill="{secondaryColor}"/></g><text x="12.5" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-flat":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(42.8 * {scale})" viewBox="0 0 1600 2570"><g fill="{color}"><path d="M691 2419c-409-575-641-1086-683-1504-10-106-10-136 5-224 31-188 105-330 241-458 129-124 270-190 453-214 69-9 113-10 182-1 373 46 655 326 703 698 40 308-120 801-424 1309-134 224-348 535-369 535-4 0-53-63-108-141z"/></g><g fill="rgba(0,0,0,0.15)" style="transform:scale(-1,1);transform-origin:center"><path d="M691 2419c-407-571-639-1083-682-1498-14-139-3-249 37-371 69-208 254-402 459-481 68-27 217-59 271-59h24v160 180 940 635c0 349-2 635-5 635-2 0-49-63-104-141z"/></g><circle cx="800" cy="800" r="600" fill="{secondaryColor}"/><text x="800" y="1100" style="font-size:800px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-arrow":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25.47 * {scale})" height="calc(35.18 * {scale})" viewBox="0 0 4330 5980"><g fill="{color}"><path d="m2080 5969c-49-20-93-63-115-113-25-55-1928-5486-1953-5573-40-138 67-282 210-283 36 0 246 73 987 345 518 190 947 345 955 345 8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29-33 0-71-5-85-10z"/></g><g fill="{secondaryColor}"><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z"/><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z" style="transform:scale(-1,1);transform-origin:center"/></g><g fill="rgba(0,0,0,0.2)" ><path d="m2165 685c8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29z"/></g><text x="2165" y="3300" style="font-size:2500px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-ball-pin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15.67 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 235 452"><g transform="translate(-135 10)"><path fill="{secondaryColor}" d="m256 442 0 0c-13 0-18-11-18-24l-6-323c0-13 11-24 24-24h0c13 0 24 11 24 24l-6 323c0 13-5 24-18 24z"/><circle style="fill:{color};stroke-width:10;stroke:{secondaryColor}" cx="256" cy="112" r="111"/><ellipse transform="matrix(0.834 0.5518 -0.5518 0.834 65.7916 -97.18)" fill="rgba(255,255,255,0.3)" cx="194.399" cy="60.749" rx="19.076" ry="32.428"/></g><text x="117.5" y="160" style="font-size:160px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.67 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2000 2420"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M845 2152c-22-37-58-95-80-129-22-35-62-99-90-143l-50-80-312 0-313 0 0-900 0-900 900 0 900 0 0 900 0 900-313 0-313 0-34 58c-19 31-38 59-42 60-5 2-8 8-8 12 0 9-69 123-88 145-5 6-11 15-13 21-16 39-77 123-89 124-8 0-33-31-55-68z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(38.8 * {scale})" viewBox="0 0 2500 2910"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m866 2652c-17-31-37-68-46-82-9-14-32-54-51-90-19-36-50-92-70-125l-36-60-332-3-331-2 0-905 0-905 660 0 660 0 0-38c0-71 50-196 102-258 71-85 189-164 244-164 12 0 26-4 29-10 8-13 222-13 230 0 3 6 17 10 30 10 25 0 117 45 154 76 130 107 191 232 191 392 0 155-63 284-190 386-36 29-129 76-150 76-11 0-22 5-25 10-3 6-31 10-61 10l-54 0 0 660 0 660-332 2-332 3-29 50c-17 28-48 84-70 125-22 41-47 86-56 100-9 14-30 51-46 83-17 32-36 57-45 57-8 0-28-25-44-58z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.8 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2010 2410"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M856 2155c-20-30-36-59-36-65 0-5-4-10-10-10-5 0-10-5-10-11 0-5-18-37-40-69-22-32-40-64-40-69 0-6-4-11-10-11-5 0-10-5-10-10 0-6-15-33-32-60l-33-50-127 0c-74 0-129-4-133-10-3-5-17-10-30-10-25 0-116-45-155-76-87-69-142-151-178-265-15-46-17-1075-2-1084 5-3 10-17 10-30 0-13 5-27 10-30 6-3 10-13 10-22 0-22 83-135 122-168 57-46 62-50 112-75l50-25 585 0 586 0 63 34c84 46 169 133 212 218l35 68 0 565 0 565-28 59c-32 69-100 157-139 180-15 9-33 22-40 29-23 22-99 57-123 57-13 0-27 5-30 10-4 6-60 10-135 10l-128 0-128 205c-84 136-133 205-144 205-10 0-33-24-54-55z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(32.13 * {scale})" viewBox="0 0 2500 2900"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m874 2669c-9-18-26-49-37-68-11-20-30-55-43-78-13-24-36-64-51-90-14-27-38-69-52-95l-26-48-142 0c-84 0-144-4-148-10-3-5-17-10-30-10-25 0-118-46-154-76-91-76-136-142-175-254-13-38-16-119-16-554 0-358 3-520 12-545 40-125 106-219 195-278 127-84 116-83 646-83l467 0 0-42c0-46 11-87 45-163 54-121 169-220 306-264 46-14 232-14 278 0 165 53 284 175 340 350 19 61 14 204-10 273-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-3 6-28 10-56 10l-49 0 0 462c0 446-1 464-21 522-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-4 6-65 10-149 10-138 0-143 1-154 23-12 23-62 114-112 202-16 28-44 79-63 115-42 77-67 88-93 39z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(23.5 * {scale})" height="calc(40 * {scale})" viewBox="34 28 198 308"><path style="stroke:{secondaryColor};stroke-width:15;stroke-linecap:round;" d="M42 327l0 -291"/><path style="fill:{color};stroke:{secondaryColor};stroke-width:10;stroke-linejoin:round;" d="M49 50c70 30 104 28 178 2-21 42-21 74 0 116-72 25-101 25-178 0l0-118z"/><text x="130" y="165" style="font-size:100px;fill:#fff;text-anchor:middle">{text}</text></svg>',"flag-triangle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(35.33 * {scale})" viewBox="0 0 40.5 53"><g transform="translate(-31 -20)"><path fill="{secondaryColor}" d="M34.7,73.3V48.4l34.6-10.1c0.7-0.2,1.2-0.8,1.2-1.5s-0.4-1.4-1-1.7L33.7,20.5c-0.5-0.2-1.1-0.2-1.6,0.2 c-0.5,0.3-0.7,0.8-0.7,1.4v51.2H34.7z"/><polygon points="34.7,24.5 66,36.5 34.7,45 34.7,10" fill="{color}"/></g><text x="11" y="21" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(34 * {scale})" height="calc(34 * {scale})" viewBox="0 0 34 34"><g transform="translate(2 2)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17" y="22" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(38 * {scale})" height="calc(38 * {scale})" viewBox="0 0 38 38"><g transform="translate(4 4)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19" y="24" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',triangle:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(36 * {scale})" height="calc(36 * {scale})" viewBox="0 0 36 36"><g transform="translate(2 2)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="30" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><g transform="translate(4 4)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="32" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',hexagon:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(35 * {scale})" height="calc(40 * {scale})" viewBox="0 0 35 40"><g transform="translate(2 2)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="25" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(39 * {scale})" height="calc(44 * {scale})" viewBox="0 0 39 44"><g transform="translate(4 4)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="27" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1100 1100"><g transform="translate(50 50)"><path style="stroke:{secondaryColor};stroke-width:50;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="550" y="700" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1200 1200"><g transform="translate(100 100)"><path style="stroke:{secondaryColor};stroke-width:100;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="600" y="750" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="12,0 0,24 12,17 24,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="17" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-left":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="24,12 0,0 7,12 0,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="16.5" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(12.16 * {scale})" height="calc(30.1 * {scale})" viewBox="0 0 902 364"><g fill="{color}" transform="matrix(0,2.4,-2.4,0,897,-930)"><polygon points="902,222 233,222 233,364 0,182 233,0 233,141 902,141 902,222"/></g><text x="450" y="700" style="font-size:900px;fill:#000;text-anchor:middle">{text}</text></svg>',"arrow-up-thin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 12 25"><g transform="translate(-136.91823 -751.91998)"><path fill="{color}" d="m148.271 760.71c-1.641-.547-3.186-1.47-4.633-2.769l0 18.07-1.675 0 0-18.07c-1.447 1.299-2.986 2.222-4.616 2.769l0-1.231c2.325-1.596 4.006-3.812 5.043-6.65l.838 0c1.037 2.838 2.718 5.055 5.043 6.65l0 1.231z"/></g><text x="6" y="20" style="font-size:10px;fill:#000;text-anchor:middle">{text}</text></svg>',car:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(21.93 * {scale})" height="calc(40.9 * {scale})" viewBox="0 0 6580 12270"><g transform="translate(0 12270) rotate(-90)"><path fill="{secondaryColor}" d="M7045 6566c-42-13-105-44-105-51 0-2 23-105 50-228 28-123 50-230 50-236 0-8-241-11-907-11-855 0-1145 6-1513 30-85 6-189 13-230 15-41 3-133 10-205 15-286 21-430 32-705 50-953 63-1459 18-2335-205-304-77-746-209-799-238-131-72-221-408-285-1062-34-345-42-532-48-1130-16-1557 108-2532 336-2649 32-17 469-149 676-205 409-110 819-191 1205-238 116-14 224-18 540-18 395 1 494 5 1140 50 1124 79 1224 82 2496 78l641-3-53-237c-29-131-52-238-51-239 1-1 31-14 66-29 56-23 76-26 142-23 67 3 83 7 120 33 23 17 50 41 61 55 10 14 51 117 91 230l73 205 674 3 675 2 90-39c98-43 198-72 315-93 122-21 829-18 990 5 321 45 626 143 849 270 293 168 516 378 704 662 266 402 416 893 467 1527 15 174 8 882-9 998-6 41-18 127-27 190-69 502-253 969-523 1325-79 105-262 284-381 374-189 142-355 229-574 300-336 110-526 139-952 148-457 9-685-23-887-124l-47-24-678-6-678-6-64 179c-79 224-92 253-121 284-67 70-177 97-274 66zm-2752-5073c-23-2-64-2-90 0-26 2-7 3 42 3 50 0 71-1 48-3zm395 0c-21-2-55-2-75 0-21 2-4 4 37 4 41 0 58-2 38-4z"/><path fill="{color}" d="M7043 6498c-13-6-23-19-23-28 0-9 23-117 50-240 28-123 50-230 50-237 0-22-2126-13-2465 10-132 10-400 28-595 42-661 47-824 55-1160 62-435 7-656-8-1040-73-415-70-865-183-1447-365-168-53-272-556-325-1569-16-319-16-1311 0-1630 45-872 129-1366 257-1518 22-26 51-39 172-77 557-177 1122-310 1563-369 271-36 351-40 690-40 361 1 463 6 1165 54 1122 78 1288 83 2337 79 460-2 840-7 843-11 4-4-17-117-47-252l-55-245 39-16c76-30 180-8 224 47 10 13 54 124 98 246l79 222 709 0 709 0 47-24c74-37 219-83 322-101 122-22 606-32 802-16 374 29 658 102 933 238 124 62 271 155 361 230l61 51 6 100c19 278 103 497 247 643 88 89 173 136 278 152l70 11 41 131c116 369 159 673 168 1170 10 584-38 984-167 1397l-40 126-70 12c-193 33-348 175-441 405-56 139-89 302-89 445 0 43-3 47-58 91-290 235-644 384-1068 450-191 29-796 39-974 16-135-18-263-54-368-102l-75-35-701 0-701 0-79 223c-82 232-102 267-163 293-38 16-138 17-170 2zm-2023-820c332-15 1155-12 1835 6 308 8 563 12 566 8 4-4 10-21 13-38 7-30 6-31-92-77-518-244-1197-396-2112-474-295-25-1282-25-1579 0-231 20-473 46-479 51-6 7 49 110 93 171 160 226 416 335 855 365 142 10 539 5 900-12zm3304-263c525-111 899-887 934-1935 19-557-37-1023-172-1435-186-563-521-900-896-899-81 0-158 14-525 92-426 91-431 92-540 146-195 96-287 207-306 368-12 104-11 2985 1 3078 22 170 135 291 365 389 49 21 191 55 480 115 226 47 419 87 430 89 45 10 164 6 229-8zm-5570-485c112-43 197-156 216-291 12-83 13-2623 1-2706-23-158-125-273-270-304-44-9-100-1-542 75-272 47-514 91-539 98-266 68-487 424-594 958-56 280-70 548-40 800 56 484 207 878 414 1081 115 114 122 116 702 218 277 49 524 90 550 90 26 1 72-8 102-19zm2111-3440c1023-44 1884-213 2462-486l113-53-7-33c-3-18-8-35-10-37-2-3-236 1-521 7-993 24-1271 26-1708 11-541-18-1128-18-1249-1-377 56-588 181-734 437-32 55-41 79-32 84 12 8 246 32 491 51 356 28 815 36 1195 20z"/></g><text x="3250" y="8250" style="font-size:3000px;fill:#fff;text-anchor:middle">{text}</text></svg>',checker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 16 16"><pattern id="p" x="0" y="0" width="16" height="16" patternUnits="userSpaceOnUse"><rect fill="{color}" x="0" width="8" height="8" y="0"/><rect fill="{color}" x="8" width="8" height="8" y="8"/></pattern><rect x="0" y="0" width="16" height="16" fill="{secondaryColor}"/><rect x="0" y="0" width="16" height="16" fill="url(#p)"/></svg>',"checker-rotated":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 60 60"><rect width="60" height="60" fill="{secondaryColor}"/><rect width="42.42" height="42.42" transform="translate(30 0) rotate(45)" fill="{color}"/></svg>',"zig-zag":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 120 60 120 90 90 120 60 120 0 120 0 60 60 0 0 0 60 30 90 60 120 120 120"/></svg>',"zig-zag-vertical":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 0 120 60 90 30 60 0 0 0 0 0 60 60 0 120 60 120 90 90 120 60 120 0"/></svg>',"circles-spaced":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',circles:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(7 * {scale})" height="calc(7 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="6" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',"diagonal-lines-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-lines-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-stripes-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"diagonal-stripes-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(14 * {scale})" height="calc(14 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(45 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}" transform="rotate(-45 3 3)"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-stripes":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"x-fill":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="45.3" height="45.3" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(13 * {scale})" height="calc(13 * {scale})" viewBox="0 0 20 20"><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><g fill="{color}"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/></g></svg>'},jd=(Id.getHighContrastMode=function(){return matchMedia("(-ms-high-contrast: white-on-black)").matches?"dark":matchMedia("(-ms-high-contrast: black-on-white)").matches?"light":matchMedia("(-ms-high-contrast: active)").matches?"dark":matchMedia("(inverted-colors: inverted)").matches?"invert":null},Id);function Id(){}(window&&window.__extends||(Td=function(t,e){return(Td=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Td(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Rd,zd=t);var Td,zd,Dd=Rd;function Rd(){var t=null!==zd&&zd.apply(this,arguments)||this;return t.copyrightMessage=void 0,t.copyrightContent=void 0,t.customAttribution=void 0,t.showFeedbackLink=!0,t.showLogo=!0,t}(window&&window.__extends||(Bd=function(t,e){return(Bd=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Bd(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Zd,Fd=Ot),Zd.prototype.onAdd=function(t){return this.container=this.buildContainer(t,u.ControlStyle.auto),this.container.className="map-copyright",this.copyrightDiv=this.buildCopyrightDiv(),this.copyrightDiv.className="azure-map-copyright",this.container.appendChild(this.copyrightDiv),this.options.showLogo&&this.addRemoveLogo(!0),this.options.showFeedbackLink&&this.addRemoveFeedbackDiv(!0),this.container},Zd.prototype.onRemove=function(){Fd.prototype.onRemove.call(this),delete this.container},Zd.prototype.setOptions=function(t){var e,o=this,t=(new Dd).merge(this.options,t);t.copyrightMessage===this.options.copyrightMessage&&t.customAttribution===this.options.customAttribution||(this.copyrightDiv.innerText=this.textAttribution(t)),t.copyrightContent!==this.options.copyrightContent&&(this.options.copyrightContent&&(e=Array.from(this.copyrightDiv.children).find(function(t){return t===o.options.copyrightContent}),this.copyrightDiv.removeChild(e)),0<this.copyrightDiv.childNodes.length?this.copyrightDiv.insertBefore(t.copyrightContent,this.copyrightDiv.childNodes[0]):this.copyrightDiv.appendChild(t.copyrightContent),this.options.copyrightContent=t.copyrightContent),!t.showLogo&&this.logoAnchor?this.addRemoveLogo(!1):t.showLogo&&!this.logoAnchor&&this.addRemoveLogo(!0),!t.showFeedbackLink&&this.feedbackAnchor?this.addRemoveFeedbackDiv(!1):t.showFeedbackLink&&!this.feedbackAnchor&&this.addRemoveFeedbackDiv(!0),this.options=t},Zd.prototype.getDefaultAttributions=function(){var t=(new Date).getFullYear(),e=["©".concat(t," TomTom")];return this.options.showLogo||e.push("©".concat(t," Microsoft")),e},Zd.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.textAttribution(this.options)||"",t},Zd.prototype.buildFeedbackLink=function(){var t=document.createElement("a");return t.setAttribute("alt","Give Feedback"),t.setAttribute("aria-label","Give Feedback"),t.href="https://feedback.azuremaps.com",t.target="_blank",t.rel="noopener",t.className="azure-map-feedback",t},Zd.prototype.addRemoveFeedbackDiv=function(t){t?(this.feedbackAnchor=this.buildFeedbackLink(),this.tooltip=_("Give Feedback"),this.container.appendChild(this.feedbackAnchor),this.container.appendChild(this.tooltip),b(this.tooltip,this.feedbackAnchor)):(this.feedbackAnchor.remove(),this.tooltip.remove(),delete this.tooltip,delete this.feedbackAnchor)},Zd.prototype.addRemoveLogo=function(t){t?(this.logoAnchor=document.createElement("a"),this.logoAnchor.className="azure-map-logo",this.logoAnchor.href="https://aka.ms/azuremaps",this.logoAnchor.setAttribute("aria-label","Visit azure.microsoft.com"),this.logoAnchor.setAttribute("target","_blank"),this.container.appendChild(this.logoAnchor),this.logoTooltip=_("Visit azure.microsoft.com"),this.container.appendChild(this.logoTooltip),b(this.logoTooltip,this.logoAnchor)):(this.logoAnchor.remove(),this.logoTooltip.remove(),delete this.logoAnchor)};var Bd,Fd,Nd=Zd;function Zd(t){var e=Fd.call(this)||this;return e.textAttribution=function(t){return[e.options.copyrightMessage,e.options.customAttribution].filter(function(t){return t}).join("")},e.options=(new Dd).merge(t),e}window&&window.__assign;window&&window.__awaiter,window&&window.__generator,window&&window.__read,window&&window.__spreadArray;var qd,Hd,Ud=function(t){var o=this;this.addToMap=function(){null==o.mapViewDesc&&(o.initializeMapLiveStateInfo(),o.initializeMapStyleInfo(),o.createMapKeyBindingInfo(),o.map.getMapContainer().setAttribute("role","application"),o.map.getMapContainer().setAttribute("aria-label","Map Application"),o.map.getCanvasContainer().setAttribute("aria-live","polite"),o.map.getCanvasContainer().setAttribute("aria-describedby","atlas-map-state atlas-map-style"),o.map.getCanvas().setAttribute("aria-label","Interactive Map"),o.map.getCanvas().setAttribute("aria-describedby","atlas-map-shortcuts"),o.map.getCanvas().setAttribute("alt","Interactive Map"))},this.removeFromMap=function(){null!=o.mapViewDesc&&o.mapViewDesc.dispose(),delete o.mapViewDesc,null!=o.atlasMapKeyBindings&&o.map.getCanvasContainer().removeChild(o.atlasMapKeyBindings),delete o.atlasMapKeyBindings,null!=o.atlasMapLiveStateInfo&&o.map.getCanvasContainer().removeChild(o.atlasMapLiveStateInfo),delete o.atlasMapLiveStateInfo,null!=o.atlasMapStyleInfo&&o.map.getCanvasContainer().removeChild(o.atlasMapStyleInfo),delete o.atlasMapStyleInfo,o.map.getMapContainer().removeAttribute("role"),o.map.getMapContainer().removeAttribute("aria-label"),o.map.getCanvasContainer().removeAttribute("aria-live"),o.map.getCanvasContainer().removeAttribute("aria-describedby"),o.map.getCanvas().removeAttribute("aria-label"),o.map.getCanvas().removeAttribute("aria-describedby"),o.map.getCanvas().removeAttribute("alt"),o.map.events.remove("stylechanged",o.updateMapStyle)},this.createMapKeyBindingInfo=function(){o.atlasMapKeyBindings=document.createElement("div"),o.atlasMapKeyBindings.setAttribute("tabindex","-1"),o.atlasMapKeyBindings.setAttribute("aria-hidden","true"),o.atlasMapKeyBindings.id="atlas-map-shortcuts",o.atlasMapKeyBindings.classList.add("hidden-accessible-element"),o.atlasMapKeyBindings.innerHTML=["Map shortcuts:","Zoom out: hyphen.","Zoom in: plus.","Pan right 100 pixels: right arrow.","Pan left 100 pixels: left arrow.","Pan up 100 pixels: up arrow.","Pan down 100 pixels: down arrow.","Rotate 15 degrees clockwise: shift + right arrow.","Rotate 15 degrees counter clockwise: shift + left arrow.","Increase pitch 10 degrees: shift + up arrow.","Decrease pitch 10 degrees: shift + down arrow.","Jump focus to the map: Escape."].join("\n"),o.map.getCanvasContainer().appendChild(o.atlasMapKeyBindings);var t=[189,187,38,37,39,40],e=o.map._getMap()._canvas;null!=e&&e.addEventListener("keyup",function(e){t.find(function(t){return e.keyCode===t})&&(o.atlasMapKeyBindings.innerHTML="")})},this.initializeMapLiveStateInfo=function(){},this.initializeMapStyleInfo=function(){o.atlasMapStyleInfo=document.createElement("div"),o.atlasMapStyleInfo.setAttribute("tabindex","-1"),o.atlasMapStyleInfo.setAttribute("aria-hidden","true"),o.atlasMapStyleInfo.id="atlas-map-style",o.atlasMapStyleInfo.classList.add("hidden-accessible-element"),o.map.events.add("stylechanged",o.updateMapStyle),o.map.getCanvasContainer().appendChild(o.atlasMapStyleInfo)},this.updateMapStyle=function(){o.atlasMapStyleInfo.innerHTML="<p>Map style: ".concat(o.map.getStyle().style,".</p>")},this.updateMapState=function(t){o.atlasMapLiveStateInfo.innerHTML=t},this.map=t},Wd=function(t){var o=this;this.listenerEnabled=!1,this.lastFlowMode="none",this.addToMap=function(){if(!o.map._isReady())throw new Error("Traffic flow could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before enabling traffic flow.");o.listenerEnabled||(o.map.events.add("styledata",o.addToMap),o.listenerEnabled=!0);var t,e=o.map.getTraffic();"none"!==e.flow&&(t=o.map.layers.getLayerById("traffic_".concat(e.flow)))&&(o.lastFlowMode=e.flow,t._updateLayoutProperty("visibility","visible","none"))},this.removeFromMap=function(){var t;o.map.getTraffic(),"none"!=o.lastFlowMode&&((t=o.map.layers.getLayerById("traffic_".concat(o.lastFlowMode)))&&t._updateLayoutProperty("visibility","none","visible"),o.lastFlowMode="none"),o.listenerEnabled&&(o.map.events.remove("styledata",o.addToMap),o.listenerEnabled=!1)},this.map=t},Gd=((window&&window.__extends||(qd=function(t,e){return(qd=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}qd(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Vd,Hd=t),Vd);function Vd(){var t=null!==Hd&&Hd.apply(this,arguments)||this;return t.interactive=!0,t.scrollZoomInteraction=!0,t.boxZoomInteraction=!0,t.dragRotateInteraction=!0,t.dragPanInteraction=!0,t.keyboardInteraction=!0,t.dblClickZoomInteraction=!0,t.touchInteraction=!0,t.touchRotate=!0,t.wheelZoomRate=1/450,t}Yd.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},Yd.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)};var Kd=Yd;function Yd(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}$d.prototype.enable=function(){this.map.getCanvasContainer().addEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().addEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().addEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().addEventListener("touchend",this._onTouchEnd)},$d.prototype.disable=function(){this.map.getCanvasContainer().removeEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().removeEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().removeEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().removeEventListener("touchend",this._onTouchEnd)};var Jd=$d;function $d(t){var e=this;this._onGestureStart=function(t){e.hasTouch||(t.preventDefault(),e.initZoom=e.map.getCamera().zoom)},this._onGestureChange=function(t){e.hasTouch||(t.preventDefault(),e.map.setCamera({zoom:e.initZoom+t.scale-1}))},this._onTouchStart=function(t){e.hasTouch=!0},this._onTouchEnd=function(t){0===t.touches.length&&(e.hasTouch=!1)},this.map=t}Qd.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},Qd.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},Qd.prototype.setOptions=function(t){this.options=(new Gd).merge(this.options,t),this.added&&this._setInteractions(this.options)},Qd.prototype.getOptions=function(){return Object.assign({},this.options)},Qd.prototype._setInteractions=function(t){var e;t.interactive?(t.boxZoomInteraction?this.map._getMap().boxZoom.enable():this.map._getMap().boxZoom.disable(),t.dblClickZoomInteraction?this.map._getMap().doubleClickZoom.enable():this.map._getMap().doubleClickZoom.disable(),t.dragPanInteraction?this.map._getMap().dragPan.enable():this.map._getMap().dragPan.disable(),t.dragRotateInteraction?this.map._getMap().dragRotate.enable():this.map._getMap().dragRotate.disable(),t.keyboardInteraction?(this.map._getMap().keyboard.enable(),this.focusShortcut.enable()):(this.map._getMap().keyboard.disable(),this.focusShortcut.disable()),t.scrollZoomInteraction?(this.map._getMap().scrollZoom.enable(),this.map._getMap().scrollZoom.setWheelZoomRate(t.wheelZoomRate)):this.map._getMap().scrollZoom.disable(),e=this.map._getMap().touchZoomRotate,t.touchInteraction?(e.enable(),t.touchRotate?e.enableRotation():e.disableRotation()):e.disable(),this.pinchZoom.enable()):(this.map._getMap().boxZoom.disable(),this.map._getMap().doubleClickZoom.disable(),this.map._getMap().dragPan.disable(),this.map._getMap().dragRotate.disable(),this.map._getMap().keyboard.disable(),this.focusShortcut.disable(),this.map._getMap().scrollZoom.disable(),this.map._getMap().touchZoomRotate.disable(),this.pinchZoom.disable())};var Xd=Qd;function Qd(t,e){this.added=!1,this.map=t,this.focusShortcut=new Kd(t),this.pinchZoom=new Jd(t),this.options=(new Gd).merge(e)}var tf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ef=(of.prototype.add=function(t,e){var o,n;if(Array.isArray(t))try{for(var r=tf(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._add(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._add(t,e)},of.prototype.getControls=function(){return Array.from(this.controls)},of.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=tf(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._remove(t)},of.prototype._add=function(t,e){this.controls.add(t);var o=(new yt).merge(e),t=t.onAdd(this.map,e),e=this.controlContainer.getElementsByClassName(o.position);if(!(0<e.length))throw new Error("Control position ".concat(o.position," does not exist."));e.item(0).appendChild(t)},of.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},of);function of(t){for(var e in this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),u.ControlPosition){var o;u.ControlPosition.hasOwnProperty(e)&&((o=document.createElement("div")).classList.add(u.ControlPosition[e]),o.classList.add("subcontrol-container"),this.controlContainer.appendChild(o))}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}var nf=window&&window.__assign||function(){return(nf=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rf=(sf.prototype.addCallback=function(s,a,c,t,l){var e,u,p=this;if(t)e=function(t){var e=t.lngLat?new Ec(t.lngLat.lng,t.lngLat.lat):void 0,o=t.point?[t.point.x,t.point.y]:void 0,n=t.features?t.features.map(function(t){return new Ma(t.geometry,t.properties,t.id)}):[],t={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:o,features:n};c(t)};else switch(s){case"data":case"sourcedata":case"styledata":e=function(t){t=nf(nf({dataType:t.dataType},"source"===t.dataType&&nf(nf(nf({isSourceLoaded:t.isSourceLoaded},t.sourceDataType&&{sourceDataType:t.sourceDataType}),{source:p.map.sources.getById(t.sourceId)}),t.tile&&{tile:{id:{x:t.tile.tileID.canonical.x,y:t.tile.tileID.canonical.y,z:t.tile.tileID.canonical.z},size:t.tile.tileSize,state:t.tile.state}})),{map:p.map,type:t.type});l&&p.map.events._removeListener(s,a,c),c(t)};break;case"error":e=function(t){t={error:t.error,map:p.map,type:t.type};l&&p.map.events._removeListener(s,a,c),c(t)};break;case"touchstart":case"touchend":case"touchmove":case"touchcancel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e=t.point?new Ia(t.point.x,t.point.y):void 0,o=t.points?t.points.map(function(t){return new Ia(t.x,t.y)}):[],n=t.lngLat?new Ec(t.lngLat.lng,t.lngLat.lat):void 0,r=t.lngLats?t.lngLats.map(function(t){return new Ec(t.lng,t.lat)}):[],i=n?p.map.layers.getRenderedShapes(new Ta(n),a?[a]:void 0):[],e={map:p.map,originalEvent:t.originalEvent,pixel:e,pixels:o,position:n,positions:r,shapes:i,layerId:a||void 0,preventDefault:function(){return t.preventDefault()},type:t.type};l&&p.map.events._removeListener(s,a,c),c(e)};break;case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"click":case"dblclick":case"mouseout":case"mouseenter":case"mouseleave":case"contextmenu":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e=t.lngLat?new Ec(t.lngLat.lng,t.lngLat.lat):void 0,o=t.point?new Ia(t.point.x,t.point.y):void 0,n=e?p.map.layers.getRenderedShapes(new Ta(e),a?[a]:void 0):[],e={map:p.map,originalEvent:t.originalEvent,position:e,pixel:o,preventDefault:function(){return t.preventDefault()},shapes:n,layerId:a||void 0,type:t.type};l&&p.map.events._removeListener(s,a,c),c(e)};break;case"styleimagemissing":e=function(t){l&&p.map.events._removeListener(s,a,c),c(t.id)};break;case"wheel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e={map:p.map,originalEvent:t.originalEvent,preventDefault:function(){return t.preventDefault()},type:t.type};l&&p.map.events._removeListener(s,a,c),c(e)};break;case"resize":e=function(t){var e,o={map:p.map,type:t.type};for(e in t)"type"!==e&&"target"!==e&&(o[e]=t[e]);l&&p.map.events._removeListener(s,a,c),c(o)};break;default:e=function(t){var e={map:p.map,type:t.type};t.originalEvent&&(e.originalEvent=t.originalEvent),l&&p.map.events._removeListener(s,a,c),c(e)}}this.callbacks.has(a)||this.callbacks.set(a,new wt),this.callbacks.get(a).has(s)||this.callbacks.get(a).set(s,new Map),this.callbacks.get(a).get(s).set(c,[e,l])},sf.prototype.removeCallback=function(t,e,o){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(o)&&this.callbacks.get(e).get(t).delete(o)},sf.prototype.getModifiedCallback=function(t,e,o){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(o))return this.callbacks.get(e).get(t).get(o)[0]},sf.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},sf.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){e=this.callbacks.get(e);if(e.has(t))return e.get(t)}},sf);function sf(t){this.callbacks=new wt,this.map=t}var af=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cf=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},lf=["maxzoomchanged","minzoomchanged","mapconfigurationchanged"],uf=(pf.prototype.add=function(t,e,o){var n,r;if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else{e=Array.isArray(e)?e:[e];try{for(var i=af(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof A&&A._isMBoxEvent(t)?this._addLayerListener(t,a,o,!1,!1):a._addEventListener(t,o,!1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},pf.prototype.addOnce=function(t,e,o){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof A&&A._isMBoxEvent(t)?this._addLayerListener(t,e,o,!1,!0):e._addEventListener(t,o,!0)},pf.prototype._addLegacy=function(t,e,o){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,o,!0,!1)},pf.prototype._addLayerListener=function(t,e,o,n,r){var i,s,a,c,e=e instanceof A?e.getId():e,l=this.map.layers.getLayerById(e),u=this.mapCallbackHandler.getModifiedCallback(t,e,o);if(u&&l)try{for(var p=af(l._getLayerIds()),h=p.next();!h.done;h=p.next()){var d=h.value;this.map._getMap().off(t,d,u)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}if(this.mapCallbackHandler.addCallback(t,e,o,n,r),l){u=this.mapCallbackHandler.getModifiedCallback(t,e,o);try{for(var f=af(l._getLayerIds()),y=f.next();!y.done;y=f.next()){d=y.value;this.map._getMap().on(t,d,u)}}catch(t){a={error:t}}finally{try{y&&!y.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}}},pf.prototype._addGlobalListener=function(t,e,o,n){var r,i,s,a;lf.includes(t)?this.map._addEventListener(t,e,n):(r=this.mapCallbackHandler.getModifiedCallback(t,"",e),this.mapCallbackHandler.addCallback(t,"",e,o,n),i=this.mapCallbackHandler.getModifiedCallback(t,"",e),"load"===t&&this.map._isLoaded()?(s={type:"load",map:this.map},setTimeout(function(){return i(s)})):"ready"===t?this.map._isReady()&&(a={type:"ready",map:this.map},setTimeout(function(){return i(a)})):(r&&this.map._getMap().off(t,r),this.map._getMap().on(t,i)))},pf.prototype.invoke=function(t,e,o){if(void 0===o)this._invokeListeners(t,"",e);else if(e instanceof A&&A._isMBoxEvent(t))this._invokeListeners(t,e.getId(),o);else{if(!(e instanceof _t))throw new Error("The invoke target is invalid.");e._invokeEvent(t,o)}},pf.prototype._invokeListeners=function(o,n,r){var i=this,t=new wt(this.mapCallbackHandler.getEventCallbacks(o,n));t?t.forEach(function(t,e){t=cf(t,2);t[0],t[1]&&i._removeListener(o,n,e),e(r)}):"error"===o&&console.error("error"in r?r.error:r)},pf.prototype.remove=function(t,e,o){var n,r;if("function"==typeof e)this._removeListener(t,"",e);else{e=Array.isArray(e)?e:[e];try{for(var i=af(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof A&&A._isMBoxEvent(t)?this._removeListener(t,a,o):null!=a&&a._removeEventListener(t,o)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},pf.prototype._removeLegacy=function(t,e,o){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,o)},pf.prototype._removeListener=function(t,e,o){var n,r;if(lf.includes(t))this.map._removeEventListener(t,o);else{var e=e instanceof A?e.getId():e,i=this.mapCallbackHandler.getModifiedCallback(t,e,o);if(i)if(e){var s=this.map.layers.getLayerById(e);if(s)try{for(var a=af(s._getLayerIds()),c=a.next();!c.done;c=a.next()){var l=c.value;this.map._getMap().off(t,l,i)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}else this.map._getMap().off(t,i);this.mapCallbackHandler.removeCallback(t,e,o)}},pf.prototype._enableLayerEvents=function(c){var l=this,t=this.mapCallbackHandler.getLayerCallbacks(c.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,o,n=cf(t,1)[0];try{for(var r=af(c._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;l.map._getMap().on(a,s,n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}})})},pf.prototype._disableLayerEvents=function(c){var l=this,t=this.mapCallbackHandler.getLayerCallbacks(c.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,o,n=cf(t,1)[0];try{for(var r=af(c._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;l.map._getMap().off(a,s,n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}})})},pf);function pf(t){this.map=t,this.mapCallbackHandler=new rf(this.map)}var hf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},df=(ff.prototype.add=function(t,e){var o,n;if(Array.isArray(t))try{for(var r=hf(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addMarker(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._addMarker(t,e)},ff.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},ff.prototype.getMarkers=function(){return Array.from(this.markers)},ff.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=hf(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeMarker(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._removeMarker(t)},ff.prototype._removeMarker=function(e){var o=this;e instanceof xh?(e._removeFromMap(),this.markers.delete(e)):this.markers.forEach(function(t){t._getId()===e&&(t._removeFromMap(),o.markers.delete(t))})},ff.prototype.clear=function(){var e=this;this.markers.forEach(function(t){t._removeFromMap(),e.markers.delete(t)})},ff);function ff(t){this.markers=new Set,this.map=t}mf.prototype.add=function(s,e,a){var c=this;return new Promise(function(o,n){var r,t,i;c.userImages.has(s)?o():e instanceof HTMLImageElement||e instanceof ImageData?(c.map._getMap().addImage(s,e,a),c.userImages.set(s,{image:e,meta:a}),o()):"string"==typeof e&&(t=void 0,t=/<svg/i.test(e)&&!/^data:/i.test(e)?"data:image/svg+xml;base64,"+window.btoa(e):e,i=!1,c.map._sendRequest(t,"Image").then(function(t){return i?void 0:t.blob()}).then(function(t){var e;!i&&t&&(clearTimeout(r),(e=new Image).onload=function(){c.map._getMap().addImage(s,e,a),c.userImages.set(s,{image:e,meta:a}),o()},e.onerror=e.onabort=function(){n("Failed to load image into HTML element.")},e.src=URL.createObjectURL(t))}).catch(function(){i||(clearTimeout(r),n("Failed to load image into HTML element."))}),r=setTimeout(function(){i=!0,n("Failed to load image within specified timeout: ".concat(c.imageLoadTimeout," ms."))},c.imageLoadTimeout))})},mf.prototype.clear=function(){var o=this;this.userImages.forEach(function(t,e){o.map._getMap().removeImage(e)}),this.userImages.clear()},mf.prototype.getImageIds=function(){var o=[];return this.userImages.forEach(function(t,e){o.push(e)}),o},mf.prototype.createFromTemplate=function(t,e,o,n,r){o=o||"#1A73AA",n=n||"#fff";e=(e=xd(e,r)).replace(/{color}/g,o).replace(/{secondaryColor}/g,n).replace(/{text}/g,"");return this.add(t,e)},mf.prototype.hasImage=function(t){return this.userImages.has(t)},mf.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},mf.prototype._restoreImages=function(){var o=this;this.userImages.forEach(function(t,e){o.map._getMap().hasImage(e)||o.map._getMap().addImage(e,t.image,t.meta)})};var yf=mf;function mf(t){this.userImages=new wt,this.imageLoadTimeout=5e3,this.map=t}var gf,vf,fo=window&&window.__extends||(gf=function(t,e){return(gf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}gf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),wf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_f=(fo(bf,vf=A),bf.prototype._buildLayers=function(){return this.layers},bf.prototype._getLayerIds=function(){return this.layers.map(function(t){return t.id})},bf.prototype._getSourceIds=function(){var e,t,o=new Set;try{for(var n=wf(this.layers),r=n.next();!r.done;r=n.next()){var i=r.value;"source"in i&&"string"==typeof i.source?o.add(i.source):"source"in i&&i.source&&o.add(i.id)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return o},bf.prototype._updateLayoutProperty=function(e,o,t,n){var r;_a(o,t)||(r=this.map._getMap(),this.layers.forEach(function(t){r.getLayer(t.id)?r.setLayoutProperty(t.id,e,n||o):console.warn("Could not update layout property ".concat(e," for layer ").concat(t.id," to ").concat(n||o))}))},bf);function bf(t,e){e=vf.call(this,e)||this;return e.layers=t,e}var xf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Sf=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Of=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Cf=(Pf.prototype.add=function(t,e){var o,n,r=e instanceof A?e.getId():e;if(Array.isArray(t))try{for(var i=xf(t),s=i.next();!s.done;s=i.next()){var a=s.value;this._addLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}else this._addLayer(t,r)},Pf.prototype._addLayer=function(e,o){if(!(this.map._isReady()||e instanceof _f))throw new Error("The layer '".concat(e.getId(),"' could not be added to the map because ")+"the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a layer to it.");var t,n,r,i;o!==e.getId()&&this.layerIndex.find(function(t){return o===t.getId()})?this._getMapboxLayerExists(e)?(n=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),this._removeMapboxLayers(e),this._addMapboxLayers(e,o),(i=this.layerIndex[n])&&this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),this.layerIndex.splice(n,1),t=this.layerIndex.findIndex(function(t){return t.getId()===o}),this.layerIndex.splice(t,0,e),e instanceof _f||(this.userLayers[r]={layer:e,before:o}),i&&i.onRemove()):(this._addMapboxLayers(e,o),this.map.events._enableLayerEvents(e),t=this.layerIndex.findIndex(function(t){return t.getId()===o}),this.layerIndex.splice(t,0,e),e instanceof _f||this.userLayers.push({layer:e,before:o})):(n=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),0<=n&&0<=r?(i=this.layerIndex[n],this._removeMapboxLayers(i),this._addMapboxLayers(e,n+1),this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),(this.layerIndex[n]=e)instanceof _f||(this.userLayers[r]={layer:e,before:void 0}),i.onRemove()):(this._addMapboxLayers(e),this.map.events._enableLayerEvents(e),this.layerIndex.push(e),e instanceof _f||this.userLayers.push({layer:e,before:o}))),e.onAdd(this.map)},Pf.prototype._addMapboxLayers=function(t,e){var o,n;if(!(t instanceof Vp)||t.getOptions().tileUrl){if(!(t instanceof _f)){t instanceof Bu&&(this.map._getMap().addSource(t._getSourceId(),t._buildSource()),this.map.sources.setSourceState(t._getSourceWrapper()));var r=this._getMapboxBefore(e);try{for(var i=xf(t._buildLayers()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().addLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}}this.map.events._enableLayerEvents(t)}},Pf.prototype._removeMapboxLayers=function(t,e){var o,n;if(t instanceof _f&&!e)this.map.events._disableLayerEvents(t);else{try{for(var r=xf(t._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;this.map._getMap().getLayer(s)&&this.map._getMap().removeLayer(s)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this.map.events._disableLayerEvents(t),t instanceof Bu&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())}},Pf.prototype._getMapboxLayerExists=function(e){var o=this,n=!1;return"string"==typeof e?!!(e=this.layerIndex.find(function(t){return t.getId()===e})):(e._getLayerIds().forEach(function(t){o.map._getMap().getLayer(t)&&(n=!0)}),n)},Pf.prototype._getMapboxBefore=function(e){var o,t,n,r;if("string"==typeof e){var i=this.layerIndex.find(function(t){return t.getId()===e});if(!i)return;try{for(var s=xf(i._getLayerIds()),a=s.next();!a.done;a=s.next()){var c=a.value;if(this.map._getMap().getLayer(c))return c}}catch(t){o={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}e=this.layerIndex.findIndex(function(t){return t.getId()===e})+1}for(var l=e;l<this.layerIndex.length;l++)try{n=void 0;for(var u=xf(this.layerIndex[l]._getLayerIds()),p=u.next();!p.done;p=u.next()){c=p.value;if(this.map._getMap().getLayer(c))return c}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}},Pf.prototype.clear=function(){for(var t=this.layerIndex.length-1;0<=t;t--){var e=this.layerIndex[t];e&&(this._removeMapboxLayers(e,!0),this.layerIndex.splice(t,1),e.onRemove())}this.userLayers=[]},Pf.prototype.getLayerById=function(e){var t=this.layerIndex.find(function(t){return t.getId()===e});if(t)return t},Pf.prototype.getLayers=function(){return this.layerIndex.slice(0)},Pf.prototype._getSourceIds=function(){var e,t,o=new Set;try{for(var n=xf(this.layerIndex),r=n.next();!r.done;r=n.next())r.value._getSourceIds().forEach(function(t){return o.add(t)})}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return o},Pf.prototype._getUserLayers=function(){return Array.from(this.userLayers)},Pf.prototype.move=function(t,e){var o=t instanceof A?t.getId():t,n=e instanceof A?e.getId():e;if(!this.layerIndex.find(function(t){return t.getId()===o}))throw new Error("The layer '".concat(o,"' has not been added to the map and cannot be moved."));e=this.layerIndex.findIndex(function(t){return t.getId()===o}),this._moveMapboxLayers(this.layerIndex[e],n),t=this.layerIndex[e],this.layerIndex.splice(e,1),e=this.layerIndex.findIndex(function(t){return t.getId()===n}),-1<e?this.layerIndex.splice(e,0,t):this.layerIndex.push(t),e=this.userLayers.find(function(t){return t.layer.getId()===o});e&&(e.before=n)},Pf.prototype._moveMapboxLayers=function(t,e){var o,n,r=this._getMapboxBefore(e);try{for(var i=xf(t._getLayerIds()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().moveLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}},Pf.prototype.getRenderedShapes=function(t,e,o){var n,r,i,s=this;if(t=t||[-180,-85.0511,180,85.0511],Array.isArray(t)?4===t.length||6===t.length?i=this.map.positionsToPixels([O.getSouthWest(t),O.getNorthEast(t)]):2!==t.length&&3!==t.length||(i=this.map.positionsToPixels([t])[0]):i=this.map.positionsToPixels([t.coordinates])[0],e){e=Array.isArray(e)?e:[e];var a=[],c=this;try{for(var l=xf(e),u=l.next();!u.done;u=l.next())!function(t){var e=t instanceof A?t.getId():t,t=c.layerIndex.findIndex(function(t){return t.getId()===e});if(!(-1<t))throw new Error("The layer '".concat(e,"' has not been added to the map ")+"and its rendered features cannot be retrieved.");a.push.apply(a,Of([],Sf(c.layerIndex[t]._getLayerIds().filter(function(t){return!!s.map._getMap().getLayer(t)})),!1))}(u.value)}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}t=this.map._getMap().queryRenderedFeatures(i,{layers:a,filter:o});return this.map.sources._mapFeaturesToShapes(t)},Pf.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=xf(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeLayer(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._removeLayer(t)},Pf.prototype._removeLayer=function(t){var e=t instanceof A?t.getId():t,o=this.layerIndex.findIndex(function(t){return t.getId()===e});if(-1==o)throw new Error("The layer '".concat(e,"' has not been added to the map and cannot be removed."));var n=this.layerIndex[o],o=(this._removeMapboxLayers(n),this.layerIndex.splice(o,1),this.userLayers.findIndex(function(t){return t.layer.getId()===e}));-1!=o&&this.userLayers.splice(o,1),t instanceof Bu&&this.map.sources.unsetSourceState(t._getSourceId()),n.onRemove()},Pf);function Pf(t){this.layerIndex=[],this.userLayers=[],this.map=t}var Lf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kf=(Mf.prototype.add=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=Lf(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.popups.has(i)||(this.popups.add(i),i.attach(this.map))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Mf.prototype.clear=function(){var e=this;this.popups.forEach(function(t){e.popups.delete(t),t.remove()})},Mf.prototype.remove=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=Lf(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.popups.has(i)&&(this.popups.delete(i),i.remove())}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Mf.prototype.getPopups=function(){return Array.from(this.popups)},Mf.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector(".".concat(Mf.Css.collection));return t||((t=document.createElement("div")).classList.add(Mf.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},Mf.prototype._addDraggedPopup=function(t){0===this.draggedPopups.size&&(this.map.getMapContainer().addEventListener("mousemove",this._onDrag),this.map.getMapContainer().addEventListener("touchmove",this._onDrag),this.map.getMapContainer().addEventListener("mouseup",this._onUp),this.map.getMapContainer().addEventListener("touchend",this._onUp)),this.draggedPopups.add(t)},Mf.Css={collection:"popup-collection-container"},Mf);function Mf(t){var n=this;this._onDrag=function(t){var e,o;"mousemove"===t.type?(e=t.clientX,o=t.clientY):"touchmove"===t.type&&(e=t.touches[0].clientX,o=t.touches[0].clientY),n.draggedPopups.forEach(function(t){t._dragToPixel([e,o])})},this._onUp=function(){n.map.getMapContainer().removeEventListener("mousemove",n._onDrag),n.map.getMapContainer().removeEventListener("touchmove",n._onDrag),n.map.getMapContainer().removeEventListener("mouseup",n._onUp),n.map.getMapContainer().removeEventListener("touchend",n._onUp),n.draggedPopups.forEach(function(t){n.draggedPopups.delete(t),t._onUp()})},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var Af=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ef=(jf.prototype.add=function(t,e){var o,n;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=Af(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addSource(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._addSource(t,e)},jf.prototype.getRenderedShapes=function(t,e,o){t="string"==typeof t?t:t.getId(),o=this.map._getMap().querySourceFeatures(t,{sourceLayer:o,filter:e});return this.map.sources._mapFeaturesToShapes(o,!0,this.sources.get(t))},jf.prototype._buildSources=function(){var e={};return this.sources.forEach(function(t){e[t.getId()]=t._buildSource()}),e},jf.prototype.clear=function(){var e=this;this.sources.forEach(function(t){e.remove(t)})},jf.prototype.getById=function(t){return this.sources.get(t)},jf.prototype.getSources=function(){return Array.from(this.sources.values())},jf.prototype.isSourceLoaded=function(t){t=t instanceof k?t.getId():t;return this.map._getMap().isSourceLoaded(t)},jf.prototype.remove=function(t,e){var o,n;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=Af(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._removeSource(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._removeSource(t,e)},jf.prototype.setSourceState=function(t,e){void 0===e&&(e=!0),this.sources.set(t.getId(),t),t._setMap(this.map,e)},jf.prototype.unsetSourceState=function(t){this.sources.has(t)&&(this.sources.get(t)._setMap(null),this.sources.delete(t))},jf.prototype._removeSource=function(t,e){t=t instanceof k?t.getId():t;if(!this.sources.has(t))throw new Error("'".concat(t,"' is not added to the map"));if(this.map._getMap().getSource(t)&&e&&this.map._getMap().removeSource(t),this.map._getMap().getSource(t)&&e)throw new Error("One or more layers have a dependency on the source '".concat(t,"'"));this.unsetSourceState(t)},jf.prototype._addSource=function(t,e){if(this.sources.has(t.getId())){if(e)throw new Error("'".concat(t.getId(),"' is already added to the map"));this.unsetSourceState(t.getId())}if(e){if(!this.map._isReady())throw new Error("The source '".concat(t.getId(),"' could not be added to the map because ")+"the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a source to it.");this.map._getMap().addSource(t.getId(),t._buildSource())}this.setSourceState(t)},jf.prototype._mapFeaturesToShapes=function(t,e,o){var n,r,i=[];try{for(var s=Af(t),a=s.next();!a.done;a=s.next()){var c=a.value;if((o||"string"==typeof c.source)&&"string"==typeof c.properties[x._shapeIdPropName]){var l=o||this.sources.get(c.source);if(l instanceof Sl){var u=l.getShapeById(c.properties[x._shapeIdPropName]);if(u instanceof x){i.push(u);continue}}}e||i.push(c)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},jf.prototype._syncSources=function(r){var n=this;r?(Object.keys(r).map(function(t){var e,o=r[t];switch(o.type){case"vector":case"raster":case"raster-dem":e=new Rp(t,{name:t,tiles:o.tiles,type:o.type,url:o.url,tileSize:"tileSize"in o?o.tileSize:void 0});break;case"canvas":e=new Il(t,o);break;case"geojson":var n=new Sl(t,{maxZoom:o.maxzoom,cluster:o.cluster,clusterRadius:o.clusterRadius,tolerance:o.tolerance,lineMetrics:o.lineMetrics,clusterProperties:o.clusterProperties,buffer:o.buffer,clusterMinPoints:o.clusterMinPoints,generateId:o.generateId,promoteId:o.promoteId,filter:o.filter});"string"!=typeof o.data&&void 0!==o.data&&n._addNoUpdate(o.data),e=n;break;case"image":e=new Zl(t,o);break;case"video":e=new Wl(t,o);break;default:e=new Rl(t,o)}return e}).forEach(function(t){var e=n.sources.get(t.getId()),o=e&&t._isDeepEqual(e);!o&&e&&n.unsetSourceState(e.getId()),n.setSourceState(t,!o)}),Array.from(this.sources.keys()).filter(function(t){return!(t in r)}).forEach(function(t){return n.unsetSourceState(t)})):console.warn("syncSources called with no style sources which is unexpected.")},jf);function jf(t){this.map=t,this.sources=new wt}(window&&window.__extends||(If=function(t,e){return(If=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}If(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Df,Tf=t);var If,Tf,zf=Df;function Df(){var t=null!==Tf&&Tf.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}(window&&window.__extends||(Rf=function(t,e){return(Rf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Rf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Nf,Bf=t);var Rf,Bf,Ff=Nf;function Nf(){var t=null!==Bf&&Bf.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var Zf,qf,jo=window&&window.__extends||(Zf=function(t,e){return(Zf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Zf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Hf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uf=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Wf=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Gf=(jo(Vf,qf=t),Vf.prototype.merge=function(){for(var e,t,o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];try{for(var r=Hf(o),i=r.next();!i.done;i=r.next()){var s=i.value;s&&"number"==typeof s.padding&&(s.padding={top:s.padding,bottom:s.padding,left:s.padding,right:s.padding})}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return qf.prototype.merge.apply(this,Wf([],Uf(o),!1))},Vf);function Vf(){var t=null!==qf&&qf.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new Ia(0,0),t.padding=new Ff,t}(window&&window.__extends||(Kf=function(t,e){return(Kf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Kf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))($f,Yf=t);var Kf,Yf,Jf=$f;function $f(){var t=null!==Yf&&Yf.apply(this,arguments)||this;return t.zoom=1,t.center=new Ec(0,0),t.centerOffset=new Ia(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.minPitch=0,t.maxPitch=60,t.maxBounds=void 0,t}(window&&window.__extends||(Xf=function(t,e){return(Xf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Xf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ty,Qf=t);var Xf,Qf,jt=ty;function ty(){var t=null!==Qf&&Qf.apply(this,arguments)||this;return t.name=void 0,t.before=void 0,t.minZoom=1,t.maxZoom=20,t.overwrite=!1,t.opacity=1,t}(window&&window.__extends||(ey=function(t,e){return(ey=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ey(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ry,oy=jt);var ey,oy,ny=ry;function ry(){var t=null!==oy&&oy.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.radius=1,t.outlineWidth=5,t.name="default-circles",t}(window&&window.__extends||(iy=function(t,e){return(iy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}iy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(cy,sy=jt);var iy,sy,ay=cy;function cy(){var t=null!==sy&&sy.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}(window&&window.__extends||(ly=function(t,e){return(ly=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ly(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(hy,uy=jt);var ly,uy,py=hy;function hy(){var t=null!==uy&&uy.apply(this,arguments)||this;return t.iconSize=1,t.fontSize=14,t.fontColor="#000",t.textFont="SegoeUi-Regular",t.cluster=!0,t.clusterIcon=void 0,t.textOffset=[0,0],t.name="default-pins",t.icon="pin-darkblue",t.title="",t}(window&&window.__extends||(dy=function(t,e){return(dy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}dy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(my,fy=jt);var dy,fy,yy=my;function my(){var t=null!==fy&&fy.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}(window&&window.__extends||(gy=function(t,e){return(gy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}gy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(_y,vy=jt);var gy,vy,wy=_y;function _y(){var t=null!==vy&&vy.apply(this,arguments)||this;return t.name="default-raster",t}(window&&window.__extends||(by=function(t,e){return(by=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}by(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Oy,xy=t);var by,xy,Sy=Oy;function Oy(){var t=null!==xy&&xy.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var Cy,Py,nr=window&&window.__extends||(Cy=function(t,e){return(Cy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Cy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ly=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ky=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},My=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Ay=(nr(Ey,Py=t),Ey.prototype.merge=function(){for(var e,t,o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];try{for(var r=Ly(o),i=r.next();!i.done;i=r.next()){var s=i.value;s&&(s.hasOwnProperty("view")?s.userRegion=s.view:s.hasOwnProperty("userRegion")&&(s.view=s.userRegion),"string"==typeof s.language)&&(s.language=Lh.getCode(s.language))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return Py.prototype.merge.apply(this,My([],ky(o),!1))},Ey);function Ey(){var t=null!==Py&&Py.apply(this,arguments)||this;return t.antialias=void 0,t.autoResize=!0,t.language=Bh,t.light=new Sy,t.preserveDrawingBuffer=!1,t.progressiveLoading=!1,t.progressiveLoadingInitialLayerGroups=["base"],t.renderWorldCopies=!0,t.showBuildingModels=!1,t.showFeedbackLink=!0,t.showLogo=!0,t.showLabels=!0,t.customAttribution=void 0,t.showTileBoundaries=!1,t.style=void 0,t.view=Ih,t.userRegion=t.view,t.customStyleTransform=void 0,t}function jy(t){return 0==t.length?void 0:t.slice(1).reduce(function(o,n){return function(t,e){t=o(t,e);return zy(zy({},t),n(t.url,e))}},t[0])}var Iy,Ty,qt=window&&window.__extends||(Iy=function(t,e){return(Iy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Iy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),zy=window&&window.__assign||function(){return(zy=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Dy=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ry=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},By=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Fy=(qt(Ny,Ty=t),Ny.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=this.styleDefinitionsVersion;try{for(var n=Dy(t),r=n.next();!r.done;r=n.next()){var i=r.value;i&&(i.authOptions?"string"==typeof i.authOptions.subscriptionKey&&(i.subscriptionKey=i["subscription-key"]=i.authOptions.subscriptionKey):"string"==typeof i.subscriptionKey?(i["subscription-key"]=i.subscriptionKey,i.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:i.subscriptionKey}):"string"==typeof i["subscription-key"]&&(i.subscriptionKey=i["subscription-key"],i.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:i["subscription-key"]}),"string"==typeof i.sessionId?i["session-id"]=i.sessionId:"string"==typeof i["session-id"]&&(i.sessionId=i["session-id"]),"boolean"==typeof i.disableTelemetry?i["disable-telemetry"]=i.disableTelemetry:"boolean"==typeof i["disable-telemetry"]&&(i.disableTelemetry=i["disable-telemetry"]),"boolean"==typeof i.enableAccessibility?i["enable-accessibility"]=i.enableAccessibility:"boolean"==typeof i["enable-accessibility"]&&(i.enableAccessibility=i["enable-accessibility"]))}}catch(t){c={error:t}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(c)throw c.error}}var s=this._transformers,a=t?t.filter(function(t){return void 0!==t}).reduce(function(t,e){return By(By([],Ry(t),!1),Ry(e._transformers||[]),!1)},[]):[],c=Ty.prototype.merge.apply(this,By([],Ry(t),!1)),a=(c.authOptions.authType!==u.AuthenticationType.subscriptionKey&&(c["subscription-key"]=c.subscriptionKey=void 0),void 0!==c.styleSet&&void 0===c.mapConfiguration&&(c.mapConfiguration=c.styleSet),c.mapConfiguration&&"string"!=typeof c.mapConfiguration&&(c.mapConfiguration=zy(zy({},c.mapConfiguration),{defaultConfiguration:c.mapConfiguration.defaultConfiguration||c.mapConfiguration.defaultStyle,configurations:c.mapConfiguration.configurations||c.mapConfiguration.styles})),this._transformers=By(By([],Ry(s||[]),!1),Ry(a.filter(function(t){return!s.includes(t)})),!1),this.transformRequest&&!this._transformers.includes(this.transformRequest)&&this._transformers.push(this.transformRequest),new Date(Date.UTC(2023,0))),l=new Date(this.styleDefinitionsVersion);return(isNaN(l.getTime())||l.getTime()<a.getTime())&&(console.warn("Style definition version ".concat(this.styleDefinitionsVersion," is invalid or deprecated, style definition version is unchanged (").concat(o,")")),this.styleDefinitionsVersion=o),this.transformRequest=jy(this._transformers),c},Ny.prototype.addTransformer=function(t){this._transformers||(this._transformers=[]),this._transformers.push(t),this.transformRequest=jy(this._transformers)},Ny.prototype.removeTransformer=function(e){this._transformers&&(this._transformers=this._transformers.filter(function(t){return e!==t}),this.transformRequest=jy(this._transformers))},Ny._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},Ny);function Ny(){var t=null!==Ty&&Ty.apply(this,arguments)||this;return t.authOptions=ed(),t.disableTelemetry="atlas.azure.us"===Nh,t["disable-telemetry"]=t.disableTelemetry,t.domain=Nh,t.staticAssetsDomain=Zh,t.styleDefinitionsPath=qh,t.styleDefinitionsVersion=Hh,t.styleAPIVersion=Uh,t.mapConfiguration=void 0,t.styleSet=void 0,t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.enableAccessibilityLocationFallback=!0,t.maxParallelImageRequests=cd(),t.refreshExpiredTiles=!0,t.subscriptionKey=pd(),t["subscription-key"]=t.subscriptionKey,t.sessionId=Fh,t["session-id"]=t.sessionId,t._transformers=[],t.transformRequest=void 0,t.workerCount=ad(),t.fadeDuration=300,t.localIdeographFontFamily="sans-serif",t.validateStyle=!1,t}qy.getLayerGroup=function(t){return"string"!=typeof t&&t.metadata&&t.metadata["microsoft.maps:layerGroup"]?t.metadata["microsoft.maps:layerGroup"]:(t="string"!=typeof t?t.id:t).startsWith("microsoft.")&&4<=(t=t.split(".")).length?t[3]:void 0};var Zy=qy;function qy(){}Uy.resolve=function(t){return new Uy(Promise.resolve(t))},Uy.reject=function(t){return new Uy(Promise.reject(t))},Uy.prototype.then=function(t,e){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).then(t,e)},Uy.prototype.catch=function(t){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).catch(t)},Uy.prototype.finally=function(t){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).finally(t)},Uy.prototype.hijackAndResolve=function(t){this._hijackedToResolve=t,this._resolve&&this._resolve(t)},Uy.prototype.hijackAndReject=function(t){this._hijackedToReject=t,this._reject&&this._reject(t)},Uy.prototype.switchWith=function(t){this.origin=t,this._toResolve=void 0,this._toReject=void 0};var Hy=Uy;function Uy(t){var r=this;this.isHijacked=function(){return void 0!==r._hijackedToResolve||void 0!==r._hijackedToReject},this.isResolved=function(){return void 0!==r._hijackedToResolve||void 0!==r._toResolve},this.isRejected=function(){return void 0!==r._hijackedToReject||void 0!==r._toReject},this.resultIfResolved=function(){return r._hijackedToResolve||r._toResolve},this.errorIfRejected=function(){return r._hijackedToReject||r._toReject},this._thenResolver=function(e,o){var n;r._hijackedToResolve?e(r._hijackedToResolve):r._hijackedToReject?o(r._hijackedToReject):(n=r.origin,r.origin.then(function(t){r.isHijacked()||(n!==r.origin?r._thenResolver(e,o):(r._toResolve=t,e(t)))}).catch(function(t){r.isHijacked()||(n!==r.origin?r._thenResolver(e,o):(r._toReject=t,o(t)))}))},this.origin=t,this[Symbol.toStringTag]=this.origin[Symbol.toStringTag]}var Wy={road:"Road",satellite:"Satellite",satellite_road_labels:"Hybrid",grayscale_dark:"Grayscale (Dark)",grayscale_light:"Grayscale (Light)",night:"Night",road_shaded_relief:"Terra",blank:"Blank",blank_accessible:"Blank (Accessible)",high_contrast_dark:"High contrast (Dark)",high_contrast_light:"High contrast (Light)"},Gy=window&&window.__assign||function(){return(Gy=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Vy=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},Ky=window&&window.__generator||function(n,r){var i,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(o){return function(t){var e=[o,t];if(i)throw new TypeError("Generator is already executing.");for(;c=l&&e[l=0]?0:c;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,s=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))c.label=e[1];else if(6===e[0]&&c.label<a[1])c.label=a[1],a=e;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(e)}}e=r.call(n,c)}catch(t){e=[6,t],s=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},Yy=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Jy=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},$y=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xy=(I.prototype.updateIndoorState=function(t,e){var o,n,r=this,i=this.map.styles.getMapConfiguration();i?(this.preservedPreindoorMapConfiguration=i,o=this.map.getStyle().style?"".concat(this.map.getStyle().style,"_indoor").concat("dark"===t?"_dark":"","_tileset_").concat(e):void 0,this.map.styles.setMapConfiguration("defaultIndoor_".concat(e),"microsoft-maps:default"===i?o:void 0)):(n=(null==(i=this.indoorState)?void 0:i.tilesetId)!==e,this.indoorState={tilesetId:e,theme:t},this.initStyleset(),this.definitions().then(function(t){var e=(r.map.getStyle().style||t.defaultConfiguration).replace("_indoor_dark","").replace("_indoor",""),o="".concat(e,"_indoor"),e=t.configurations.find(function(t){return t.name.startsWith(o)});e&&r.map.setStyle({style:e.name},!n)}))},I.prototype.unsetIndoorState=function(){var o=this,t=this.preservedPreindoorMapConfiguration;t?this.map.styles.setMapConfiguration(t):(this.indoorState=void 0,this.initStyleset(),this.definitions().then(function(t){var e=o.map.getStyle().style;e.includes("_indoor")&&e.split("_indoor")[0]?o.map.setStyle({style:e.split("_indoor")[0]}):o.map.setStyle({style:void 0})}))},I.prototype.initStyleset=function(){var t,o=this;return t=this.serviceOptions.mapConfiguration?"string"==typeof this.serviceOptions.mapConfiguration?(t=this.map.authentication?this.map.authentication.initialize():Promise.resolve(),new Hy(t.then(function(){return o._request(o.serviceOptions.domain,"".concat($,"/mapconfigurations/metadata/").concat(o.serviceOptions.mapConfiguration),"StyleDefinitions").then(function(t){return Gy(Gy({},t),{defaultConfiguration:t.defaultConfiguration||t.defaultStyle,configurations:t.configurations||t.styles})})}))):Hy.resolve(this.serviceOptions.mapConfiguration):(t=this.map.authentication?this.map.authentication.initialize():Promise.resolve(),new Hy(t.then(function(){return o._request(o.serviceOptions.staticAssetsDomain,"".concat(J,"/").concat($),"StyleDefinitions",{version:o.serviceOptions.styleDefinitionsVersion,mcv:ut.replace(/\./g,"")}).then(function(e){return{version:isNaN(e.version)?0:parseFloat(e.version),defaultConfiguration:e.defaultStyle,configurations:e.styles.filter(function(t){return o.indoorState?"auto"===o.indoorState.theme?t.name.endsWith("dark"===t.theme?"_indoor_dark":"_indoor"):t.name.endsWith("dark"===o.indoorState.theme?"_indoor_dark":"_indoor"):!t.name.includes("indoor")}).map(function(t){return{copyright:t.copyright.join(" "),name:t.name,displayName:function(t){t=o.indoorState&&t.includes("_indoor")?t.split("_indoor")[0]:t;return t in Wy?Wy[t]:t}(t.name),theme:t.theme,thumbnail:new ct({domain:o.serviceOptions.staticAssetsDomain,path:t.thumbnail,protocol:"https"}).toString(),url:new ct({domain:o.serviceOptions.staticAssetsDomain,path:"".concat(J,"/").concat($,"/").concat(t.name),queryParams:{styleVersion:void 0!==e.version&&null!==e.version?e.version:o.serviceOptions.styleDefinitionsVersion,mcv:ut.replace(/\./g,"")},protocol:"https"}).toString()}})}})}))),this.initPromise&&this.initPromise.switchWith(t),this.initPromise=t,this.initPromise.then(function(t){return o.map._invokeEvent("mapconfigurationchanged",t)}),this.initPromise},I.prototype.getStyle=function(t){t=this._lookUp(t);if(!t)throw Error("Style definition is not available.");if(t.url)return t.url;if(t.style)return t.style;throw Error("Style definition neither contains URL nor style object.")},I.prototype.deriveNewStyleAndLayerGroups=function(t,e){for(var o,n,r=this.map.getStyle(),i=this.map.getTraffic(),s={},a=0;a<e.layers.length;a++){var c=e.layers[a],l=Zy.getLayerGroup(c);l?(s[l]||(s[l]=[]),s[l].push(c),r.showBuildingModels||"fill-extrusion"!==c.type?"fill-extrusion"===c.type&&(c.layout=null!=(o=c.layout)?o:{},c.layout.visibility="visible"):(c.layout=null!=(o=c.layout)?o:{},c.layout.visibility="none"),"none"!==i.flow&&l&&l==="traffic_".concat(i.flow)&&"line"==c.type&&(c.layout=null!=(n=c.layout)?n:{},c.layout.visibility="visible"),"labels"!==l&&"labels_places"!==l&&"labels_indoor"!==l||"symbol"!==c.type||(r.showLabels&&"none"!==(null==(n=c.layout)?void 0:n.visibility)?(c.layout=null!=(l=c.layout)?l:{},c.layout.visibility="visible"):(c.layout=null!=(l=c.layout)?l:{},c.layout.visibility="none"))):s[c.id]=[c]}return[e,s]},I.prototype.injectUserLayersIntoStyle=function(s,a,c){return s?this.map.layers._getUserLayers().reduce(function(o,e){var n,t,r,i;return e.layer instanceof eh||(n=c[e.before]&&0<c[e.before].length?c[e.before][0]:void 0,t=s.layers.find(function(t){return t.id===e.layer.getId()}),-1<(r=a.layers.findIndex(function(t){return t.id===e.layer.getId()}))&&a.layers.splice(r,1),t&&(r=new Set(Array.from(e.layer._getSourceIds()).map(function(t){return s.sources[t]?{source:s.sources[t],id:t}:void 0}).filter(function(t){return void 0!==t})),-1<(i=n?o.layers.findIndex(function(t){return t.id===n.id}):-1)?o.layers.splice(i,0,t):o.layers.push(t),r.forEach(function(t){var e=t.source,t=t.id;o.sources[t]=e}))),o},Gy({},a)):a},I.prototype.setStyle=function(r,t){var i=this,e=(void 0===t&&(t=!0),this._lookUp(r));if(!e)throw Error("Style definition ".concat(r.style," is not available."));if(!e.url&&!e.style)throw Error("Style definition neither contains URL nor style object.");var o=function(){return i._onStyleData(e)},s=function(){i.map.events.remove("styledata",o),i.map.events.addOnce("styledata",o)},n=r&&r.customStyleTransform?function(t,e){t=r.customStyleTransform(t,e);return s(),t}:function(t,e){var o=Gy(Gy({},e),{layers:Jy([],Yy(e.layers),!1),sources:Gy({},e.sources)}),n=r.progressiveLoading&&!i.map._isLoaded(),e=(n&&Array.isArray(null==e?void 0:e.layers)&&((o=Gy({},e)).layers=o.layers.map(function(t){var e=Gy({},t);return t.layout&&(e.layout=Gy({},t.layout)),e})),Yy(i.deriveNewStyleAndLayerGroups(t,o),2)),o=e[0],e=e[1],n=(n&&(n=r.progressiveLoadingInitialLayerGroups,Array.isArray(n))&&0<n.length&&i._deferLayerGroupVisibilities(e,n),i.injectUserLayersIntoStyle(t,o,e)),t=Object.entries(e).map(function(t){var t=Yy(t,2),e=t[0],t=t[1];return i._buildFundamentalLayerFrom(t,e)}),o=i.map.layers._getUserLayers().reduce(function(t,e){var o=e.before?t.findIndex(function(t){return t.getId()===e.before}):-1;return-1<o?t.splice(o,0,e.layer):t.push(e.layer),t},t);return i.map.layers.layerIndex=o,i.map.sources._syncSources(n.sources),s(),n};this.map._getMap().setStyle(e.url||e.style,{diff:t,validate:this.serviceOptions.validateStyle,transformStyle:n})},I.prototype.getTheme=function(t){t=this._lookUp(t);if(t)return t.theme.toLowerCase()},I.prototype.getThemeAsync=function(e){return Vy(this,void 0,void 0,function(){return Ky(this,function(t){switch(t.label){case 0:return[4,this._lookUpAsync(e)];case 1:return[2,t.sent().theme]}})})},I.prototype.setMapConfiguration=function(t,o){var n=this;"string"==typeof(this.serviceOptions.mapConfiguration=t)?this.initStyleset():this.initPromise?this.initPromise.hijackAndResolve(t):this.initPromise=Hy.resolve(t),this.definitions().then(function(t){var e=t.defaultConfiguration;t.configurations.find(function(t){return t.name===o})&&(e=o),n.map.setStyle({style:e})})},I.prototype.getMapConfiguration=function(){return this.serviceOptions.mapConfiguration},I.prototype.setStyleSet=function(t){this.updateIndoorState("indoor_dark"===t?"dark":"light",null)},I.prototype.getStyleSet=function(){return void 0!==this.indoorState?"dark"===this.indoorState.theme?"indoor_dark":"indoor":"base"},I.prototype.clearStyleSet=function(){this.unsetIndoorState()},I.prototype._buildFundamentalLayerFrom=function(t,e){if(t&&0<t.length)return(t=new _f(t,e)).onAdd(this.map),t;throw new Error("Unable to construct fundamental map layer for ID: ".concat(e,"."))},I.prototype._transformStyleRequest=function(t,e){t.includes(H)&&(e.url=e.url.replace(H,this.serviceOptions.domain)),t.includes(K)&&(e.url=e.url.replace(K,J)),t.includes(Y)&&(e.url=e.url.replace(Y,$)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&((t=new URL(e.url)).searchParams.get(Z)||(t.searchParams.set(Z,this.serviceOptions.styleAPIVersion),e.url=t.href),null!=(t=this.map.authentication)&&t.signRequest(e),this._deleteAuthTokenForStaticAssets(e))},I.prototype._request=function(n,r,i,s){var a;return void 0===s&&(s={}),Vy(this,void 0,void 0,function(){var e,o;return Ky(this,function(t){switch(t.label){case 0:return o={url:new ct({protocol:"https",domain:n,path:r,queryParams:Gy(((o={})[Z]=this.serviceOptions.styleAPIVersion,o),s)}).toString()},"function"==typeof this.serviceOptions.transformRequest&&i&&(o=this.serviceOptions.transformRequest(o.url,i)),null!=(a=this.map.authentication)&&a.signRequest(o),this._deleteAuthTokenForStaticAssets(o),e={method:"GET",mode:"cors"},o.credentials&&(e.credentials=o.credentials),o.headers&&(e.headers=o.headers),[4,fetch(o.url,e).then(function(t){if(t.ok)return t.json();throw new Error("HTTP ".concat(t.status,": ").concat(t.statusText," "))})];case 1:return[2,t.sent()]}})})},I.prototype._deleteAuthTokenForStaticAssets=function(t){t.url.startsWith("https://".concat(this.serviceOptions.staticAssetsDomain,"/").concat(J))&&(delete t.headers[Q],delete t.headers[q])},I);function I(t,e){var u=this;this.definitions=function(){var t=u.initPromise||u.initStyleset();return t},this.indoorState=void 0,this.preservedPreindoorMapConfiguration=void 0,this._progressiveLoadingState={mapStyle:void 0,pendingVisibilityChange:void 0},this._deferLayerGroupVisibilities=function(e,t){var o,r,n,i,s=t.filter(function(t){return t in e});0!==s.length&&(o=u.map._getMap(),r=o.getZoom(),n=u.map.getStyle().style,u._progressiveLoadingState.pendingVisibilityChange&&(u.map.events.remove("load",u._progressiveLoadingState.pendingVisibilityChange),u._progressiveLoadingState.pendingVisibilityChange=null),u._progressiveLoadingState.mapStyle=n,(i=Object.entries(e).reduce(function(t,e){var e=Yy(e,2),o=e[0],e=e[1],n=s.includes(o);return Jy(Jy([],Yy(t),!1),Yy(e.filter(function(t){if("custom"===t.type)return!1;if(n)if("number"==typeof t.maxzoom&&"number"==typeof t.minzoom){if(r<=t.maxzoom&&r>=t.minzoom)return!1}else if("number"==typeof t.minzoom){if(r>=t.minzoom)return!1}else{if("number"!=typeof t.maxzoom)return!1;if(r<=t.maxzoom)return!1}return"none"!==(null==(t=t.layout)?void 0:t.visibility)})),!1)},[])).forEach(function(t){t.layout=t.layout||{},t.layout.visibility="none"}),u._progressiveLoadingState.pendingVisibilityChange=function(){u._progressiveLoadingState.pendingVisibilityChange=null;var t=u.map.getStyle().style;n===t&&(i.forEach(function(t){t.layout.visibility="visible",o.setLayoutProperty(t.id,"visibility","visible")}),null!=(t=u.map.copyrightDelegate))&&t.reloadAttribution()},u.map.events.addOnce("load",u._progressiveLoadingState.pendingVisibilityChange))},this._onStyleData=function(t){u.map.events.invoke("stylechanged",{style:t.name,map:u.map,type:"stylechanged"})},this._lookUp=function(t){var e,o,n=u.definitions(),r=n.errorIfRejected(),i=n.resultIfResolved();if(r||!i)return null;var n=i.configurations,s=void 0;try{for(var a=$y(n),c=a.next();!c.done;c=a.next()){var l=c.value;if(l.name===t.style)return l;l.name===i.defaultConfiguration&&(s=s||l)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(e)throw e.error}}return s=s||n[0]},this._lookUpAsync=function(o){return Vy(u,void 0,void 0,function(){var e;return Ky(this,function(t){switch(t.label){case 0:return[4,this.definitions()];case 1:return e=t.sent(),[2,e.configurations.find(function(t){return t.name===(o.style||e.defaultConfiguration)})||e.configurations.find(function(t){return t.name===e.defaultConfiguration})||e.configurations[0]]}})})},this.map=t,this.serviceOptions=e}var Qy=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tm=(em.prototype.add=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=Qy(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.indicators.has(i)||(this.indicators.add(i),i.attach(this.map))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},em.prototype.clear=function(){var e=this;this.indicators.forEach(function(t){e.indicators.delete(t),t.remove()})},em.prototype.remove=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=Qy(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.indicators.has(i)&&(this.indicators.delete(i),i.remove())}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},em.prototype.getIndicators=function(){return Array.from(this.indicators)},em.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector(".".concat(em.Css.collection));return t||((t=document.createElement("div")).setAttribute("aria-label","map data"),t.setAttribute("role","listbox"),t.classList.add(em.Css.collection),this.map.getMapContainer().appendChild(t)),t},em.Css={collection:"accessible-indicator-collection-container"},em);function em(t){this.map=t,this.indicators=new Set}var om,nm,a=window&&window.__extends||(om=function(t,e){return(om=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}om(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),rm=window&&window.__assign||function(){return(rm=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},im=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},sm=window&&window.__generator||function(n,r){var i,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(o){return function(t){var e=[o,t];if(i)throw new TypeError("Generator is already executing.");for(;c=l&&e[l=0]?0:c;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,s=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))c.label=e[1];else if(6===e[0]&&c.label<a[1])c.label=a[1],a=e;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(e)}}e=r.call(n,c)}catch(t){e=[6,t],s=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},am=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},cm=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},lm=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Do=(a(T,nm=_t),Object.defineProperty(T.prototype,"isDisposed",{get:function(){return this.removed},enumerable:!1,configurable:!0}),T.prototype.getCanvas=function(){return this.map.getCanvas()},T.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},T.prototype.getMapContainer=function(){return this.map.getContainer()},T.prototype.getServiceOptions=function(){return L(this.serviceOptions,Fy._cloneCustomizer)},T.prototype.setServiceOptions=function(t){this.serviceOptions=(new Fy).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap();t=this.styles.serviceOptions.mapConfiguration!==this.serviceOptions.mapConfiguration||this.styles.serviceOptions.staticAssetsDomain!==this.serviceOptions.staticAssetsDomain||this.styles.serviceOptions.styleDefinitionsVersion!==this.serviceOptions.styleDefinitionsVersion||this.styles.serviceOptions.domain!==this.serviceOptions.domain||this.styles.serviceOptions.styleAPIVersion!==this.serviceOptions.styleAPIVersion;this.styles.serviceOptions=this.serviceOptions,t&&(this.styles.initPromise=null,this.setStyle({}))},T.prototype.addRequestTransformer=function(t){this.serviceOptions.addTransformer(t)},T.prototype.removeRequestTransformer=function(t){this.serviceOptions.removeTransformer(t)},T.prototype.setCamera=function(t,e){if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var o,n=(new Gf).merge({maxZoom:this.getCamera().maxZoom},t),r=this._generateSafeBounds(n.bounds),i={padding:n.padding,offset:n.offset,maxZoom:n.maxZoom};if(!(o=this.map.cameraForBounds(r,i)))throw s={message:"The map cannot be fit to the current canvas with the given CameraBoundsOptions.",containerWidth:null==(s=null==(s=this.map)?void 0:s.getContainer())?void 0:s.clientWidth,containerHeight:null==s?void 0:s.clientHeight,safeBounds:r,cameraForBoundsOptions:i},new Error(JSON.stringify(s));"pitch"in t&&(o.pitch=t.pitch),"bearing"in t&&(o.bearing=t.bearing),"minPitch"in t&&this.map.setMinPitch(t.minPitch),"maxPitch"in t&&this.map.setMaxPitch(t.maxPitch),this.map.setMaxZoom(n.maxZoom),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(n.maxBounds)}else{i=(new Jf).merge(this.getCamera(),t);i.centerOffset&&2<=i.centerOffset.length&&(s=i.centerOffset,(n=gc([i.center],i.zoom))[0][0]+=s[0],n[0][1]+=s[1],i.center=mc(n,i.zoom)[0]),o={center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,around:void 0},this.map.setMinZoom(i.minZoom),this.map.setMaxZoom(i.maxZoom),i.minPitch&&this.map.setMinPitch(i.minPitch),i.maxPitch&&this.map.setMaxPitch(i.maxPitch),this._invokeEvent("minzoomchanged",this.map.getMinZoom()),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(i.maxBounds)}r?this.map.setMaxBounds(r):this.map.setMaxBounds(null);var s=(new zf).merge(t),n={duration:s.duration,easing:function(t){return t},offset:[0,0],animate:!0},i={fromControl:e};"jump"===s.type?this.map.jumpTo(o,i):"ease"===s.type?this.map.easeTo(rm(rm({},o),n),i):"fly"===s.type&&this.map.flyTo(rm(rm({},o),n),i)},T.prototype.setCameraBounds=function(t){this.setCamera(t)},T.prototype.getCamera=function(){var t=this.map.getBounds().getSouthWest().toArray(),e=this.map.getBounds().getNorthEast().toArray();return{zoom:this.map.getZoom(),center:this.map.getCenter().toArray(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),bounds:new O(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},T.prototype.setStyle=function(t,e){void 0===e&&(e=!0),delete t.preserveDrawingBuffer;t=(new Ay).merge(this.styleOptions,t),t.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(t.autoResize),t.language!==this.styleOptions.language&&(this.localizedStringsPromise=Lh.getStrings(t.language)),t.renderWorldCopies!==this.styleOptions.renderWorldCopies&&this.map.setRenderWorldCopies(t.renderWorldCopies),t.showFeedbackLink!==this.styleOptions.showFeedbackLink&&this.copyrightControl.setOptions({showFeedbackLink:t.showFeedbackLink}),t.customAttribution!==this.styleOptions.customAttribution&&this.copyrightControl.setOptions({customAttribution:t.customAttribution}),t.showLogo!==this.styleOptions.showLogo&&this.copyrightControl.setOptions({showLogo:t.showLogo}),t.showTileBoundaries!==this.styleOptions.showTileBoundaries&&(this.map.showTileBoundaries=t.showTileBoundaries),t.showBuildingModels&&console.warn("showBuildingModels is deprecated."),e=e&&this.styleOptions.language===t.language&&this.styleOptions.view===t.view;this.styleOptions=t,this._setStyleComponents(t,e)},T.prototype.getStyle=function(){return c(this.styleOptions)},T.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},T.prototype.addPins=function(t,e){var e=(new py).merge(e),o=this.layers.getLayerById(e.name),n=!1;if(o||(n=!0,o=new jp("".concat(e.name,"-source"),e.name,{source:"".concat(e.name,"-source"),minZoom:e.minZoom,maxZoom:e.maxZoom,iconOptions:{anchor:"center",size:e.iconSize,image:["case",["has","icon"],["get","icon"],e.icon],ignorePlacement:!e.cluster,opacity:e.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],e.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[e.textFont]]],size:["case",["has","point_count"],20,e.fontSize],ignorePlacement:!e.cluster,opacity:e.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[e.textOffset[0]/16,e.textOffset[1]/16]]],color:e.fontColor}})),!(o instanceof jp))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a SymbolLayer.")+"A SymbolLayer should be used for rendering pins.");var r=o.getSource(),i=("string"==typeof r?(s=r,r=this.sources.getById(s)):s=r.getId(),!1);if(r||(i=!0,r=new Sl(s,{cluster:e.cluster})),!(r instanceof Sl))throw new Error("The source with name '".concat(s,"' already exists but it is not a DataSource.")+"New data can only be added to a DataSource.");i&&this.sources.add(r),n&&this.layers.add(o,e.before);var s=new Zc(t);e.overwrite?r.setShapes(s):r.add(s)},T.prototype.addCircles=function(t,e){var e=(new ny).merge(e),o=this.layers.getLayerById(e.name),n=!1;if(o||(n=!0,o=new _u("".concat(e.name,"-source"),e.name,{source:"".concat(e.name,"-source"),minZoom:e.minZoom,maxZoom:e.maxZoom,opacity:e.opacity,radius:["case",["has","radius"],["get","radius"],e.radius],color:["case",["has","color"],["get","color"],e.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],e.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],e.outlineWidth]})),!(o instanceof _u))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a BubbleLayer.")+"A BubbleLayer should be used for rendering circles.");var r=o.getSource(),i=("string"==typeof r?(s=r,r=this.sources.getById(s)):s=r.getId(),!1);if(r||(i=!0,r=new Sl(s)),!(r instanceof Sl))throw new Error("The source with name '".concat(s,"' already exists but it is not a DataSource.")+"New data can only be added to a DataSource.");i&&this.sources.add(r),n&&this.layers.add(o,e.before);var s=new Zc(t);e.overwrite?r.setShapes(s):r.add(s)},T.prototype.addLinestrings=function(t,e){var e=(new ay).merge(e),o=this.layers.getLayerById(e.name),n=!1;if(o||(n=!0,o=new Ju("".concat(e.name,"-source"),e.name,{source:"".concat(e.name,"-source"),minZoom:e.minZoom,maxZoom:e.maxZoom,lineCap:e.cap,lineJoin:e.join,strokeOpacity:e.opacity,strokeColor:["case",["has","color"],["get","color"],e.color],strokeWidth:["case",["has","width"],["get","width"],e.width]})),!(o instanceof Ju))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a LineLayer.")+"A LineLayer should be used for rendering linestrings.");var r=o.getSource(),i=("string"==typeof r?(s=r,r=this.sources.getById(s)):s=r.getId(),!1);if(r||(i=!0,r=new Sl(s)),!(r instanceof Sl))throw new Error("The source with name '".concat(s,"' already exists but it is not a DataSource.")+"New data can only be added to a DataSource.");i&&this.sources.add(r),n&&this.layers.add(o,e.before);var s=new Zc(t);e.overwrite?r.setShapes(s):r.add(s)},T.prototype.addPolygons=function(t,e){var e=(new yy).merge(e),o=this.layers.getLayerById(e.name),n=!1;if(o||(n=!0,o=new yp("".concat(e.name,"-source"),e.name,{source:"".concat(e.name,"-source"),minZoom:e.minZoom,maxZoom:e.maxZoom,fillOpacity:e.opacity,fillColor:["case",["has","color"],["get","color"],e.color]})),!(o instanceof yp))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a PolygonLayer.")+"A PolygonLayer should be used for rendering linestrings.");var r=o.getSource(),i=("string"==typeof r?(s=r,r=this.sources.getById(s)):s=r.getId(),!1);if(r||(i=!0,r=new Sl(s)),!(r instanceof Sl))throw new Error("The source with name '".concat(s,"' already exists but it is not a DataSource.")+"New data can only be added to a DataSource.");i&&this.sources.add(r),n&&this.layers.add(o,e.before);var s=new Zc(t);e.overwrite?r.setShapes(s):r.add(s)},T.prototype.addRaster=function(t,e){var o,e=(new wy).merge(e),n=this.layers.getLayerById(e.name);if(!((n=n||new Vp({maxZoom:e.maxZoom,minZoom:e.minZoom,opacity:e.opacity,tileSize:256,tileUrl:"{subdomain}"},e.name))instanceof Vp))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a TileLayer.")+"A TileLayer should be used for rendering raster images.");if("{subdomain}"!==n.getOptions().tileUrl)throw new Error("A TileLayer with name '".concat(e.name,"' already exists but was configured ")+"for a single tile url [default for new TileLayer(...)].");(o=!e.overwrite&&n.getOptions().subdomains||[]).push.apply(o,cm([],am(t),!1)),n._setOptionsNoUpdate({subdomains:o}),this.layers.add(n,e.before)},T.prototype.getLayers=function(){return this.layers.getLayers().map(function(t){return t.getId()})},T.prototype.removeLayers=function(t){var e,o;try{for(var n=lm(t),r=n.next();!r.done;r=n.next()){var i,s=r.value;this.layers.getLayerById(s)&&(this.layers.remove(s),i="".concat(s,"-source"),this.sources.getById(i))&&this.sources.remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},T.prototype.addHtml=function(t,e){t.id||(t.id="marker_".concat(ka()));var o=new xh({htmlContent:t});return this.markers.add(o,e),t.id},T.prototype.removeHtml=function(t){this.markers.remove(t)},T.prototype.addEventListener=function(t,e,o){this.events._addLegacy(t,e,o)},T.prototype.removeEventListener=function(t,e,o){this.events._removeLegacy(t,e,o)},T.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},T.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},T.prototype.addControl=function(t,e){this.controls.add(t,e)},T.prototype.removeControl=function(t){this.controls.remove(t)},T.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,o=this.trafficOptions.flow;if(this.trafficOptions=(new As).merge(this.trafficOptions,t),this.controls.getControls().filter(function(t){return t instanceof Bs}).forEach(function(t){return t.updateButtonState()}),this.incidentDelegate&&(this.trafficOptions.incidents?e||this.incidentDelegate.addToMap():this.incidentDelegate.removeFromMap()),this.trafficOptions.flow&&"none"!==this.trafficOptions.flow){["absolute","relative-delay"].includes(this.trafficOptions.flow)&&console.warn("The 'absolute' and 'relative-delay' flow options are deprecated. Please use 'relative' instead.");try{this.trafficOptions.flow!==o&&this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=o,t}}else this.flowDelegate.removeFromMap()},T.prototype.getTraffic=function(){return c(this.trafficOptions)},T.prototype.remove=function(){this.dispose()},T.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear(),this.indicators.clear()},T.prototype.dispose=function(){var t;for(this.clear(),this.map.remove(),null!=(t=this.authentication)&&t.dispose(),this.removed=!0,window.removeEventListener("resize",this._windowResizeCallback);this.getMapContainer().firstChild;){var e=this.getMapContainer().firstChild;this.getMapContainer().removeChild(e)}},T.prototype.resize=function(t,e,o){"number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e?o=t:(t=t,this.getMapContainer().style.height="number"==typeof t?"".concat(t,"px"):t,this.getMapContainer().style.width="number"==typeof e?"".concat(e,"px"):e);t=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden",this.map.resize(o),this.getMapContainer().style.overflow=t},T.prototype.pixelsToPositions=function(t){var e,o,n=[];try{for(var r=lm(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.unproject(s);n.push(new Ec(a.lng,a.lat))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n},T.prototype.positionsToPixels=function(t){var e,o,n=[];try{for(var r=lm(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.project(s);n.push(new Ia(a.x,a.y))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n},T.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},T.prototype.stop=function(){this.map.stop()},T.prototype.triggerRepaint=function(){this.map.triggerRepaint()},T.prototype.enableElevation=function(t,e){this.map.setTerrain("string"==typeof t?{source:t,exaggeration:e}:{source:t.getId(),exaggeration:e})},T.prototype.disableElevation=function(){this.map.setTerrain(null)},T.prototype._getMap=function(){return this.map},T.prototype._rebuildStyle=function(e){return void 0===e&&(e=!0),im(this,void 0,void 0,function(){return sm(this,function(t){return this.styles.setStyle(this.styleOptions,e),this.imageSprite._restoreImages(),[2]})})},T.prototype._isLoaded=function(){return this.loaded},T.prototype._isReady=function(){return this.ready},T.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise},T.prototype._sendRequest=function(t,e,o){var n;return(n="function"==typeof this.serviceOptions.transformRequest?this.serviceOptions.transformRequest(t,e):n)?fetch(n.url||t,{credentials:n.credentials,headers:rm(rm({},o),n.headers),method:"GET",mode:"cors"}):fetch(t,{headers:o,method:"GET",mode:"cors"})},T.prototype._substituteDomainLanguageViewAndSignInRequest=function(t,e){var o;(t.includes(U)||t.includes(H))&&(o=new RegExp("[^{]".concat(U,"[^}]")),t.match(o)&&(e.url=e.url.replace(U,H)),ct.protoRegEx.test(this.serviceOptions.domain)?(o=e.url.indexOf(H),e.url=this.serviceOptions.domain+e.url.substring(o+H.length)):e.url=e.url.replace(H,this.serviceOptions.domain)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&null!=(o=this.authentication)&&o.signRequest(e),t.includes(V)&&(e.url=e.url.replace(V,this.styleOptions.language)),t.includes(W)&&(e.url=this.styleOptions.view?e.url.replace(W,this.styleOptions.view):e.url.replace(W,"").replace("&".concat(G,"="),""))},T.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},T.prototype._setStyleComponents=function(a,c){var l=this;void 0===c&&(c=!0),this.removed||this.styles.definitions().then(function(t){var e,o,n=!0;if(l.styleOptions.style)try{for(var r=lm(t.configurations),i=r.next();!i.done;i=r.next()){var s=i.value;if(l.styleOptions.style===s.name){n=!1;break}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}n&&(l.styleOptions.style=t.defaultConfiguration),l.styleOptions=a,l._rebuildStyle(c)})},T.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!td&&dd(t.authOptions),t.domain&&!Vh&&fd(t.domain),t.styleDefinitionsPath&&!Kh&&yd(t.styleDefinitionsPath),t.workerCount&&!Jh&&md(t.workerCount),t.maxParallelImageRequests&&!$h&&gd(t.maxParallelImageRequests),!t.subscriptionKey&&!t["subscription-key"]||td||_d(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||Qh||wd(t.sessionId||t["session-id"]),t.language&&!Xh&&vd(t.language),!t.userRegion&&!t.view||Gh||bd(t.userRegion||t.view))},T.prototype._generateSafeBounds=function(t){if(t){var e=O.getSouth(t),o=O.getWest(t),n=O.getNorth(t),r=O.getEast(t);if(!(isFinite(e)&&isFinite(o)&&isFinite(n)&&isFinite(r)))throw new Error("The bounds specified are invalid: [".concat(t,"]"));for(;r<o;)r+=360;return new O([o,e,r,n])}return t},T.prototype._detectHighContrast=function(){var t,e;switch(jd.getHighContrastMode()){case"invert":case"light":t=T.Css.hcLight,e="high_contrast_light";break;case"dark":t=T.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},T.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},T);function T(t,e){var o,n,r=nm.call(this)||this;r.removed=!1,r.loaded=!1,r.ready=!1,r._windowResizeCallback=function(){return r.resize()},r._updateGlobalDefaults(e),r.serviceOptions=(new Fy).merge(e),r.styleOptions=(new Ay).merge(e),r.trafficOptions=new As,r.styles=new Xy(r,r.serviceOptions),r.serviceOptions.authOptions.subscriptionKey&&(r.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(r.serviceOptions.authOptions.subscriptionKey)),o=r.serviceOptions.authOptions.clientId||(r.serviceOptions.authOptions.subscriptionKey?r.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting"),r.insights&&r.insights.setAuthenticatedUserContext(r.serviceOptions.sessionId,o),arguments[2]&&"ENVIRONMENT"in window&&window.ENVIRONMENT.hmr?(n=arguments[2],r.ready=!0,r.loaded=!0):(o={antialias:r.styleOptions.antialias,attributionControl:!1,container:t,fadeDuration:r.serviceOptions.fadeDuration,localIdeographFontFamily:r.serviceOptions.localIdeographFontFamily,preserveDrawingBuffer:r.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:r.serviceOptions.refreshExpiredTiles,renderWorldCopies:r.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var o={url:t};return"Tile"===e||"Source"===e?(t.includes(U)&&r.insights&&r.insights.trackEvent({name:"TileLoad"}),r._substituteDomainLanguageViewAndSignInRequest(t,o)):"Style"!==e&&"SpriteJSON"!==e&&"SpriteImage"!==e&&"Glyphs"!==e||r.styles._transformStyleRequest(t,o),r.serviceOptions.transformRequest&&_s(o,r.serviceOptions.transformRequest(o.url,e)),o}},n=new D.Map(o));try{r.map=n,r.controls=new ef(r),r.events=new uf(r),r.imageSprite=new yf(r),r.layers=new Cf(r),r.markers=new df(r),r.sources=new Ef(r),r.popups=new kf(r),r.indicators=new tm(r),r.map.getContainer().classList.add(T.Css.container),r.map.getCanvasContainer().classList.add(T.Css.canvasContainer),r.map.getCanvas().classList.add(T.Css.canvas),r._detectHighContrast(),r.copyrightControl=new Nd({showFeedbackLink:r.styleOptions.showFeedbackLink,showLogo:r.styleOptions.showLogo,customAttribution:r.styleOptions.customAttribution}),r.controls.add(r.copyrightControl,{position:u.ControlPosition.NonFixed});var i=r.authentication?r.authentication.initialize():Promise.resolve();if(r.removed)return r;var s=function(){r.loaded=!0,r.map.off("load",s)},a=(r.map.on("load",s),function(){r.ready=!0,r.map.off("styledata",a),r.events.invoke("ready",{map:r,type:"ready"})});r.map.on("styledata",a),r._setAutoResize(r.styleOptions.autoResize),r.map.showTileBoundaries=r.styleOptions.showTileBoundaries,r.localizedStringsPromise=Lh.getStrings(r.styleOptions.language),i.then(function(){return r.styles.definitions()}).then(function(t){if(!r.removed){if(r.authentication&&!r.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");r.serviceOptions["enable-accessibility"]&&r.accessibleMapDelegate.addToMap(),r._setStyleComponents(r.styleOptions),r.copyrightDelegate&&r.copyrightDelegate.addToMap()}}).catch(function(t){t=t instanceof Error?t:new Error(t);r.events.invoke("error",{map:r,type:"error",error:t})}),r.setCamera(rm(rm({minZoom:1},e),{type:"jump",duration:0})),r.flowDelegate=new Wd(r),r.accessibleMapDelegate=new Ud(r),r.userInteractionDelegate=new Xd(r,e),r.userInteractionDelegate.addToMap(),r.copyrightControl.setOptions({copyrightMessage:r.copyrightControl.getDefaultAttributions().join(", ")})}catch(t){throw t}return r}var um=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},pm=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Ee=(z.applyTemplate=function(e,o){var n,r,t,i=this,s=document.createElement("div");return s.classList.add(z.Css.template),e&&("boolean"!=typeof(o=o||{}).singleDescription&&(o.singleDescription=!0),o.sandboxContent="boolean"!=typeof o.sandboxContent||o.sandboxContent,o.title&&"string"==typeof o.content&&(o.content.includes("{title}")||o.content.includes("{name}"))||(e.title?o.title="{title}":e.name&&(o.title="{name}")),"boolean"!=typeof o.detectHyperlinks&&(o.detectHyperlinks=!0),"boolean"!=typeof o.parsePropertyPaths&&(o.parsePropertyPaths=!0),o.textColor&&(s.style.color=o.textColor),o.fillColor&&(s.style.backgroundColor=o.fillColor),o.title&&((t=this._applyStringTemplate(e,o.title,o)).innerText=t.textContent||t.innerText||"",this._appendChild(s,t,z.Css.title)),(n=document.createElement("div")).classList.add(z.Css.content),Array.isArray(o.content)?0<o.content.length&&o.content[0].propertyPath?this._appendChild(n,this._generateContent(e,o.content,o),z.Css.item):o.content.forEach(function(t){i._appendChild(n,i._generateContent(e,t,o),z.Css.item)}):(r=0,t=void(e.description&&Object.keys(e).forEach(function(t){i._ignoreProperty(t,e[t])||r++})),1===r||o.singleDescription&&e.description||2===r&&e.Snippet?(t=document.createElement("div")).innerHTML=e.description:t=this._generateContent(e,o.content,o),this._appendChild(n,t,z.Css.item)),""!==n.innerHTML)&&(o.sandboxContent?s.appendChild(z._createSandboxedIframe(n,o)):s.appendChild(n)),s},z._createSandboxedIframe=function(t,e){var o=document.createElement("iframe"),t=(o.sandbox.add("allow-popups"),t.innerHTML),n=!1,r=100,i=550,s=10,a=(document.body.scrollWidth<=340&&(i=300,r=50),t.split(/<(tr|div|br|li|h[0-9]|p>)/)),c=Math.max.apply(Math,pm([],um(a.map(function(t){return t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length})),!1))-1,l=Math.ceil(3.5*c),c=(l<i&&(i=l,r=c),t.includes("<img")||t.includes("<video")?(n=!0,o.width="550px"):(l=-1<t.indexOf(z.Css.table)?25:20,s+=Math.max(.5*a.length*l,Math.ceil(t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/r)*l)),o.width=i+"px",o.height=n||280<s?"280px":s+"px",e.textColor?"color:".concat(e.textColor,";"):""),a=e.fillColor?"background-color:".concat(e.fillColor,";"):"",r='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" />'+'<link rel="stylesheet" href="'.concat(z._cssUrl,'" type="text/css"/>')+"<style>html, body{margin:0;padding:0;".concat(c).concat(a,"}</style></head>")+'<body><div class="'.concat(z.Css.template,'" style="padding:0;width:').concat(i-20,'px">').concat(t,"</div></body></html>");return void 0===o.srcdoc?o.src="data:text/html;charset=utf-8,"+encodeURI(r):o.srcdoc=r,o},z._appendChild=function(t,e,o){e&&(o&&(e.className=(e.className?e.className+" ":"")+o),t.appendChild(e))},z._generateContent=function(t,e,o){return e?Array.isArray(e)?this._generatePropertyInfoTable(t,e,o):this._applyStringTemplate(t,e,o):(e=this._generateDynamicTableHtml(t,null,o))?((t=document.createElement("div")).innerHTML=e,t):null},z._applyStringTemplate=function(t,e,o){if(e){for(var n,r,i=e,s=this._placeholderRx.exec(e);s;)2<=s.length&&(n=this._getPropertyValue(t,s[1],o),i=i.replace(s[0],n)),s=this._placeholderRx.exec(e);if(i)return(i=i.trim()).includes("<")&&(i=i.replace(/[\r\n]+/g,"<br/>")),(r=document.createElement("div")).innerHTML=i,r}return null},z._getPropertyValue=function(t,e,o,n){var r=o.parsePropertyPaths?e.split("/"):[e],i=r.length;if(0<i&&t){var s=r[0],a=t[s];if(o.detectHyperlinks&&"link"===e&&(!n||n.hyperlinkFormat)){var c,l,u,p=[];if(Array.isArray(a)?a.forEach(function(t){t.href?p.push(t):"string"==typeof t&&p.push({href:t})}):a.href&&p.push(a),0<p.length)return n&&n.hyperlinkFormat?c=n.hyperlinkFormat:o&&o.hyperlinkFormat&&(c=o.hyperlinkFormat),l=c&&c.target?c.target:"_blank",u=[],p.forEach(function(t){t.title||c&&c.label||!t.rel||u.push(t.rel," - "),u.push('<a href="',t.href,'" target="',l,'">'),t.title?u.push(t.title):c&&c.label?u.push(c.label):u.push(t.href),u.push("</a>","<br/>")}),u.pop(),u.join("")}if(null!=a){for(var h=void 0,h=1;h<i&&(a=a[r[h]],s=r[h],null!=a);h++);if(h===i&&null!=a){t=void 0;if((t=void 0!==a.value?a.value:a)instanceof Date)return n&&n.dateFormat?t.toLocaleString(void 0,n.dateFormat):o.dateFormat?t.toLocaleString(void 0,o.dateFormat):t.toISOString();if("object"==typeof t)return(d=this._generateDynamicTableHtml(t,r.slice(1),o))||"";if("number"==typeof t){if(n){if(n.dateFormat)return new Date(t).toLocaleString(void 0,n.dateFormat);if(n.numberFormat)return t.toLocaleString(void 0,n.numberFormat)}else if(/(timestamp|date)/gi.test(s))return new Date(t).toISOString();return t.toLocaleString(void 0,o.numberFormat)}if("string"==typeof t&&""!==t&&!/[\n\r<>\s]/g.test(t)&&(o.detectHyperlinks||n&&n.hyperlinkFormat)){var d,t=t.trim(),e=this._isUrlRx.test(t)||n&&n.hyperlinkFormat,f=this._isImageUrlRx.test(t)&&(e||t.startsWith("data:image")),y=this._emailRx.test(t);if(e||f||y)return e=void 0,d=void(n&&n.hyperlinkFormat?e=n.hyperlinkFormat:o&&o.hyperlinkFormat&&(e=o.hyperlinkFormat)),d=e&&e.target?' target="'.concat(e.target,'"'):' target="_blank"',n="".concat(e&&e.label?e.label:t),e&&e.scheme?t=e.scheme+t:y&&(t="mailto:"+t),o=e&&e.label?' alt="'.concat(e.label,'"'):"",(e&&e.isImage||f)&&(n='<img src="'.concat(t,'" style="max-width:100%"').concat(o,'"/>')),'<a href="'.concat(t,'"').concat(d,">").concat(n,"</a>")}return t.toString()}}}return""},z._generatePropertyInfoTable=function(o,t,n){var r,i;return o&&t&&0<t.length?((r=[]).push('<table class="'.concat((i=this).Css.table,'">')),t.forEach(function(t){var e=i._getPropertyValue(o,t.propertyPath,n,t);t.hideLabel?r.push('<tr><td colspan="2">',e,"</td></tr>"):(t=t.label||t.propertyPath.split("/")[0],r.push("<tr><th>",t,"</th><td>",e,"</td></tr>"))}),r.push("</table>"),(t=document.createElement("div")).innerHTML=r.join(""),t):null},z._generateDynamicTableHtml=function(e,t,o){var n,r,i,s,a=this;return!e||((n=[]).push('<table class="'.concat((r=this).Css.table,'">')),i=t&&0<t.length?t.join("/")+"/":"",s=0,Object.keys(e).forEach(function(t){a._ignoreProperty(t,e[t])||(n.push("<tr><th>",t,"</th><td>",r._getPropertyValue(e,i+t,o),"</td></tr>"),s++)}),0===s)?null:(n.push("</table>"),n.join(""))},z._ignoreProperty=function(t,e){switch(t){case"title":case"name":case"base":case"popupTemplate":case"anchor":case"icon":case"image":case"imageUrl":case"rotation":case"color":case"size":case"offset":case"strokeColor":case"strokeWidth":case"strokeOpacity":case"subType":case"fillColor":case"fillOpacity":case"visibility":case"visible":return!0;default:if(0===t.indexOf("_")||null==e||""===e)return!0}return!1},z._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,z._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,z._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,z._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,z._cssUrl=new ct({domain:B,path:"sdk/javascript/mapcontrol/".concat(pt.getEndpointVersion(),"/atlas.min.css")}).toString(),z.Css={template:"azure-maps-control-popup-template",title:"azure-maps-control-popup-template-title",content:"azure-maps-control-popup-template-content",item:"azure-maps-control-popup-template-content-item",table:"azure-maps-control-popup-template-table"},z);function z(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}var s=new ct({domain:B,path:"sdk/javascript/mapcontrol/".concat(pt.getEndpointVersion(),"/mapbox-gl-rtl-text.min.js")});D.setRTLTextPlugin(s.toString(),function(t){t&&console.warn(t)},!0),u.HtmlMarker=xh,u.Map=Do,u.Pixel=Ia,u.Popup=yh,u.PopupTemplate=Ee,u.Shape=x,u._getAssetDomain=function(){return R},u._getDomain=function(){return Nh},u._hasMaxParallelImageRequests=Ld,u._hasSetAuthenticationOptions=Sd,u._hasSetDomain=Od,u._hasSetLanguage=kd,u._hasSetSessionId=Md,u._hasSetStyleDefinitionsPath=Cd,u._hasSetStyleDefinitionsVersion=function(){return Yh},u._hasSetView=Ad,u._hasWorkerCount=Pd,u.addImageTemplate=function(t,e,o){!o&&Ed[t.toLowerCase()]||(Ed[t.toLowerCase()]=e)},u.clearPrewarmedResources=function(){D.clearPrewarmedResources()},u.control=r,u.data=ho,u.getAllImageTemplateNames=function(){return Object.keys(Ed)},u.getAuthenticationOptions=ed,u.getDomain=nd,u.getImageTemplate=xd,u.getLanguage=ld,u.getMaxParallelImageRequests=cd,u.getSessionId=ud,u.getStaticAssetsDomain=od,u.getStyleAPIVersion=sd,u.getStyleDefinitionsPath=rd,u.getStyleDefinitionsVersion=id,u.getSubscriptionKey=pd,u.getUserRegion=function(){return Ih},u.getVersion=function(){return pt.getFullVersion()},u.getView=hd,u.getWorkerCount=ad,u.internal=rt,u.isSupported=function(t){return!Mh.isIE()},u.layer=ue,u.math=o,u.prewarm=function(){D.prewarm()},u.setAuthenticationOptions=dd,u.setDomain=fd,u.setLanguage=vd,u.setMaxParallelImageRequests=gd,u.setSessionId=wd,u.setStyleAPIVersion=function(t){Uh=t},u.setStyleDefinitionsPath=yd,u.setStyleDefinitionsVersion=function(t){Hh=t,Yh=!0},u.setSubscriptionKey=_d,u.setUserRegion=bd,u.setView=function(t){Ih=t,Gh=!0},u.setWorkerCount=md,u.source=rr});
|
|
55
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("azuremaps-maplibre-gl")):"function"==typeof define&&define.amd?define(["exports","azuremaps-maplibre-gl"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).atlas=t.atlas||{},t.maplibregl)}(this,function(u,D){"use strict";var R="atlas.microsoft.com",B="atlas.microsoft.com",F="styling",N="2023-01-01",Z="api-version",q="Authorization",H="{{azMapsDomain}}",U="{azMapsDomain}",W="{{azMapsView}}",G="view",V="{{azMapsLanguage}}",K="{{azMapsStylingPath}}",Y="{{azMapsStylePath}}",J="styling",$="styles",X="2.0",Q="x-ms-client-id",tt=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},t=(et.prototype.merge=function(){for(var e,t,o,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{for(var i=tt(n),s=i.next();!s.done;s=i.next()){var a=s.value;if(a)for(var c in a)a.hasOwnProperty(c)&&this.hasOwnProperty(c)&&(void 0!==a[c]&&null!=a[c]?this[c]instanceof et?this[c].merge(a[c]):this[c]=a[c]:(o=o||new(Object.getPrototypeOf(this).constructor),this[c]=o[c]))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return this},et);function et(){}var ot,nt,rt=window&&window.__extends||(ot=function(t,e){return(ot=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ot(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),it=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},st=(rt(at,nt=t),at);function at(){var t=null!==nt&&nt.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}lt.prototype.get=function(){return fetch(this.toString(),{method:"GET",mode:"cors",headers:new Headers(this.options.headers)}).then(function(t){if(t.ok)return t.json();throw new Error("HTTP ".concat(t.status,": ").concat(t.statusText))})},lt.prototype.toString=function(){var t=this,e=Object.entries(t.options.queryParams).map(function(t){var t=it(t,2),e=t[0],t=t[1];return"".concat(e,"=").concat(t)}).join("&"),o=[],n=t.options.path||"";return lt.protoRegEx.test(n)?o.push(n):(t.options.domain&&(lt.protoRegEx.test(t.options.domain)||(o.push("".concat(t.options.protocol,"://")),o.push(t.options.subdomain?"".concat(t.options.subdomain,"."):"")),o.push(t.options.domain)),o.push(t.options.path?"/".concat(n):"")),o.push(e?"?".concat(e):""),o.join("")},lt.protoRegEx=new RegExp(/^(((file|http|https):\/\/)|blob:)/i);var ct=lt;function lt(t){this.options=(new st).merge(t)}var ut="3.1.0",pt=(ht.getFullVersion=function(){return ut},ht.getEndpointVersion=function(){var t=ut.indexOf(".");return-1===(t=ut.indexOf(".",t+1))?ut:ut.substring(0,t)},ht);function ht(){}function _(t){var e=document.createElement("span");return e.innerText=t,e.classList.add("tooltiptext"),-1!=navigator.userAgent.indexOf("Edg")?e.classList.add("edge"):-1!=navigator.userAgent.indexOf("Chrome")?e.classList.add("chrome"):-1!=navigator.userAgent.indexOf("Safari")?e.classList.add("safari"):-1!=navigator.userAgent.indexOf("Firefox")&&e.classList.add("firefox"),-1!=navigator.userAgent.indexOf("Windows")?e.classList.add("win"):-1!=navigator.userAgent.indexOf("Macintosh")&&e.classList.add("mac"),e}function b(r,i,s){function t(t){var e=i.getBoundingClientRect(),o=r.getBoundingClientRect(),n=e.x+o.width>window.innerWidth?window.innerWidth-o.width:e.x,o=e.y+e.height+o.height+4>window.innerHeight?e.y-o.height-4:e.y+e.height+4;s&&i.parentElement&&(e=i.parentElement?i.parentElement.getBoundingClientRect():null,r.style.position="absolute",n-=e.x,o-=e.y),r.style.transform="translate(".concat(n,"px, ").concat(o,"px)"),r.style.display="block"}void 0===s&&(s=!1),i.addEventListener("mouseover",t),i.addEventListener("focusin",t),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||"block"!==r.style.display||(t.stopPropagation(),r.style.display="none")})}var dt,ft,rt=window&&window.__extends||(dt=function(t,e){return(dt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}dt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),yt=(u.ControlPosition=void 0,(jt=u.ControlPosition||(u.ControlPosition={})).TopLeft="top-left",jt.TopRight="top-right",jt.BottomLeft="bottom-left",jt.BottomRight="bottom-right",jt.NonFixed="non-fixed",rt(mt,ft=t),mt);function mt(){var t=null!==ft&&ft.apply(this,arguments)||this;return t.position=u.ControlPosition.NonFixed,t}vt.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],o=0;o<t.length;o++){var n=t[o]/255;e[o]=n<=.03928?n/12.92:Math.pow((.055+n)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},vt.prototype.getRBGA=function(t){var e=document.createElement("canvas").getContext("2d"),t=(e.globalAlpha=1,e.fillStyle=t,e.fillRect(0,0,1,1),e.getImageData(0,0,1,1).data);return[t[0],t[1],t[2],t[3]]};var gt=vt;function vt(t){var e;t&&(e=void 0,3<=(e="string"==typeof t?this.getRBGA(t):t).length)&&(this.r=e[0],this.g=e[1],this.b=e[2],3<e.length)&&(this.a=e[3])}u.ControlStyle=void 0,(jt=u.ControlStyle||(u.ControlStyle={})).light="light",jt.dark="dark",jt.auto="auto";var wt=Map,_t=(bt.prototype._addEventListener=function(t,e,o){this.listeners.has(t)||this.listeners.set(t,new wt),this.listeners.get(t).set(e,o)},bt.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},bt.prototype._invokeEvent=function(o,n){var r=this;this.listeners.has(o)&&this.listeners.get(o).forEach(function(t,e){t&&r._removeEventListener(o,e);try{e(n)}catch(t){console.error(t)}})},bt);function bt(){this.listeners=new wt}var xt,St,rt=Object.freeze({__proto__:null,EventEmitter:_t}),Ot=((window&&window.__extends||(xt=function(t,e){return(xt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ct,St=_t),Ct.prototype.onRemove=function(){this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.events.remove("stylechanged",this._onStyleChange),delete this._map),this._observer&&(this._observer.disconnect(),delete this._observer),delete this._theme},Ct.prototype.buildContainer=function(t,e,o,n){return this._map=t,this._container=document.createElement(n||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof o&&this._container.setAttribute("aria-label",o),e.toLowerCase()===u.ControlStyle.auto?this._map&&this._map.events.add("stylechanged",this._onStyleChange):this._container.classList.add(e),this._container},Ct.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},Ct.activateClickDelay=100,Ct);function Ct(){var e=null!==St&&St.apply(this,arguments)||this;return e._onStyleChange=function(){e._map.getStyle().style.toLowerCase().startsWith("blank")?e._observer||(e._onBackgroundChange(),e._observer=new MutationObserver(e._onBackgroundChange),e._observer.observe(e._map.getMapContainer(),{attributes:!0,attributeFilter:["style"]})):(e._observer&&(e._observer.disconnect(),delete e._observer),e._map.styles.getThemeAsync(e._map.getStyle()).then(function(t){e._setTheme(t)}))},e._onBackgroundChange=function(){var t=new gt(e._map.getMapContainer().style.backgroundColor).getLuminosity(),t=isNaN(t)||.5<t?u.ControlStyle.light:u.ControlStyle.dark;e._setTheme(t)},e}(window&&window.__extends||(Pt=function(t,e){return(Pt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Pt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Mt,Lt=t);var Pt,Lt,kt=Mt;function Mt(){var t=null!==Lt&&Lt.apply(this,arguments)||this;return t.rotationDegreesDelta=15,t.style=u.ControlStyle.light,t.inverted=!1,t}(window&&window.__extends||(At=function(t,e){return(At=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}At(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(It,Et=Ot),It.prototype.onAdd=function(t,e){var o=this,n=this.buildContainer(t,this.options.style,"Rotation Control"),r=this.constructRotationButton(t),i=this.constructRotationGrid(t,e),s=_("Reset to Default Rotation");return n.addEventListener("mouseover",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasMouse=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasFocus=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse)||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||(t.stopPropagation(),r.focus(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),r.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||null==n||!n.classList.contains("in-use")||"none"!==(null==s?void 0:s.style.display)||(t.stopPropagation(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&It.InvertOrderPositions.includes(e.position)?(n.appendChild(i),n.appendChild(r),n.appendChild(s),b(s,r)):(n.appendChild(r),n.appendChild(s),b(s,r),n.appendChild(i)),n},It.prototype.constructRotationGrid=function(t,e){var o=document.createElement("div"),n=(o.classList.add("sub-container"),o.classList.add("hidden-accessible-element"),this.constructRightRotationButton(t)),t=this.constructLeftRotationButton(t),r=_("Rotate Left"),i=_("Rotate Right");return e&&It.InvertOrderPositions.includes(e.position)?(o.appendChild(n),o.appendChild(i),b(i,n),o.appendChild(t),o.appendChild(r),b(r,t)):(o.appendChild(t),o.appendChild(r),b(r,t),o.appendChild(n),o.appendChild(i),b(i,n)),o},It.prototype.constructRotationButton=function(e){var o=this,t=document.createElement("button"),n=(t.classList.add("azure-maps-control-button"),t.classList.add("rotation"),t.setAttribute("aria-label","Reset to Default Rotation"),t.setAttribute("alt","Reset to Default Rotation"),t.setAttribute("type","button"),document.createElement("div"));return t.appendChild(n),t.addEventListener("click",function(t){t.timeStamp-o.lastActiveTime>Ot.activateClickDelay&&e.setCamera({bearing:It.DefaultRotation},!0)}),e.events.add("rotate",function(t){n.style.transform="rotate(".concat(-t.map.getCamera().bearing,"deg)")}),t},It.prototype.constructRightRotationButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("rotation-right"),o.setAttribute("aria-label","Rotate Right"),o.setAttribute("alt","Rotate Right"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing-(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:It.RotationDuration,type:"ease"},!0)}),o},It.prototype.constructLeftRotationButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("rotation-left"),o.setAttribute("aria-label","Rotate Left"),o.setAttribute("alt","Rotate Left"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing+(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:It.RotationDuration,type:"ease"},!0)}),o},It.DefaultRotation=0,It.RotationDuration=100,It.InvertOrderPositions=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight];var At,Et,jt=It;function It(t){var e=Et.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new kt).merge(t),e}(window&&window.__extends||(Tt=function(t,e){return(Tt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Tt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Rt,zt=t);var Tt,zt,Dt=Rt;function Rt(){var t=null!==zt&&zt.apply(this,arguments)||this;return t.pitchDegreesDelta=10,t.style=u.ControlStyle.light,t.inverted=!1,t}(window&&window.__extends||(Bt=function(t,e){return(Bt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Bt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Zt,Ft=Ot),Zt.prototype.onAdd=function(t,e){var o=this,n=this.buildContainer(t,this.options.style,"Pitch Control"),r=this.constructPitchButton(t),i=this.constructPitchGrid(t,e),s=_("Reset to Default Pitch");return n.addEventListener("mouseover",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasMouse=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasFocus=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse)||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||(t.stopPropagation(),r.focus(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),r.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||null==n||!n.classList.contains("in-use")||"none"!==(null==s?void 0:s.style.display)||(t.stopPropagation(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&Zt.INVERT_ORDER_POSITIONS.includes(e.position)?(n.appendChild(i),n.appendChild(r),n.appendChild(s),b(s,n)):(n.appendChild(r),n.appendChild(s),b(s,n),n.appendChild(i)),this.map=t,this.container=n,this.pitchButton=r,t.events.add("pitch",this.pitchChanged),this.updatePitchButtonsState(),n},Zt.prototype.onRemove=function(){this.container&&(this.container.remove(),this.container=null,this.pitchButton=null,this.pitchIncrementButton=null,this.pitchDecrementButton=null),this.map&&(this.map.events.remove("pitch",this.pitchChanged),this.map=null)},Zt.prototype.constructPitchGrid=function(t,e){var o=document.createElement("div"),t=(o.classList.add("sub-container"),o.classList.add("hidden-accessible-element"),this.pitchIncrementButton=this.constructPitchIncrementButton(t),this.pitchDecrementButton=this.constructPitchDecrementButton(t),_("Increase Pitch")),n=_("Decrease Pitch");return e&&Zt.INVERT_ORDER_POSITIONS.includes(e.position)?(o.appendChild(this.pitchDecrementButton),o.appendChild(n),b(n,this.pitchDecrementButton),o.appendChild(this.pitchIncrementButton),o.appendChild(t),b(t,this.pitchIncrementButton)):(o.appendChild(this.pitchIncrementButton),o.appendChild(t),b(t,this.pitchIncrementButton),o.appendChild(this.pitchDecrementButton),o.appendChild(n),b(n,this.pitchDecrementButton)),o},Zt.prototype.constructPitchButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch"),o.setAttribute("aria-label","Reset to Default Pitch"),o.setAttribute("alt","Reset to Default Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){event.timeStamp-e.lastActiveTime>Ot.activateClickDelay&&t.setCamera({pitch:Zt.DEFAULT_PITCH},!0)}),o},Zt.prototype.constructPitchDecrementButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch-down"),o.setAttribute("aria-label","Decrease Pitch"),o.setAttribute("alt","Decrease Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch-(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:Zt.PITCH_DURATION_MS,type:"ease"},!0)}),o},Zt.prototype.constructPitchIncrementButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch-up"),o.setAttribute("aria-label","Increase Pitch"),o.setAttribute("alt","Increase Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch+(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:Zt.PITCH_DURATION_MS,type:"ease"},!0)}),o},Zt.PITCH_DURATION_MS=100,Zt.DEFAULT_PITCH=0,Zt.INVERT_ORDER_POSITIONS=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight];var Bt,Ft,Nt=Zt;function Zt(t){var o=Ft.call(this)||this;return o.container=null,o.map=null,o.pitchButton=null,o.pitchIncrementButton=null,o.pitchDecrementButton=null,o.hasMouse=!1,o.hasFocus=!1,o.pitchChanged=function(t){return o.updatePitchButtonsState()},o.updatePitchButtonsState=function(){var t=o.map.getCamera().pitch<=0,e=60<=o.map.getCamera().pitch;o.hasFocus&&o.pitchButton&&(t||e)&&o.pitchButton.focus(),o.options.inverted?(o.pitchIncrementButton&&o.pitchIncrementButton.disabled!=t&&(o.pitchIncrementButton.disabled=t),o.pitchDecrementButton&&o.pitchDecrementButton.disabled!=e&&(o.pitchDecrementButton.disabled=e)):(o.pitchIncrementButton&&o.pitchIncrementButton.disabled!=e&&(o.pitchIncrementButton.disabled=e),o.pitchDecrementButton&&o.pitchDecrementButton.disabled!=t&&(o.pitchDecrementButton.disabled=t))},o.options=(new Dt).merge(t),o}(window&&window.__extends||(qt=function(t,e){return(qt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}qt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Wt,Ht=Ot),Wt.prototype.onAdd=function(t,e){this.map=t,null!=(o=null==(o=this.map)?void 0:o._getMap())&&o.addControl(this.control);var o=this.buildContainer(t,u.ControlStyle.auto,"Scale Bar");return o.appendChild(null==(t=this.control)?void 0:t._container),o},Wt.prototype.onRemove=function(){var t;Ht.prototype.onRemove.call(this),null!=(t=null==(t=this.map)?void 0:t._getMap())&&t.removeControl(this.control),this.map=null},Wt.prototype.setUnit=function(t){var e;null!=(e=this.control)&&e.setUnit(t)};var qt,Ht,Ut=Wt;function Wt(t){var e=Ht.call(this)||this;return e.map=null,e.control=new D.ScaleControl({maxWidth:null==t?void 0:t.maxWidth,unit:null==t?void 0:t.unit}),e}var Gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Vt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Kt(o){var e,n;return o.__esModule?o:("function"==typeof(e=o.default)?(n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:n={},Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(o).forEach(function(t){var e=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(n,t,e.get?e:{enumerable:!0,get:function(){return o[t]}})}),n)}function Yt(t,e){return t===e||t!=t&&e!=e}var Jt=Yt;function $t(t,e){for(var o=t.length;o--;)if(Jt(t[o][0],e))return o;return-1}var Xt=$t,Qt=Array.prototype.splice;var te=$t;var ee=$t;var oe=$t;function ne(t){var e=this.__data__;return!((t=Xt(e,t))<0||(t==e.length-1?e.pop():Qt.call(e,t,1),--this.size,0))}function re(t){var e=this.__data__;return(t=te(e,t))<0?void 0:e[t][1]}function ie(t){return-1<ee(this.__data__,t)}function se(t,e){var o=this.__data__,n=oe(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this}function ae(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}ae.prototype.clear=function(){this.__data__=[],this.size=0},ae.prototype.delete=ne,ae.prototype.get=re,ae.prototype.has=ie,ae.prototype.set=se;var ce=ae,le=ce;function ue(){this.__data__=new le,this.size=0}function pe(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}function he(t){return this.__data__.get(t)}function de(t){return this.__data__.has(t)}var Gt="object"==typeof Gt&&Gt&&Gt.Object===Object&&Gt,e="object"==typeof self&&self&&self.Object===Object&&self,e=Gt||e||Function("return this")(),fe=e.Symbol,o=Object.prototype,ye=o.hasOwnProperty,me=o.toString,ge=fe?fe.toStringTag:void 0;var ve=Object.prototype.toString;var we=function(t){var e=ye.call(t,ge),o=t[ge];try{var n=!(t[ge]=void 0)}catch(t){}var r=me.call(t);return n&&(e?t[ge]=o:delete t[ge]),r},_e=function(t){return ve.call(t)},be=fe?fe.toStringTag:void 0;function xe(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(be&&be in Object(t)?we:_e)(t)}function Se(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var Oe=xe,Ce=Se;function Pe(t){return!!Ce(t)&&("[object Function]"==(t=Oe(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var o=e["__core-js_shared__"],Le=(o=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var ke=Function.prototype.toString;function Me(t){if(null!=t){try{return ke.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Ae=Pe,Ee=function(t){return!!Le&&Le in t},je=Se,Ie=Me,Te=/^\[object .+?Constructor\]$/,o=Function.prototype,ze=Object.prototype,o=o.toString,ze=ze.hasOwnProperty,De=RegExp("^"+o.call(ze).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Re=function(t){return!(!je(t)||Ee(t))&&(Ae(t)?De:Te).test(Ie(t))},Be=function(t,e){return null==t?void 0:t[e]};function Fe(t,e){return t=Be(t,e),Re(t)?t:void 0}var o=Fe(e,"Map"),ze=Fe(Object,"create"),Ne=ze;var Ze=ze,qe=Object.prototype.hasOwnProperty;var He=ze,Ue=Object.prototype.hasOwnProperty;var We=ze;function Ge(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function Ve(t){var e,o=this.__data__;return Ze?"__lodash_hash_undefined__"===(e=o[t])?void 0:e:qe.call(o,t)?o[t]:void 0}function Ke(t){var e=this.__data__;return He?void 0!==e[t]:Ue.call(e,t)}function Ye(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=We&&void 0===e?"__lodash_hash_undefined__":e,this}function Je(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}Je.prototype.clear=function(){this.__data__=Ne?Ne(null):{},this.size=0},Je.prototype.delete=Ge,Je.prototype.get=Ve,Je.prototype.has=Ke,Je.prototype.set=Ye;var $e=Je,Xe=ce,Qe=o;var to=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};function eo(t,e){return t=t.__data__,to(e)?t["string"==typeof e?"string":"hash"]:t.map}var oo=eo;var no=eo;var ro=eo;var io=eo;function so(t){return t=oo(this,t).delete(t),this.size-=t?1:0,t}function ao(t){return no(this,t).get(t)}function co(t){return ro(this,t).has(t)}function lo(t,e){var o=io(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this}function uo(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}uo.prototype.clear=function(){this.size=0,this.__data__={hash:new $e,map:new(Qe||Xe),string:new $e}},uo.prototype.delete=so,uo.prototype.get=ao,uo.prototype.has=co,uo.prototype.set=lo;var ze=uo,po=ce,ho=o,fo=ze;function yo(t,e){var o=this.__data__;if(o instanceof po){var n=o.__data__;if(!ho||n.length<199)return n.push([t,e]),this.size=++o.size,this;o=this.__data__=new fo(n)}return o.set(t,e),this.size=o.size,this}var mo=ce,ce=pe,go=he,vo=de;function wo(t){t=this.__data__=new mo(t);this.size=t.size}wo.prototype.clear=ue,wo.prototype.delete=ce,wo.prototype.get=go,wo.prototype.has=vo,wo.prototype.set=yo;ce=wo;function _o(t,e){for(var o=-1,n=null==t?0:t.length;++o<n&&!1!==e(t[o],o,t););return t}var bo=Fe,go=function(){try{var t=bo(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),xo=go;function So(t,e,o){"__proto__"==e&&xo?xo(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}var Oo=So,Co=Yt,Po=Object.prototype.hasOwnProperty;function Lo(t,e,o){var n=t[e];Po.call(t,e)&&Co(n,o)&&(void 0!==o||e in t)||Oo(t,e,o)}var ko=Lo,Mo=So;function Ao(t,e,o,n){for(var r=!o,i=(o=o||{},-1),s=e.length;++i<s;){var a=e[i],c=n?n(o[a],t[a],a,o,t):void 0;void 0===c&&(c=t[a]),(r?Mo:ko)(o,a,c)}return o}function Eo(t,e){for(var o=-1,n=Array(t);++o<t;)n[o]=e(o);return n}function jo(t){return null!=t&&"object"==typeof t}var Io=xe,To=jo;var vo=function(t){return To(t)&&"[object Arguments]"==Io(t)},zo=jo,Do=Object.prototype,Ro=Do.hasOwnProperty,Bo=Do.propertyIsEnumerable,Do=vo(function(){return arguments}())?vo:function(t){return zo(t)&&Ro.call(t,"callee")&&!Bo.call(t,"callee")},vo=Array.isArray,Fo={exports:{}};i=(i=(r=Fo).exports)&&!i.nodeType&&i,No=(No=i&&r&&!r.nodeType&&r)&&No.exports===i?e.Buffer:void 0,i=No?No.isBuffer:void 0,r.exports=i||function(){return!1};var No=Fo.exports,Zo=/^(?:0|[1-9]\d*)$/;function qo(t,e){var o=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==o||"symbol"!=o&&Zo.test(t))&&-1<t&&t%1==0&&t<e}function Ho(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}var Uo=xe,Wo=Ho,Go=jo,n={};n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1;function Vo(t){return Go(t)&&Wo(t.length)&&!!n[Uo(t)]}function Ko(e){return function(t){return e(t)}}var Yo,Jo,r={exports:{}},Gt=(Fo=(Fo=(i=r).exports)&&!Fo.nodeType&&Fo,Yo=Fo&&i&&!i.nodeType&&i,Jo=Yo&&Yo.exports===Fo&&Gt.process,Fo=function(){try{var t=Yo&&Yo.require&&Yo.require("util").types;return t?t:Jo&&Jo.binding&&Jo.binding("util")}catch(t){}}(),i.exports=Fo,r.exports),i=Vo,Fo=Ko,r=Gt&&Gt.isTypedArray,Fo=r?Fo(r):i,$o=Eo,Xo=Do,Qo=vo,tn=No,en=qo,on=Fo,nn=Object.prototype.hasOwnProperty;function rn(t,e){var o,n=Qo(t),r=!n&&Xo(t),i=!n&&!r&&tn(t),s=!n&&!r&&!i&&on(t),a=n||r||i||s,c=a?$o(t.length,String):[],l=c.length;for(o in t)!e&&!nn.call(t,o)||a&&("length"==o||i&&("offset"==o||"parent"==o)||s&&("buffer"==o||"byteLength"==o||"byteOffset"==o)||en(o,l))||c.push(o);return c}var sn=Object.prototype;function an(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||sn)}function cn(e,o){return function(t){return e(o(t))}}var r=cn(Object.keys,Object),ln=an,un=r,pn=Object.prototype.hasOwnProperty;var hn=Pe,dn=Ho;function fn(t){return null!=t&&dn(t.length)&&!hn(t)}var yn=rn,mn=function(t){if(!ln(t))return un(t);var e,o=[];for(e in Object(t))pn.call(t,e)&&"constructor"!=e&&o.push(e);return o},gn=fn;function vn(t){return(gn(t)?yn:mn)(t)}var wn=Ao,_n=vn;function bn(t,e){return t&&wn(e,_n(e),t)}var xn=Se,Sn=an,On=function(t){var e=[];if(null!=t)for(var o in Object(t))e.push(o);return e},Cn=Object.prototype.hasOwnProperty;var Pn=rn,Ln=function(t){if(!xn(t))return On(t);var e,o=Sn(t),n=[];for(e in t)("constructor"!=e||!o&&Cn.call(t,e))&&n.push(e);return n},kn=fn;function Mn(t){return kn(t)?Pn(t,!0):Ln(t)}var An=Ao,En=Mn;function jn(t,e){return t&&An(e,En(e),t)}var In,i={exports:{}},Tn=(Tn=(Tn=(r=i).exports)&&!Tn.nodeType&&Tn,s=(s=Tn&&r&&!r.nodeType&&r)&&s.exports===Tn?e.Buffer:void 0,In=s?s.allocUnsafe:void 0,r.exports=function(t,e){return e?t.slice():(e=t.length,e=In?In(e):new t.constructor(e),t.copy(e),e)},i.exports);function zn(t,e){var o=-1,n=t.length;for(e=e||Array(n);++o<n;)e[o]=t[o];return e}function Dn(){return[]}var Rn=function(t,e){for(var o=-1,n=null==t?0:t.length,r=0,i=[];++o<n;){var s=t[o];e(s,o,t)&&(i[r++]=s)}return i},Bn=Object.prototype.propertyIsEnumerable,Fn=Object.getOwnPropertySymbols,s=Fn?function(e){return null==e?[]:(e=Object(e),Rn(Fn(e),function(t){return Bn.call(e,t)}))}:Dn,Nn=Ao,Zn=s;function qn(t,e){return Nn(t,Zn(t),e)}function Hn(t,e){for(var o=-1,n=e.length,r=t.length;++o<n;)t[r+o]=e[o];return t}var r=cn(Object.getPrototypeOf,Object),Un=Hn,Wn=r,Gn=s,i=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Un(e,Gn(t)),t=Wn(t);return e}:Dn,Vn=Ao,Kn=i;function Yn(t,e){return Vn(t,Kn(t),e)}var Jn=Hn,$n=vo;function Xn(t,e,o){return e=e(t),$n(t)?e:Jn(e,o(t))}var Qn=Xn,tr=s,er=vn;function or(t){return Qn(t,er,tr)}var nr=Xn,rr=i,ir=Mn;function sr(t){return nr(t,ir,rr)}var s=Fe(e,"DataView"),i=o,o=Fe(e,"Promise"),ar=Fe(e,"Set"),cr=Fe(e,"WeakMap"),lr=xe,ur=Me,pr="[object Map]",hr="[object Promise]",dr="[object Set]",fr="[object WeakMap]",yr="[object DataView]",mr=ur(s),gr=ur(i),vr=ur(o),wr=ur(ar),_r=ur(cr),br=lr,s=br=s&&br(new s(new ArrayBuffer(1)))!=yr||i&&br(new i)!=pr||o&&br(o.resolve())!=hr||ar&&br(new ar)!=dr||cr&&br(new cr)!=fr?function(t){var e=lr(t),t="[object Object]"==e?t.constructor:void 0,t=t?ur(t):"";if(t)switch(t){case mr:return yr;case gr:return pr;case vr:return hr;case wr:return dr;case _r:return fr}return e}:br,xr=Object.prototype.hasOwnProperty;function Sr(t){var e=t.length,o=new t.constructor(e);return e&&"string"==typeof t[0]&&xr.call(t,"index")&&(o.index=t.index,o.input=t.input),o}var i=e.Uint8Array,Or=i;function Cr(t){var e=new t.constructor(t.byteLength);return new Or(e).set(new Or(t)),e}var Pr=Cr;var Lr=/\w*$/;var o=fe?fe.prototype:void 0,kr=o?o.valueOf:void 0;var Mr=Cr;function Ar(t,e){return e=e?Mr(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var Er=Cr,jr=function(t,e){return e=e?Pr(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)},Ir=function(t){var e=new t.constructor(t.source,Lr.exec(t));return e.lastIndex=t.lastIndex,e},Tr=function(t){return kr?Object(kr.call(t)):{}},zr=Ar;function Dr(t,e,o){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Er(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return jr(t,o);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return zr(t,o);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Ir(t);case"[object Set]":return new n;case"[object Symbol]":return Tr(t)}}var Rr=Se,Br=Object.create;function Fr(){}var Nr=function(t){if(!Rr(t))return{};if(Br)return Br(t);Fr.prototype=t;t=new Fr;return Fr.prototype=void 0,t},Zr=r,qr=an;function Hr(t){return"function"!=typeof t.constructor||qr(t)?{}:Nr(Zr(t))}var Ur=s,Wr=jo;function Gr(t){return Wr(t)&&"[object Map]"==Ur(t)}var ar=Ko,cr=Gt&&Gt.isMap,br=cr?ar(cr):Gr,Vr=s,Kr=jo;function Yr(t){return Kr(t)&&"[object Set]"==Vr(t)}var e=Ko,o=Gt&&Gt.isSet,ar=o?e(o):Yr,Jr=ce,$r=_o,Xr=Lo,Qr=bn,ti=jn,ei=Tn,oi=zn,ni=qn,ri=Yn,ii=or,si=sr,ai=s,ci=Sr,li=Dr,ui=Hr,pi=vo,hi=No,di=br,fi=Se,yi=ar,mi=vn,gi=Mn,vi="[object Arguments]",wi="[object Function]",_i="[object Object]",d={};d[vi]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object DataView]"]=d["[object Boolean]"]=d["[object Date]"]=d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d["[object Map]"]=d["[object Number]"]=d[_i]=d["[object RegExp]"]=d["[object Set]"]=d["[object String]"]=d["[object Symbol]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d["[object Error]"]=d[wi]=d["[object WeakMap]"]=!1;function bi(o,n,r,t,e,i){var s,a=1&n,c=2&n,l=4&n;if(void 0===(s=r?e?r(o,t,e,i):r(o):s)){if(!fi(o))return o;if(t=pi(o)){if(s=ci(o),!a)return oi(o,s)}else{var u=ai(o),p=u==wi||"[object GeneratorFunction]"==u;if(hi(o))return ei(o,a);if(u==_i||u==vi||p&&!e){if(s=c||p?{}:ui(o),!a)return c?ri(o,ti(s,o)):ni(o,Qr(s,o))}else{if(!d[u])return e?o:{};s=li(o,u,a)}}if(p=(i=i||new Jr).get(o))return p;i.set(o,s),yi(o)?o.forEach(function(t){s.add(bi(t,n,r,t,o,i))}):di(o)&&o.forEach(function(t,e){s.set(e,bi(t,n,r,e,o,i))});var h=t?void 0:(l?c?si:ii:c?gi:mi)(o);$r(h||o,function(t,e){h&&(t=o[e=t]),Xr(s,e,bi(t,n,r,e,o,i))})}return s}var xi=bi;var a=Vt(function(t){return xi(t,5)}),Si=So,Oi=Yt;function Ci(t,e,o){(void 0===o||Oi(t[e],o))&&(void 0!==o||e in t)||Si(t,e,o)}var cr=function(c){return function(t,e,o){for(var n=-1,r=Object(t),i=o(t),s=i.length;s--;){var a=i[c?s:++n];if(!1===e(r[a],a,r))break}return t}}(),Pi=fn,Li=jo;function ki(t){return Li(t)&&Pi(t)}var Mi=xe,Ai=r,Ei=jo,Gt=Function.prototype,e=Object.prototype,ji=Gt.toString,Ii=e.hasOwnProperty,Ti=ji.call(Object);function zi(t){return!(!Ei(t)||"[object Object]"!=Mi(t))&&(null===(t=Ai(t))||"function"==typeof(t=Ii.call(t,"constructor")&&t.constructor)&&t instanceof t&&ji.call(t)==Ti)}function Di(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ri=Ao,Bi=Mn;var Fi=Ci,Ni=Tn,Zi=Ar,qi=zn,Hi=Hr,Ui=Do,Wi=vo,Gi=ki,Vi=No,Ki=Pe,Yi=Se,Ji=zi,$i=Fo,Xi=Di,Qi=function(t){return Ri(t,Bi(t))};var ts=ce,es=Ci,os=cr,ns=function(t,e,o,n,r,i,s){var a,c,l,u=Xi(t,o),p=Xi(e,o),h=s.get(p);h||((e=void 0===(h=i?i(u,p,o+"",t,e,s):void 0))&&(c=!(a=Wi(p))&&Vi(p),l=!a&&!c&&$i(p),h=p,a||c||l?h=Wi(u)?u:Gi(u)?qi(u):c?Ni(p,!(e=!1)):l?Zi(p,!(e=!1)):[]:Ji(p)||Ui(p)?Ui(h=u)?h=Qi(u):Yi(u)&&!Ki(u)||(h=Hi(p)):e=!1),e&&(s.set(p,h),r(h,p,n,i,s),s.delete(p))),Fi(t,o,h)},rs=Se,is=Mn,ss=Di;function as(t){return t}var cs=function(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)},ls=Math.max;var us=function(t){return function(){return t}},ps=go,hs=Date.now;var o=function(o){var n=0,r=0;return function(){var t=hs(),e=16-(t-r);if(r=t,0<e){if(800<=++n)return arguments[0]}else n=0;return o.apply(void 0,arguments)}}(ps?function(t,e){return ps(t,"toString",{configurable:!0,enumerable:!1,value:us(e),writable:!0})}:as),ds=as,fs=function(i,s,a){return s=ls(void 0===s?i.length-1:s,0),function(){for(var t=arguments,e=-1,o=ls(t.length-s,0),n=Array(o);++e<o;)n[e]=t[s+e];for(var e=-1,r=Array(s+1);++e<s;)r[e]=t[e];return r[s]=a(n),cs(i,this,r)}},ys=o;var ms=Yt,gs=fn,vs=qo,ws=Se;var _s=function(t,e){return ys(fs(t,e,ds),t+"")},bs=function(t,e,o){var n;return!!ws(o)&&!!("number"==(n=typeof e)?gs(o)&&vs(e,o.length):"string"==n&&e in o)&&ms(o[e],t)};var xs,Ss,Os=function n(r,i,s,a,c){r!==i&&os(i,function(t,e){var o;c=c||new ts,rs(t)?ns(r,i,e,s,n,a,c):(o=a?a(ss(r,e),t,e+"",r,i,c):void 0,es(r,e,o=void 0===o?t:o))},is)},Cs=Vt(function(a){return _s(function(t,e){var o=-1,n=e.length,r=1<n?e[n-1]:void 0,i=2<n?e[2]:void 0,r=3<a.length&&"function"==typeof r?(n--,r):void 0;for(i&&bs(e[0],e[1],i)&&(r=n<3?void 0:r,n=1),t=Object(t);++o<n;){var s=e[o];s&&a(t,s,o,r)}return t})}(function(t,e,o){Os(t,e,o)})),Ps=((window&&window.__extends||(xs=function(t,e){return(xs=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ls,Ss=t),Ls);function Ls(){var t=null!==Ss&&Ss.apply(this,arguments)||this;return t.layout="icons",t.mapStyles=["road","grayscale_light","grayscale_dark","night","road_shaded_relief"],t.style=u.ControlStyle.light,t.autoSelectionMode=!0,t}var ks,Ms,br=window&&window.__extends||(ks=function(t,e){return(ks=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ks(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),As=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},Es=window&&window.__generator||function(n,r){var i,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(o){return function(t){var e=[o,t];if(i)throw new TypeError("Generator is already executing.");for(;c=l&&e[l=0]?0:c;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,s=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))c.label=e[1];else if(6===e[0]&&c.label<a[1])c.label=a[1],a=e;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(e)}}e=r.call(n,c)}catch(t){e=[6,t],s=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},js=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},ar=(br(c,Ms=Ot),c.prototype.onAdd=function(t,e){var o=this,n=(this.map=t,this.buildContainer(t,this.options.style,"Map Style Control")),r=this.buildStyleOpsGrid(),i=(this.styleOpsGrid=r,this.buildCurrStyleBtn()),t=_("Select Style");return r.classList.add(e&&e.position||"top-right"),n.addEventListener("mouseover",function(){o.hasMouse=!0,n.classList.add(c.Css.inUse),r.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(){o.hasFocus=!0,n.classList.add(c.Css.inUse),r.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(n.classList.remove(c.Css.inUse),r.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.target===i&&Array.from(r.children).forEach(function(t){return t.removeAttribute("tabIndex")}),t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse)||(n.classList.remove(c.Css.inUse),r.classList.add("hidden-accessible-element"))}),r.addEventListener("keydown",function(t){27===t.keyCode&&(t.stopPropagation(),i.focus(),Array.from(r.children).forEach(function(t){return t.setAttribute("tabIndex","-1")}),n.classList.contains(c.Css.inUse))&&(n.classList.remove(c.Css.inUse),r.classList.add("hidden-accessible-element"))}),i.addEventListener("click",function(t){n.classList.contains(c.Css.inUse)?(n.classList.remove(c.Css.inUse),r.classList.add("hidden-accessible-element")):(n.classList.add(c.Css.inUse),r.classList.remove("hidden-accessible-element"),r.firstElementChild&&r.firstElementChild.focus())}),e&&c.InvertOrderPositions.includes(e.position)?(n.appendChild(r),n.appendChild(i),n.appendChild(t),b(t,i)):(n.appendChild(i),n.appendChild(t),b(t,i),n.appendChild(r)),n},c.prototype.onRemove=function(){Ms.prototype.onRemove.call(this),this.styleOpsGrid=null,this.styleButtons.clear(),this.thumbnailCache.response.clear(),this.thumbnailCache.blob.clear(),this.thumbnailCache.assumedConfiguration=void 0,this.map.events.remove("stylechanged",this.onStyleChange),this.map.events.remove("mapconfigurationchanged",this.onMapConfigurationChange)},c.prototype.setSelectedStyle=function(o){var e,t,n=this;this.styleIcons.has(o)&&(e=this.currStyleImage,t=this.styleIcons.get(o),e.src!==t&&(e.src=t),Object.entries(this.styleButtons).forEach(function(t){var t=js(t,2),e=t[0];return t[1].setAttribute("aria-current",e===o?"true":"false")}),this.map.styles.definitions().then(function(t){t=n.mapToFriendlyStyleName(o,t);e.alt!==t&&(e.alt=t),e.parentElement.lastChild instanceof Text&&(e.parentElement.lastChild.textContent=t)}))},c.prototype.disableStyle=function(t){t=this.styleButtons[t];t&&t.setAttribute("disabled","true")},c.prototype.enableStyle=function(t){t=this.styleButtons[t];t&&t.removeAttribute("disabled")},c.prototype.buildSelectStyleBtn=function(o,t,e){var n=this,r=document.createElement("button"),i=this.mapToFriendlyStyleName(o,t),s=(r.setAttribute("aria-label",i),r.setAttribute("type","button"),new Image),t=(e.then(function(t){var e;return n.thumbnailCache.blob.has(t.url)?n.thumbnailCache.blob.get(t.url):(e=t.clone().blob(),n.thumbnailCache.blob.set(t.url,e),e)}).then(function(t){t=URL.createObjectURL(t);s.src=t,o===n.map.getStyle().style&&(n.currStyleImage.src=t,n.currStyleImage.alt=i,n.currStyleImage.parentElement.lastChild.nodeType==Node.TEXT_NODE?n.currStyleImage.parentElement.lastChild.textContent=i:n.currStyleImage.parentElement.appendChild(document.createTextNode(i))),n.styleIcons.set(o,t)}),s.setAttribute("aria-hidden","true"),r.appendChild(s),"icons"===this.options.layout?r.classList.add(c.Css.button):(r.classList.add(c.Css.listButton),r.classList.add(c.Css.expanded),r.appendChild(document.createTextNode(i))),r.addEventListener("click",function(){n.hasMouse=!1,n.hasFocus=!1;var t=n.styleButtons[o];t&&!t.hasAttribute("disabled")&&(n._invokeEvent("styleselected",o),n.options.autoSelectionMode&&n.map.setStyle({style:o}),Object.entries(n.styleButtons).forEach(function(t){var t=js(t,2),e=t[0];return t[1].setAttribute("aria-current",e===o?"true":"false")}))}),document.createElement("div"));return t.classList.add("selected-icon"),r.appendChild(t),r},c.prototype.buildCurrStyleBtn=function(){var t=document.createElement("button"),e=("icons"==this.options.layout?t.classList.add(c.Css.button):t.classList.add(c.Css.listButton),t.classList.add(c.Css.currentStyle),t.setAttribute("aria-label","Select Style"),t.setAttribute("tabindex","-1"),this.currStyleImage=new Image,t.appendChild(this.currStyleImage),document.createElement("div"));return e.classList.add("icon"),t.appendChild(e),t},c.prototype.buildStyleOpsGrid=function(){var t=this,e=document.createElement("div");return e.classList.add(c.Css.styleOptions),"icons"===this.options.layout?e.classList.add(this.options.layout):e.classList.add(c.Css.dropdown),e.setAttribute("aria-label","Style Options"),e.classList.add("hidden-accessible-element"),this.map.styles.definitions().then(function(e){return As(t,void 0,void 0,function(){return Es(this,function(t){return this.onMapConfigurationChange(e),this.map.events.add("stylechanged",this.onStyleChange),[2]})})}),this.map.events.add("mapconfigurationchanged",this.onMapConfigurationChange),e},c.prototype.populateOpsGridFromDefinitions=function(r){var t,o,i=this;this.styleOpsGrid&&(t=r.configurations,(t=Array.isArray(this.options.mapStyles)?t.filter(function(t){return i.options.mapStyles.includes(t.name.split("_indoor")[0])}):t).forEach(function(t){var e,o={url:t.thumbnail},n=(t.thumbnail&&i.map.styles._transformStyleRequest(t.thumbnail,o),i.map.getServiceOptions()),n=(n.transformRequest&&Cs(o,n.transformRequest(o.url,"Thumbnail")),i.thumbnailCache.response.has(o.url)?e=Promise.resolve(i.thumbnailCache.response.get(o.url)):(e=fetch(o.url,{headers:o.headers}),i.thumbnailCache.response.set(o.url,e)),i.buildSelectStyleBtn(t.name,r,e));i.styleOpsGrid.appendChild(n),i.styleButtons[t.name]=n,"icons"===i.options.layout&&(o=_(i.mapToFriendlyStyleName(t.name,r)),i.styleOpsGrid.appendChild(o),b(o,n))}),o=this.map.getStyle().style,Object.entries(this.styleButtons).forEach(function(t){var t=js(t,2),e=t[0];return t[1].setAttribute("aria-current",e===o?"true":"false")}))},c.InvertOrderPositions=[u.ControlPosition.TopRight,u.ControlPosition.BottomRight],c.Css={button:"azure-maps-control-button",listButton:"azure-maps-control-list-button",expanded:"expanded",currentStyle:"curr-style",inUse:"in-use",styleOptions:"style-options",dropdown:"azure-maps-control-dropdown"},c);function c(t){var e=Ms.call(this)||this;return e.styleOpsGrid=null,e.hasMouse=!1,e.hasFocus=!1,e.styleButtons=new wt,e.styleIcons=new wt,e.thumbnailCache={assumedConfiguration:void 0,response:new wt,blob:new wt},e.onStyleChange=function(){var t;e.options.autoSelectionMode&&(t=e.map.getStyle().style,e.setSelectedStyle(t))},e.onMapConfigurationChange=function(t){!e.styleOpsGrid||0<e.styleOpsGrid.children.length&&e.thumbnailCache.assumedConfiguration===t||(e.thumbnailCache.assumedConfiguration=t,Array.from(e.styleOpsGrid.children).forEach(function(t){return t.remove()}),e.styleButtons.clear(),e.populateOpsGridFromDefinitions(t))},e.mapToFriendlyStyleName=function(e,t){t=t.configurations.find(function(t){return t.name===e});return(null==t?void 0:t.displayName)||e},e.options=(new Ps).merge(a(t)),e}(window&&window.__extends||(Is=function(t,e){return(Is=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Is(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ds,Ts=t);var Is,Ts,zs=Ds;function Ds(){var t=null!==Ts&&Ts.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}(window&&window.__extends||(Rs=function(t,e){return(Rs=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Rs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ns,Bs=zs);var Rs,Bs,Fs=Ns;function Ns(){var t=null!==Bs&&Bs.apply(this,arguments)||this;return t.isActive=!1,t.style=u.ControlStyle.light,t}(window&&window.__extends||(Zs=function(t,e){return(Zs=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Zs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Us,qs=Ot),Object.defineProperty(Us.prototype,"isActive",{get:function(){var t;return!!this.map&&("none"!==(t=this.map.getTraffic()).flow||t.incidents)},set:function(t){this.map&&this.map.setTraffic({flow:t?this.options.flow:"none",incidents:!!t&&this.options.incidents})},enumerable:!1,configurable:!0}),Us.prototype.onAdd=function(t){(this.map=t).getTraffic(),void 0!==this.initIsActive&&(this.isActive=this.initIsActive),this.container=this.buildContainer(t,this.style,"Traffic Control"),this.container.style.flexDirection="column";var t=this.constructTrafficButton(t),e=(this.container.appendChild(t),_("Toggle Traffic Display"));return this.container.appendChild(e),b(e,t),this.container},Us.prototype.onRemove=function(){qs.prototype.onRemove.call(this),this.map=null},Us.prototype.getOptions=function(){return(new Fs).merge({isActive:this.isActive,flow:this.options.flow,incidents:this.options.incidents,style:this.style})},Us.prototype.updateButtonState=function(){this.trafficButton&&(this.isActive?(this.container.classList.add("in-use"),this.trafficButton.setAttribute("aria-description","Traffic is displayed")):(this.container.classList.remove("in-use"),this.trafficButton.removeAttribute("aria-description")),this.trafficButton.setAttribute("aria-pressed",this.isActive?"true":"false"))},Us.prototype.constructTrafficButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("traffic"),o.setAttribute("aria-label","Toggle Traffic Display"),o.setAttribute("alt","Toggle Traffic Display"),o.setAttribute("type","button"),this.trafficButton=o,this.updateButtonState(),o.addEventListener("click",function(){e.isActive=!e.isActive}),o};var Zs,qs,Hs=Us;function Us(t){var e,o=this;return(o=qs.call(this)||this).hasMouse=!1,o.hasFocus=!1,o.options=(new zs).merge({flow:"relative",incidents:!0}),o.style=u.ControlStyle.light,o.container=null,o.trafficButton=null,o.map=null,t&&(o.initIsActive=null!=(e=t.isActive)&&e,o.options.flow=t.flow||"relative",o.options.incidents=null==(e=t.incidents)||e,o.style=t.style||u.ControlStyle.light),o}var Ws,Gs,r=window&&window.__extends||(Ws=function(t,e){return(Ws=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ws(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Vs=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gt=(r(Ks,Gs=Ot),Ks.prototype.onAdd=function(t){this.map=t;var e=this.buildContainer(t,u.ControlStyle.auto,"Traffic Legend"),t=this.buildTrafficLegendDiv(t);return e.setAttribute("role","definition"),e.appendChild(t),e},Ks.prototype.onRemove=function(){Gs.prototype.onRemove.call(this),this.syncHiddenState&&(this.map.events.remove("styledata",this.syncHiddenState),this.syncHiddenState=null),this.map=null},Ks.prototype.buildTrafficLegendDiv=function(e){var o,t,n,r,i=document.createElement("div"),s=(i.classList.add("traffic-legend","hidden"),i.setAttribute("alt","Traffic Legend"),document.createElement("table")),a=document.createElement("tr"),c=document.createElement("td"),l=(c.setAttribute("alt","Traffic"),c.appendChild(document.createTextNode("Traffic")),_("Traffic")),u=(c.classList.add("traffic-legend-title"),c.colSpan=6,a.appendChild(c),a.appendChild(l),b(l,c),s.appendChild(a),document.createElement("tr"));try{for(var p=Vs(this.table),h=p.next();!h.done;h=p.next()){var d=h.value,f=document.createElement("td");if("Fast"===d||"Slow"===d)f.setAttribute("alt",d),f.appendChild(document.createTextNode(d)),f.classList.add("traffic-legend-text");else{f.classList.add("traffic-legend-colors"),f.setAttribute("aria-label","Traffic Legend"),f.setAttribute("role","img");try{n=void 0;for(var y=Vs(d),m=y.next();!m.done;m=y.next()){var g=m.value,v=document.createElement("div");v.classList.add(g),f.appendChild(v)}}catch(t){n={error:t}}finally{try{m&&!m.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}}u.appendChild(f);var w=_(d instanceof Array?"Traffic Legend":d);u.appendChild(w),b(w,f)}}catch(t){o={error:t}}finally{try{h&&!h.done&&(t=p.return)&&t.call(p)}finally{if(o)throw o.error}}return s.appendChild(u),i.appendChild(s),this.syncHiddenState=function(t){"style"===t.dataType&&((t=e.getTraffic()).flow&&"none"!==t.flow?i.classList.remove("hidden"):i.classList.add("hidden"))},this.syncHiddenState({dataType:"style"}),e.events.add("styledata",this.syncHiddenState),i},Ks);function Ks(){var t=Gs.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t.map=null,t.syncHiddenState=null,t}function Ys(t){return this.__data__.has(t)}var Js=ze;function $s(t){var e=-1,o=null==t?0:t.length;for(this.__data__=new Js;++e<o;)this.add(t[e])}$s.prototype.add=$s.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},$s.prototype.has=Ys;var Xs=$s,Qs=function(t,e){for(var o=-1,n=null==t?0:t.length;++o<n;)if(e(t[o],o,t))return!0;return!1},ta=function(t,e){return t.has(e)};function ea(t,e,o,n,r,i){var s=1&o,a=t.length,c=e.length;if(a!=c&&!(s&&a<c))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var u=-1,p=!0,h=2&o?new Xs:void 0;for(i.set(t,e),i.set(e,t);++u<a;){var d,f=t[u],y=e[u];if(void 0!==(d=n?s?n(y,f,u,e,t,i):n(f,y,u,t,e,i):d)){if(d)continue;p=!1;break}if(h){if(!Qs(e,function(t,e){if(!ta(h,e)&&(f===t||r(f,t,o,n,i)))return h.push(e)})){p=!1;break}}else if(f!==y&&!r(f,y,o,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p}function oa(t){var o=-1,n=Array(t.size);return t.forEach(function(t,e){n[++o]=[e,t]}),n}function na(t){var e=-1,o=Array(t.size);return t.forEach(function(t){o[++e]=t}),o}var ra=i,ia=Yt,sa=ea,e=fe?fe.prototype:void 0,aa=e?e.valueOf:void 0;var ca=or,la=Object.prototype.hasOwnProperty;var ua=ce,pa=ea,ha=function(t,e,o,n,r,i,s){switch(o){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return t.byteLength==e.byteLength&&i(new ra(t),new ra(e))?!0:!1;case"[object Boolean]":case"[object Date]":case"[object Number]":return ia(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=oa;case"[object Set]":a=a||na;if(t.size!=e.size&&!(1&n))return!1;var c=s.get(t);if(c)return c==e;n|=2,s.set(t,e);c=sa(a(t),a(e),n,r,i,s);return s.delete(t),c;case"[object Symbol]":if(aa)return aa.call(t)==aa.call(e)}return!1},da=function(t,e,o,n,r,i){var s=1&o,a=ca(t),c=a.length;if(c!=ca(e).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in e:la.call(e,u)))return!1}var p=i.get(t),h=i.get(e);if(p&&h)return p==e&&h==t;for(var d=!0,f=(i.set(t,e),i.set(e,t),s);++l<c;){var y,m=t[u=a[l]],g=e[u];if(!(void 0===(y=n?s?n(g,m,u,e,t,i):n(m,g,u,t,e,i):y)?m===g||r(m,g,o,n,i):y)){d=!1;break}f=f||"constructor"==u}return d&&!f&&(p=t.constructor)!=(h=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof p&&p instanceof p&&"function"==typeof h&&h instanceof h)&&(d=!1),i.delete(t),i.delete(e),d},fa=s,ya=vo,ma=No,ga=Fo,va="[object Arguments]",wa="[object Array]",_a="[object Object]",ba=Object.prototype.hasOwnProperty;var xa=function(t,e,o,n,r,i){var s=ya(t),a=ya(e),c=s?wa:fa(t),a=a?wa:fa(e),l=(c=c==va?_a:c)==_a,u=(a=a==va?_a:a)==_a;if((a=c==a)&&ma(t)){if(!ma(e))return!1;l=!(s=!0)}if(a&&!l)return i=i||new ua,s||ga(t)?pa(t,e,o,n,r,i):ha(t,e,c,o,n,r,i);if(!(1&o)){s=l&&ba.call(t,"__wrapped__"),c=u&&ba.call(e,"__wrapped__");if(s||c)return r(s?t.value():t,c?e.value():e,o,n,i=i||new ua)}return a&&(i=i||new ua,da(t,e,o,n,r,i))},Sa=jo;var Oa=function t(e,o,n,r,i){return e===o||(null==e||null==o||!Sa(e)&&!Sa(o)?e!=e&&o!=o:xa(e,o,n,r,t,i))};var Ca=Vt(function(t,e){return Oa(t,e)});for(var Pa,La,Tn={exports:{}},Do=Kt(Object.freeze({__proto__:null,default:{}})),cr=Tn,ka=0,Ma=[],Aa=0;Aa<256;Aa++)Ma[Aa]=(Aa+256).toString(16).substr(1);function Ea(){t=16,(!Pa||ja.BUFFER_SIZE<ka+t)&&(ka=0,Pa=ja.randomBytes(ja.BUFFER_SIZE));var t=Pa.slice(ka,ka+=t);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}function ja(){var t=Ea();return Ma[t[0]]+Ma[t[1]]+Ma[t[2]]+Ma[t[3]]+"-"+Ma[t[4]]+Ma[t[5]]+"-"+Ma[t[6]]+Ma[t[7]]+"-"+Ma[t[8]]+Ma[t[9]]+"-"+Ma[t[10]]+Ma[t[11]]+Ma[t[12]]+Ma[t[13]]+Ma[t[14]]+Ma[t[15]]}ja.BUFFER_SIZE=4096,ja.bin=Ea,ja.clearBuffer=function(){Pa=null,ka=0},ja.test=function(t){return"string"==typeof t&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)},"undefined"!=typeof crypto?La=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(La=window.msCrypto),La=La||Do,(cr.exports=ja).randomBytes=function(){if(La){if(La.randomBytes)return La.randomBytes;if(La.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){t=new Uint8Array(t);return La.getRandomValues(t),Array.from(t)}:function(t){t=new Uint8Array(t);return La.getRandomValues(t),t}}return function(t){for(var e=[],o=0;o<t;o++)e.push(Math.floor(256*Math.random()));return e}}();var Ia=Vt(Tn.exports),Ta=(za.TYPE="Feature",za);function za(t,e,o,n){this.type="Feature",this.type=za.TYPE,this.properties=e||{},this.id=o,this.geometry=t,this.bbox=n}var Da,Ra,go=window&&window.__extends||(Da=function(t,e){return(Da=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Da(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ba=(Ra=Array,go(l,Ra),l.fromData=function(o){var n=NaN,r=NaN,i=new Set(["y"]),s=new Set(["x"]);return Object.keys(o).forEach(function(t){var e=t.toLowerCase();isNaN(n)&&i.has(e)&&"number"==typeof o[t]?n=o[t]:isNaN(r)&&s.has(e)&&"number"==typeof o[t]&&(r=o[t])}),isNaN(n)||isNaN(r)?null:new l(n,r)},l.getX=function(t){return 0<t.length?t[0]:NaN},l.getY=function(t){return 1<t.length?t[1]:NaN},l.getDestination=function(t,e,o){return new l(l.getX(t)+o*Math.cos((e+270)*Math.PI/180),l.getY(t)+o*Math.sin((e+270)*Math.PI/180))},l.getDistance=function(t,e){var o=l.getX(t)-l.getX(e),t=l.getY(t)-l.getY(e);return Math.sqrt(o*o+t*t)},l.getHeading=function(t,e){var o=l.getX(e)-l.getX(t),t=l.getY(t)-l.getY(e);return 180*(2.5*Math.PI-Math.atan2(t,o))/Math.PI%360},l);function l(t,e){return Ra.call(this,t,e)||this}Na.TYPE="Point";var Fa=Na;function Na(t){this.type="Point",this.type=Na.TYPE,this.coordinates=t}var p,h,f,y,m,Za=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},qa=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ha=6378137,Ua=Math.PI/180,Wa=180/Math.PI,Ga=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],Va=85.0511;function Ka(t){return t*Ua}function Ya(t){return t*Wa}function Ja(t,e,o){return Math.min(Math.max(t,e),o)}function $a(t,e){var o=Ka(e[1]-t[1]),n=Ka(e[0]-t[0]),o=Math.pow(Math.sin(o/2),2)+Math.cos(Ka(t[1]))*Math.cos(Ka(e[1]))*Math.pow(Math.sin(n/2),2),t=2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o));return Math.round(Ha*t*100)/100}function Xa(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return h.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return h.kilometers;case"miles":case"mile":case"mi":return h.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return h.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return h.yards;default:return h.meters}return h.meters}function Qa(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return m.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return m.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return m.knotsPerSecond;case"standardgravity":case"g":return m.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return m.feetPerSecondSquared;case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return m.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return m.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return m.kilometersPerHourSecond;default:return m.metersPerSecondSquared}return m.metersPerSecondSquared}function tc(t){if(t)switch(t){case"acres":case"ac":return p.acres;case"hectares":case"ha":return p.hectares;case"squareFeet":case"ft^2":case"ft2":return p.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return p.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return p.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return p.squareMiles;default:return p.squareMeters}return p.squareMeters}function ec(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return y.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return y.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return y.knots;case"mach":case"m":return y.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return y.kilometersPerHour;default:return y.metersPerSecond}return y.metersPerSecond}function oc(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return f.ms;case"minutes":case"minute":case"mins":case"min":return f.minutes;case"hours":case"hour":case"hr":case"h":return f.hours;case"days":case"day":case"d":return f.days;default:return f.seconds}return f.seconds}function nc(t){var e=0;if(t&&0<t.length)for(var e=Math.abs(rc(t[0])),o=1,n=t.length;o<n;o++)e-=Math.abs(rc(t[o]));return e}function rc(t){var e=0;if(3<=t.length){for(var o=void 0,n=void 0,r=0,i=t.length;r<i;r++)e+=(Ka(t[r===i-2?(o=i-2,n=i-1,0):r===i-1?(o=i-1,n=0,1):(n=(o=r)+1,r+2)][0])-Ka(t[o][0]))*Math.sin(Ka(t[n][1]));e=e*Ha*Ha/2}return e}function ic(t,e,o){return(t[0]-o[0])*(e[1]-o[1])-(t[1]-o[1])*(e[0]-o[0])}function sc(t,e,o){if(2<=o.length){for(var n,r,i,s=1/0,a=null,c=xc(o,22),l=0,u=c.length-1;l<u;l++)r=function(t,e,o){if(e[0]===o[0]&&e[1]===o[1])return e;var n=t[0]-e[0],t=t[1]-e[1],r=o[0]-e[0],i=o[1]-e[1],n=(r*n+i*t)/(r*r+i*i);return n<0?e:1<n?o:[e[0]+r*n,e[1]+i*n]}(e,c[l],c[l+1]),(n=Ba.getDistance(e,r))<s&&(s=n,a=r);if(a)return i=bc([a],22)[0],new Ta(new Fa(i),{distance:uc(t,i)})}else if(1===o.length)return new Ta(new Fa(o[0]),{distance:uc(t,o[0])});return null}function ac(t,e){var o;return!isNaN(t)&&"number"==typeof e&&0<=e&&(o=void 0,o=e<Ga.length?Ga[e]:Math.pow(10,e),t=Math.round(t*o)/o),t}function cc(t,e,o,n){switch(Xa(e)){case h.meters:t/=1e3;break;case h.feet:t/=3280.8399;break;case h.miles:t/=.62137119;break;case h.yards:t/=1093.6133;break;case h.nauticalMiles:t/=.5399568;break;case h.kilometers:}switch(Xa(o)){case h.meters:t*=1e3;break;case h.feet:t*=3280.8399;break;case h.miles:t*=.62137119;break;case h.yards:t*=1093.6133;break;case h.nauticalMiles:t*=.5399568;break;case h.kilometers:}return"number"==typeof n&&0<=n&&(e=Math.pow(10,n),t=Math.round(t*e)/e),t}function lc(t,e,o,n){n=n||"meters",t=jc(t);var n=pc(n),r=Ka(t[1]),t=Ka(t[0]),e=e*Ua,o=o/n,n=Math.asin(Math.sin(r)*Math.cos(o)+Math.cos(r)*Math.sin(o)*Math.cos(e)),t=t+Math.atan2(Math.sin(e)*Math.sin(o)*Math.cos(r),Math.cos(o)-Math.sin(r)*Math.sin(n)),e=Ja(g(n*Wa),-85,85);return[v(t*Wa),e]}function uc(t,e,o){t=$a(t=jc(t),e=jc(e));return"meters"===o?t:cc(t,"meters",o||"meters")}function pc(t){t=Xa(t);return cc(Ha,h.meters,t)}function hc(t,e,o){for(var n=[],r=Ka(t[1]),i=Ka(t[0]),s=Ka(e[1]),a=Ka(e[0]),c=2*Math.asin(Math.sqrt(Math.pow(Math.sin((r-s)/2),2)+Math.cos(r)*Math.cos(s)*Math.pow(Math.sin((i-a)/2),2))),l=0;l<=o;l++){var u=l/o,p=Math.sin((1-u)*c)/Math.sin(c),u=Math.sin(u*c)/Math.sin(c),h=p*Math.cos(r)*Math.cos(i)+u*Math.cos(s)*Math.cos(a),d=p*Math.cos(r)*Math.sin(i)+u*Math.cos(s)*Math.sin(a),p=p*Math.sin(r)+u*Math.sin(s),u=Math.atan2(p,Math.sqrt(Math.pow(h,2)+Math.pow(d,2))),p=Math.atan2(d,h),u=Ja(u*Wa,-85,85);n.push([p*=Wa,u])}return n}function dc(t){return(Array.isArray(t)?t:t.coordinates).reduce(function(t,e){var o=0<t.length?t[t.length-1]:null;return o&&180<Math.abs(e[0]-o[0])?(o=o[0]<0?e[0]-360:e[0]+360,t.push([o,e[1]])):t.push(e),t},[])}function fc(t){for(var e,o,n,r,i,s=Array.isArray(t)?t:t.coordinates,a=[],c=[],l=0;l<s.length;l++)a.push(s[l]),l+1>=s.length||(e=(o=Za(s[l],2))[0],o=o[1],r=(i=Za(s[l+1],2))[0],i=i[1],180<Math.abs(r-e)&&(n=0<e?180:-180,r=Math.abs((0<e?r+360:r-360)-e),i=o+(i-o)*(Math.abs(n-e)/r),a.push([n,i]),c.push(a),a=[[-n,i]]));return c.push(a),c}function yc(t,e){var o,n;return t=jc(t),e=jc(e),t&&2<=t.length&&e&&2<=e.length?(n=Ka(t[1]),o=Ka(e[1]),e=Ka(e[0]-t[0]),t=Math.sin(e)*Math.cos(o),n=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(e),(Ya(Math.atan2(t,n))+360)%360):NaN}function mc(t,e){var o,n=0;Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var r=0,i=o.length-1;r<i;r++)n+=$a(o[r],o[r+1]);return cc(n,"meters",e||"meters")}function gc(t,e,o){o=o||"meters";var n,r=0;if(Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates),2<=n.length){for(var i,s,a=n.length,c=1;c<a;c++){if(e<=r+(s=uc(n[c-1],n[c],o)))return i=yc(n[c-1],n[c]),lc(n[c-1],i,e-r,o);r+=s}return r<=e?n[a-1]:n[0]}return null}function vc(t,e,o,n,r){n=n||"meters",r=r||0,t=jc(t);for(var i=[],s=360/o,a=0;a<=o;a++)i.push(lc(t,(a*s+r)%360,e,n));return i}function wc(t,e,o,n,r){return dc(vc(t,e,o,n,r))}function g(t){return 90<t?180<(t=(t+90)%360)?90-(t-180):t-90:t<-90?(t=(t-90)%360)<-180?-90-(t+180):t+90:t}function v(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function _c(t,e,o){if(0===o)return Object.assign({},t);e=jc(e);for(var n,r,i=[],s=0,a=t.length;s<a;s++)n=uc(e,t[s]),r=yc(e,t[s]),i.push(lc(e,r+o,n));return i}function bc(t,e){for(var o,n,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)o=t[s][0]/r-.5,n=.5-t[s][1]/r,i.push([360*o,90-360*Math.atan(Math.exp(2*-n*Math.PI))/Math.PI]);return i}function xc(t,e){for(var o,n,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)n=Math.sin(t[s][1]*Math.PI/180),o=(t[s][0]+180)/360,n=.5-Math.log((1+n)/(1-n))/(4*Math.PI),i.push([Math.round(o*r),Math.round(n*r)]);return i}function Sc(t,e,o,n){switch(Qa(e)){case m.kilometersPerHourSecond:t/=3.6;break;case m.milesPerHourSecond:t/=2.236936292054;break;case m.knotsPerSecond:t/=1.943844492441;break;case m.standardGravity:t/=.1019716212978;break;case m.kilometersPerSecondSquared:t/=.001;break;case m.milesPerSecondSquared:t/=.000621371192;break;case m.feetPerSecondSquared:t/=3.280839895012;break;case m.yardsPerSecondSquared:t/=1.093613298338;break;case m.metersPerSecondSquared:}switch(Qa(o)){case m.kilometersPerHourSecond:t*=3.6;break;case m.milesPerHourSecond:t*=2.236936292054;break;case m.knotsPerSecond:t*=1.943844492441;break;case m.standardGravity:t*=.1019716212978;break;case m.kilometersPerSecondSquared:t*=.001;break;case m.milesPerSecondSquared:t*=.000621371192;break;case m.feetPerSecondSquared:t*=3.280839895012;break;case m.yardsPerSecondSquared:t*=1.093613298338;break;case m.metersPerSecondSquared:}return ac(t,n)}function Oc(t,e,o,n){switch(tc(e)){case p.acres:t*=4046.8564224;break;case p.hectares:t*=1e4;break;case p.squareFeet:t*=.09290304;break;case p.squareKilometers:t*=1e6;break;case p.squareMiles:t*=259e4;break;case p.squareYards:t*=.83612736;break;case p.squareMeters:}switch(tc(o)){case p.acres:t/=4046.8564224;break;case p.hectares:t/=1e4;break;case p.squareFeet:t/=.09290304;break;case p.squareKilometers:t/=1e6;break;case p.squareMiles:t/=259e4;break;case p.squareYards:t/=.83612736;break;case p.squareMeters:}return ac(t,n)}function Cc(t,e,o,n){switch(ec(e)){case y.feetPerSecond:t*=1.09728;break;case y.milesPerHour:t*=1.6093;break;case y.knots:t*=1.852;break;case y.metersPerSecond:t*=3.6;break;case y.mach:t*=1234.8;break;case y.kilometersPerHour:}switch(ec(o)){case y.feetPerSecond:t/=1.09728;break;case y.milesPerHour:t/=1.6093;break;case y.knots:t/=1.852;break;case y.metersPerSecond:t/=3.6;break;case y.mach:t/=1234.8;break;case y.kilometersPerHour:}return ac(t,n)}function Pc(t,e,o,n){switch(oc(e)){case f.ms:t/=1e3;break;case f.hours:t*=3600;break;case f.minutes:t*=60;break;case f.days:t*=86400;break;case f.seconds:}switch(oc(o)){case f.ms:t*=1e3;break;case f.hours:t/=3600;break;case f.minutes:t/=60;break;case f.days:t/=86400;break;case f.seconds:}return ac(t,n)}function Lc(t,e,o,n,r,i,s,a){e=cc(e,r,h.meters),r=Pc(o,i,f.seconds);return Sc(2*(e-Cc(t,n,y.metersPerSecond)*r)/(r*r),m.metersPerSecondSquared,s,a)}function kc(t,e,o,n,r,i,s){t=Cc(t,n,y.metersPerSecond);return Sc((Cc(e,n,y.metersPerSecond)-t)/Pc(o,r,f.seconds),m.metersPerSecondSquared,i,s)}function Mc(t,e,o,n){t=Ac(t),e=Ac(e);return null!=t&&null!=e?Pc(e.getTime()-t.getTime(),f.ms,o,n):NaN}function Ac(t){if("[object Date]"===Object.prototype.toString.call(t))return t;if("string"==typeof t){var e=Date.parse(t);if(!isNaN(e))return new Date(e);if(0<=t.indexOf("Date("))return e=(e=0)<(t=t.replace("/Date(","").replace(")/","")).indexOf("+")?parseInt(t.substr(0,t.indexOf("+")),10):0<t.indexOf("-")?parseInt(t.substr(0,t.indexOf("-")),10):parseInt(t,10),new Date(e)}else if("number"==typeof t)return new Date(t);return null}function Ec(t){var e=[],o=null,n=null;if(Array.isArray(t)&&0<t.length)if(Array.isArray(t[0])&&"number"==typeof t[0][0])e=t;else for(var r=t.length,i=0;i<r;i++)e=e.concat(Ec(t[i]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":e=t.coordinates;break;case"Polygon":o=t.coordinates;break;case"MultiPoint":e=t.coordinates;break;case"MultiLineString":o=t.coordinates;break;case"MultiPolygon":n=t.coordinates;break;case"Feature":var s=t,e=w._isCircle(s)?w._getCirclePositions(s):Ec(s.geometry);break;case"FeatureCollection":e=Ec(t.features);break;case"GeometryCollection":e=Ec(t.geometries)}else if(t instanceof w)return Ec(t.toJson());if(o)for(r=o.length,i=0;i<r;i++)e=e.concat(o[i]);else if(n)for(var a=n.length,i=0;i<a;i++)for(var c=n[i].length,l=0;l<c;l++)e=e.concat(n[i][l]);return e}function jc(t){if(Array.isArray(t)&&"number"==typeof t[0])return t;if(t.type){if("Point"===t.type)return t.coordinates;if("Feature"===t.type&&"Point"===t.geometry.type)return t.geometry.coordinates}else if(t instanceof w&&"Point"===t.getType())return t.getCoordinates();return null}function Ic(t,e,o){o=o||"meters";var n,r=0;if(Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates),2<=n.length){for(var i,s,a,c=n.length,l=1;l<c;l++){if(e<=r+(a=uc(n[l-1],n[l],o)))return i=yc(n[l-1],n[l]),s=lc(n[l-1],i,e-r,o),new Ta(new Fa(s),{heading:i});r+=a}return r<=e?new Ta(new Fa(n[c-1]),{heading:yc(n[c-2],n[c-1])}):new Ta(new Fa(n[0]),{heading:yc(n[0],n[1])})}return null}(o=p=p||{}).squareMeters="squareMeters",o.acres="acres",o.hectares="hectares",o.squareFeet="squareFeet",o.squareKilometers="squareKilometers",o.squareMiles="squareMiles",o.squareYards="squareYards",(br=h=h||{}).meters="meters",br.kilometers="kilometers",br.feet="feet",br.miles="miles",br.nauticalMiles="nauticalMiles",br.yards="yards",(r=f=f||{}).seconds="seconds",r.hours="hours",r.ms="ms",r.minutes="minutes",r.days="days",(ze=y=y||{}).metersPerSecond="metersPerSecond",ze.kilometersPerHour="kilometersPerHour",ze.feetPerSecond="feetPerSecond",ze.milesPerHour="milesPerHour",ze.knots="knots",ze.mach="mach",(i=m=m||{}).milesPerSecondSquared="milesPerSecondSquared",i.kilometersPerSecondSquared="kilometersPerSecondSquared",i.knotsPerSecond="knotsPerSecond",i.standardGravity="standardGravity",i.feetPerSecondSquared="feetPerSecondSquared",i.yardsPerSecondSquared="yardsPerSecondSquared",i.milesPerHourSecond="milesPerHourSecond",i.kilometersPerHourSecond="kilometersPerHourSecond",i.metersPerSecondSquared="metersPerSecondSquared";var Tc,zc,fe=window&&window.__extends||(Tc=function(t,e){return(Tc=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Tc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Dc=(zc=Array,fe(Rc,zc),Rc.fromPosition=function(t){return 2===t.length?new Rc(t[0],t[1]):2<t.length?new Rc(t[0],t[1],t[2]):null},Rc.areEqual=function(t,e,o){var n,r;return void 0===o&&(o=6),!!(t&&2<=t.length&&e&&2<=e.length)&&(o=Math.pow(10,o),r=g(t[1]),n=g(e[1]),t=v(t[0]),e=v(e[0]),0==Math.round((r-n)*o)/o)&&(0==(r=Math.round((t-e)*o)/o)||360==r)},Rc.fromLatLng=function(r,t,e){var i,s,a,c,l,u,o=[];return"number"==typeof r?(o.push(r),"number"==typeof t&&o.push(t),"number"==typeof e&&o.push(e)):Array.isArray(r)?2<=r.length&&"number"==typeof r[0]&&"number"==typeof r[1]&&(3<=r.length&&"number"==typeof r[2]?o.push(r[0],r[1],r[2]):o.push(r[0],r[1])):"object"==typeof r&&(i=["lat","latitude","y"],s=["lng","longitude","lon","x"],a=["elv","elevation","alt","altitude","z"],u=l=c=NaN,Object.keys(r).forEach(function(t,e,o){var n=t.toLowerCase();isNaN(c)&&0<=i.indexOf(n)&&"number"==typeof r[t]?c=r[t]:isNaN(l)&&0<=s.indexOf(n)&&"number"==typeof r[t]?l=r[t]:isNaN(u)&&0<=a.indexOf(n)&&"number"==typeof r[t]&&(u=r[t])}),isNaN(c)||isNaN(l)||(o.push(l,c),isNaN(u))||o.push(u)),2<=o.length?o:null},Rc.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var o=0,n=t.length;o<n;o++){var r=Rc.fromLatLng(t[o]);r&&e.push(r)}return e},Rc._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},Rc);function Rc(t,e,o){return o?zc.call(this,t,e,o)||this:zc.call(this,t,e)||this}Fc.TYPE="Polygon";var Bc=Fc;function Fc(t,e){this.type="Polygon",this.type=Fc.TYPE,1===Dc._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var Nc,Zc,e=window&&window.__extends||(Nc=function(t,e){return(Nc=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Nc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),qc=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},w=(e(x,Zc=_t),x.prototype.addProperty=function(t,e){Ca(this.data.properties[t],e)||(this.data.properties[t]=a(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},x.prototype.getBounds=function(){var e,t,o,n,r,i=this.getCoordinates(),s=this.getType();if("Point"===s)r=this.circlePolygon?(a=this.circlePolygon.geometry.coordinates,S.fromPositions(a[0])):new S(a=i,a);else if("MultiPoint"===s||"LineString"===s){var a=i;r=S.fromPositions(a)}else if("Polygon"===s){a=i;r=S.fromPositions(a[0])}else if("MultiLineString"===s){a=i;try{for(var c=qc(a),l=c.next();!l.done;l=c.next()){var u=l.value;r=S.merge(r,S.fromPositions(u))}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}}else if("MultiPolygon"===s){a=i;try{for(var p=qc(a),h=p.next();!h.done;h=p.next()){var d=h.value;r=S.merge(r,S.fromPositions(d[0]))}}catch(t){o={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(o)throw o.error}}}return r},x.prototype.getCoordinates=function(){return a(this.data.geometry.coordinates)},x.prototype.getCircleCoordinates=function(){return this.circlePolygon?a(this.circlePolygon.geometry.coordinates[0]):null},x.prototype.getId=function(){return this.data.id},x.prototype.getProperties=function(){return a(this.data.properties)},x.prototype.getType=function(){return this.data.geometry.type},x.prototype.isCircle=function(){return x._isCircle(this.data)},x.prototype.isRectangle=function(){return x._isRectangle(this.data)},x.prototype.setCoordinates=function(t){t="Polygon"===this.getType()&&1===Dc._getDimensions(t)?[t]:t;Ca(this.data.geometry.coordinates,t)||(this.data.geometry.coordinates=a(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},x.prototype.setProperties=function(t){t[x._shapeIdPropName]=this.data.id,Ca(this.data.properties,t)||(this.data.properties=a(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},x.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},x.prototype._toJson=function(){return this.circlePolygon||this.data},x.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},x.prototype._handleCircle=function(){var t;this.isCircle()?(t=x._getCirclePositions(this.data),this.circlePolygon=new Ta(new Bc([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"):delete this.circlePolygon},x._isCircle=function(t){return t&&t.geometry&&"Point"===t.geometry.type&&t.geometry.coordinates&&t.properties&&"string"==typeof t.properties.subType&&"circle"===t.properties.subType.toLowerCase()&&"number"==typeof t.properties.radius},x._isRectangle=function(t){if("Polygon"===t.geometry.type&&t.geometry.coordinates&&"string"==typeof t.properties.subType&&"rectangle"===t.properties.subType.toLowerCase()){t=t.geometry.coordinates;if(1===t.length){t=t[0];if(5===t.length)return t[0][0]===t[4][0]&&t[0][1]===t[4][1];if(4===t.length)return!0}}return!1},x._getCirclePositions=function(t){return wc(t.geometry.coordinates,t.properties.radius,72,"meters")},x._shapeIdPropName="_azureMapsShapeId",x);function x(t,e,o){var n,r,i=Zc.call(this)||this;return"Feature"===t.type?(r=a((n=t).geometry),o=n.properties?a(n.properties):{},e=null==n.id||""===n.id?Ia():n.id):(r=a(t),e=null==e||""===e?Ia():e,o=o?a(o):{}),o[x._shapeIdPropName]=e,i.data=new Ta(r,o,e),i._handleCircle(),i}var Hc,Uc,ce=window&&window.__extends||(Hc=function(t,e){return(Hc=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Hc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Wc=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},S=(Uc=Array,ce(O,Uc),O.fromBoundingBox=function(t){var e=O.getWest(t),o=O.getSouth(t),n=O.getEast(t),t=O.getNorth(t);return new O([e,o,n,t])},O.fromDimensions=function(t,e,o){var n=t[0],t=t[1],r=Math.min(Math.max(t+o/2,-85.5),85.5),t=Math.min(Math.max(t-o/2,-85.5),85.5),o=v(n+e/2);return new O([v(n-e/2),t,o,r])},O.fromEdges=function(t,e,o,n){return new O([t,e,o,n])},O.containsPosition=function(t,e){var o=O.getCenter(t),n=Math.abs(o[1]-e[1]),o=Math.abs(o[0]-e[0]),e=(180<o&&(o=360-o),O.getHeight(t)),t=O.getWidth(t);return n<=e/2+1e-8&&o<=t/2+1e-8},O.containsBoundingBox=function(t,e){var o=t&&4===t.length,n=e&&4===e.length;return!(!o||!n)&&O.getWest(t)<O.getWest(e)&&O.getWest(e)<O.getEast(t)&&O.getWest(t)<O.getEast(e)&&O.getEast(e)<O.getEast(t)&&O.getSouth(t)<O.getSouth(e)&&O.getSouth(e)<O.getNorth(t)&&O.getSouth(t)<O.getNorth(e)&&O.getNorth(e)<O.getNorth(t)},O.crossesAntimeridian=function(t){return v(O.getEast(t))-v(O.getWest(t))<0||O.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)||O.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)},O.getCenter=function(t){var e=v(O.getEast(t)),o=v(O.getWest(t)),o=(e<o&&(e+=360),v((o+e)/2)),e=g(O.getSouth(t)),t=g(O.getNorth(t));return[o,g((e+t)/2)]},O.getHeight=function(t){t=g(O.getNorth(t))-g(O.getSouth(t));return isNaN(t)?0:t},O.getWidth=function(t){t=v(O.getEast(t))-v(O.getWest(t));return isNaN(t)?0:t<0?t+360:t},O.getSouthWest=function(t){var e=this.getSouth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},O.getNorthEast=function(t){var e=this.getNorth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},O.getNorthWest=function(t){var e=this.getNorth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},O.getSouthEast=function(t){var e=this.getSouth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},O.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},O.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},O.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},O.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},O.intersect=function(t,e){var o=O.getCenter(t),n=O.getCenter(e),r=Math.abs(o[1]-n[1]),o=Math.abs(o[0]-n[0]),n=(180<o&&(o=360-o),O.getHeight(t)),t=O.getWidth(t),i=O.getHeight(e),e=O.getWidth(e);return r<=n/2+i/2&&o<=t/2+e/2},O.merge=function(t,e){var o=t&&4===t.length,n=e&&4===e.length;if(o&&!n)return t;if(n&&!o)return e;if(!o&&!n)return null;for(var o=Math.max(g(O.getNorth(t)),g(O.getNorth(e))),n=Math.min(g(O.getSouth(t)),g(O.getSouth(e))),r=[t,e],i=[],s=0,s=0;s<r.length;s++){var a=r[s],c=v(O.getWest(a)),l=v(O.getEast(a));O.crossesAntimeridian(a)?(i.push([c,180]),i.push([-180,l])):i.push([c,l])}i.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var u=[],p=i[0];for(s=1;s<i.length;){var h=i[s];p[1]>=h[0]?p[1]=Math.max(p[1],h[1]):(u.push(p),p=h),s++}u.push(p);var d=u.length,f=u[0][0]+360-u[d-1][1],y=[u[d-1][1],u[0][0]];for(s=1;s<d;s++){var m=u[s][0]-u[s-1][1];f<m&&(f=m,y=[u[s-1][1],u[s][0]])}return new O([y[1],n],[y[0],o])},O.fromPositions=function(t){for(var e,o,n=NaN,r=NaN,i=NaN,s=NaN,a=t.length,c=new Array(a),l=0;a--;)(o=t[a])&&2<=o.length&&(e=g(o[1]),n=isNaN(n)?e:Math.max(n,e),r=isNaN(r)?e:Math.min(r,e),c[l++]=v(o[0]));if(l){c.length=l,c.sort(function(t,e){return t-e});for(var u=c[0]+360-c[l-1],p=0,a=1;a<l;a++){var h=c[a]-c[a-1];u<h&&(u=h,p=a)}i=c[p],s=c[(p||l)-1]}return isNaN(i)||isNaN(r)||isNaN(s)||isNaN(n)?null:new O([i,r,s,n])},O.fromLatLngs=function(t){return O.fromPositions(Dc.fromLatLngs(t))},O.fromData=function(t){var e,o,n=null;if(Array.isArray(t)&&0<t.length){try{for(var r=Wc(t),i=r.next();!i.done;i=r.next()){var s,a=i.value;null!=(s=O.fromData(a))&&(n=null===n?s:O.merge(n,s))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n}if(t instanceof w)return t.getBounds();if(t&&t.type){var c=t;if(c.bbox&&4===c.bbox.length)return c.bbox;switch(c.type){case"FeatureCollection":return O.fromData(c.features);case"Feature":return w._isCircle(c)?O.fromPositions(w._getCirclePositions(c)):O.fromData(c.geometry);case"GeometryCollection":return O.fromData(c.geometries);case"Point":var l=c.coordinates;if(l&&2<=l.length)return[l[0],l[1],l[0],l[1]];break;case"LineString":case"MultiPoint":return O.fromPositions(c.coordinates);case"Polygon":case"MultiLineString":var u=c.coordinates;if(u&&0<u.length){for(var p=0,h=u.length;p<h;p++)null!=(s=O.fromPositions(u[p]))&&(n=null===n?s:O.merge(n,s));if(null!=n)return n}break;case"MultiPolygon":var d=c.coordinates;if(d&&0<d.length){for(p=0,h=d.length;p<h;p++)for(var f=0,y=d[p].length;f<y;f++)null!=(s=O.fromPositions(d[p][f]))&&(n=null===n?s:O.merge(n,s));return n}}}return null},O.splitOnAntimeridian=function(t){var e,o,n,r,i,s,a=[];return O.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)?[[-180,t[1],t[2],180,t[4],t[5]]]:O.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)?[[-180,t[1],180,t[3]]]:(O.crossesAntimeridian(t)?(s=e=void 0,o=v(O.getWest(t)),n=v(O.getEast(t)),r=g(O.getNorth(t)),i=g(O.getSouth(t)),s=6<=t.length?(e=[o,i,t[2],180,r,t[5]],[-180,i,t[2],n,r,t[5]]):(e=[o,i,180,r],[-180,i,n,r]),a.push(e,s)):a.push(t),a)},O.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe=function(t){return 6<=t.length&&360<t[3]-t[0]},O.isBoundingBoxWithLessThanSixElementsLargerThanGlobe=function(t){return t.length<6&&360<t[2]-t[0]},O);function O(t,e){var o,n=this;return t&&e?n=(o=t)[2]&&e[2]?Uc.call(this,o[0],o[1],o[2]||0,e[0],e[1],e[2]||0)||this:Uc.call(this,o[0],o[1],e[0],e[1])||this:t&&(o=t)&&(4===o.length?n=Uc.call(this,o[0],o[1],o[2],o[3])||this:6<=o.length&&(n=Uc.call(this,o[0],o[1],o[2],o[3],o[4],o[5])||this)),n}Vc.TYPE="FeatureCollection";var Gc=Vc;function Vc(t,e){this.type="FeatureCollection",this.type=Vc.TYPE,this.features=t,this.bbox=e}Kc.TYPE="GeometryCollection";s=Kc;function Kc(t){this.type="GeometryCollection",this.type=Kc.TYPE,this.geometries=t}Yc.TYPE="LineString";vo=Yc;function Yc(t,e){this.type="LineString",this.type=Yc.TYPE,this.coordinates=t,this.bbox=e}Jc.TYPE="MultiLineString";No=Jc;function Jc(t,e){this.type="MultiLineString",this.type=Jc.TYPE,this.coordinates=t,this.bbox=e}$c.TYPE="MultiPoint";Fo=$c;function $c(t,e){this.type="MultiPoint",this.type=$c.TYPE,this.coordinates=t,this.bbox=e}Xc.TYPE="MultiPolygon";Do=Xc;function Xc(t,e){this.type="MultiPolygon",this.type=Xc.TYPE,this.coordinates=t,this.bbox=e}var Qc,tl,cr=window&&window.__extends||(Qc=function(t,e){return(Qc=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Qc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Tn=(tl=Array,cr(C,tl),C.fromPosition=function(t){return 2<=t.length?new C((180+t[0])/360,C._latToMercatorY(t[1]),3<=t.length?C._altitudeToMercatorZ(t[2],t[1]):0):[0,0,0]},C.fromPositions=function(t){for(var e=[],o=0,n=t.length;o<n;o++)e.push(this.fromPosition(t[o]));return e},C.toFloat32Array=function(t){for(var e=new Float32Array(3*t.length),o=0,n=t.length;o<n;o++){var r=3*o,i=t[o];e[r]=(180+i[0])/360,e[1+r]=C._latToMercatorY(i[1]),e[2+r]=3<=i.length?C._altitudeToMercatorZ(i[2],i[1]):0}return e},C.toPosition=function(t){var e;return 2<=t.length?(e=360/Math.PI*Math.atan(Math.exp((180-360*t[1])*Math.PI/180))-90,new Dc(360*t[0]-180,e,3<=t.length?C._mercatorZToAltitude(t[2],t[1]):0)):[0,0,0]},C.toPositions=function(t){for(var e=[],o=0,n=t.length;o<n;o++)e.push(this.toPosition(t[o]));return e},C.mercatorScale=function(t){return 1/Math.cos(t*Math.PI/180)},C.meterInMercatorUnits=function(t){return 1/C.earthCircumference*C.mercatorScale(C._latToMercatorY(t))},C._circumferenceAtLatitude=function(t){return C.earthCircumference*Math.cos(t*Math.PI/180)},C._altitudeToMercatorZ=function(t,e){return t/C._circumferenceAtLatitude(e)},C._mercatorZToAltitude=function(t,e){return t*C._circumferenceAtLatitude(C._latToMercatorY(e))},C._latToMercatorY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360},C.earthCircumference=2*Math.PI*pc(),C);function C(t,e,o){return tl.call(this,t,e,o||0)||this}go=Object.freeze({__proto__:null,BoundingBox:S,Feature:Ta,FeatureCollection:Gc,GeometryCollection:s,LineString:vo,MercatorPoint:Tn,MultiLineString:No,MultiPoint:Fo,MultiPolygon:Do,Point:Fa,Polygon:Bc,Position:Dc});function el(t,e){return t*t+e*e}function ol(t,e){for(var o,n,r,i=t[0],s=[i],a=1,c=t.length;a<c;a++)o=t[a],r=i,el((n=o)[0]-r[0],n[1]-r[1])>e&&(s.push(o),i=o);return i!==o&&s.push(o),s}function nl(t,e,o,n,r){for(var i,s,a,c,l,u,p,h=n,d=e+1;d<o;d++){s=t[d],a=t[e],f=t[o],p=u=l=c=void 0,l=a[0],a=a[1],u=f[0]-l,p=f[1]-a,0==u&&0==p||(1<(c=((s[0]-l)*u+(s[1]-a)*p)/el(u,p))?(l=f[0],a=f[1]):0<c&&(l+=u*c,a+=p*c));var f=el(s[0]-l,s[1]-a);h<f&&(i=d,h=f)}n<h&&(1<i-e&&nl(t,e,i,n,r),r.push(t[i]),1<o-i)&&nl(t,i,o,n,r)}var rl=function(t,e,o){var n,r;return void 0===e&&(e=1),void 0===o&&(o=!1),t.length<=2||(e=e*e,t=o?t:ol(t,e),n=(o=t).length-1,r=[o[0]],nl(o,0,n,e,r),r.push(o[n]),t=r),t};var il=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sl=(al.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},al.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},al.prototype.transformArray=function(t,e,o){var n,r;if(t&&Array.isArray(t)&&Array.isArray(t[0])){var i=[];try{for(var s=il(t),a=s.next();!a.done;a=s.next()){var c=a.value;i.push(this.transform(c,e,o))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i}return null},al.prototype.transform=function(t,e,o){var n=t[0]*e[0][3]+t[1]*e[1][3]+e[2][3],t=t[0]*e[0][4]+t[1]*e[1][4]+e[2][4];return"number"==typeof o&&0<=o?[ac(n,o),ac(t,o)]:[ac(n,6),ac(t,6)]},al._calculateAffineTransform=function(t,e){if(t.length!==e.length||t.length<1)throw new Error("Error: source and target arrays must have the same length.");var o=Math.min(t[0].length,e[0].length),n=o+1;if(t.length<o)throw new Error("Erorr: At least "+o+" reference points required.");for(var r=[],i=[],s=0;s<n;s++){i[s]=[];for(var a=0;a<n;a++){a<o&&(r[a]=0);for(var c=i[s][a]=0;c<t.length;c++)a<o&&(r[a]+=s<o?t[c][s]*e[c][a]:e[c][a]),i[s][a]+=o<=s&&o<=a?1:o<=s?t[c][a]:o<=a?t[c][s]:t[c][s]*t[c][a]}i[s]=i[s].concat(r)}if(this._gaussJordanElimination(i))return i;throw new Error("Error: Singular matrix. Points are likely coplanar.")},al._gaussJordanElimination=function(t){for(var e,o=t.length,n=2*o-1,r=0;r<o;r++){for(var i=r,s=r+1;s<o;s++)Math.abs(t[s][r])>Math.abs(t[i][r])&&(i=s);if(e=t[i],t[i]=t[r],t[r]=e,Math.abs(t[r][r])<=1e-12)return!1;for(var a=r+1;a<o;a++)for(var c=t[a][r]/t[r][r],l=r;l<n;l++)t[a][l]-=t[r][l]*c}for(r=o-1;-1<r;r--){c=t[r][r];for(s=0;s<r;s++)for(var u=n-1;r-1<u;u--)t[s][u]-=t[r][u]*t[s][r]/c;t[r][r]/=c;for(var p=o;p<n;p++)t[r][p]/=c}return!0},al);function al(t,e){this.M=al._calculateAffineTransform(t,e),this.inverseM=al._calculateAffineTransform(e,t)}var cl,ll,o=Object.freeze({__proto__:null,get AccelerationUnits(){return m},AffineTransform:sl,get AreaUnits(){return p},get DistanceUnits(){return h},get SpeedUnits(){return y},get TimeUnits(){return f},WEBMERCATOR_MAXLAT:Va,_precision:ac,boundingBoxToPolygon:function(t){var e=v(S.getWest(t)),o=v(S.getEast(t)),n=g(S.getNorth(t)),r=g(S.getSouth(t)),t=S.getCenter(t),r=[[e,n],[e,r],[t[0],r],[o,r],[o,n],[t[0],n],[e,n]];return new Bc([r])},convertAcceleration:Sc,convertArea:Oc,convertDistance:cc,convertSpeed:Cc,convertTimespan:Pc,getAcceleration:Lc,getAccelerationFromFeatures:function(t,e,o,n,r,i,s){if("string"==typeof o&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){o=Mc(t.properties[o],e.properties[o],f.seconds);if(!isNaN(o)){var a=0;if(n&&"string"==typeof n){var c=t.properties[n],n=e.properties[n];if("number"==typeof c&&(a=c,"number"==typeof n))return kc(c,n,o,r,f.seconds,i,s)}return Lc(a,uc(t.geometry.coordinates,e.geometry.coordinates,h.meters),o,r,h.meters,f.seconds,i,s)}}return NaN},getAccelerationFromSpeeds:kc,getArea:function t(e,o,n){if(e){var r=0;switch((e=e instanceof w?e.toJson():e).type){case"Feature":var i=e;if(i.geometry)return t(i.geometry,o,n);break;case"Polygon":(i=e).coordinates&&(r=nc(i.coordinates));break;case"MultiPolygon":var s=e;if(s.coordinates)for(var a=0,c=s.coordinates.length;a<c;a++)r+=nc(s.coordinates[a])}return Oc(r,p.squareMeters,o,n)}return 0},getCardinalSpline:function(t,e,o,n){if(!t||t.length<=2)return c;"number"!=typeof e&&(e=.5),("number"!=typeof o||o<=0)&&(o=15);var r,i,s,a=t.length,c=t.slice(0),l=(n?(Dc.areEqual(c[0],c[a-1])&&(c.pop(),a--),c.unshift(t[a-1]),c.push(t[0]),c.push(t[1]),a++):(c.unshift(t[0]),c.push(t[a-1])),[]);l.push([1,0,0,0]);for(var u=1;u<o-1;u++)l.push([2*(s=(r=u/o)*(i=r*r))-3*i+1,-2*s+3*i,s-2*i+r,s-i]);l.push([0,1,0,0]);for(var p,h,d,f,y,m,g=[],u=1;u<a;u++)for(p=e*(c[u+1][0]-c[u-1][0]),h=e*(c[u+1][1]-c[u-1][1]),d=e*(c[u+2][0]-c[u][0]),f=e*(c[u+2][1]-c[u][1]),r=0;r<o;r++)m=(y=l[r])[0]*c[u][0]+y[1]*c[u+1][0]+y[2]*p+y[3]*d,y=Ja(y[0]*c[u][1]+y[1]*c[u+1][1]+y[2]*h+y[3]*f,-85,85),g.push([m,y]);return g},getClosestPointOnGeometry:function t(e,o,n,r){var i=jc(e),s=xc([i],22)[0],a=null,c=1/0;switch((o=o instanceof w?o.toJson():o).type){case"Feature":return t(e,o.geometry,n);case"Point":f=[[o.coordinates]];break;case"MultiPoint":for(var l,u=o.coordinates,p=0,h=u.length;p<h;p++)(l=uc(i,u[p]))<c&&(c=l,a=new Ta(new Fa(u[p]),{distance:l}));break;case"LineString":f=[o.coordinates];break;case"Polygon":case"MultiLineString":f=o.coordinates;break;case"MultiPolygon":var d=o.coordinates;if(0<d.length)for(var f=d[0],p=1,h=d.length;p<h;p++)f=f.concat(d[p])}if(f)for(var y,p=0,h=f.length;p<h;p++)(y=sc(i,s,f[p]))&&y.properties.distance<c&&(c=y.properties.distance,a=y);return a&&(a.properties.distance=cc(a.properties.distance,"meters",n,r)),a},getConvexHull:function(t){var e,o,n=Ec(t).map(function(t){return[v(t[0]),g(t[1])]}),r=(n.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}),[]);try{for(var i=qa(n),s=i.next();!s.done;s=i.next()){for(var a=s.value;2<=r.length&&ic(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}for(var c=[],l=n.length-1;0<=l;l--){for(;2<=c.length&&ic(c[c.length-2],c[c.length-1],n[l])<=0;)c.pop();c.push(n[l])}return new Bc([r.concat(c)])},getDestination:lc,getDistanceTo:uc,getEarthRadius:pc,getGeodesicPath:function(t,e){(!e||e<=0)&&(e=15),Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var o,n=o.length-1,r=[],i=0;i<n;i++)r=r.concat(hc(o[i],o[i+1],e));return dc(r)},getGeodesicPaths:function(t,e){(!e||e<=0)&&(e=15),Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var o,n=o.length-1,r=[],i=[],s=0;s<n;s++)for(var a,c,l,u,p,h=hc(o[s],o[s+1],e),d=0;d<h.length;d++)r.push(h[d]),d+1>=h.length||(a=(c=Za(h[d],2))[0],c=c[1],u=(p=Za(h[d+1],2))[0],p=p[1],180<Math.abs(u-a)&&(l=0<a?180:-180,u=Math.abs((0<a?u+360:u-360)-a),p=c+(p-c)*(Math.abs(l-a)/u),r.push([l,p]),i.push(r),r=[[-l,p]]));return i.push(r),i},getHeading:yc,getLengthOfPath:mc,getPathDenormalizedAtAntimerian:dc,getPathSplitByAntimeridian:fc,getPixelHeading:function(t,e){t=jc(t),e=jc(e);var e=(t=Za(xc([t,e],21),2))[0],o=(t=t[1])[0]-e[0],e=e[1]-t[1];return(2.5*Math.PI-Math.atan2(e,o))*Wa%360},getPointWithHeadingAlongPath:Ic,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var o=[],n=mc(t,h.meters)/(e-1),r=0;r<e;r++){var i=Ic(t,n*r,h.meters);null!=i&&o.push(i)}return o},getPosition:jc,getPositionAlongPath:gc,getPositions:Ec,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var o=[],n=mc(t,h.meters)/(e-1),r=0;r<e;r++){var i=gc(t,n*r,h.meters);null!=i&&o.push(i)}return o},getRegularPolygonPath:wc,getRegularPolygonPaths:function(t,e,o,n,r){return fc(vc(t,e,o,n,r))},getSpeed:function(t,e,o,n,r,i){return t=jc(t),e=jc(e),t&&e?(o=Pc(o,n,f.seconds),Cc(uc(t,e,h.meters)/o,y.metersPerSecond,r,i)):0},getSpeedFromFeatures:function(t,e,o,n,r){if("string"==typeof o&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){o=Mc(t.properties[o],e.properties[o],f.seconds);if(!isNaN(o))return Cc(uc(t.geometry.coordinates,e.geometry.coordinates,h.meters)/o,y.metersPerSecond,n,r)}return NaN},getTimespan:Mc,getTravelDistance:function(t,e,o,n,r,i,s,a){return e=Pc(e,r,f.seconds),r=(o=Cc(o,i,y.metersPerSecond))*e,"number"==typeof n&&(r+=.5*Sc(n,s,m.metersPerSecondSquared)*e*e),cc(r,h.meters,t,a)},interpolate:function(t,e,o){o=void 0===o?.5:o;var n=uc(t=jc(t),e=jc(e),"kilometers");return lc(t,yc(t,e),n*o,"kilometers")},mercatorPixelsToPositions:bc,mercatorPositionsToPixels:xc,normalizeLatitude:g,normalizeLongitude:v,parseTimestamp:Ac,rotatePositions:_c,simplify:function(t,e){return rl(t,e,!0)}}),ul=((window&&window.__extends||(cl=function(t,e){return(cl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}cl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(pl,ll=t),pl);function pl(){var t=null!==ll&&ll.apply(this,arguments)||this;return t.zoomDelta=1,t.style=u.ControlStyle.light,t}(window&&window.__extends||(hl=function(t,e){return(hl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}hl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(fl,dl=Ot),fl.prototype.onAdd=function(t){this.container=this.buildContainer(t,this.options.style,"Zoom Control"),this.container.style.flexDirection="column",this.zoomInButton=this.constructZoomInButton(t),this.zoomOutButton=this.constructZoomOutButton(t);var e=_("Zoom In"),o=_("Zoom Out");return this.container.appendChild(this.zoomInButton),this.container.appendChild(e),this.container.appendChild(this.zoomOutButton),this.container.appendChild(o),b(e,this.zoomInButton),b(o,this.zoomOutButton),t.events.add("zoom",this.zoomChanged),t.events.add("minzoomchanged",this.minZoomChanged),t.events.add("maxzoomchanged",this.maxZoomChanged),this.map=t,this.container},fl.prototype.onRemove=function(){dl.prototype.onRemove.call(this),this.map&&(this.map.events.remove("zoom",this.zoomChanged),this.map.events.remove("minzoomchanged",this.minZoomChanged),this.map.events.remove("maxzoomchanged",this.maxZoomChanged),this.map=null),this.container&&(this.container.remove(),this.container=null,this.zoomInButton=null,this.zoomOutButton=null)},fl.prototype.updateZoomButtonsState=function(){var t=this.map.getCamera().zoom>=this.map._getMap().getMaxZoom(),e=S.getSouth(this.map.getCamera().bounds)<=-Va&&S.getNorth(this.map.getCamera().bounds)>=Va,e=this.map.getCamera().zoom<=this.map._getMap().getMinZoom()||e;this.zoomInButton&&this.zoomInButton.disabled!=t&&(this.zoomInButton.disabled=t,this.zoomInButton.setAttribute("aria-label",t?"Zoom In disabled":"Zoom In")),this.zoomOutButton&&this.zoomOutButton.disabled!=e&&(this.zoomOutButton.disabled=e,this.zoomOutButton.setAttribute("aria-label",t?"Zoom Out disabled":"Zoom Out"))},fl.prototype.constructZoomInButton=function(e){var o=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("zoom-in"),t.setAttribute("aria-label","Zoom In"),t.setAttribute("alt","Zoom In"),t.setAttribute("type","button"),t.addEventListener("click",function(){var t;e.setCamera({maxBounds:null==(t=e._getMap().getMaxBounds())?void 0:t.toArray().flat(),zoom:e.getCamera().zoom+o.options.zoomDelta,duration:fl.ZOOM_DURATION_MS,type:"ease"},!0)}),t},fl.prototype.constructZoomOutButton=function(e){var o=this,t=document.createElement("button");return t.classList.add("azure-maps-control-button"),t.classList.add("zoom-out"),t.setAttribute("aria-label","Zoom Out"),t.setAttribute("alt","Zoom Out"),t.setAttribute("type","button"),t.addEventListener("click",function(){var t;e.setCamera({maxBounds:null==(t=e._getMap().getMaxBounds())?void 0:t.toArray().flat(),zoom:e.getCamera().zoom-o.options.zoomDelta,duration:fl.ZOOM_DURATION_MS,type:"ease"},!0)}),t},fl.ZOOM_DURATION_MS=200;var hl,dl,br=fl;function fl(t){var e=dl.call(this)||this;return e.container=null,e.zoomInButton=null,e.zoomOutButton=null,e.zoomChanged=function(t){return e.updateZoomButtonsState()},e.minZoomChanged=function(t){return e.updateZoomButtonsState()},e.maxZoomChanged=function(t){return e.updateZoomButtonsState()},e.options=(new ul).merge(t),e}var r=Object.freeze({__proto__:null,CompassControl:jt,ControlBase:Ot,PitchControl:Nt,ScaleControl:Ut,StyleControl:ar,TrafficControl:Hs,TrafficLegendControl:Gt,ZoomControl:br}),yl=bi;var P=Vt(function(t,e){return yl(t,5,e="function"==typeof e?e:void 0)}),ml=(gl.Css={hidden:"hidden-accessible-element"},gl);function gl(t){var e=this;this.attach=function(t){e.map!==t&&(e.map&&e.detachFromCurrentMap(),e.map=t,e.map.indicators._getCollectionDiv().appendChild(e.element),e.map.indicators.add(e))},this.remove=function(){e.detachFromCurrentMap(),e.element.remove()},this.getElement=function(){return e.element},this.detachFromCurrentMap=function(){e.map&&(e.map.indicators.remove(e),delete e.map)},this.element=document.createElement("div"),this.element.setAttribute("tabindex","0"),this.element.setAttribute("role","option"),null!=t&&t.setSize&&this.element.setAttribute("aria-setsize",t.setSize.toString()),null!=t&&t.positionInSet&&this.element.setAttribute("aria-posinset",t.positionInSet.toString()),this.element.setAttribute("aria-label","data point"),this.element.classList.add(gl.Css.hidden)}(window&&window.__extends||(vl=function(t,e){return(vl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}vl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(bl,wl=t);var vl,wl,_l=bl;function bl(){var t=null!==wl&&wl.apply(this,arguments)||this;return t.buffer=128,t.maxZoom=18,t.cluster=!1,t.clusterRadius=50,t.clusterMaxZoom=void 0,t.clusterProperties=void 0,t.lineMetrics=!1,t.tolerance=.375,t.clusterMinPoints=2,t.generateId=!1,t.promoteId=void 0,t.filter=void 0,t}(window&&window.__extends||(xl=function(t,e){return(xl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ol,Sl=_t),Ol.prototype.getId=function(){return this.id},Ol.prototype._setMap=function(t,e){var o;void 0===e&&(e=!0),null==t||void 0===t?(o=this.map,delete this.map,e&&(this._invokeEvent("sourceremoved",this),o)&&o.events.invoke("sourceremoved",this)):(this.map=t,e&&(this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this)))};var xl,Sl,L=Ol;function Ol(t){var e=Sl.call(this)||this;return e.id=t||Ia(),e}var Cl,Pl,ze=window&&window.__extends||(Cl=function(t,e){return(Cl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Cl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ll=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kl=(ze(k,Pl=L),k.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},k.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},k.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},k.prototype.getClusterExpansionZoom=function(e){var r=this;return new Promise(function(o,n){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterExpansionZoom(e,function(t,e){t?n(t):"number"==typeof e&&o(e)}):n("The DataSource hasn't been added to a map.")})},k.prototype.getClusterChildren=function(e){var r=this;return new Promise(function(o,n){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterChildren(e,function(t,e){t?n(t):e&&o(r.map.sources._mapFeaturesToShapes(e,!1,r))}):n("The DataSource hasn't been added to a map.")})},k.prototype.getClusterLeaves=function(e,r,i){var s=this;return new Promise(function(o,n){var t;s.map?(t=s.map._getMap().getSource(s.getId()))&&"geojson"===t.type&&t.getClusterLeaves(e,r,i,function(t,e){t?n(t):e&&o(s.map.sources._mapFeaturesToShapes(e,!1,s))}):n("The DataSource hasn't been added to a map.")})},k.prototype.getOptions=function(){return a(this.options)},k.prototype.getShapes=function(){return Array.from(this.shapes)},k.prototype.importDataFromUrl=function(t){var e=this;return fetch(t,{method:"GET",mode:"cors"}).then(function(t){if(t.ok)return t.json();throw new Error("HTTP ".concat(t.status,": ").concat(t.statusText))}).then(function(t){e.add(t)})},k.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},k.prototype.remove=function(t){var e,o,t=Array.isArray(t)?t:[t];try{for(var n=Ll(t),r=n.next();!r.done;r=n.next()){var i=r.value;"number"==typeof i?this._removeByIndex(i):this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}this._updateSource()},k.prototype.removeById=function(t){var e,o,t=Array.isArray(t)?t:[t];try{for(var n=Ll(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}this._updateSource()},k.prototype.setOptions=function(t){t=(new _l).merge(this.options,a(t));Ca(this.options,t)||(this._invokeEvent("datasourceupdated",this),this.options=t,this.map&&this.map._rebuildStyle())},k.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},k.prototype.toJson=function(){return new Gc(this.shapes.map(function(t){return t.toJson()}))},k.prototype._toJson=function(){return new Gc(this.shapes.map(function(t){return t._toJson()}))},k.prototype._buildSource=function(){var t={type:"geojson",data:this._toJson(),maxzoom:this.options.maxZoom,cluster:this.options.cluster,clusterRadius:this.options.clusterRadius,tolerance:this.options.tolerance,lineMetrics:this.options.lineMetrics,clusterProperties:this.options.clusterProperties,buffer:this.options.buffer,clusterMinPoints:this.options.clusterMinPoints,generateId:this.options.generateId,promoteId:this.options.promoteId,filter:this.options.filter};return"number"==typeof this.options.clusterMaxZoom&&(t.clusterMaxZoom=this.options.clusterMaxZoom),t},k.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this._buildSource(),t=t._buildSource(),e.type===t.type)&&e.maxzoom===t.maxzoom&&e.cluster===t.cluster&&e.clusterRadius===t.clusterRadius&&e.tolerance===t.tolerance&&e.lineMetrics===t.lineMetrics&&JSON.stringify(e.clusterProperties)===JSON.stringify(t.clusterProperties)&&e.buffer===t.buffer&&e.clusterMinPoints===t.clusterMinPoints&&e.generateId===t.generateId&&e.promoteId===t.promoteId&&e.filter===t.filter},k.prototype._addNoUpdate=function(t,e){var o;t instanceof w?(this._addToSources(t,e),o=[t]):Array.isArray(t)?(o=t.map(function(t){return t instanceof w?t:new w(t)}),this._addToSources(o,e)):"FeatureCollection"===t.type?(o=t.features.map(function(t){return new w(t)}),this._addToSources(o,e)):"GeometryCollection"===t.type?(o=t.geometries.map(function(t){return new w(t)}),this._addToSources(o,e)):(t=new w(t),this._addToSources(t,e),o=[t]),this._invokeEvent("dataadded",o)},k.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new wt,t&&0<t.length&&this._invokeEvent("dataremoved",t)},k.prototype._updateSource=function(){var t=this;void 0===this.requestId&&(this.requestId=requestAnimationFrame(function(){t._updateMboxSource(),t.requestId=void 0}))},k.prototype._addToSources=function(t,e){var o,n,r,i;if(t=Array.isArray(t)?t:[t],"number"!=typeof e)try{for(var s=Ll(t),a=s.next();!a.done;a=s.next()){var c=a.value;this.shapes.push(c),this.shapesMap.set(c.getId(),this.shapes.length-1)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}else for(var l=t.length-1;0<=l;l--)this.shapes.splice(e,0,t[l]),this._updateShapesMap(e);try{for(var u=Ll(t),p=u.next();!p.done;p=u.next())(c=p.value)._setDataSource(this)}catch(t){r={error:t}}finally{try{p&&!p.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}},k.prototype._removeById=function(t){var t=t instanceof w?t.getId():"string"==typeof t||"number"==typeof t?t:t.id,e=this.shapes[this.shapesMap.get(t)];e&&(e._setDataSource(null),this.shapes.splice(this.shapesMap.get(t),1),this._updateShapesMap(this.shapesMap.get(t)),this.shapesMap.delete(t),this._invokeEvent("dataremoved",[e]))},k.prototype._removeByIndex=function(t){var e;if(t>=this.shapes.length)throw new Error("The specified remove index '".concat(t,"' ")+"is greater than the maximum possible index '".concat(this.shapes.length-1,"'"));e=this.shapes[t],this.shapesMap.delete(e.getId()),e._setDataSource(null),this.shapes.splice(t,1),this._updateShapesMap(t),this._invokeEvent("dataremoved",[e])},k.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},k.prototype._updateMboxSource=function(){var t;this.map&&this.map._getMap()&&(t=this.map._getMap().getSource(this.getId()))&&"geojson"===t.type&&t.setData(this._toJson())},k);function k(t,e){t=Pl.call(this,t)||this;return t.requestId=void 0,t.options=(new _l).merge(a(e)),t.shapes=[],t.shapesMap=new wt,t}(window&&window.__extends||(Ml=function(t,e){return(Ml=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ml(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(jl,Al=t);var Ml,Al,El=jl;function jl(){var t=null!==Al&&Al.apply(this,arguments)||this;return t.bounds=void 0,t.minZoom=0,t.maxZoom=22,t.isTMS=!1,t.tiles=void 0,t.url=void 0,t}(window&&window.__extends||(Il=function(t,e){return(Il=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Il(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(zl,Tl=L),zl.prototype.getOptions=function(){return a(this.options)},zl.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},zl.prototype._buildSource=function(){var t={type:"vector"};return this.options.bounds&&(t.bounds=this.options.bounds),this.options.tiles?(t.tiles=this.options.tiles,t.minzoom=this.options.minZoom,t.maxzoom=this.options.maxZoom):this.options.url&&(t.url=this.options.url),this.options.isTMS&&(t.scheme="tms"),t},zl.prototype._isDeepEqual=function(t){var e,o;return this.constructor===t.constructor&&(e=this._buildSource(),o=t._buildSource(),e.type===o.type)&&e.url===o.url&&(void 0===e.tiles&&void 0===o.tiles||e.tiles&&o.tiles&&e.tiles.length===o.tiles.length&&e.tiles.every(function(t,e){return t===o.tiles[e]}))&&e.minzoom===o.minzoom&&e.maxzoom===o.maxzoom&&e.bounds===o.bounds&&e.attribution===o.attribution&&e.promoteId===o.promoteId&&e.scheme===o.scheme};var Il,Tl,i=zl;function zl(t,e){t=Tl.call(this,t)||this;return t.options=(new El).merge(a(e)),t}(window&&window.__extends||(Dl=function(t,e){return(Dl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Dl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Fl,Rl=L),Fl.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this.source,t=t.source,e.type===t.type)&&e.canvas===t.canvas&&JSON.stringify(e.coordinates)===JSON.stringify(t.coordinates)&&e.animate===t.animate},Fl.prototype._buildSource=function(){return this.source};var Dl,Rl,Bl=Fl;function Fl(t,e,o){t=Rl.call(this,t)||this;return t.source=e,t}(window&&window.__extends||(Nl=function(t,e){return(Nl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Nl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Hl,Zl=L),Hl.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this.source,t=t.source,e.type===t.type)},Hl.prototype._buildSource=function(){return this.source};var Nl,Zl,ql=Hl;function Hl(t,e,o){t=Zl.call(this,t)||this;return t.source=e,t}(window&&window.__extends||(Ul=function(t,e){return(Ul=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ul(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Vl,Wl=L),Vl.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this.source,t=t.source,e.type===t.type)&&JSON.stringify(e.coordinates)===JSON.stringify(t.coordinates)&&e.url===t.url},Vl.prototype._buildSource=function(){return this.source};var Ul,Wl,Gl=Vl;function Vl(t,e,o){t=Wl.call(this,t)||this;return t.source=e,t}(window&&window.__extends||(Kl=function(t,e){return(Kl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Kl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))($l,Yl=L),$l.prototype._isDeepEqual=function(t){var e;return this.constructor===t.constructor&&(e=this.source,t=t.source,e.type===t.type)&&JSON.stringify(e.coordinates)===JSON.stringify(t.coordinates)&&e.urls===t.urls},$l.prototype._buildSource=function(){return this.source};var Kl,Yl,Jl=$l;function $l(t,e,o){t=Yl.call(this,t)||this;return t.source=e,t}(window&&window.__extends||(Xl=function(t,e){return(Xl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Xl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(tu,Ql=El);var Xl,Ql,fe=tu;function tu(){var t=null!==Ql&&Ql.apply(this,arguments)||this;return t.tileSize=512,t}(window&&window.__extends||(eu=function(t,e){return(eu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}eu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ru,ou=fe);var eu,ou,nu=ru;function ru(){var t=null!==ou&&ou.apply(this,arguments)||this;return t.encoding=void 0,t}var iu,su,e=window&&window.__extends||(iu=function(t,e){return(iu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}iu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),au=window&&window.__assign||function(){return(au=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ce=(e(cu,su=L),cu.prototype.getOptions=function(){return a(this.options)},cu.prototype._buildSource=function(){return au({type:"raster-dem",bounds:this.options.bounds,minzoom:this.options.minZoom,maxzoom:this.options.maxZoom,tileSize:this.options.tileSize,encoding:this.options.encoding},this.options.tiles?{tiles:this.options.tiles}:{url:this.options.url})},cu.prototype._isDeepEqual=function(t){return this.constructor===t.constructor&&(t=t.getOptions(),this.options.url===t.url)&&this.options.tiles===t.tiles&&this.options.bounds===t.bounds&&this.options.minZoom===t.minZoom&&this.options.maxZoom===t.maxZoom&&this.options.tileSize===t.tileSize&&this.options.encoding===t.encoding},cu);function cu(t,e){t=su.call(this,t)||this;return t.options=(new nu).merge(a(e)),t}var lu,uu,cr=Object.freeze({__proto__:null,CanvasSource:Bl,DataSource:kl,ElevationTileSource:ce,ImageSource:Gl,Source:L,UnknownSource:ql,VectorTileSource:i,VideoSource:Jl}),M=((window&&window.__extends||(lu=function(t,e){return(lu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}lu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(pu,uu=_t),pu.prototype.getId=function(){return this.id},pu.prototype.getMap=function(){return this.map||null},pu.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},pu.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},pu._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},pu.prototype._updateBaseProperties=function(t,e){this._updateFilter(t.filter,e.filter),this._updateZoomRange(t.minZoom,e.minZoom,t.maxZoom,e.maxZoom),this._updateLayoutProperty("visibility",t.visible,e.visible,t.visible?"visible":"none")},pu.prototype._updateFilter=function(t,e){Ca(t,e)||this.map._getMap().setFilter(this.id,t)},pu.prototype._updatePaintProperty=function(t,e,o,n){Ca(e,o)||this.map._getMap().setPaintProperty(this.id,t,n||e)},pu.prototype._updateLayoutProperty=function(t,e,o,n){Ca(e,o)||this.map._getMap().setLayoutProperty(this.id,t,n||e)},pu.prototype._updateZoomRange=function(t,e,o,n){t===e&&n===o||this.map._getMap().setLayerZoomRange(this.id,t,o)},pu.LayerEvents={layeradded:void 0,layerremoved:void 0,focusin:void 0,focusout:void 0},pu);function pu(t){var e=uu.call(this)||this;return e.id=t||Ia(),e}(window&&window.__extends||(hu=function(t,e){return(hu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}hu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(fu,du=t),fu._cloneCustomizer=function(t){if(t instanceof L)return t};var hu,du,s=fu;function fu(){var t=null!==du&&du.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}(window&&window.__extends||(yu=function(t,e){return(yu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}yu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(vu,mu=s);var yu,mu,gu=vu;function vu(){var t=null!==mu&&mu.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color="#1A73AA",t.blur=0,t.opacity=1,t.strokeColor="#FFFFFF",t.strokeOpacity=1,t.strokeWidth=2,t.pitchAlignment="viewport",t.radius=8,t.createIndicators=!1,t.accessibilityIdKey=void 0,t}var wu,_u,vo=window&&window.__extends||(wu=function(t,e){return(wu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}wu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),bu=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},xu=window&&window.__generator||function(n,r){var i,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(o){return function(t){var e=[o,t];if(i)throw new TypeError("Generator is already executing.");for(;c=l&&e[l=0]?0:c;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,s=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))c.label=e[1];else if(6===e[0]&&c.label<a[1])c.label=a[1],a=e;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(e)}}e=r.call(n,c)}catch(t){e=[6,t],s=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},Su=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Ou=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Cu=(vo(Pu,_u=M),Pu.prototype.getOptions=function(){return P(this.options,gu._cloneCustomizer)},Pu.prototype.getSource=function(){return this.options.source},Pu.prototype.setOptions=function(t){t=(new gu).merge(this.options,P(t,gu._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("circle-blur",t.blur,this.options.blur),this._updatePaintProperty("circle-color",t.color,this.options.color),this._updatePaintProperty("circle-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("circle-radius",t.radius,this.options.radius),this._updatePaintProperty("circle-stroke-color",t.strokeColor,this.options.strokeColor),this._updatePaintProperty("circle-stroke-opacity",t.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("circle-stroke-width",t.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("circle-pitch-alignment",t.pitchAlignment,this.options.pitchAlignment)}this.options=t},Pu.prototype.onAdd=function(e){var t,o,n=this;_u.prototype.onAdd.call(this,e),this.options.createIndicators&&(e.events.addOnce("idle",this._setAccessibleIndicator),e.events.add("moveend",this._setAccessibleIndicator),(t=this._getDataSource())?e.events.add("dataadded",t,function(){e.events.addOnce("idle",n._setAccessibleIndicator)}):(o="string"==typeof this.options.source?this.options.source:this.options.source.getId(),e.events.add("sourcedata",function(t){(null==(t=t.source)?void 0:t.getId())===o&&e._getMap().isSourceLoaded(o)&&(t=n._getSourceDataEventCacheKey())!==n.sourceDataEventCacheKey&&(n._setAccessibleIndicator(),n.sourceDataEventCacheKey=t)})))},Pu.prototype.onRemove=function(){var t;this.options.createIndicators&&(this.map.events.remove("idle",this._setAccessibleIndicator),this.map.events.remove("moveend",this._setAccessibleIndicator),(t=this._getDataSource())?this.map.events.remove("dataadded",t,this._setAccessibleIndicator):this.map.events.remove("sourcedata",this._setAccessibleIndicator)),_u.prototype.onRemove.call(this)},Pu.prototype._getSourceDataEventCacheKey=function(){var t;if(this.map)return t=this.map.getServiceOptions().mapConfiguration,Ou(Ou([],Su(this.map.getCamera().bounds),!1),[this.map.getCamera().zoom,this.map.getCamera().pitch,this.map.getStyle().style,t instanceof Object?t.id:t],!1).join(",")},Pu.prototype._getDataSource=function(){var t="string"==typeof this.options.source?this.map.sources.getById(this.options.source):this.options.source;if(t instanceof kl)return t},Pu.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof L?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"circle-color":this.options.color,"circle-blur":this.options.blur,"circle-opacity":this.options.opacity,"circle-stroke-color":this.options.strokeColor,"circle-stroke-opacity":this.options.strokeOpacity,"circle-stroke-width":this.options.strokeWidth,"circle-pitch-alignment":this.options.pitchAlignment,"circle-radius":this.options.radius},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},Pu.prototype._getLayerIds=function(){return[this.id]},Pu.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof L?t.add(this.options.source.getId()):t.add(this.options.source),t},Pu.prototype.getFirstCoordinate=function(t){return Array.isArray(t[0])?this.getFirstCoordinate(t[0]):t},Pu);function Pu(t,e,o){var n=_u.call(this,e)||this;return n.accessibleIndicator=[],n._setAccessibleIndicator=function(){return bu(n,void 0,void 0,function(){var e,c,l,u,p,h,d=this;return xu(this,function(t){return this.accessibleIndicator.forEach(function(t){return t.remove()}),this.accessibleIndicator=[],e=this.map.layers.getRenderedShapes(this.map.getCamera().bounds,this),c=this.options.accessibilityIdKey||(this._getDataSource()?w._shapeIdPropName:void 0),l=function(e,o){var n=e[o],r=n instanceof w?n.toJson():n,i=new ml({positionInSet:o+1,setSize:e.length}),s=i.getElement(),a=Su(d.map.positionsToPixels([d.getFirstCoordinate(r.geometry.coordinates)]),1)[0];return s.addEventListener("focusin",function(t){d.accessibleIndicator.filter(function(t){return t!==i}).forEach(function(t){return t.remove()}),0<=o-1&&u(i,l(e,o-1)),o+1<e.length&&h(l(e,o+1)),2<=o&&o==e.length-1&&p(l(e,0)),0==o&&2<=e.length&&h(l(e,e.length-1)),void 0!==c&&d.map._getMap().setPaintProperty(d.id,"circle-stroke-color",["case",["==",["get",c],r.properties[c]],"#000000",d.options.strokeColor]);t={target:s,type:"focusin",map:d.map,shape:n,originalEvent:t,pixel:a};d._invokeEvent("focusin",t)}),s.addEventListener("focusout",function(t){void 0!==c&&d.map._getMap().setPaintProperty(d.id,"circle-stroke-color",["case",["==",["get",c],r.properties[c]],d.options.strokeColor,d.options.strokeColor]);t={target:s,type:"focusout",map:d.map,shape:n,originalEvent:t,pixel:a};d._invokeEvent("focusout",t)}),d.accessibleIndicator.push(i),i},u=function(t,e){e.attach(d.map);e=e.getElement(),t=t.getElement();t.parentElement.insertBefore(e,t)},p=function(t){t.attach(d.map);var t=t.getElement(),e=t.parentElement;e.insertBefore(t,e.firstElementChild)},h=function(t){t.attach(d.map)},0<e.length&&h(l(e,0)),1<e.length&&h(l(e,e.length-1)),[2]})})},n.options=(new gu).merge(P(o,gu._cloneCustomizer)),n.options.source=t||n.options.source,n}(window&&window.__extends||(Lu=function(t,e){return(Lu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Lu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Au,ku=s),Au._cloneCustomizer=function(t){if(t instanceof L)return t};var Lu,ku,Mu=Au;function Au(){var t=null!==ku&&ku.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color=["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],t.intensity=1,t.opacity=1,t.radius=30,t.weight=1,t}(window&&window.__extends||(Eu=function(t,e){return(Eu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Eu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Iu,ju=M),Iu.prototype.getOptions=function(){return P(this.options,Mu._cloneCustomizer)},Iu.prototype.getSource=function(){return this.options.source},Iu.prototype.setOptions=function(t){t=(new Mu).merge(this.options,P(t,Mu._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("heatmap-color",t.color,this.options.color),this._updatePaintProperty("heatmap-intensity",t.intensity,this.options.intensity),this._updatePaintProperty("heatmap-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("heatmap-radius",t.radius,this.options.radius),this._updatePaintProperty("heatmap-weight",t.weight,this.options.weight)}this.options=t},Iu.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof L?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"heatmap-color":this.options.color,"heatmap-intensity":this.options.intensity,"heatmap-opacity":this.options.opacity,"heatmap-radius":this.options.radius,"heatmap-weight":this.options.weight},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},Iu.prototype._getLayerIds=function(){return[this.id]},Iu.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof L?t.add(this.options.source.getId()):t.add(this.options.source),t};var Eu,ju,Tn=Iu;function Iu(t,e,o){e=ju.call(this,e)||this;return e.options=(new Mu).merge(P(o,Mu._cloneCustomizer)),e.options.source=t||e.options.source,e}(window&&window.__extends||(Tu=function(t,e){return(Tu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Tu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Du,zu=s);var Tu,zu,No=Du;function Du(){var t=null!==zu&&zu.apply(this,arguments)||this;return t.contrast=0,t.fadeDuration=300,t.hueRotation=0,t.maxBrightness=1,t.minBrightness=0,t.opacity=1,t.saturation=0,t}(window&&window.__extends||(Ru=function(t,e){return(Ru=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ru(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Nu,Bu=No),Nu._cloneCustomizer=function(t){if(t instanceof L)return t};var Ru,Bu,Fu=Nu;function Nu(){var t=null!==Bu&&Bu.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}(window&&window.__extends||(Zu=function(t,e){return(Zu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Zu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Uu,qu=M),Uu.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},Uu.prototype.onAdd=function(t){qu.prototype.onAdd.call(this,t)};var Zu,qu,Hu=Uu;function Uu(){return null!==qu&&qu.apply(this,arguments)||this}(window&&window.__extends||(Wu=function(t,e){return(Wu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Wu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Vu,Gu=Hu),Vu.prototype.getOptions=function(){return P(this.options,Fu._cloneCustomizer)},Vu.prototype.setOptions=function(t){var e,o=(new Fu).merge(this.options,P(t,Fu._cloneCustomizer)),n="string"==typeof t.url&&t.url!==this.getOptions().url,t=void 0!==t.coordinates&&t.coordinates!==this.getOptions().coordinates;this.map&&(this._updateBaseProperties(o,this.options),this._updatePaintProperty("raster-contrast",o.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",o.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",o.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",o.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",o.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",o.saturation,this.options.saturation),e=this.map._getMap().getSource(this._getSourceId()))&&e.updateImage(o),this.options=o,n?this.reloadImage():t&&this.updateTransform()},Vu.prototype.getPositions=function(e){return this.transform.then(function(t){return t.toTarget(e)})},Vu.prototype.getPixels=function(e){return this.transform.then(function(t){return t.toSource(e)})},Vu.getCoordinatesFromRefPoints=function(t,e,o,n){return new sl(o,n).toTarget([[0,0],[t,0],[t,e],[0,e]])},Vu.getCoordinatesFromEdges=function(t,e,o,n,r){"number"!=typeof r&&(r=0);e=[Math.min(n,o),e,Math.max(n,o),t],n=S.getCenter(e);return _c([S.getNorthWest(e),S.getNorthEast(e),S.getSouthEast(e),S.getSouthWest(e)],n,r)},Vu.prototype._buildLayers=function(){var t={id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-opacity":this.options.opacity,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-min":this.options.minBrightness,"raster-brightness-max":this.options.maxBrightness,"raster-saturation":this.options.saturation,"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),[t]},Vu.prototype._getLayerIds=function(){return[this.id]},Vu.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},Vu.prototype._getSourceId=function(){return"".concat(this.getId(),"-ImageSource")},Vu.prototype.reloadImage=function(){var o=this;this.options.url&&(this.transform=new Promise(function(e,t){o.img.onload=function(){var t=[[0,0],[o.img.width,0],[o.img.width,o.img.height],[0,o.img.height]];e(new sl(t,o.options.coordinates)),o.isLoading=!1},o.img.onerror=o.img.onabort=function(){t("Failed to load image")},o.isLoading=!0,o.img.src=o.options.url}))},Vu.prototype.updateTransform=function(){var t;this.isLoading||(t=[[0,0],[this.img.width,0],[this.img.width,this.img.height],[0,this.img.height]],this.transform=Promise.resolve(new sl(t,this.options.coordinates)))},Vu.prototype._getSourceWrapper=function(){var t=this._getSourceId(),e=this._buildSource();return new Gl(t,e)};var Wu,Gu,Fo=Vu;function Vu(t,e){e=Gu.call(this,e)||this;return e.isLoading=!1,e.options=(new Fu).merge(P(t,Fu._cloneCustomizer)),e.img=new Image,e.reloadImage(),e}(window&&window.__extends||(Ku=function(t,e){return(Ku=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ku(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))($u,Yu=s);var Ku,Yu,Ju=$u;function $u(){var t=null!==Yu&&Yu.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.lineCap="round",t.lineJoin="round",t.blur=0,t.strokeColor="#1E90FF",t.strokeDashArray=void 0,t.strokeGradient=void 0,t.offset=0,t.strokeOpacity=1,t.translate=new Ba(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var Xu,Qu,Do=window&&window.__extends||(Xu=function(t,e){return(Xu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Xu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),tp=window&&window.__assign||function(){return(tp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ep=(Do(op,Qu=M),op.prototype.getOptions=function(){return P(this.options,Ju._cloneCustomizer)},op.prototype.getSource=function(){return this.options.source},op.prototype.setOptions=function(t){t=(new Ju).merge(this.options,P(t,Ju._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("line-blur",t.blur,this.options.blur),this._updateLayoutProperty("line-cap",t.lineCap,this.options.lineCap),this._updateLayoutProperty("line-join",t.lineJoin,this.options.lineJoin),this._updatePaintProperty("line-offset",t.offset,this.options.offset),this._updatePaintProperty("line-color",t.strokeColor,this.options.strokeColor),this._updatePaintProperty("line-dasharray",t.strokeDashArray,this.options.strokeDashArray),this._updatePaintProperty("line-gradient",t.strokeGradient,this.options.strokeGradient),this._updatePaintProperty("line-opacity",t.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("line-width",t.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("line-translate",t.translate,this.options.translate),this._updatePaintProperty("line-translate-anchor",t.translateAnchor,this.options.translateAnchor)}this.options=t},op.prototype._buildLayers=function(){return[tp(tp(tp(tp({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof L?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none","line-cap":this.options.lineCap,"line-join":this.options.lineJoin},paint:tp(tp(tp({"line-blur":this.options.blur,"line-color":this.options.strokeColor},this.options.strokeDashArray?{"line-dasharray":this.options.strokeDashArray}:{}),this.options.strokeGradient?{"line-gradient":this.options.strokeGradient}:{}),{"line-offset":this.options.offset,"line-opacity":this.options.strokeOpacity,"line-translate":this.options.translate,"line-translate-anchor":this.options.translateAnchor,"line-width":this.options.strokeWidth})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},op.prototype._getLayerIds=function(){return[this.id]},op.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof L?t.add(this.options.source.getId()):t.add(this.options.source),t},op);function op(t,e,o){e=Qu.call(this,e)||this;return e.options=(new Ju).merge(P(o,Ju._cloneCustomizer)),e.options.source=t||e.options.source,e}(window&&window.__extends||(np=function(t,e){return(np=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}np(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(sp,rp=s);var np,rp,ip=sp;function sp(){var t=null!==rp&&rp.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.base=0,t.fillColor="#1E90FF",t.height=0,t.fillOpacity=1,t.fillPattern=void 0,t.translate=new Ba(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var ap,cp,jt=window&&window.__extends||(ap=function(t,e){return(ap=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ap(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),lp=window&&window.__assign||function(){return(lp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Nt=(jt(up,cp=M),up.prototype.getOptions=function(){return P(this.options,ip._cloneCustomizer)},up.prototype.getSource=function(){return this.options.source},up.prototype.setOptions=function(t){t=(new ip).merge(this.options,P(t,ip._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("fill-extrusion-base",t.base,this.options.base),this._updatePaintProperty("fill-extrusion-color",t.fillColor,this.options.fillColor),this._updatePaintProperty("fill-extrusion-height",t.height,this.options.height),this._updatePaintProperty("fill-extrusion-opacity",t.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-extrusion-pattern",t.fillPattern,this.options.fillPattern),this._updatePaintProperty("fill-extrusion-translate",t.translate,this.options.translate),this._updatePaintProperty("fill-extrusion-translate-anchor",t.translateAnchor,this.options.translateAnchor),this._updatePaintProperty("fill-extrusion-vertical-gradient",t.verticalGradient,this.options.verticalGradient)}this.options=t},up.prototype._buildLayers=function(){return[lp(lp(lp(lp({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof L?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:lp(lp({"fill-extrusion-base":this.options.base,"fill-extrusion-height":this.options.height,"fill-extrusion-opacity":this.options.fillOpacity},this.options.fillPattern?{"fill-extrusion-pattern":this.options.fillPattern}:{"fill-extrusion-color":this.options.fillColor}),{"fill-extrusion-translate":this.options.translate,"fill-extrusion-translate-anchor":this.options.translateAnchor,"fill-extrusion-vertical-gradient":this.options.verticalGradient})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},up.prototype._getLayerIds=function(){return[this.id]},up.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof L?t.add(this.options.source.getId()):t.add(this.options.source),t},up);function up(t,e,o){e=cp.call(this,e)||this;return e.options=(new ip).merge(P(o,ip._cloneCustomizer)),e.options.source=t||e.options.source,e}(window&&window.__extends||(pp=function(t,e){return(pp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}pp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(fp,hp=s);var pp,hp,dp=fp;function fp(){var t=null!==hp&&hp.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=void 0,t}(window&&window.__extends||(yp=function(t,e){return(yp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}yp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(vp,mp=M),vp.prototype.getOptions=function(){return P(this.options,dp._cloneCustomizer)},vp.prototype.getSource=function(){return this.options.source},vp.prototype.setOptions=function(t){t=(new dp).merge(this.options,P(t,dp._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("fill-color",t.fillColor,this.options.fillColor),this._updatePaintProperty("fill-opacity",t.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-pattern",t.fillPattern,this.options.fillPattern)}this.options=t},vp.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof L?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"fill-opacity":this.options.fillOpacity},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),this.options.fillPattern?t.paint["fill-pattern"]=this.options.fillPattern:t.paint["fill-color"]=this.options.fillColor,[t]},vp.prototype._getLayerIds=function(){return[this.id]},vp.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof L?t.add(this.options.source.getId()):t.add(this.options.source),t};var yp,mp,gp=vp;function vp(t,e,o){e=mp.call(this,e)||this;return e.options=(new dp).merge(P(o,dp._cloneCustomizer)),e.options.source=t||e.options.source,e}(window&&window.__extends||(wp=function(t,e){return(wp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}wp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(xp,_p=t);var wp,_p,bp=xp;function xp(){var t=null!==_p&&_p.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new Ba(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}(window&&window.__extends||(Sp=function(t,e){return(Sp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Sp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Pp,Op=t);var Sp,Op,Cp=Pp;function Pp(){var t=null!==Op&&Op.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="center",t.textField=void 0,t.font=["StandardFont-Regular"],t.ignorePlacement=!1,t.justify="center",t.offset=new Ba(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.radialOffset=void 0,t.rotation=0,t.rotationAlignment="auto",t.variableAnchor=void 0,t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}(window&&window.__extends||(Lp=function(t,e){return(Lp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Lp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ap,kp=s);var Lp,kp,Mp=Ap;function Ap(){var t=null!==kp&&kp.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new bp,t.textOptions=new Cp,t.placement="point",t.sortKey=void 0,t.zOrder="auto",t.lineSpacing=250,t}var Ep,jp,Ut=window&&window.__extends||(Ep=function(t,e){return(Ep=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ep(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ip=window&&window.__assign||function(){return(Ip=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Tp=(Ut(zp,jp=M),zp.prototype.getOptions=function(){return P(this.options,Mp._cloneCustomizer)},zp.prototype.getSource=function(){return this.options.source},zp.prototype.setOptions=function(t){t=(new Mp).merge(this.options,P(t,Mp._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);var e=this.options,o=t.iconOptions,n=e.iconOptions,r=t.textOptions,i=e.textOptions;this._updateBaseProperties(t,e),this._updateLayoutProperty("symbol-spacing",t.lineSpacing,e.lineSpacing),this._updateLayoutProperty("symbol-placement",t.placement,e.placement),this._updateLayoutProperty("symbol-sort-key",t.sortKey,e.sortKey),this._updateLayoutProperty("symbol-z-order",t.zOrder,e.zOrder),this._updateLayoutProperty("icon-allow-overlap",o.allowOverlap,n.allowOverlap),this._updateLayoutProperty("icon-anchor",o.anchor,n.anchor),this._updateLayoutProperty("icon-ignore-placement",o.ignorePlacement,n.ignorePlacement),this._updateLayoutProperty("icon-image",o.image,n.image),this._updateLayoutProperty("icon-offset",o.offset,n.offset),this._updatePaintProperty("icon-opacity",o.opacity,n.opacity),this._updateLayoutProperty("icon-optional",o.optional,n.optional),this._updateLayoutProperty("icon-padding",o.padding,n.padding),this._updateLayoutProperty("icon-pitch-alignment",o.pitchAlignment,n.pitchAlignment),this._updateLayoutProperty("icon-rotate",o.rotation,n.rotation),this._updateLayoutProperty("icon-rotation-alignment",o.rotationAlignment,n.rotationAlignment),this._updateLayoutProperty("icon-size",o.size,n.size),this._updateLayoutProperty("text-allow-overlap",r.allowOverlap,i.allowOverlap),this._updateLayoutProperty("text-anchor",r.anchor,i.anchor),this._updatePaintProperty("text-color",r.color,i.color),this._updateLayoutProperty("text-font",r.font,i.font),this._updateLayoutProperty("text-ignore-placement",r.ignorePlacement,i.ignorePlacement),this._updateLayoutProperty("text-justify",r.justify,i.justify),this._updatePaintProperty("text-halo-blur",r.haloBlur,i.haloBlur),this._updatePaintProperty("text-halo-color",r.haloColor,i.haloColor),this._updatePaintProperty("text-halo-width",r.haloWidth,i.haloWidth),this._updateLayoutProperty("text-offset",r.offset,i.offset),this._updatePaintProperty("text-opacity",r.opacity,i.opacity),this._updateLayoutProperty("text-optional",r.optional,i.optional),this._updateLayoutProperty("text-padding",r.padding,i.padding),this._updateLayoutProperty("text-pitch-alignment",r.pitchAlignment,i.pitchAlignment),this._updateLayoutProperty("text-radial-offset",r.radialOffset,i.radialOffset),this._updateLayoutProperty("text-rotate",r.rotation,i.rotation),this._updateLayoutProperty("text-rotation-alignment",r.rotationAlignment,i.rotationAlignment),this._updateLayoutProperty("text-size",r.size,i.size),this._updateLayoutProperty("text-variable-anchor",r.variableAnchor,i.variableAnchor),this._updateLayoutProperty("text-field",r.textField,i.textField)}this.options=t},zp.prototype._buildLayers=function(){var t=Ip(Ip(Ip(Ip({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof L?this.options.source.getId():this.options.source,layout:Ip(Ip({visibility:this.options.visible?"visible":"none","symbol-placement":this.options.placement,"symbol-spacing":this.options.lineSpacing,"symbol-z-order":this.options.zOrder,"text-allow-overlap":this.options.textOptions.allowOverlap,"text-anchor":this.options.textOptions.anchor},this.options.textOptions.textField&&{"text-field":this.options.textOptions.textField}),{"text-font":this.options.textOptions.font,"text-ignore-placement":this.options.textOptions.ignorePlacement,"text-justify":this.options.textOptions.justify,"text-offset":this.options.textOptions.offset,"text-optional":this.options.textOptions.optional,"text-padding":this.options.textOptions.padding,"text-pitch-alignment":this.options.textOptions.pitchAlignment,"text-rotate":this.options.textOptions.rotation,"text-rotation-alignment":this.options.textOptions.rotationAlignment,"text-size":this.options.textOptions.size,"icon-allow-overlap":this.options.iconOptions.allowOverlap,"icon-anchor":this.options.iconOptions.anchor,"icon-ignore-placement":this.options.iconOptions.ignorePlacement,"icon-image":this.options.iconOptions.image,"icon-offset":this.options.iconOptions.offset,"icon-optional":this.options.iconOptions.optional,"icon-padding":this.options.iconOptions.padding,"icon-pitch-alignment":this.options.iconOptions.pitchAlignment,"icon-rotate":this.options.iconOptions.rotation,"icon-rotation-alignment":this.options.iconOptions.rotationAlignment,"icon-size":this.options.iconOptions.size}),paint:{"text-color":this.options.textOptions.color,"text-halo-blur":this.options.textOptions.haloBlur,"text-halo-color":this.options.textOptions.haloColor,"text-halo-width":this.options.textOptions.haloWidth,"text-opacity":this.options.textOptions.opacity,"icon-opacity":this.options.iconOptions.opacity}}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom});return void 0!==this.options.sortKey&&(t.layout["symbol-sort-key"]=this.options.sortKey),void 0!==this.options.textOptions.radialOffset&&(t.layout["text-radial-offset"]=this.options.textOptions.radialOffset),void 0!==this.options.textOptions.variableAnchor&&(t.layout["text-variable-anchor"]=this.options.textOptions.variableAnchor),[t]},zp.prototype._getLayerIds=function(){return[this.id]},zp.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof L?t.add(this.options.source.getId()):t.add(this.options.source),t},zp);function zp(t,e,o){e=jp.call(this,e)||this;return e.options=(new Mp).merge(P(o,Mp._cloneCustomizer)),e.options.source=t||e.options.source,e}var Dp,Rp,ar=window&&window.__extends||(Dp=function(t,e){return(Dp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Dp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Bp=window&&window.__assign||function(){return(Bp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Fp=(ar(Np,Rp=L),Np.prototype._buildSource=function(){return this.source},Np.prototype._isDeepEqual=function(t){var o,e,n,r;return this.constructor===t.constructor&&(r=this.source,o=t.source,t=r.type===o.type&&r.url===o.url&&(void 0===r.tiles&&void 0===o.tiles||r.tiles&&o.tiles&&r.tiles.length===o.tiles.length&&r.tiles.every(function(t,e){return t===o.tiles[e]}))&&r.minzoom===o.minzoom&&r.maxzoom===o.maxzoom&&r.bounds===o.bounds&&r.attribution===o.attribution,e="raster"!==r.type||"raster"===r.type&&r.type===o.type&&r.tileSize===o.tileSize&&r.scheme===o.scheme,n="raster-dem"!==r.type||"raster-dem"===r.type&&r.type===o.type&&r.tileSize===o.tileSize&&r.encoding===o.encoding,r="vector"!==r.type||"vector"===r.type&&r.type===o.type&&r.promoteId===o.promoteId&&r.scheme===o.scheme,t)&&e&&n&&r},Np.prototype._modifySource=function(t,e){if("raster"!==t.type&&"raster-dem"!==t.type&&"vector"!==t.type||!t.tiles){if("raster"!==t.type&&"raster-dem"!==t.type&&"vector"!==t.type||!t.url)throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");t.url="string"==typeof t.url?t.url:new ct({domain:H,path:t.url.path,queryParams:Bp(Bp({},e),t.url.queryParams)}).toString()}else{var o=t.tiles.map(function(t){return"string"==typeof t?t:new ct({domain:H,path:t.path,queryParams:Bp(Bp({},e),t.queryParams)}).toString()});t.tiles=o}return t},Np);function Np(t,e,o){t=Rp.call(this,t)||this;return t.source=t._modifySource(e,o),t}(window&&window.__extends||(Zp=function(t,e){return(Zp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Zp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Up,qp=No);var Zp,qp,Hp=Up;function Up(){var t=null!==qp&&qp.apply(this,arguments)||this;return t.bounds=[-180,-85.0511,180,85.0511],t.minSourceZoom=0,t.maxSourceZoom=22,t.tileSize=512,t.isTMS=!1,t.subdomains=void 0,t.tileUrl=void 0,t}var Wp,Gp,Gt=window&&window.__extends||(Wp=function(t,e){return(Wp=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Wp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Vp=window&&window.__assign||function(){return(Vp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Kp=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yp=(Gt(Jp,Gp=Hu),Jp.prototype.getOptions=function(){return P(this.options,Hp._cloneCustomizer)},Jp.prototype.setOptions=function(t){t=(new Hp).merge(this.options,P(t,Hp._cloneCustomizer));if(this.map){if(!Ca(t.bounds,this.options.bounds)||t.isTMS!==this.options.isTMS||t.maxSourceZoom!==this.options.maxSourceZoom||t.minSourceZoom!==this.options.minSourceZoom||!Ca(t.subdomains,this.options.subdomains)||t.tileSize!==this.options.tileSize||t.tileUrl!==this.options.tileUrl)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("raster-contrast",t.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",t.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",t.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",t.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",t.saturation,this.options.saturation)}this.options=t},Jp.prototype._setOptionsNoUpdate=function(t){this.options=(new Hp).merge(this.options,P(t,Hp._cloneCustomizer))},Jp.prototype._buildLayers=function(){return[Vp(Vp({id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-max":this.options.maxBrightness,"raster-brightness-min":this.options.minBrightness,"raster-opacity":this.options.opacity,"raster-saturation":this.options.saturation}},this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},Jp.prototype._getLayerIds=function(){return[this.id]},Jp.prototype._buildSource=function(){var e,t;if(this.options.tileUrl){if(-1===this.options.tileUrl.indexOf("{"))return{type:"raster",url:this.options.tileUrl};if(-1!==this.options.tileUrl.indexOf("{subdomain}")){if(!(this.options.subdomains&&0<this.options.subdomains.length))throw new Error("The {subdomain} placeholder was included in the tileUrl but no subdomains were specified");var o=[];try{for(var n=Kp(this.options.subdomains),r=n.next();!r.done;r=n.next()){var i=r.value;o.push(this.options.tileUrl.replace(/{subdomain}/g,i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}t=o}else t=[this.options.tileUrl]}return Vp({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},t&&{tiles:t})},Jp.prototype._getSourceId=function(){return"".concat(this.getId(),"-RasterSource")},Jp.prototype._getSourceWrapper=function(){var t=this._getSourceId(),e=this._buildSource();return new Fp(t,{name:t,tiles:e.tiles,type:e.type,url:e.url})},Jp);function Jp(t,e){e=Gp.call(this,e)||this;return t&&e.setOptions(t),e}(window&&window.__extends||($p=function(t,e){return($p=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}$p(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(th,Xp=s);var $p,Xp,Qp=th;function th(){var t=null!==Xp&&Xp.apply(this,arguments)||this;return t.renderer=void 0,t}(window&&window.__extends||(eh=function(t,e){return(eh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}eh(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(rh,oh=M),rh.prototype.getOptions=function(){return P(this.options,Qp._cloneCustomizer)},rh.prototype.setOptions=function(t){t=(new Qp).merge(this.options,P(t,Qp._cloneCustomizer));this.map&&this.map.triggerRepaint(),this.options=t},rh.prototype.onAdd=function(t){var e,o;oh.prototype.onAdd.call(this,t),this.map.events.add("stylechanged",this._onStyleChange),this.options.renderer&&this.glContext&&null!=(o=(e=this.options.renderer).onAdd)&&o.call(e,t,this.glContext)},rh.prototype.onRemove=function(){var t,e;this.options.renderer&&this.glContext&&null!=(e=(t=this.options.renderer).onRemove)&&e.call(t,this.map,this.glContext),this.map.events.remove("stylechanged",this._onStyleChange),this.glContext=null,oh.prototype.onRemove.call(this)},rh.prototype._buildLayers=function(){var r=this;if(this.options.renderer)return[{id:this.id,type:"custom",renderingMode:this.options.renderer.renderingMode,onAdd:function(t,e){r.glContext=e},onRemove:function(t,e){},prerender:function(t,e){var o,n;r._shouldRender()&&null!=(n=(o=r.options.renderer).prerender)&&n.call(o,t,e)},render:function(t,e){r._shouldRender()&&r.options.renderer.render(t,e)}}];throw new Error("Cannot build the WebGL layer because renderer was not set.")},rh.prototype._getLayerIds=function(){return[this.id]},rh.prototype._getSourceIds=function(){return(new Set).add(this.source.getId())},rh.prototype._shouldRender=function(){var t;return!!this.map&&(t=this.map.getCamera().zoom,this.options.visible)&&this.options.minZoom<=t&&this.options.maxZoom>t};var eh,oh,nh=rh;function rh(t,e){var o=oh.call(this,t)||this;return o._onStyleChange=function(){var t,e;o.map._getMap().getLayer(o.id)||(t=o.map,e=null==(e=o.map.layers._getUserLayers().find(function(t){return t.layer.getId()==o.id}))?void 0:e.before,t.layers.remove(o),t.layers.add(o,e))},o.options=(new Qp).merge(P(e,Qp._cloneCustomizer)),o.source=new kl,o}var br=Object.freeze({__proto__:null,BubbleLayer:Cu,HeatMapLayer:Tn,ImageLayer:Fo,Layer:M,LineLayer:ep,PolygonExtrusionLayer:Nt,PolygonLayer:gp,SymbolLayer:Tp,TileLayer:Yp,WebGLLayer:nh}),ih=(sh.convertHtmlString=function(t){var e;return"string"==typeof t?((e=document.createElement("div")).innerHTML=t,e):t},sh.parseWithFilter=function(t,e,o,n){var r=this;if(void 0===e&&(e=function(t){return!0}),void 0===o&&(o=function(t){return t}),void 0===n&&(n=function(){return document.createElement("div")}),"string"==typeof t){var i=(new DOMParser).parseFromString(t,"text/html").body;if(0==i.children.length)return o(i.innerHTML);var s,i=1==i.children.length&&1==i.childNodes.length?i.children[0]:(s=n(),Array.from(i.childNodes).map(function(t){return s.append(t)}),s)}else i=t;return Array.from(i.children).forEach(function(t){return r.parseWithFilter(t,e,o)}),e(i)?o(i):(i.parentNode&&i.parentNode.removeChild(i),null)},sh);function sh(){}var ah=jo,ch=zi;var lh,uh,ph=Vt(function(t){return ah(t)&&1===t.nodeType&&!ch(t)}),hh=((window&&window.__extends||(lh=function(t,e){return(lh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}lh(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(dh,uh=t),dh._cloneCustomizer=function(t){if(ph(t))return t},dh);function dh(){var t=null!==uh&&uh.apply(this,arguments)||this;return t.anchor="none",t.draggable=!1,t.closeButton=!0,t.content=document.createElement("span"),t.fillColor="#FFFFFF",t.pixelOffset=new Ba(0,0),t.position=new Dc(0,0),t.showPointer=!0,t}var fh,yh,ze=window&&window.__extends||(fh=function(t,e){return(fh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}fh(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),mh=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},gh=(ze(A,yh=_t),A.prototype.setPopupOptions=function(t){this.setOptions(t)},A.prototype.setOptions=function(t){var e,t=(new hh).merge(this.options,P(t,hh._cloneCustomizer));t.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(t),this.contentDiv.prepend(this.htmlContent)):t.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,t.draggable),t.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn),e=_("close"),this.contentDiv.appendChild(e),b(e,this.closeBtn,!0)):!t.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn),t.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!t.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv),t.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=t.fillColor,this.contentDiv.style.backgroundColor=t.fillColor),this.marker&&(t.anchor!==this.options.anchor?"none"===this.options.anchor?(this.autoAnchor!==t.anchor&&this._replaceMarker(this.map,t),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,t),"none"===t.anchor&&this.map.events.add("move",this._onMove)):(Ca(t.position,this.options.position)||this.marker.setLngLat(t.position),Ca(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset))),this.options=t},A.prototype.getPopupOptions=function(){return this.getOptions()},A.prototype.getOptions=function(){return P(this.options,hh._cloneCustomizer)},A.prototype.getPopupContainer=function(){return this.containerDiv},A.prototype._dragToPixel=function(t){this.dragging||(this.dragging=!0,this.contentDiv.style.pointerEvents="none",this._invokeEvent("dragstart",{type:"dragstart",target:this}));t=[t[0]+this.dragOffset[0],t[1]+this.dragOffset[1]],t=mh(this.map.pixelsToPositions([t]),1)[0];this.options.position=t,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},A.prototype._onUp=function(){this.dragging&&(this.contentDiv.style.pointerEvents="",this._invokeEvent("dragend",{type:"dragend",target:this}),"none"===this.options.anchor)&&this._onMove(),delete this.dragOffset,delete this.dragging},A.prototype._createContainerDiv=function(t){var e=this,o=document.createElement("div"),n=(o.classList.add(A.Css.container),o.classList.add(A.Css.hidden),o.style.borderColor=t.fillColor,o.setAttribute("role","dialog"),o.setAttribute("aria-label","Map Information Window"),!1);return o.addEventListener("keydown",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(n=!0)}),o.addEventListener("keyup",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(n=!1)}),o.addEventListener("focusin",function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement)&&t.target.focus()}),o.addEventListener("focusout",function(t){n&&t.relatedTarget instanceof Node&&!o.contains(t.relatedTarget)&&(n=!1,e.isOpen())&&e.close()}),o},A.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(A.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},A.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(A.Css.arrow),t},A.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(A.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("tabindex","0"),t.innerHTML="×",t},A.prototype._createHtmlContent=function(t){var e=ih.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},A.prototype._createMarker=function(t,e){var o=this.marker?this.marker.getLngLat():t.position,e=("none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new D.Marker({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset})):(this.containerDiv.classList.add(t.anchor),new D.Marker({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}))).setLngLat(o);return e},A.prototype._getAutoAnchor=function(t,e){var o,n,r=this.containerDiv.offsetWidth,i=this.containerDiv.offsetHeight,s=[];return(n=this.marker?(o=(n=t._getMap().project(this.marker.getLngLat())).x,n.y):(n=mh(t.positionsToPixels([e.position]),1),o=(e=mh(n[0],2))[0],e[1]))<i?s.push("top"):n>t.getCanvas().offsetHeight-i&&s.push("bottom"),o<r/2?s.push("left"):o>t.getCanvas().offsetWidth-r/2&&s.push("right"),0<s.length?s.join("-"):"bottom"},A.prototype._replaceMarker=function(t,e,o){var n=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,o),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,n||null)},A.prototype._setDraggable=function(t,e){e?(t.addEventListener("mousedown",this._onDown),t.addEventListener("touchstart",this._onDown),t.addEventListener("dragstart",this._onDragStart)):(t.removeEventListener("mousedown",this._onDown),t.removeEventListener("touchstart",this._onDown),t.removeEventListener("dragstart",this._onDragStart))},A.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},A);function A(t){var o=yh.call(this)||this;return o.attach=function(t){o.map!==t&&(o.map&&o.remove(),o.map=t,o.marker=o._createMarker(o.options),o.marker.addTo(o.map._getMap()),o.map.popups._getCollectionDiv().appendChild(o.containerDiv),o.map.popups.add(o))},o.open=function(t){if(!t&&!o.map)throw new Error("Must specify a map to open on or attach to a map in advance");o.attach(t||o.map),o.containerDiv.classList.remove(A.Css.hidden),o.map.events.add("move",o._onMove),o._onMove(),o._invokeEvent("open",{target:o,type:"open"})},o.close=function(){o.map&&o.map.events.remove("move",o._onMove),o.containerDiv.classList.add(A.Css.hidden),o._invokeEvent("close",{target:o,type:"close"})},o.remove=function(){o.map&&(o.marker.remove(),o.containerDiv.classList.remove(o.autoAnchor||o.options.anchor),o.map.events.remove("move",o._onMove),o.map.popups.remove(o),delete o.map,delete o.marker,delete o.autoAnchor)},o.isOpen=function(){return o.map&&!o.containerDiv.classList.contains(A.Css.hidden)},o._onMove=function(){var t=o._getAutoAnchor(o.map,o.options);t!==o.autoAnchor&&(o._replaceMarker(o.map,o.options,t),o.map.events.add("move",o._onMove))},o._onDown=function(t){o.map.popups._addDraggedPopup(o);var e=mh(o.map.positionsToPixels([o.options.position]),1)[0];"mousedown"===t.type?o.dragOffset=[e[0]-t.clientX,e[1]-t.clientY]:"touchstart"===t.type&&(o.dragOffset=[e[0]-t.touches[0].clientX,e[1]-t.touches[0].clientY])},o._onDragStart=function(t){t.preventDefault()},o.options=(new hh).merge(P(t,hh._cloneCustomizer)),o.containerDiv=o._createContainerDiv(o.options),o.contentDiv=o._createContentDiv(o.options),o.containerDiv.appendChild(o.contentDiv),o.options.showPointer&&(o.arrowDiv=o._createArrowDiv(),o.containerDiv.appendChild(o.arrowDiv)),o.options.closeButton&&(o.closeBtn=o._createCloseButton(),o.contentDiv.appendChild(o.closeBtn),t=_("close"),o.contentDiv.appendChild(t),b(t,o.closeBtn,!0)),o}(window&&window.__extends||(vh=function(t,e){return(vh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}vh(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(bh,wh=t),bh._cloneCustomizer=function(t){if(t instanceof gh||ph(t))return t};var vh,wh,_h=bh;function bh(){var t=null!==wh&&wh.apply(this,arguments)||this;return t.anchor="bottom",t.color="#1A73AA",t.draggable=!1,t.htmlContent='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.5 36.5" id="marker_'.concat(Ia(),'" width="24.5" height="36.5" display="block"><path d="M12.25.25a12.2543,12.2543,0,0,0-12,12.4937c0,6.4436,6.4879,12.1093,11.059,22.5641.5493,1.2563,1.3327,1.2563,1.882,0C17.7621,24.8529,24.25,19.1857,24.25,12.7437A12.2543,12.2543,0,0,0,12.25.25Z" fill="{color}" stroke="{secondaryColor}" stroke-width="0.5"/><text style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; fill: white;" text-anchor="middle" x="12" y="18">{text}</text></svg>'),t.pixelOffset=new Ba(0,0),t.position=new Dc(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}(window&&window.__extends||(xh=function(t,e){return(xh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xh(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(E,Sh=_t),E.prototype.getOptions=function(){return P(this.options,_h._cloneCustomizer)},E.prototype.getElement=function(){return this.marker.getElement()},E.prototype.setOptions=function(t){t=(new _h).merge(this.options,P(t,_h._cloneCustomizer));Ca(t.htmlContent,this.options.htmlContent)&&t.anchor===this.options.anchor?("string"!=typeof t.htmlContent||t.color===this.options.color&&t.text===this.options.text&&t.secondaryColor===this.options.secondaryColor||(this.element.innerHTML=this._getSubbedHtmlString(t)||""),t.draggable!==this.options.draggable&&(this._setDraggable(t.draggable),this.marker.setDraggable(t.draggable)),Ca(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset),Ca(t.position,this.options.position)||this.marker.setLngLat(t.position),t.visible!==this.options.visible&&(t.visible?this.element.classList.remove(E.hiddenClass):this.element.classList.add(E.hiddenClass))):(this.marker.remove(),this._buildMarker(t),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=t},E.prototype.togglePopup=function(){if(this.options.popup)if(this.options.popup.isOpen())this.options.popup.close();else{if(!this.map)throw new Error("The marker must be added to a map before calling togglePopup().");this.options.popup.setOptions({position:this.options.position}),this.options.popup.open(this.map)}},E.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=a(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},E.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},E.prototype._getId=function(){if(this.element)return("string"==typeof this.options.htmlContent?this.element.firstChild:this.element).id},E.prototype._buildMarker=function(t){var e;"string"==typeof t.htmlContent?(e=this._getSubbedHtmlString(t)||"",this.element=ih.convertHtmlString(e)):this.element=t.htmlContent,this.element.classList.add(E.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(E.hiddenClass),this.marker=new D.Marker({element:this.element,offset:t.pixelOffset,draggable:t.draggable,anchor:t.anchor}).setLngLat(t.position),this.marker.on("drag",this._onDrag),this.marker.on("dragstart",this._onDragStart),this.marker.on("dragend",this._onDragEnd),this.element.addEventListener("click",this._bubbleElementEvent),this.element.addEventListener("dblclick",this._bubbleElementEvent),this.element.addEventListener("contextmenu",this._bubbleElementEvent),this.element.addEventListener("keydown",this._bubbleElementEvent),this.element.addEventListener("keypress",this._bubbleElementEvent),this.element.addEventListener("keyup",this._bubbleElementEvent),this.element.addEventListener("mousedown",this._bubbleElementEvent),this.element.addEventListener("mouseenter",this._bubbleElementEvent),this.element.addEventListener("mouseleave",this._bubbleElementEvent),this.element.addEventListener("mousemove",this._bubbleElementEvent),this.element.addEventListener("mouseout",this._bubbleElementEvent),this.element.addEventListener("mouseover",this._bubbleElementEvent),this.element.addEventListener("mouseup",this._bubbleElementEvent)},E.prototype._getSubbedHtmlString=function(t){return"string"==typeof t.htmlContent?t.htmlContent.replace(/{color}/gi,t.color||"").replace(/{secondaryColor}/gi,t.secondaryColor||"").replace(/{text}/gi,t.text||""):null},E.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector(".".concat(E.collectionContainerClass));return t||((t=document.createElement("div")).classList.add(E.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},E.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},E.collectionContainerClass="marker-collection-container",E.hiddenClass="hidden-accessible-element",E.containerClass="marker-container";var xh,Sh,Oh=E;function E(t){var e=Sh.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new Dc(t.lng,t.lat),e._invokeEvent("drag",{type:"drag",target:e})},e._onDragStart=function(){e._invokeEvent("dragstart",{type:"dragstart",target:e})},e._onDragEnd=function(){e._invokeEvent("dragend",{type:"dragend",target:e})},e._bubbleElementEvent=function(t){e._invokeEvent(t.type,{type:t.type,target:e})},e._onEleDragStart=function(t){t.preventDefault()},e.options=(new _h).merge(P(t,_h._cloneCustomizer)),e._buildMarker(e.options),e}Ph.parse=function(t){var e=(t=t.toLowerCase()).lastIndexOf("-");return-1!==e?{code:t,language:t.substring(0,e),region:t.substring(e+1)}:{code:t,language:t}};var Ch=Ph;function Ph(){}var Lh={localizationsPath:"locs/mapcontrol/2019-3-12",sensitiveUserRegions:["il","kr","pk","in","cn","ar","bh","eg","jo","sa","kw","om","qa","ma","ae"],locales:{defaultLanguage:{defaultRegion:{code:"NGT",strings:"en/resource.json"},latn:{code:"NGT-Latn",strings:"en/resource.json"}},ar:{defaultRegion:{code:"ar",strings:"ar-sa/resource.json"}},bg:{defaultRegion:{code:"bg-BG",strings:"bg-bg/resource.json"}},cs:{defaultRegion:{code:"cs-CZ",strings:"cs-cz/resource.json"}},da:{defaultRegion:{code:"da-DK",strings:"da-dk/resource.json"}},de:{defaultRegion:{code:"de-DE",strings:"de-de/resource.json"}},el:{defaultRegion:{code:"el-GR",strings:"el-gr/resource.json"}},en:{defaultRegion:{code:"en",strings:"en/resource.json"},us:{code:"en-US",strings:"en/resource.json"},au:{code:"en-AU",strings:"en/resource.json"},gb:{code:"en-GB",strings:"en/resource.json"},nz:{code:"en-NZ",strings:"en/resource.json"}},es:{defaultRegion:{code:"es-ES",strings:"es-es/resource.json"},mx:{code:"es-MX",strings:"es-mx/resource.json"}},fi:{defaultRegion:{code:"fi-FI",strings:"fi-fi/resource.json"}},fr:{defaultRegion:{code:"fr-FR",strings:"fr-fr/resource.json"}},hu:{defaultRegion:{code:"hu-HU",strings:"hu-hu/resource.json"}},id:{defaultRegion:{code:"id-ID",strings:"id-id/resource.json"}},it:{defaultRegion:{code:"it-IT",strings:"it-it/resource.json"}},ko:{defaultRegion:{code:"ko-KR",strings:"ko-kr/resource.json"}},lt:{defaultRegion:{code:"lt-LT",strings:"lt-lt/resource.json"}},ms:{defaultRegion:{code:"ms-MY",strings:"ms-my/resource.json"}},nb:{defaultRegion:{code:"nb-NO",strings:"nb-no/resource.json"}},nl:{defaultRegion:{code:"nl-NL",strings:"nl-nl/resource.json"}},pl:{defaultRegion:{code:"pl-PL",strings:"pl-pl/resource.json"}},pt:{defaultRegion:{code:"pt-PT",strings:"pt-pt/resource.json"},br:{code:"pt-BR",strings:"pt-br/resource.json"}},ru:{defaultRegion:{code:"ru-RU",strings:"ru-ru/resource.json"}},sk:{defaultRegion:{code:"sk-SK",strings:"sk-sk/resource.json"}},sl:{defaultRegion:{code:"sl-SL",strings:"sl-sl/resource.json"}},sv:{defaultRegion:{code:"sv-SE",strings:"sv-se/resource.json"}},th:{defaultRegion:{code:"th-TH",strings:"th-th/resource.json"}},tr:{defaultRegion:{code:"tr-TR",strings:"tr-tr/resource.json"}},zh:{defaultRegion:{code:"zh",strings:"en/resource.json"}},"zh-hans":{defaultRegion:{code:"zh-Hans",strings:"zh-cn/resource.json"},cn:{code:"zh-Hans-CN",strings:"zh-cn/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"en/resource.json"},tw:{code:"zh-Hant-TW",strings:"zh-tw/resource.json"}}}},kh=function(){this.Unknown="Unknown",this.Accident="Accident",this.Fog="Fog",this.Danger="Danger",this.Rain="Rain",this.Ice="Ice",this.Jam="Jam",this.LaneClosed="Lane Closed",this.RoadClosed="Road Closed",this.RoadWorks="Road Works",this.Wind="Wind",this.Flood="Flood",this.Detour="Detour"},Mh=(Ah.getCode=function(t){var e=Ch.parse(t);return-1===Lh.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},Ah.getStrings=function(t){t=this.getLocaleData(t);return Lh.locales.defaultLanguage.defaultRegion.code===t.code?new Promise(function(t){t(new kh)}):new ct({domain:B,path:"".concat(Lh.localizationsPath,"/").concat(t.strings)}).get().then(function(t){return t},function(){return new kh})},Ah.getLocaleData=function(t){if("string"==typeof t&&(t=Ch.parse(t)),Lh.locales[t.code])return Lh.locales[t.code].defaultRegion;var e;if(Lh.locales[t.language])e=Lh.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=Lh.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},Ah);function Ah(){}jh.getEdgeOrIEVersion=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");return 0<e?parseInt(t.substring(e+5,t.indexOf(".",e)),10):0<t.indexOf("Trident/")?(e=t.indexOf("rv:"),parseInt(t.substring(e+3,t.indexOf(".",e)),10)):0<(e=t.indexOf("Edge/"))?parseInt(t.substring(e+5,t.indexOf(".",e)),10):-1},jh.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},jh.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11};var Eh=jh;function jh(){}var Ih,Th,zh,fe=window&&window.__extends||(Ih=function(t,e){return(Ih=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ih(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Dh=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Rh=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Bh=(u.AuthenticationType=void 0,(e=u.AuthenticationType||(u.AuthenticationType={})).subscriptionKey="subscriptionKey",e.aad="aad",e.anonymous="anonymous",e.sas="sas",fe(Fh,Th=t),Fh.prototype.setSubscriptionKey=function(t){this.authType=u.AuthenticationType.subscriptionKey,this.subscriptionKey=t},Fh.prototype.setAadProperties=function(t,e,o,n,r){this.authType=u.AuthenticationType.aad,this.authContext=r||this.authContext,this.aadInstance=n||this.aadInstance,this.clientId=t,this.aadAppId=e,this.aadTenant=o},Fh.prototype.setTokenCallbackFunction=function(t){this.authType=u.AuthenticationType.anonymous,this.getToken=t},Fh.prototype.setSasCallbackFunction=function(t){this.authType=u.AuthenticationType.sas,this.getToken=t},Fh.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=Th.prototype.merge.apply(this,Rh([],Dh(t),!1));return o.authType===u.AuthenticationType.subscriptionKey?o.authContext=o.aadAppId=o.getToken=void 0:o.authType===u.AuthenticationType.aad?o.subscriptionKey=o.getToken=void 0:o.authType===u.AuthenticationType.anonymous?o.subscriptionKey=o.authContext=o.aadAppId=void 0:o.authType===u.AuthenticationType.sas&&(o.authContext=o.subscriptionKey=o.aadAppId=void 0),o},Fh);function Fh(){var t=null!==Th&&Th.apply(this,arguments)||this;return t.authType=void 0,t.subscriptionKey=void 0,t.clientId=void 0,t.aadAppId=void 0,t.aadTenant=void 0,t.aadInstance=void 0,t.getToken=void 0,t.sasToken=void 0,t.authContext=void 0,t}var Nh="NGT",Zh=Ia(),qh=R,Hh=B,Uh=F,Wh=N,Gh=X,Vh=new Bh,Kh=!1,Yh=!1,Jh=!1,$h=!1,Xh=!1,Qh=!1,td=!1,ed=!1,od=!1;function nd(){return Object.assign({},Vh)}function rd(){return Hh}function id(){return qh}function sd(){return Uh}function ad(){return Wh}function cd(){return Gh}function ld(){return D.workerCount}function ud(){return D.maxParallelImageRequests}function pd(){return Nh}function hd(){return Zh}function dd(){return Vh.authType===u.AuthenticationType.subscriptionKey?Vh.subscriptionKey:void 0}function fd(){return zh}function yd(t){Vh=(new Bh).merge(Vh,t),od=!0}function md(t){qh=t,Yh=!0}function gd(t){Uh=t,Jh=!0}function vd(t){0<t&&(D.workerCount=t,Xh=!0)}function wd(t){0<t&&(D.maxParallelImageRequests=t,Qh=!0)}function _d(t){Nh=Mh.getCode(t),td=!0}function bd(t){Zh=t,ed=!0}function xd(t){Vh.setSubscriptionKey(t),od=!0}function Sd(t){zh=t,Kh=!0}function Od(t,e){if(e=Math.abs(e||1),"string"==typeof t&&Id[t.toLowerCase()]){for(var o=Id[t.toLowerCase()],n=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,r=o,i=n.exec(o);i;)r=r.replace(i[0],parseFloat(i[1])*e+""),i=n.exec(o);return r=r.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function Cd(){return od}function Pd(){return Yh}function Ld(){return Jh}function kd(){return Xh}function Md(){return Qh}function Ad(){return td}function Ed(){return ed}function jd(){return Kh}var Id={marker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 26 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><text x="12.5" y="17.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:2"/><text x="12.5" y="18.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-circle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><circle cx="12.5" cy="12.5" r="9" fill="{secondaryColor}"/><text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',pin:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(24 * {scale})" height="calc(28 * {scale})" viewBox="0 0 24 28"><path d="m11.988 16.615a5.15 5.15 0 0 1-2.268-.525 4.909 4.909 0 0 1-2.805-4.442 5.019 5.019 0 0 1 5.072-4.936h.012a5.03 5.03 0 0 1 5.085 4.961 4.907 4.907 0 0 1-.549 2.224 5.114 5.114 0 0 1-4.548 2.718zm0-8.06a3.173 3.173 0 0 0-3.226 3.099 3.081 3.081 0 0 0 1.77 2.782 3.299 3.299 0 0 0 4.365-1.386 3.049 3.049 0 0 0 .342-1.381 3.184 3.184 0 0 0-3.239-3.114h-.012z" fill="{secondaryColor}"/><path d="m11.999.922a10.908 10.908 0 0 0-11.076 10.732 10.639 10.639 0 0 0 4.418 8.598l6.658 6.464 6.658-6.463a10.537 10.537 0 0 0 2.198-15.041 11.182 11.182 0 0 0-8.856-4.289zm1.873 14.341a4.221 4.221 0 0 1-5.589-1.789 3.945 3.945 0 0 1-.445-1.8 4.164 4.164 0 0 1 8.323-.037 4.028 4.028 0 0 1-2.289 3.626Z" fill="{color}"/><path d="m11.999 28-7.256-7.044a11.611 11.611 0 0 1-4.743-9.303 11.844 11.844 0 0 1 11.988-11.652.102 .102 0 0 1 .02 0 12.164 12.164 0 0 1 9.577 4.647 11.357 11.357 0 0 1 2.299 8.614 11.521 11.521 0 0 1-4.63 7.695zm-.01-26.157a9.997 9.997 0 0 0-10.143 9.812 9.769 9.769 0 0 0 4.04 7.853l.099.083 6.014 5.838 6.113-5.922a9.7 9.7 0 0 0 3.945-6.505 9.533 9.533 0 0 0-1.933-7.229 10.305 10.305 0 0 0-8.116-3.931h-.021zm.021 14.772a5.11 5.11 0 0 1-4.547-2.718 4.868 4.868 0 0 1 .932-5.743 5.118 5.118 0 0 1 3.58-1.46h.024a5.031 5.031 0 0 1 5.084 4.938 4.92 4.92 0 0 1-2.805 4.457h0a5.152 5.152 0 0 1-2.269.525zm-.011-8.079h-.015a3.277 3.277 0 0 0-2.295.933 3.029 3.029 0 0 0-.587 3.58 3.297 3.297 0 0 0 4.364 1.386h0a3.092 3.092 0 0 0 1.772-2.795 3.185 3.185 0 0 0-3.239-3.105z" fill="{secondaryColor}"/><text x="12" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"pin-round":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25 * {scale})" height="calc(25 * {scale})" viewBox="0 0 25 25"><g transform="translate(0 1)"><circle cx="12.25" cy="11.5833" r="11" fill="{color}"/><path d="m12.25 23.583a12 12 0 1 1 12-12 12 12 0 0 1-12 12zm0-22a10 10 0 1 0 10 10 10 10 0 0 0-10-10z" fill="{secondaryColor}"/><circle cx="12.25" cy="11.5833" r="4.2386" fill="{secondaryColor}"/></g><text x="12.5" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-flat":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(42.8 * {scale})" viewBox="0 0 1600 2570"><g fill="{color}"><path d="M691 2419c-409-575-641-1086-683-1504-10-106-10-136 5-224 31-188 105-330 241-458 129-124 270-190 453-214 69-9 113-10 182-1 373 46 655 326 703 698 40 308-120 801-424 1309-134 224-348 535-369 535-4 0-53-63-108-141z"/></g><g fill="rgba(0,0,0,0.15)" style="transform:scale(-1,1);transform-origin:center"><path d="M691 2419c-407-571-639-1083-682-1498-14-139-3-249 37-371 69-208 254-402 459-481 68-27 217-59 271-59h24v160 180 940 635c0 349-2 635-5 635-2 0-49-63-104-141z"/></g><circle cx="800" cy="800" r="600" fill="{secondaryColor}"/><text x="800" y="1100" style="font-size:800px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-arrow":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25.47 * {scale})" height="calc(35.18 * {scale})" viewBox="0 0 4330 5980"><g fill="{color}"><path d="m2080 5969c-49-20-93-63-115-113-25-55-1928-5486-1953-5573-40-138 67-282 210-283 36 0 246 73 987 345 518 190 947 345 955 345 8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29-33 0-71-5-85-10z"/></g><g fill="{secondaryColor}"><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z"/><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z" style="transform:scale(-1,1);transform-origin:center"/></g><g fill="rgba(0,0,0,0.2)" ><path d="m2165 685c8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29z"/></g><text x="2165" y="3300" style="font-size:2500px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-ball-pin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15.67 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 235 452"><g transform="translate(-135 10)"><path fill="{secondaryColor}" d="m256 442 0 0c-13 0-18-11-18-24l-6-323c0-13 11-24 24-24h0c13 0 24 11 24 24l-6 323c0 13-5 24-18 24z"/><circle style="fill:{color};stroke-width:10;stroke:{secondaryColor}" cx="256" cy="112" r="111"/><ellipse transform="matrix(0.834 0.5518 -0.5518 0.834 65.7916 -97.18)" fill="rgba(255,255,255,0.3)" cx="194.399" cy="60.749" rx="19.076" ry="32.428"/></g><text x="117.5" y="160" style="font-size:160px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.67 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2000 2420"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M845 2152c-22-37-58-95-80-129-22-35-62-99-90-143l-50-80-312 0-313 0 0-900 0-900 900 0 900 0 0 900 0 900-313 0-313 0-34 58c-19 31-38 59-42 60-5 2-8 8-8 12 0 9-69 123-88 145-5 6-11 15-13 21-16 39-77 123-89 124-8 0-33-31-55-68z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(38.8 * {scale})" viewBox="0 0 2500 2910"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m866 2652c-17-31-37-68-46-82-9-14-32-54-51-90-19-36-50-92-70-125l-36-60-332-3-331-2 0-905 0-905 660 0 660 0 0-38c0-71 50-196 102-258 71-85 189-164 244-164 12 0 26-4 29-10 8-13 222-13 230 0 3 6 17 10 30 10 25 0 117 45 154 76 130 107 191 232 191 392 0 155-63 284-190 386-36 29-129 76-150 76-11 0-22 5-25 10-3 6-31 10-61 10l-54 0 0 660 0 660-332 2-332 3-29 50c-17 28-48 84-70 125-22 41-47 86-56 100-9 14-30 51-46 83-17 32-36 57-45 57-8 0-28-25-44-58z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.8 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2010 2410"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M856 2155c-20-30-36-59-36-65 0-5-4-10-10-10-5 0-10-5-10-11 0-5-18-37-40-69-22-32-40-64-40-69 0-6-4-11-10-11-5 0-10-5-10-10 0-6-15-33-32-60l-33-50-127 0c-74 0-129-4-133-10-3-5-17-10-30-10-25 0-116-45-155-76-87-69-142-151-178-265-15-46-17-1075-2-1084 5-3 10-17 10-30 0-13 5-27 10-30 6-3 10-13 10-22 0-22 83-135 122-168 57-46 62-50 112-75l50-25 585 0 586 0 63 34c84 46 169 133 212 218l35 68 0 565 0 565-28 59c-32 69-100 157-139 180-15 9-33 22-40 29-23 22-99 57-123 57-13 0-27 5-30 10-4 6-60 10-135 10l-128 0-128 205c-84 136-133 205-144 205-10 0-33-24-54-55z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(32.13 * {scale})" viewBox="0 0 2500 2900"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m874 2669c-9-18-26-49-37-68-11-20-30-55-43-78-13-24-36-64-51-90-14-27-38-69-52-95l-26-48-142 0c-84 0-144-4-148-10-3-5-17-10-30-10-25 0-118-46-154-76-91-76-136-142-175-254-13-38-16-119-16-554 0-358 3-520 12-545 40-125 106-219 195-278 127-84 116-83 646-83l467 0 0-42c0-46 11-87 45-163 54-121 169-220 306-264 46-14 232-14 278 0 165 53 284 175 340 350 19 61 14 204-10 273-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-3 6-28 10-56 10l-49 0 0 462c0 446-1 464-21 522-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-4 6-65 10-149 10-138 0-143 1-154 23-12 23-62 114-112 202-16 28-44 79-63 115-42 77-67 88-93 39z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(23.5 * {scale})" height="calc(40 * {scale})" viewBox="34 28 198 308"><path style="stroke:{secondaryColor};stroke-width:15;stroke-linecap:round;" d="M42 327l0 -291"/><path style="fill:{color};stroke:{secondaryColor};stroke-width:10;stroke-linejoin:round;" d="M49 50c70 30 104 28 178 2-21 42-21 74 0 116-72 25-101 25-178 0l0-118z"/><text x="130" y="165" style="font-size:100px;fill:#fff;text-anchor:middle">{text}</text></svg>',"flag-triangle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(35.33 * {scale})" viewBox="0 0 40.5 53"><g transform="translate(-31 -20)"><path fill="{secondaryColor}" d="M34.7,73.3V48.4l34.6-10.1c0.7-0.2,1.2-0.8,1.2-1.5s-0.4-1.4-1-1.7L33.7,20.5c-0.5-0.2-1.1-0.2-1.6,0.2 c-0.5,0.3-0.7,0.8-0.7,1.4v51.2H34.7z"/><polygon points="34.7,24.5 66,36.5 34.7,45 34.7,10" fill="{color}"/></g><text x="11" y="21" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(34 * {scale})" height="calc(34 * {scale})" viewBox="0 0 34 34"><g transform="translate(2 2)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17" y="22" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(38 * {scale})" height="calc(38 * {scale})" viewBox="0 0 38 38"><g transform="translate(4 4)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19" y="24" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',triangle:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(36 * {scale})" height="calc(36 * {scale})" viewBox="0 0 36 36"><g transform="translate(2 2)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="30" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><g transform="translate(4 4)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="32" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',hexagon:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(35 * {scale})" height="calc(40 * {scale})" viewBox="0 0 35 40"><g transform="translate(2 2)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="25" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(39 * {scale})" height="calc(44 * {scale})" viewBox="0 0 39 44"><g transform="translate(4 4)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="27" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1100 1100"><g transform="translate(50 50)"><path style="stroke:{secondaryColor};stroke-width:50;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="550" y="700" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1200 1200"><g transform="translate(100 100)"><path style="stroke:{secondaryColor};stroke-width:100;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="600" y="750" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="12,0 0,24 12,17 24,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="17" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-left":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="24,12 0,0 7,12 0,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="16.5" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(12.16 * {scale})" height="calc(30.1 * {scale})" viewBox="0 0 902 364"><g fill="{color}" transform="matrix(0,2.4,-2.4,0,897,-930)"><polygon points="902,222 233,222 233,364 0,182 233,0 233,141 902,141 902,222"/></g><text x="450" y="700" style="font-size:900px;fill:#000;text-anchor:middle">{text}</text></svg>',"arrow-up-thin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 12 25"><g transform="translate(-136.91823 -751.91998)"><path fill="{color}" d="m148.271 760.71c-1.641-.547-3.186-1.47-4.633-2.769l0 18.07-1.675 0 0-18.07c-1.447 1.299-2.986 2.222-4.616 2.769l0-1.231c2.325-1.596 4.006-3.812 5.043-6.65l.838 0c1.037 2.838 2.718 5.055 5.043 6.65l0 1.231z"/></g><text x="6" y="20" style="font-size:10px;fill:#000;text-anchor:middle">{text}</text></svg>',car:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(21.93 * {scale})" height="calc(40.9 * {scale})" viewBox="0 0 6580 12270"><g transform="translate(0 12270) rotate(-90)"><path fill="{secondaryColor}" d="M7045 6566c-42-13-105-44-105-51 0-2 23-105 50-228 28-123 50-230 50-236 0-8-241-11-907-11-855 0-1145 6-1513 30-85 6-189 13-230 15-41 3-133 10-205 15-286 21-430 32-705 50-953 63-1459 18-2335-205-304-77-746-209-799-238-131-72-221-408-285-1062-34-345-42-532-48-1130-16-1557 108-2532 336-2649 32-17 469-149 676-205 409-110 819-191 1205-238 116-14 224-18 540-18 395 1 494 5 1140 50 1124 79 1224 82 2496 78l641-3-53-237c-29-131-52-238-51-239 1-1 31-14 66-29 56-23 76-26 142-23 67 3 83 7 120 33 23 17 50 41 61 55 10 14 51 117 91 230l73 205 674 3 675 2 90-39c98-43 198-72 315-93 122-21 829-18 990 5 321 45 626 143 849 270 293 168 516 378 704 662 266 402 416 893 467 1527 15 174 8 882-9 998-6 41-18 127-27 190-69 502-253 969-523 1325-79 105-262 284-381 374-189 142-355 229-574 300-336 110-526 139-952 148-457 9-685-23-887-124l-47-24-678-6-678-6-64 179c-79 224-92 253-121 284-67 70-177 97-274 66zm-2752-5073c-23-2-64-2-90 0-26 2-7 3 42 3 50 0 71-1 48-3zm395 0c-21-2-55-2-75 0-21 2-4 4 37 4 41 0 58-2 38-4z"/><path fill="{color}" d="M7043 6498c-13-6-23-19-23-28 0-9 23-117 50-240 28-123 50-230 50-237 0-22-2126-13-2465 10-132 10-400 28-595 42-661 47-824 55-1160 62-435 7-656-8-1040-73-415-70-865-183-1447-365-168-53-272-556-325-1569-16-319-16-1311 0-1630 45-872 129-1366 257-1518 22-26 51-39 172-77 557-177 1122-310 1563-369 271-36 351-40 690-40 361 1 463 6 1165 54 1122 78 1288 83 2337 79 460-2 840-7 843-11 4-4-17-117-47-252l-55-245 39-16c76-30 180-8 224 47 10 13 54 124 98 246l79 222 709 0 709 0 47-24c74-37 219-83 322-101 122-22 606-32 802-16 374 29 658 102 933 238 124 62 271 155 361 230l61 51 6 100c19 278 103 497 247 643 88 89 173 136 278 152l70 11 41 131c116 369 159 673 168 1170 10 584-38 984-167 1397l-40 126-70 12c-193 33-348 175-441 405-56 139-89 302-89 445 0 43-3 47-58 91-290 235-644 384-1068 450-191 29-796 39-974 16-135-18-263-54-368-102l-75-35-701 0-701 0-79 223c-82 232-102 267-163 293-38 16-138 17-170 2zm-2023-820c332-15 1155-12 1835 6 308 8 563 12 566 8 4-4 10-21 13-38 7-30 6-31-92-77-518-244-1197-396-2112-474-295-25-1282-25-1579 0-231 20-473 46-479 51-6 7 49 110 93 171 160 226 416 335 855 365 142 10 539 5 900-12zm3304-263c525-111 899-887 934-1935 19-557-37-1023-172-1435-186-563-521-900-896-899-81 0-158 14-525 92-426 91-431 92-540 146-195 96-287 207-306 368-12 104-11 2985 1 3078 22 170 135 291 365 389 49 21 191 55 480 115 226 47 419 87 430 89 45 10 164 6 229-8zm-5570-485c112-43 197-156 216-291 12-83 13-2623 1-2706-23-158-125-273-270-304-44-9-100-1-542 75-272 47-514 91-539 98-266 68-487 424-594 958-56 280-70 548-40 800 56 484 207 878 414 1081 115 114 122 116 702 218 277 49 524 90 550 90 26 1 72-8 102-19zm2111-3440c1023-44 1884-213 2462-486l113-53-7-33c-3-18-8-35-10-37-2-3-236 1-521 7-993 24-1271 26-1708 11-541-18-1128-18-1249-1-377 56-588 181-734 437-32 55-41 79-32 84 12 8 246 32 491 51 356 28 815 36 1195 20z"/></g><text x="3250" y="8250" style="font-size:3000px;fill:#fff;text-anchor:middle">{text}</text></svg>',checker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 16 16"><pattern id="p" x="0" y="0" width="16" height="16" patternUnits="userSpaceOnUse"><rect fill="{color}" x="0" width="8" height="8" y="0"/><rect fill="{color}" x="8" width="8" height="8" y="8"/></pattern><rect x="0" y="0" width="16" height="16" fill="{secondaryColor}"/><rect x="0" y="0" width="16" height="16" fill="url(#p)"/></svg>',"checker-rotated":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 60 60"><rect width="60" height="60" fill="{secondaryColor}"/><rect width="42.42" height="42.42" transform="translate(30 0) rotate(45)" fill="{color}"/></svg>',"zig-zag":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 120 60 120 90 90 120 60 120 0 120 0 60 60 0 0 0 60 30 90 60 120 120 120"/></svg>',"zig-zag-vertical":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 0 120 60 90 30 60 0 0 0 0 0 60 60 0 120 60 120 90 90 120 60 120 0"/></svg>',"circles-spaced":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',circles:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(7 * {scale})" height="calc(7 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="6" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',"diagonal-lines-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-lines-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-stripes-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"diagonal-stripes-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(14 * {scale})" height="calc(14 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(45 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}" transform="rotate(-45 3 3)"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-stripes":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"x-fill":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="45.3" height="45.3" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(13 * {scale})" height="calc(13 * {scale})" viewBox="0 0 20 20"><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><g fill="{color}"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/></g></svg>'},Td=(zd.getHighContrastMode=function(){return matchMedia("(-ms-high-contrast: white-on-black)").matches?"dark":matchMedia("(-ms-high-contrast: black-on-white)").matches?"light":matchMedia("(-ms-high-contrast: active)").matches?"dark":matchMedia("(inverted-colors: inverted)").matches?"invert":null},zd);function zd(){}(window&&window.__extends||(Dd=function(t,e){return(Dd=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Dd(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Fd,Rd=t);var Dd,Rd,Bd=Fd;function Fd(){var t=null!==Rd&&Rd.apply(this,arguments)||this;return t.copyrightMessage=void 0,t.copyrightContent=void 0,t.customAttribution=void 0,t.showFeedbackLink=!0,t.showLogo=!0,t}(window&&window.__extends||(Nd=function(t,e){return(Nd=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Nd(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Hd,Zd=Ot),Hd.prototype.onAdd=function(t){return this.container=this.buildContainer(t,u.ControlStyle.auto),this.container.className="map-copyright",this.copyrightDiv=this.buildCopyrightDiv(),this.copyrightDiv.className="azure-map-copyright",this.container.appendChild(this.copyrightDiv),this.options.showLogo&&this.addRemoveLogo(!0),this.options.showFeedbackLink&&this.addRemoveFeedbackDiv(!0),this.container},Hd.prototype.onRemove=function(){Zd.prototype.onRemove.call(this),delete this.container},Hd.prototype.setOptions=function(t){var e,o=this,t=(new Bd).merge(this.options,t);t.copyrightMessage===this.options.copyrightMessage&&t.customAttribution===this.options.customAttribution||(this.copyrightDiv.innerText=this.textAttribution(t)),t.copyrightContent!==this.options.copyrightContent&&(this.options.copyrightContent&&(e=Array.from(this.copyrightDiv.children).find(function(t){return t===o.options.copyrightContent}),this.copyrightDiv.removeChild(e)),0<this.copyrightDiv.childNodes.length?this.copyrightDiv.insertBefore(t.copyrightContent,this.copyrightDiv.childNodes[0]):this.copyrightDiv.appendChild(t.copyrightContent),this.options.copyrightContent=t.copyrightContent),!t.showLogo&&this.logoAnchor?this.addRemoveLogo(!1):t.showLogo&&!this.logoAnchor&&this.addRemoveLogo(!0),!t.showFeedbackLink&&this.feedbackAnchor?this.addRemoveFeedbackDiv(!1):t.showFeedbackLink&&!this.feedbackAnchor&&this.addRemoveFeedbackDiv(!0),this.options=t},Hd.prototype.getDefaultAttributions=function(){var t=(new Date).getFullYear(),e=["©".concat(t," TomTom")];return this.options.showLogo||e.push("©".concat(t," Microsoft")),e},Hd.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.textAttribution(this.options)||"",t},Hd.prototype.buildFeedbackLink=function(){var t=document.createElement("a");return t.setAttribute("alt","Give Feedback"),t.setAttribute("aria-label","Give Feedback"),t.href="https://feedback.azuremaps.com",t.target="_blank",t.rel="noopener",t.className="azure-map-feedback",t},Hd.prototype.addRemoveFeedbackDiv=function(t){t?(this.feedbackAnchor=this.buildFeedbackLink(),this.tooltip=_("Give Feedback"),this.container.appendChild(this.feedbackAnchor),this.container.appendChild(this.tooltip),b(this.tooltip,this.feedbackAnchor)):(this.feedbackAnchor.remove(),this.tooltip.remove(),delete this.tooltip,delete this.feedbackAnchor)},Hd.prototype.addRemoveLogo=function(t){t?(this.logoAnchor=document.createElement("a"),this.logoAnchor.className="azure-map-logo",this.logoAnchor.href="https://aka.ms/azuremaps",this.logoAnchor.setAttribute("aria-label","Visit azure.microsoft.com"),this.logoAnchor.setAttribute("target","_blank"),this.container.appendChild(this.logoAnchor),this.logoTooltip=_("Visit azure.microsoft.com"),this.container.appendChild(this.logoTooltip),b(this.logoTooltip,this.logoAnchor)):(this.logoAnchor.remove(),this.logoTooltip.remove(),delete this.logoAnchor)};var Nd,Zd,qd=Hd;function Hd(t){var e=Zd.call(this)||this;return e.textAttribution=function(t){return[e.options.copyrightMessage,e.options.customAttribution].filter(function(t){return t}).join("")},e.options=(new Bd).merge(t),e}window&&window.__assign;window&&window.__awaiter,window&&window.__generator,window&&window.__read,window&&window.__spreadArray;var Ud,Wd,Gd=function(t){var o=this;this.addToMap=function(){null==o.mapViewDesc&&(o.initializeMapLiveStateInfo(),o.initializeMapStyleInfo(),o.createMapKeyBindingInfo(),o.map.getMapContainer().setAttribute("role","application"),o.map.getMapContainer().setAttribute("aria-label","Map Application"),o.map.getCanvasContainer().setAttribute("aria-live","polite"),o.map.getCanvasContainer().setAttribute("aria-describedby","atlas-map-state atlas-map-style"),o.map.getCanvas().setAttribute("aria-label","Interactive Map"),o.map.getCanvas().setAttribute("aria-describedby","atlas-map-shortcuts"),o.map.getCanvas().setAttribute("alt","Interactive Map"))},this.removeFromMap=function(){null!=o.mapViewDesc&&o.mapViewDesc.dispose(),delete o.mapViewDesc,null!=o.atlasMapKeyBindings&&o.map.getCanvasContainer().removeChild(o.atlasMapKeyBindings),delete o.atlasMapKeyBindings,null!=o.atlasMapLiveStateInfo&&o.map.getCanvasContainer().removeChild(o.atlasMapLiveStateInfo),delete o.atlasMapLiveStateInfo,null!=o.atlasMapStyleInfo&&o.map.getCanvasContainer().removeChild(o.atlasMapStyleInfo),delete o.atlasMapStyleInfo,o.map.getMapContainer().removeAttribute("role"),o.map.getMapContainer().removeAttribute("aria-label"),o.map.getCanvasContainer().removeAttribute("aria-live"),o.map.getCanvasContainer().removeAttribute("aria-describedby"),o.map.getCanvas().removeAttribute("aria-label"),o.map.getCanvas().removeAttribute("aria-describedby"),o.map.getCanvas().removeAttribute("alt"),o.map.events.remove("stylechanged",o.updateMapStyle)},this.createMapKeyBindingInfo=function(){o.atlasMapKeyBindings=document.createElement("div"),o.atlasMapKeyBindings.setAttribute("tabindex","-1"),o.atlasMapKeyBindings.setAttribute("aria-hidden","true"),o.atlasMapKeyBindings.id="atlas-map-shortcuts",o.atlasMapKeyBindings.classList.add("hidden-accessible-element"),o.atlasMapKeyBindings.innerHTML=["Map shortcuts:","Zoom out: hyphen.","Zoom in: plus.","Pan right 100 pixels: right arrow.","Pan left 100 pixels: left arrow.","Pan up 100 pixels: up arrow.","Pan down 100 pixels: down arrow.","Rotate 15 degrees clockwise: shift + right arrow.","Rotate 15 degrees counter clockwise: shift + left arrow.","Increase pitch 10 degrees: shift + up arrow.","Decrease pitch 10 degrees: shift + down arrow.","Jump focus to the map: Escape."].join("\n"),o.map.getCanvasContainer().appendChild(o.atlasMapKeyBindings);var t=[189,187,38,37,39,40],e=o.map._getMap()._canvas;null!=e&&e.addEventListener("keyup",function(e){t.find(function(t){return e.keyCode===t})&&(o.atlasMapKeyBindings.innerHTML="")})},this.initializeMapLiveStateInfo=function(){},this.initializeMapStyleInfo=function(){o.atlasMapStyleInfo=document.createElement("div"),o.atlasMapStyleInfo.setAttribute("tabindex","-1"),o.atlasMapStyleInfo.setAttribute("aria-hidden","true"),o.atlasMapStyleInfo.id="atlas-map-style",o.atlasMapStyleInfo.classList.add("hidden-accessible-element"),o.map.events.add("stylechanged",o.updateMapStyle),o.map.getCanvasContainer().appendChild(o.atlasMapStyleInfo)},this.updateMapStyle=function(){o.atlasMapStyleInfo.innerHTML="<p>Map style: ".concat(o.map.getStyle().style,".</p>")},this.updateMapState=function(t){o.atlasMapLiveStateInfo.innerHTML=t},this.map=t},Vd=function(t){var o=this;this.listenerEnabled=!1,this.lastFlowMode="none",this.addToMap=function(){if(!o.map._isReady())throw new Error("Traffic flow could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before enabling traffic flow.");o.listenerEnabled||(o.map.events.add("styledata",o.addToMap),o.listenerEnabled=!0);var t,e=o.map.getTraffic();"none"!==e.flow&&(t=o.map.layers.getLayerById("traffic_".concat(e.flow)))&&(o.lastFlowMode=e.flow,t._updateLayoutProperty("visibility","visible","none"))},this.removeFromMap=function(){var t;o.map.getTraffic(),"none"!=o.lastFlowMode&&((t=o.map.layers.getLayerById("traffic_".concat(o.lastFlowMode)))&&t._updateLayoutProperty("visibility","none","visible"),o.lastFlowMode="none"),o.listenerEnabled&&(o.map.events.remove("styledata",o.addToMap),o.listenerEnabled=!1)},this.map=t},Kd=((window&&window.__extends||(Ud=function(t,e){return(Ud=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ud(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Yd,Wd=t),Yd);function Yd(){var t=null!==Wd&&Wd.apply(this,arguments)||this;return t.interactive=!0,t.scrollZoomInteraction=!0,t.boxZoomInteraction=!0,t.dragRotateInteraction=!0,t.dragPanInteraction=!0,t.keyboardInteraction=!0,t.dblClickZoomInteraction=!0,t.touchInteraction=!0,t.touchRotate=!0,t.wheelZoomRate=1/450,t}$d.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},$d.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)};var Jd=$d;function $d(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}Qd.prototype.enable=function(){this.map.getCanvasContainer().addEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().addEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().addEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().addEventListener("touchend",this._onTouchEnd)},Qd.prototype.disable=function(){this.map.getCanvasContainer().removeEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().removeEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().removeEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().removeEventListener("touchend",this._onTouchEnd)};var Xd=Qd;function Qd(t){var e=this;this._onGestureStart=function(t){e.hasTouch||(t.preventDefault(),e.initZoom=e.map.getCamera().zoom)},this._onGestureChange=function(t){e.hasTouch||(t.preventDefault(),e.map.setCamera({zoom:e.initZoom+t.scale-1}))},this._onTouchStart=function(t){e.hasTouch=!0},this._onTouchEnd=function(t){0===t.touches.length&&(e.hasTouch=!1)},this.map=t}ef.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},ef.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},ef.prototype.setOptions=function(t){this.options=(new Kd).merge(this.options,t),this.added&&this._setInteractions(this.options)},ef.prototype.getOptions=function(){return Object.assign({},this.options)},ef.prototype._setInteractions=function(t){var e;t.interactive?(t.boxZoomInteraction?this.map._getMap().boxZoom.enable():this.map._getMap().boxZoom.disable(),t.dblClickZoomInteraction?this.map._getMap().doubleClickZoom.enable():this.map._getMap().doubleClickZoom.disable(),t.dragPanInteraction?this.map._getMap().dragPan.enable():this.map._getMap().dragPan.disable(),t.dragRotateInteraction?this.map._getMap().dragRotate.enable():this.map._getMap().dragRotate.disable(),t.keyboardInteraction?(this.map._getMap().keyboard.enable(),this.focusShortcut.enable()):(this.map._getMap().keyboard.disable(),this.focusShortcut.disable()),t.scrollZoomInteraction?(this.map._getMap().scrollZoom.enable(),this.map._getMap().scrollZoom.setWheelZoomRate(t.wheelZoomRate)):this.map._getMap().scrollZoom.disable(),e=this.map._getMap().touchZoomRotate,t.touchInteraction?(e.enable(),t.touchRotate?e.enableRotation():e.disableRotation()):e.disable(),this.pinchZoom.enable()):(this.map._getMap().boxZoom.disable(),this.map._getMap().doubleClickZoom.disable(),this.map._getMap().dragPan.disable(),this.map._getMap().dragRotate.disable(),this.map._getMap().keyboard.disable(),this.focusShortcut.disable(),this.map._getMap().scrollZoom.disable(),this.map._getMap().touchZoomRotate.disable(),this.pinchZoom.disable())};var tf=ef;function ef(t,e){this.added=!1,this.map=t,this.focusShortcut=new Jd(t),this.pinchZoom=new Xd(t),this.options=(new Kd).merge(e)}var of=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nf=(rf.prototype.add=function(t,e){var o,n;if(Array.isArray(t))try{for(var r=of(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._add(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._add(t,e)},rf.prototype.getControls=function(){return Array.from(this.controls)},rf.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=of(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._remove(t)},rf.prototype._add=function(t,e){this.controls.add(t);var o=(new yt).merge(e),t=t.onAdd(this.map,e),e=this.controlContainer.getElementsByClassName(o.position);if(!(0<e.length))throw new Error("Control position ".concat(o.position," does not exist."));e.item(0).appendChild(t)},rf.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},rf);function rf(t){for(var e in this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),u.ControlPosition){var o;u.ControlPosition.hasOwnProperty(e)&&((o=document.createElement("div")).classList.add(u.ControlPosition[e]),o.classList.add("subcontrol-container"),this.controlContainer.appendChild(o))}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}var sf=window&&window.__assign||function(){return(sf=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},af=(cf.prototype.addCallback=function(s,a,c,t,l){var e,u,p=this;if(t)e=function(t){var e=t.lngLat?new Dc(t.lngLat.lng,t.lngLat.lat):void 0,o=t.point?[t.point.x,t.point.y]:void 0,n=t.features?t.features.map(function(t){return new Ta(t.geometry,t.properties,t.id)}):[],t={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:o,features:n};c(t)};else switch(s){case"data":case"sourcedata":case"styledata":e=function(t){t=sf(sf({dataType:t.dataType},"source"===t.dataType&&sf(sf(sf({isSourceLoaded:t.isSourceLoaded},t.sourceDataType&&{sourceDataType:t.sourceDataType}),{source:p.map.sources.getById(t.sourceId)}),t.tile&&{tile:{id:{x:t.tile.tileID.canonical.x,y:t.tile.tileID.canonical.y,z:t.tile.tileID.canonical.z},size:t.tile.tileSize,state:t.tile.state}})),{map:p.map,type:t.type});l&&p.map.events._removeListener(s,a,c),c(t)};break;case"error":e=function(t){t={error:t.error,map:p.map,type:t.type};l&&p.map.events._removeListener(s,a,c),c(t)};break;case"touchstart":case"touchend":case"touchmove":case"touchcancel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e=t.point?new Ba(t.point.x,t.point.y):void 0,o=t.points?t.points.map(function(t){return new Ba(t.x,t.y)}):[],n=t.lngLat?new Dc(t.lngLat.lng,t.lngLat.lat):void 0,r=t.lngLats?t.lngLats.map(function(t){return new Dc(t.lng,t.lat)}):[],i=n?p.map.layers.getRenderedShapes(new Fa(n),a?[a]:void 0):[],e={map:p.map,originalEvent:t.originalEvent,pixel:e,pixels:o,position:n,positions:r,shapes:i,layerId:a||void 0,preventDefault:function(){return t.preventDefault()},type:t.type};l&&p.map.events._removeListener(s,a,c),c(e)};break;case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"click":case"dblclick":case"mouseout":case"mouseenter":case"mouseleave":case"contextmenu":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e=t.lngLat?new Dc(t.lngLat.lng,t.lngLat.lat):void 0,o=t.point?new Ba(t.point.x,t.point.y):void 0,n=e?p.map.layers.getRenderedShapes(new Fa(e),a?[a]:void 0):[],e={map:p.map,originalEvent:t.originalEvent,position:e,pixel:o,preventDefault:function(){return t.preventDefault()},shapes:n,layerId:a||void 0,type:t.type};l&&p.map.events._removeListener(s,a,c),c(e)};break;case"styleimagemissing":e=function(t){l&&p.map.events._removeListener(s,a,c),c(t.id)};break;case"wheel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e={map:p.map,originalEvent:t.originalEvent,preventDefault:function(){return t.preventDefault()},type:t.type};l&&p.map.events._removeListener(s,a,c),c(e)};break;case"resize":e=function(t){var e,o={map:p.map,type:t.type};for(e in t)"type"!==e&&"target"!==e&&(o[e]=t[e]);l&&p.map.events._removeListener(s,a,c),c(o)};break;default:e=function(t){var e={map:p.map,type:t.type};t.originalEvent&&(e.originalEvent=t.originalEvent),l&&p.map.events._removeListener(s,a,c),c(e)}}this.callbacks.has(a)||this.callbacks.set(a,new wt),this.callbacks.get(a).has(s)||this.callbacks.get(a).set(s,new Map),this.callbacks.get(a).get(s).set(c,[e,l])},cf.prototype.removeCallback=function(t,e,o){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(o)&&this.callbacks.get(e).get(t).delete(o)},cf.prototype.getModifiedCallback=function(t,e,o){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(o))return this.callbacks.get(e).get(t).get(o)[0]},cf.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},cf.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){e=this.callbacks.get(e);if(e.has(t))return e.get(t)}},cf);function cf(t){this.callbacks=new wt,this.map=t}var lf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uf=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},pf=["maxzoomchanged","minzoomchanged","mapconfigurationchanged"],hf=(df.prototype.add=function(t,e,o){var n,r;if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else{e=Array.isArray(e)?e:[e];try{for(var i=lf(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof M&&M._isMBoxEvent(t)?this._addLayerListener(t,a,o,!1,!1):a._addEventListener(t,o,!1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},df.prototype.addOnce=function(t,e,o){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof M&&M._isMBoxEvent(t)?this._addLayerListener(t,e,o,!1,!0):e._addEventListener(t,o,!0)},df.prototype._addLegacy=function(t,e,o){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,o,!0,!1)},df.prototype._addLayerListener=function(t,e,o,n,r){var i,s,a,c,e=e instanceof M?e.getId():e,l=this.map.layers.getLayerById(e),u=this.mapCallbackHandler.getModifiedCallback(t,e,o);if(u&&l)try{for(var p=lf(l._getLayerIds()),h=p.next();!h.done;h=p.next()){var d=h.value;this.map._getMap().off(t,d,u)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}if(this.mapCallbackHandler.addCallback(t,e,o,n,r),l){u=this.mapCallbackHandler.getModifiedCallback(t,e,o);try{for(var f=lf(l._getLayerIds()),y=f.next();!y.done;y=f.next()){d=y.value;this.map._getMap().on(t,d,u)}}catch(t){a={error:t}}finally{try{y&&!y.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}}},df.prototype._addGlobalListener=function(t,e,o,n){var r,i,s,a;pf.includes(t)?this.map._addEventListener(t,e,n):(r=this.mapCallbackHandler.getModifiedCallback(t,"",e),this.mapCallbackHandler.addCallback(t,"",e,o,n),i=this.mapCallbackHandler.getModifiedCallback(t,"",e),"load"===t&&this.map._isLoaded()?(s={type:"load",map:this.map},setTimeout(function(){return i(s)})):"ready"===t?this.map._isReady()&&(a={type:"ready",map:this.map},setTimeout(function(){return i(a)})):(r&&this.map._getMap().off(t,r),this.map._getMap().on(t,i)))},df.prototype.invoke=function(t,e,o){if(void 0===o)this._invokeListeners(t,"",e);else if(e instanceof M&&M._isMBoxEvent(t))this._invokeListeners(t,e.getId(),o);else{if(!(e instanceof _t))throw new Error("The invoke target is invalid.");e._invokeEvent(t,o)}},df.prototype._invokeListeners=function(o,n,r){var i=this,t=new wt(this.mapCallbackHandler.getEventCallbacks(o,n));t?t.forEach(function(t,e){t=uf(t,2);t[0],t[1]&&i._removeListener(o,n,e),e(r)}):"error"===o&&console.error("error"in r?r.error:r)},df.prototype.remove=function(t,e,o){var n,r;if("function"==typeof e)this._removeListener(t,"",e);else{e=Array.isArray(e)?e:[e];try{for(var i=lf(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof M&&M._isMBoxEvent(t)?this._removeListener(t,a,o):null!=a&&a._removeEventListener(t,o)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},df.prototype._removeLegacy=function(t,e,o){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,o)},df.prototype._removeListener=function(t,e,o){var n,r;if(pf.includes(t))this.map._removeEventListener(t,o);else{var e=e instanceof M?e.getId():e,i=this.mapCallbackHandler.getModifiedCallback(t,e,o);if(i)if(e){var s=this.map.layers.getLayerById(e);if(s)try{for(var a=lf(s._getLayerIds()),c=a.next();!c.done;c=a.next()){var l=c.value;this.map._getMap().off(t,l,i)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}else this.map._getMap().off(t,i);this.mapCallbackHandler.removeCallback(t,e,o)}},df.prototype._enableLayerEvents=function(c){var l=this,t=this.mapCallbackHandler.getLayerCallbacks(c.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,o,n=uf(t,1)[0];try{for(var r=lf(c._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;l.map._getMap().on(a,s,n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}})})},df.prototype._disableLayerEvents=function(c){var l=this,t=this.mapCallbackHandler.getLayerCallbacks(c.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,o,n=uf(t,1)[0];try{for(var r=lf(c._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;l.map._getMap().off(a,s,n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}})})},df);function df(t){this.map=t,this.mapCallbackHandler=new af(this.map)}var ff=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yf=(mf.prototype.add=function(t,e){var o,n;if(Array.isArray(t))try{for(var r=ff(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addMarker(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._addMarker(t,e)},mf.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},mf.prototype.getMarkers=function(){return Array.from(this.markers)},mf.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=ff(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeMarker(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._removeMarker(t)},mf.prototype._removeMarker=function(e){var o=this;e instanceof Oh?(e._removeFromMap(),this.markers.delete(e)):this.markers.forEach(function(t){t._getId()===e&&(t._removeFromMap(),o.markers.delete(t))})},mf.prototype.clear=function(){var e=this;this.markers.forEach(function(t){t._removeFromMap(),e.markers.delete(t)})},mf);function mf(t){this.markers=new Set,this.map=t}vf.prototype.add=function(s,e,a){var c=this;return new Promise(function(o,n){var r,t,i;c.userImages.has(s)?o():e instanceof HTMLImageElement||e instanceof ImageData?(c.map._getMap().addImage(s,e,a),c.userImages.set(s,{image:e,meta:a}),o()):"string"==typeof e&&(t=void 0,t=/<svg/i.test(e)&&!/^data:/i.test(e)?"data:image/svg+xml;base64,"+window.btoa(e):e,i=!1,c.map._sendRequest(t,"Image").then(function(t){return i?void 0:t.blob()}).then(function(t){var e;!i&&t&&(clearTimeout(r),(e=new Image).onload=function(){c.map._getMap().addImage(s,e,a),c.userImages.set(s,{image:e,meta:a}),o()},e.onerror=e.onabort=function(){n("Failed to load image into HTML element.")},e.src=URL.createObjectURL(t))}).catch(function(){i||(clearTimeout(r),n("Failed to load image into HTML element."))}),r=setTimeout(function(){i=!0,n("Failed to load image within specified timeout: ".concat(c.imageLoadTimeout," ms."))},c.imageLoadTimeout))})},vf.prototype.clear=function(){var o=this;this.userImages.forEach(function(t,e){o.map._getMap().removeImage(e)}),this.userImages.clear()},vf.prototype.getImageIds=function(){var o=[];return this.userImages.forEach(function(t,e){o.push(e)}),o},vf.prototype.createFromTemplate=function(t,e,o,n,r){o=o||"#1A73AA",n=n||"#fff";e=(e=Od(e,r)).replace(/{color}/g,o).replace(/{secondaryColor}/g,n).replace(/{text}/g,"");return this.add(t,e)},vf.prototype.hasImage=function(t){return this.userImages.has(t)},vf.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},vf.prototype._restoreImages=function(){var o=this;this.userImages.forEach(function(t,e){o.map._getMap().hasImage(e)||o.map._getMap().addImage(e,t.image,t.meta)})};var gf=vf;function vf(t){this.userImages=new wt,this.imageLoadTimeout=5e3,this.map=t}var wf,_f,ce=window&&window.__extends||(wf=function(t,e){return(wf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}wf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),bf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xf=(ce(Sf,_f=M),Sf.prototype._buildLayers=function(){return this.layers},Sf.prototype._getLayerIds=function(){return this.layers.map(function(t){return t.id})},Sf.prototype._getSourceIds=function(){var e,t,o=new Set;try{for(var n=bf(this.layers),r=n.next();!r.done;r=n.next()){var i=r.value;"source"in i&&"string"==typeof i.source?o.add(i.source):"source"in i&&i.source&&o.add(i.id)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return o},Sf.prototype._updateLayoutProperty=function(e,o,t,n){var r;Ca(o,t)||(r=this.map._getMap(),this.layers.forEach(function(t){r.getLayer(t.id)?r.setLayoutProperty(t.id,e,n||o):console.warn("Could not update layout property ".concat(e," for layer ").concat(t.id," to ").concat(n||o))}))},Sf);function Sf(t,e){e=_f.call(this,e)||this;return e.layers=t,e}var Of=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cf=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Pf=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Lf=(kf.prototype.add=function(t,e){var o,n,r=e instanceof M?e.getId():e;if(Array.isArray(t))try{for(var i=Of(t),s=i.next();!s.done;s=i.next()){var a=s.value;this._addLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}else this._addLayer(t,r)},kf.prototype._addLayer=function(e,o){if(!(this.map._isReady()||e instanceof xf))throw new Error("The layer '".concat(e.getId(),"' could not be added to the map because ")+"the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a layer to it.");var t,n,r,i;o!==e.getId()&&this.layerIndex.find(function(t){return o===t.getId()})?this._getMapboxLayerExists(e)?(n=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),this._removeMapboxLayers(e),this._addMapboxLayers(e,o),(i=this.layerIndex[n])&&this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),this.layerIndex.splice(n,1),t=this.layerIndex.findIndex(function(t){return t.getId()===o}),this.layerIndex.splice(t,0,e),e instanceof xf||(this.userLayers[r]={layer:e,before:o}),i&&i.onRemove()):(this._addMapboxLayers(e,o),this.map.events._enableLayerEvents(e),t=this.layerIndex.findIndex(function(t){return t.getId()===o}),this.layerIndex.splice(t,0,e),e instanceof xf||this.userLayers.push({layer:e,before:o})):(n=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),0<=n&&0<=r?(i=this.layerIndex[n],this._removeMapboxLayers(i),this._addMapboxLayers(e,n+1),this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),(this.layerIndex[n]=e)instanceof xf||(this.userLayers[r]={layer:e,before:void 0}),i.onRemove()):(this._addMapboxLayers(e),this.map.events._enableLayerEvents(e),this.layerIndex.push(e),e instanceof xf||this.userLayers.push({layer:e,before:o}))),e.onAdd(this.map)},kf.prototype._addMapboxLayers=function(t,e){var o,n;if(!(t instanceof Yp)||t.getOptions().tileUrl){if(!(t instanceof xf)){t instanceof Hu&&(this.map._getMap().addSource(t._getSourceId(),t._buildSource()),this.map.sources.setSourceState(t._getSourceWrapper()));var r=this._getMapboxBefore(e);try{for(var i=Of(t._buildLayers()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().addLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}}this.map.events._enableLayerEvents(t)}},kf.prototype._removeMapboxLayers=function(t,e){var o,n;if(t instanceof xf&&!e)this.map.events._disableLayerEvents(t);else{try{for(var r=Of(t._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;this.map._getMap().getLayer(s)&&this.map._getMap().removeLayer(s)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this.map.events._disableLayerEvents(t),t instanceof Hu&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())}},kf.prototype._getMapboxLayerExists=function(e){var o=this,n=!1;return"string"==typeof e?!!(e=this.layerIndex.find(function(t){return t.getId()===e})):(e._getLayerIds().forEach(function(t){o.map._getMap().getLayer(t)&&(n=!0)}),n)},kf.prototype._getMapboxBefore=function(e){var o,t,n,r;if("string"==typeof e){var i=this.layerIndex.find(function(t){return t.getId()===e});if(!i)return;try{for(var s=Of(i._getLayerIds()),a=s.next();!a.done;a=s.next()){var c=a.value;if(this.map._getMap().getLayer(c))return c}}catch(t){o={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}e=this.layerIndex.findIndex(function(t){return t.getId()===e})+1}for(var l=e;l<this.layerIndex.length;l++)try{n=void 0;for(var u=Of(this.layerIndex[l]._getLayerIds()),p=u.next();!p.done;p=u.next()){c=p.value;if(this.map._getMap().getLayer(c))return c}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}},kf.prototype.clear=function(){for(var t=this.layerIndex.length-1;0<=t;t--){var e=this.layerIndex[t];e&&(this._removeMapboxLayers(e,!0),this.layerIndex.splice(t,1),e.onRemove())}this.userLayers=[]},kf.prototype.getLayerById=function(e){var t=this.layerIndex.find(function(t){return t.getId()===e});if(t)return t},kf.prototype.getLayers=function(){return this.layerIndex.slice(0)},kf.prototype._getSourceIds=function(){var e,t,o=new Set;try{for(var n=Of(this.layerIndex),r=n.next();!r.done;r=n.next())r.value._getSourceIds().forEach(function(t){return o.add(t)})}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return o},kf.prototype._getUserLayers=function(){return Array.from(this.userLayers)},kf.prototype.move=function(t,e){var o=t instanceof M?t.getId():t,n=e instanceof M?e.getId():e;if(!this.layerIndex.find(function(t){return t.getId()===o}))throw new Error("The layer '".concat(o,"' has not been added to the map and cannot be moved."));e=this.layerIndex.findIndex(function(t){return t.getId()===o}),this._moveMapboxLayers(this.layerIndex[e],n),t=this.layerIndex[e],this.layerIndex.splice(e,1),e=this.layerIndex.findIndex(function(t){return t.getId()===n}),-1<e?this.layerIndex.splice(e,0,t):this.layerIndex.push(t),e=this.userLayers.find(function(t){return t.layer.getId()===o});e&&(e.before=n)},kf.prototype._moveMapboxLayers=function(t,e){var o,n,r=this._getMapboxBefore(e);try{for(var i=Of(t._getLayerIds()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().moveLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}},kf.prototype.getRenderedShapes=function(t,e,o){var n,r,i,s=this;if(t=t||[-180,-85.0511,180,85.0511],Array.isArray(t)?4===t.length||6===t.length?i=this.map.positionsToPixels([S.getSouthWest(t),S.getNorthEast(t)]):2!==t.length&&3!==t.length||(i=this.map.positionsToPixels([t])[0]):i=this.map.positionsToPixels([t.coordinates])[0],e){e=Array.isArray(e)?e:[e];var a=[],c=this;try{for(var l=Of(e),u=l.next();!u.done;u=l.next())!function(t){var e=t instanceof M?t.getId():t,t=c.layerIndex.findIndex(function(t){return t.getId()===e});if(!(-1<t))throw new Error("The layer '".concat(e,"' has not been added to the map ")+"and its rendered features cannot be retrieved.");a.push.apply(a,Pf([],Cf(c.layerIndex[t]._getLayerIds().filter(function(t){return!!s.map._getMap().getLayer(t)})),!1))}(u.value)}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}t=this.map._getMap().queryRenderedFeatures(i,{layers:a,filter:o});return this.map.sources._mapFeaturesToShapes(t)},kf.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=Of(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeLayer(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._removeLayer(t)},kf.prototype._removeLayer=function(t){var e=t instanceof M?t.getId():t,o=this.layerIndex.findIndex(function(t){return t.getId()===e});if(-1==o)throw new Error("The layer '".concat(e,"' has not been added to the map and cannot be removed."));var n=this.layerIndex[o],o=(this._removeMapboxLayers(n),this.layerIndex.splice(o,1),this.userLayers.findIndex(function(t){return t.layer.getId()===e}));-1!=o&&this.userLayers.splice(o,1),t instanceof Hu&&this.map.sources.unsetSourceState(t._getSourceId()),n.onRemove()},kf);function kf(t){this.layerIndex=[],this.userLayers=[],this.map=t}var Mf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Af=(Ef.prototype.add=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=Mf(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.popups.has(i)||(this.popups.add(i),i.attach(this.map))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Ef.prototype.clear=function(){var e=this;this.popups.forEach(function(t){e.popups.delete(t),t.remove()})},Ef.prototype.remove=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=Mf(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.popups.has(i)&&(this.popups.delete(i),i.remove())}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Ef.prototype.getPopups=function(){return Array.from(this.popups)},Ef.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector(".".concat(Ef.Css.collection));return t||((t=document.createElement("div")).classList.add(Ef.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},Ef.prototype._addDraggedPopup=function(t){0===this.draggedPopups.size&&(this.map.getMapContainer().addEventListener("mousemove",this._onDrag),this.map.getMapContainer().addEventListener("touchmove",this._onDrag),this.map.getMapContainer().addEventListener("mouseup",this._onUp),this.map.getMapContainer().addEventListener("touchend",this._onUp)),this.draggedPopups.add(t)},Ef.Css={collection:"popup-collection-container"},Ef);function Ef(t){var n=this;this._onDrag=function(t){var e,o;"mousemove"===t.type?(e=t.clientX,o=t.clientY):"touchmove"===t.type&&(e=t.touches[0].clientX,o=t.touches[0].clientY),n.draggedPopups.forEach(function(t){t._dragToPixel([e,o])})},this._onUp=function(){n.map.getMapContainer().removeEventListener("mousemove",n._onDrag),n.map.getMapContainer().removeEventListener("touchmove",n._onDrag),n.map.getMapContainer().removeEventListener("mouseup",n._onUp),n.map.getMapContainer().removeEventListener("touchend",n._onUp),n.draggedPopups.forEach(function(t){n.draggedPopups.delete(t),t._onUp()})},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var jf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},If=(j.prototype.add=function(t,e){var o,n;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=jf(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addSource(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._addSource(t,e)},j.prototype.getRenderedShapes=function(t,e,o){t="string"==typeof t?t:t.getId(),o=this.map._getMap().querySourceFeatures(t,{sourceLayer:o,filter:e});return this.map.sources._mapFeaturesToShapes(o,!0,this.sources.get(t))},j.prototype.getFeatureState=function(t,e,o){t="string"==typeof t?t:t instanceof w?t.getId():t.id,e="string"==typeof e?e:e.getId();return this.map._getMap().getFeatureState({id:t,source:e,sourceLayer:o})},j.prototype.removeFeatureState=function(t,e,o,n){t="string"==typeof t?t:t instanceof w?t.getId():t.id,e="string"==typeof e?e:e.getId();this.map._getMap().removeFeatureState({id:t,source:e,sourceLayer:o},n)},j.prototype.setFeatureState=function(t,e,o,n){t="string"==typeof t?t:t instanceof w?t.getId():t.id,e="string"==typeof e?e:e.getId();this.map._getMap().setFeatureState({id:t,source:e,sourceLayer:n},o)},j.prototype._buildSources=function(){var e={};return this.sources.forEach(function(t){e[t.getId()]=t._buildSource()}),e},j.prototype.clear=function(){var e=this;this.sources.forEach(function(t){e.remove(t)})},j.prototype.getById=function(t){return this.sources.get(t)},j.prototype.getSources=function(){return Array.from(this.sources.values())},j.prototype.isSourceLoaded=function(t){t=t instanceof L?t.getId():t;return this.map._getMap().isSourceLoaded(t)},j.prototype.remove=function(t,e){var o,n;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=jf(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._removeSource(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._removeSource(t,e)},j.prototype.setSourceState=function(t,e){void 0===e&&(e=!0),this.sources.set(t.getId(),t),t._setMap(this.map,e)},j.prototype.unsetSourceState=function(t){this.sources.has(t)&&(this.sources.get(t)._setMap(null),this.sources.delete(t))},j.prototype._removeSource=function(t,e){t=t instanceof L?t.getId():t;if(!this.sources.has(t))throw new Error("'".concat(t,"' is not added to the map"));if(this.map._getMap().getSource(t)&&e&&this.map._getMap().removeSource(t),this.map._getMap().getSource(t)&&e)throw new Error("One or more layers have a dependency on the source '".concat(t,"'"));this.unsetSourceState(t)},j.prototype._addSource=function(t,e){if(this.sources.has(t.getId())){if(e)throw new Error("'".concat(t.getId(),"' is already added to the map"));this.unsetSourceState(t.getId())}if(e){if(!this.map._isReady())throw new Error("The source '".concat(t.getId(),"' could not be added to the map because ")+"the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a source to it.");this.map._getMap().addSource(t.getId(),t._buildSource())}this.setSourceState(t)},j.prototype._mapFeaturesToShapes=function(t,e,o){var n,r,i=[];try{for(var s=jf(t),a=s.next();!a.done;a=s.next()){var c=a.value;if((o||"string"==typeof c.source)&&"string"==typeof c.properties[w._shapeIdPropName]){var l=o||this.sources.get(c.source);if(l instanceof kl){var u=l.getShapeById(c.properties[w._shapeIdPropName]);if(u instanceof w){i.push(u);continue}}}e||i.push(c)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},j.prototype._syncSources=function(r){var n=this;r?(Object.keys(r).map(function(t){var e,o=r[t];switch(o.type){case"vector":case"raster":case"raster-dem":e=new Fp(t,{name:t,tiles:o.tiles,type:o.type,url:o.url,tileSize:"tileSize"in o?o.tileSize:void 0});break;case"canvas":e=new Bl(t,o);break;case"geojson":var n=new kl(t,{maxZoom:o.maxzoom,cluster:o.cluster,clusterRadius:o.clusterRadius,tolerance:o.tolerance,lineMetrics:o.lineMetrics,clusterProperties:o.clusterProperties,buffer:o.buffer,clusterMinPoints:o.clusterMinPoints,generateId:o.generateId,promoteId:o.promoteId,filter:o.filter});"string"!=typeof o.data&&void 0!==o.data&&n._addNoUpdate(o.data),e=n;break;case"image":e=new Gl(t,o);break;case"video":e=new Jl(t,o);break;default:e=new ql(t,o)}return e}).forEach(function(t){var e=n.sources.get(t.getId()),o=e&&t._isDeepEqual(e);!o&&e&&n.unsetSourceState(e.getId()),n.setSourceState(t,!o)}),Array.from(this.sources.keys()).filter(function(t){return!(t in r)}).forEach(function(t){return n.unsetSourceState(t)})):console.warn("syncSources called with no style sources which is unexpected.")},j);function j(t){this.map=t,this.sources=new wt}(window&&window.__extends||(Tf=function(t,e){return(Tf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Tf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Rf,zf=t);var Tf,zf,Df=Rf;function Rf(){var t=null!==zf&&zf.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}(window&&window.__extends||(Bf=function(t,e){return(Bf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Bf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Zf,Ff=t);var Bf,Ff,Nf=Zf;function Zf(){var t=null!==Ff&&Ff.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var qf,Hf,i=window&&window.__extends||(qf=function(t,e){return(qf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}qf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Uf=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wf=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Gf=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Vf=(i(Kf,Hf=t),Kf.prototype.merge=function(){for(var e,t,o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];try{for(var r=Uf(o),i=r.next();!i.done;i=r.next()){var s=i.value;s&&"number"==typeof s.padding&&(s.padding={top:s.padding,bottom:s.padding,left:s.padding,right:s.padding})}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return Hf.prototype.merge.apply(this,Gf([],Wf(o),!1))},Kf);function Kf(){var t=null!==Hf&&Hf.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new Ba(0,0),t.padding=new Nf,t}(window&&window.__extends||(Yf=function(t,e){return(Yf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Yf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Xf,Jf=t);var Yf,Jf,$f=Xf;function Xf(){var t=null!==Jf&&Jf.apply(this,arguments)||this;return t.zoom=1,t.center=new Dc(0,0),t.centerOffset=new Ba(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.minPitch=0,t.maxPitch=60,t.maxBounds=void 0,t}(window&&window.__extends||(Qf=function(t,e){return(Qf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Qf(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ey,ty=t);var Qf,ty,vo=ey;function ey(){var t=null!==ty&&ty.apply(this,arguments)||this;return t.name=void 0,t.before=void 0,t.minZoom=1,t.maxZoom=20,t.overwrite=!1,t.opacity=1,t}(window&&window.__extends||(oy=function(t,e){return(oy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}oy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(iy,ny=vo);var oy,ny,ry=iy;function iy(){var t=null!==ny&&ny.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.radius=1,t.outlineWidth=5,t.name="default-circles",t}(window&&window.__extends||(sy=function(t,e){return(sy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}sy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ly,ay=vo);var sy,ay,cy=ly;function ly(){var t=null!==ay&&ay.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}(window&&window.__extends||(uy=function(t,e){return(uy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}uy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(dy,py=vo);var uy,py,hy=dy;function dy(){var t=null!==py&&py.apply(this,arguments)||this;return t.iconSize=1,t.fontSize=14,t.fontColor="#000",t.textFont="SegoeUi-Regular",t.cluster=!0,t.clusterIcon=void 0,t.textOffset=[0,0],t.name="default-pins",t.icon="pin-darkblue",t.title="",t}(window&&window.__extends||(fy=function(t,e){return(fy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}fy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(gy,yy=vo);var fy,yy,my=gy;function gy(){var t=null!==yy&&yy.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}(window&&window.__extends||(vy=function(t,e){return(vy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}vy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(by,wy=vo);var vy,wy,_y=by;function by(){var t=null!==wy&&wy.apply(this,arguments)||this;return t.name="default-raster",t}(window&&window.__extends||(xy=function(t,e){return(xy=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xy(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Cy,Sy=t);var xy,Sy,Oy=Cy;function Cy(){var t=null!==Sy&&Sy.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var Py,Ly,Do=window&&window.__extends||(Py=function(t,e){return(Py=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Py(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ky=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},My=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Ay=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Ey=(Do(jy,Ly=t),jy.prototype.merge=function(){for(var e,t,o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];try{for(var r=ky(o),i=r.next();!i.done;i=r.next()){var s=i.value;s&&(s.hasOwnProperty("view")?s.userRegion=s.view:s.hasOwnProperty("userRegion")&&(s.view=s.userRegion),"string"==typeof s.language)&&(s.language=Mh.getCode(s.language))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return Ly.prototype.merge.apply(this,Ay([],My(o),!1))},jy);function jy(){var t=null!==Ly&&Ly.apply(this,arguments)||this;return t.antialias=void 0,t.autoResize=!0,t.language=Nh,t.light=new Oy,t.preserveDrawingBuffer=!1,t.progressiveLoading=!1,t.progressiveLoadingInitialLayerGroups=["base"],t.renderWorldCopies=!0,t.showBuildingModels=!1,t.showFeedbackLink=!0,t.showLogo=!0,t.showLabels=!0,t.customAttribution=void 0,t.showTileBoundaries=!1,t.style=void 0,t.view=zh,t.userRegion=t.view,t.customStyleTransform=void 0,t}function Iy(t){return 0==t.length?void 0:t.slice(1).reduce(function(o,n){return function(t,e){t=o(t,e);return Dy(Dy({},t),n(t.url,e))}},t[0])}var Ty,zy,jt=window&&window.__extends||(Ty=function(t,e){return(Ty=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ty(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Dy=window&&window.__assign||function(){return(Dy=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Ry=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},By=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Fy=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Ny=(jt(Zy,zy=t),Zy.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=this.styleDefinitionsVersion;try{for(var n=Ry(t),r=n.next();!r.done;r=n.next()){var i=r.value;i&&(i.authOptions?"string"==typeof i.authOptions.subscriptionKey&&(i.subscriptionKey=i["subscription-key"]=i.authOptions.subscriptionKey):"string"==typeof i.subscriptionKey?(i["subscription-key"]=i.subscriptionKey,i.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:i.subscriptionKey}):"string"==typeof i["subscription-key"]&&(i.subscriptionKey=i["subscription-key"],i.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:i["subscription-key"]}),"string"==typeof i.sessionId?i["session-id"]=i.sessionId:"string"==typeof i["session-id"]&&(i.sessionId=i["session-id"]),"boolean"==typeof i.disableTelemetry?i["disable-telemetry"]=i.disableTelemetry:"boolean"==typeof i["disable-telemetry"]&&(i.disableTelemetry=i["disable-telemetry"]),"boolean"==typeof i.enableAccessibility?i["enable-accessibility"]=i.enableAccessibility:"boolean"==typeof i["enable-accessibility"]&&(i.enableAccessibility=i["enable-accessibility"]))}}catch(t){c={error:t}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(c)throw c.error}}var s=this._transformers,a=t?t.filter(function(t){return void 0!==t}).reduce(function(t,e){return Fy(Fy([],By(t),!1),By(e._transformers||[]),!1)},[]):[],c=zy.prototype.merge.apply(this,Fy([],By(t),!1)),a=(c.authOptions.authType!==u.AuthenticationType.subscriptionKey&&(c["subscription-key"]=c.subscriptionKey=void 0),void 0!==c.styleSet&&void 0===c.mapConfiguration&&(c.mapConfiguration=c.styleSet),c.mapConfiguration&&"string"!=typeof c.mapConfiguration&&(c.mapConfiguration=Dy(Dy({},c.mapConfiguration),{defaultConfiguration:c.mapConfiguration.defaultConfiguration||c.mapConfiguration.defaultStyle,configurations:c.mapConfiguration.configurations||c.mapConfiguration.styles})),this._transformers=Fy(Fy([],By(s||[]),!1),By(a.filter(function(t){return!s.includes(t)})),!1),this.transformRequest&&!this._transformers.includes(this.transformRequest)&&this._transformers.push(this.transformRequest),new Date(Date.UTC(2023,0))),l=new Date(this.styleDefinitionsVersion);return(isNaN(l.getTime())||l.getTime()<a.getTime())&&(console.warn("Style definition version ".concat(this.styleDefinitionsVersion," is invalid or deprecated, style definition version is unchanged (").concat(o,")")),this.styleDefinitionsVersion=o),this.transformRequest=Iy(this._transformers),c},Zy.prototype.addTransformer=function(t){this._transformers||(this._transformers=[]),this._transformers.push(t),this.transformRequest=Iy(this._transformers)},Zy.prototype.removeTransformer=function(e){this._transformers&&(this._transformers=this._transformers.filter(function(t){return e!==t}),this.transformRequest=Iy(this._transformers))},Zy._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},Zy);function Zy(){var t=null!==zy&&zy.apply(this,arguments)||this;return t.authOptions=nd(),t.disableTelemetry="atlas.azure.us"===qh,t["disable-telemetry"]=t.disableTelemetry,t.domain=qh,t.staticAssetsDomain=Hh,t.styleDefinitionsPath=Uh,t.styleDefinitionsVersion=Wh,t.styleAPIVersion=Gh,t.mapConfiguration=void 0,t.styleSet=void 0,t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.enableAccessibilityLocationFallback=!0,t.maxParallelImageRequests=ud(),t.refreshExpiredTiles=!0,t.subscriptionKey=dd(),t["subscription-key"]=t.subscriptionKey,t.sessionId=Zh,t["session-id"]=t.sessionId,t._transformers=[],t.transformRequest=void 0,t.workerCount=ld(),t.fadeDuration=300,t.localIdeographFontFamily="sans-serif",t.validateStyle=!1,t}Hy.getLayerGroup=function(t){return"string"!=typeof t&&t.metadata&&t.metadata["microsoft.maps:layerGroup"]?t.metadata["microsoft.maps:layerGroup"]:(t="string"!=typeof t?t.id:t).startsWith("microsoft.")&&4<=(t=t.split(".")).length?t[3]:void 0};var qy=Hy;function Hy(){}Wy.resolve=function(t){return new Wy(Promise.resolve(t))},Wy.reject=function(t){return new Wy(Promise.reject(t))},Wy.prototype.then=function(t,e){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).then(t,e)},Wy.prototype.catch=function(t){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).catch(t)},Wy.prototype.finally=function(t){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).finally(t)},Wy.prototype.hijackAndResolve=function(t){this._hijackedToResolve=t,this._resolve&&this._resolve(t)},Wy.prototype.hijackAndReject=function(t){this._hijackedToReject=t,this._reject&&this._reject(t)},Wy.prototype.switchWith=function(t){this.origin=t,this._toResolve=void 0,this._toReject=void 0};var Uy=Wy;function Wy(t){var r=this;this.isHijacked=function(){return void 0!==r._hijackedToResolve||void 0!==r._hijackedToReject},this.isResolved=function(){return void 0!==r._hijackedToResolve||void 0!==r._toResolve},this.isRejected=function(){return void 0!==r._hijackedToReject||void 0!==r._toReject},this.resultIfResolved=function(){return r._hijackedToResolve||r._toResolve},this.errorIfRejected=function(){return r._hijackedToReject||r._toReject},this._thenResolver=function(e,o){var n;r._hijackedToResolve?e(r._hijackedToResolve):r._hijackedToReject?o(r._hijackedToReject):(n=r.origin,r.origin.then(function(t){r.isHijacked()||(n!==r.origin?r._thenResolver(e,o):(r._toResolve=t,e(t)))}).catch(function(t){r.isHijacked()||(n!==r.origin?r._thenResolver(e,o):(r._toReject=t,o(t)))}))},this.origin=t,this[Symbol.toStringTag]=this.origin[Symbol.toStringTag]}var Gy={road:"Road",satellite:"Satellite",satellite_road_labels:"Hybrid",grayscale_dark:"Grayscale (Dark)",grayscale_light:"Grayscale (Light)",night:"Night",road_shaded_relief:"Terra",blank:"Blank",blank_accessible:"Blank (Accessible)",high_contrast_dark:"High contrast (Dark)",high_contrast_light:"High contrast (Light)"},Vy=window&&window.__assign||function(){return(Vy=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Ky=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},Yy=window&&window.__generator||function(n,r){var i,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(o){return function(t){var e=[o,t];if(i)throw new TypeError("Generator is already executing.");for(;c=l&&e[l=0]?0:c;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,s=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))c.label=e[1];else if(6===e[0]&&c.label<a[1])c.label=a[1],a=e;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(e)}}e=r.call(n,c)}catch(t){e=[6,t],s=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},Jy=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},$y=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},Xy=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qy=(I.prototype.updateIndoorState=function(t,e){var o,n,r=this,i=this.map.styles.getMapConfiguration();i?(this.preservedPreindoorMapConfiguration=i,o=this.map.getStyle().style?"".concat(this.map.getStyle().style,"_indoor").concat("dark"===t?"_dark":"","_tileset_").concat(e):void 0,this.map.styles.setMapConfiguration("defaultIndoor_".concat(e),"microsoft-maps:default"===i?o:void 0)):(n=(null==(i=this.indoorState)?void 0:i.tilesetId)!==e,this.indoorState={tilesetId:e,theme:t},this.initStyleset(),this.definitions().then(function(t){var e=(r.map.getStyle().style||t.defaultConfiguration).replace("_indoor_dark","").replace("_indoor",""),o="".concat(e,"_indoor"),e=t.configurations.find(function(t){return t.name.startsWith(o)});e&&r.map.setStyle({style:e.name},!n)}))},I.prototype.unsetIndoorState=function(){var o=this,t=this.preservedPreindoorMapConfiguration;t?this.map.styles.setMapConfiguration(t):(this.indoorState=void 0,this.initStyleset(),this.definitions().then(function(t){var e=o.map.getStyle().style;e.includes("_indoor")&&e.split("_indoor")[0]?o.map.setStyle({style:e.split("_indoor")[0]}):o.map.setStyle({style:void 0})}))},I.prototype.initStyleset=function(){var t,o=this;return t=this.serviceOptions.mapConfiguration?"string"==typeof this.serviceOptions.mapConfiguration?(t=this.map.authentication?this.map.authentication.initialize():Promise.resolve(),new Uy(t.then(function(){return o._request(o.serviceOptions.domain,"".concat($,"/mapconfigurations/metadata/").concat(o.serviceOptions.mapConfiguration),"StyleDefinitions").then(function(t){return Vy(Vy({},t),{defaultConfiguration:t.defaultConfiguration||t.defaultStyle,configurations:t.configurations||t.styles})})}))):Uy.resolve(this.serviceOptions.mapConfiguration):(t=this.map.authentication?this.map.authentication.initialize():Promise.resolve(),new Uy(t.then(function(){return o._request(o.serviceOptions.staticAssetsDomain,"".concat(J,"/").concat($),"StyleDefinitions",{version:o.serviceOptions.styleDefinitionsVersion,mcv:ut.replace(/\./g,"")}).then(function(e){return{version:isNaN(e.version)?0:parseFloat(e.version),defaultConfiguration:e.defaultStyle,configurations:e.styles.filter(function(t){return o.indoorState?"auto"===o.indoorState.theme?t.name.endsWith("dark"===t.theme?"_indoor_dark":"_indoor"):t.name.endsWith("dark"===o.indoorState.theme?"_indoor_dark":"_indoor"):!t.name.includes("indoor")}).map(function(t){return{copyright:t.copyright.join(" "),name:t.name,displayName:function(t){t=o.indoorState&&t.includes("_indoor")?t.split("_indoor")[0]:t;return t in Gy?Gy[t]:t}(t.name),theme:t.theme,thumbnail:new ct({domain:o.serviceOptions.staticAssetsDomain,path:t.thumbnail,protocol:"https"}).toString(),url:new ct({domain:o.serviceOptions.staticAssetsDomain,path:"".concat(J,"/").concat($,"/").concat(t.name),queryParams:{styleVersion:void 0!==e.version&&null!==e.version?e.version:o.serviceOptions.styleDefinitionsVersion,mcv:ut.replace(/\./g,"")},protocol:"https"}).toString()}})}})}))),this.initPromise&&this.initPromise.switchWith(t),this.initPromise=t,this.initPromise.then(function(t){return o.map._invokeEvent("mapconfigurationchanged",t)}),this.initPromise},I.prototype.getStyle=function(t){t=this._lookUp(t);if(!t)throw Error("Style definition is not available.");if(t.url)return t.url;if(t.style)return t.style;throw Error("Style definition neither contains URL nor style object.")},I.prototype.deriveNewStyleAndLayerGroups=function(t,e){for(var o,n,r=this.map.getStyle(),i=this.map.getTraffic(),s={},a=0;a<e.layers.length;a++){var c=e.layers[a],l=qy.getLayerGroup(c);l?(s[l]||(s[l]=[]),s[l].push(c),r.showBuildingModels||"fill-extrusion"!==c.type?"fill-extrusion"===c.type&&(c.layout=null!=(o=c.layout)?o:{},c.layout.visibility="visible"):(c.layout=null!=(o=c.layout)?o:{},c.layout.visibility="none"),"none"!==i.flow&&l&&l==="traffic_".concat(i.flow)&&"line"==c.type&&(c.layout=null!=(n=c.layout)?n:{},c.layout.visibility="visible"),"labels"!==l&&"labels_places"!==l&&"labels_indoor"!==l||"symbol"!==c.type||(r.showLabels&&"none"!==(null==(n=c.layout)?void 0:n.visibility)?(c.layout=null!=(l=c.layout)?l:{},c.layout.visibility="visible"):(c.layout=null!=(l=c.layout)?l:{},c.layout.visibility="none"))):s[c.id]=[c]}return[e,s]},I.prototype.injectUserLayersIntoStyle=function(s,a,c){return s?this.map.layers._getUserLayers().reduce(function(o,e){var n,t,r,i;return e.layer instanceof nh||(n=(null==(t=null==(t=null==c?void 0:c[e.before])?void 0:t[0])?void 0:t.id)||e.before,t=s.layers.find(function(t){return t.id===e.layer.getId()}),-1<(r=a.layers.findIndex(function(t){return t.id===e.layer.getId()}))&&a.layers.splice(r,1),t&&(r=new Set(Array.from(e.layer._getSourceIds()).map(function(t){return s.sources[t]?{source:s.sources[t],id:t}:void 0}).filter(function(t){return void 0!==t})),-1<(i=n?o.layers.findIndex(function(t){return t.id===n}):-1)?o.layers.splice(i,0,t):o.layers.push(t),r.forEach(function(t){var e=t.source,t=t.id;o.sources[t]=e}))),o},Vy({},a)):a},I.prototype.setStyle=function(r,t){var i=this,e=(void 0===t&&(t=!0),this._lookUp(r));if(!e)throw Error("Style definition ".concat(r.style," is not available."));if(!e.url&&!e.style)throw Error("Style definition neither contains URL nor style object.");var o=function(){return i._onStyleData(e)},s=function(){i.map.events.remove("styledata",o),i.map.events.addOnce("styledata",o)},n=r&&r.customStyleTransform?function(t,e){t=r.customStyleTransform(t,e);return s(),t}:function(t,e){var o=Vy(Vy({},e),{layers:$y([],Jy(e.layers),!1),sources:Vy({},e.sources)}),n=r.progressiveLoading&&!i.map._isLoaded(),e=(n&&Array.isArray(null==e?void 0:e.layers)&&((o=Vy({},e)).layers=o.layers.map(function(t){var e=Vy({},t);return t.layout&&(e.layout=Vy({},t.layout)),e})),Jy(i.deriveNewStyleAndLayerGroups(t,o),2)),o=e[0],e=e[1],n=(n&&(n=r.progressiveLoadingInitialLayerGroups,Array.isArray(n))&&0<n.length&&i._deferLayerGroupVisibilities(e,n),i.injectUserLayersIntoStyle(t,o,e)),t=Object.entries(e).map(function(t){var t=Jy(t,2),e=t[0],t=t[1];return i._buildFundamentalLayerFrom(t,e)}),o=i.map.layers._getUserLayers().reduce(function(t,e){var o=e.before?t.findIndex(function(t){return t.getId()===e.before}):-1;return-1<o?t.splice(o,0,e.layer):t.push(e.layer),t},t);return i.map.layers.layerIndex=o,i.map.sources._syncSources(n.sources),s(),n};this.map._getMap().setStyle(e.url||e.style,{diff:t,validate:this.serviceOptions.validateStyle,transformStyle:n})},I.prototype.getTheme=function(t){t=this._lookUp(t);if(t)return t.theme.toLowerCase()},I.prototype.getThemeAsync=function(e){return Ky(this,void 0,void 0,function(){return Yy(this,function(t){switch(t.label){case 0:return[4,this._lookUpAsync(e)];case 1:return[2,t.sent().theme]}})})},I.prototype.setMapConfiguration=function(t,o){var n=this;"string"==typeof(this.serviceOptions.mapConfiguration=t)?this.initStyleset():this.initPromise?this.initPromise.hijackAndResolve(t):this.initPromise=Uy.resolve(t),this.definitions().then(function(t){var e=t.defaultConfiguration;t.configurations.find(function(t){return t.name===o})&&(e=o),n.map.setStyle({style:e})})},I.prototype.getMapConfiguration=function(){return this.serviceOptions.mapConfiguration},I.prototype.setStyleSet=function(t){this.updateIndoorState("indoor_dark"===t?"dark":"light",null)},I.prototype.getStyleSet=function(){return void 0!==this.indoorState?"dark"===this.indoorState.theme?"indoor_dark":"indoor":"base"},I.prototype.clearStyleSet=function(){this.unsetIndoorState()},I.prototype._buildFundamentalLayerFrom=function(t,e){if(t&&0<t.length)return(t=new xf(t,e)).onAdd(this.map),t;throw new Error("Unable to construct fundamental map layer for ID: ".concat(e,"."))},I.prototype._transformStyleRequest=function(t,e){t.includes(H)&&(e.url=e.url.replace(H,this.serviceOptions.domain)),t.includes(K)&&(e.url=e.url.replace(K,J)),t.includes(Y)&&(e.url=e.url.replace(Y,$)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&((t=new URL(e.url)).searchParams.get(Z)||(t.searchParams.set(Z,this.serviceOptions.styleAPIVersion),e.url=t.href),null!=(t=this.map.authentication)&&t.signRequest(e),this._deleteAuthTokenForStaticAssets(e))},I.prototype._request=function(n,r,i,s){var a;return void 0===s&&(s={}),Ky(this,void 0,void 0,function(){var e,o;return Yy(this,function(t){switch(t.label){case 0:return o={url:new ct({protocol:"https",domain:n,path:r,queryParams:Vy(((o={})[Z]=this.serviceOptions.styleAPIVersion,o),s)}).toString()},"function"==typeof this.serviceOptions.transformRequest&&i&&(o=this.serviceOptions.transformRequest(o.url,i)),null!=(a=this.map.authentication)&&a.signRequest(o),this._deleteAuthTokenForStaticAssets(o),e={method:"GET",mode:"cors"},o.credentials&&(e.credentials=o.credentials),o.headers&&(e.headers=o.headers),[4,fetch(o.url,e).then(function(t){if(t.ok)return t.json();throw new Error("HTTP ".concat(t.status,": ").concat(t.statusText," "))})];case 1:return[2,t.sent()]}})})},I.prototype._deleteAuthTokenForStaticAssets=function(t){t.url.startsWith("https://".concat(this.serviceOptions.staticAssetsDomain,"/").concat(J))&&(delete t.headers[Q],delete t.headers[q])},I);function I(t,e){var u=this;this.definitions=function(){var t=u.initPromise||u.initStyleset();return t},this.indoorState=void 0,this.preservedPreindoorMapConfiguration=void 0,this._progressiveLoadingState={mapStyle:void 0,pendingVisibilityChange:void 0},this._deferLayerGroupVisibilities=function(e,t){var o,r,n,i,s=t.filter(function(t){return t in e});0!==s.length&&(o=u.map._getMap(),r=o.getZoom(),n=u.map.getStyle().style,u._progressiveLoadingState.pendingVisibilityChange&&(u.map.events.remove("load",u._progressiveLoadingState.pendingVisibilityChange),u._progressiveLoadingState.pendingVisibilityChange=null),u._progressiveLoadingState.mapStyle=n,(i=Object.entries(e).reduce(function(t,e){var e=Jy(e,2),o=e[0],e=e[1],n=s.includes(o);return $y($y([],Jy(t),!1),Jy(e.filter(function(t){if("custom"===t.type)return!1;if(n)if("number"==typeof t.maxzoom&&"number"==typeof t.minzoom){if(r<=t.maxzoom&&r>=t.minzoom)return!1}else if("number"==typeof t.minzoom){if(r>=t.minzoom)return!1}else{if("number"!=typeof t.maxzoom)return!1;if(r<=t.maxzoom)return!1}return"none"!==(null==(t=t.layout)?void 0:t.visibility)})),!1)},[])).forEach(function(t){t.layout=t.layout||{},t.layout.visibility="none"}),u._progressiveLoadingState.pendingVisibilityChange=function(){u._progressiveLoadingState.pendingVisibilityChange=null;var t=u.map.getStyle().style;n===t&&(i.forEach(function(t){t.layout.visibility="visible",o.setLayoutProperty(t.id,"visibility","visible")}),null!=(t=u.map.copyrightDelegate))&&t.reloadAttribution()},u.map.events.addOnce("load",u._progressiveLoadingState.pendingVisibilityChange))},this._onStyleData=function(t){u.map.events.invoke("stylechanged",{style:t.name,map:u.map,type:"stylechanged"})},this._lookUp=function(t){var e,o,n=u.definitions(),r=n.errorIfRejected(),i=n.resultIfResolved();if(r||!i)return null;var n=i.configurations,s=void 0;try{for(var a=Xy(n),c=a.next();!c.done;c=a.next()){var l=c.value;if(l.name===t.style)return l;l.name===i.defaultConfiguration&&(s=s||l)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(e)throw e.error}}return s=s||n[0]},this._lookUpAsync=function(o){return Ky(u,void 0,void 0,function(){var e;return Yy(this,function(t){switch(t.label){case 0:return[4,this.definitions()];case 1:return e=t.sent(),[2,e.configurations.find(function(t){return t.name===(o.style||e.defaultConfiguration)})||e.configurations.find(function(t){return t.name===e.defaultConfiguration})||e.configurations[0]]}})})},this.map=t,this.serviceOptions=e}var tm=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},em=(om.prototype.add=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=tm(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.indicators.has(i)||(this.indicators.add(i),i.attach(this.map))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},om.prototype.clear=function(){var e=this;this.indicators.forEach(function(t){e.indicators.delete(t),t.remove()})},om.prototype.remove=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=tm(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.indicators.has(i)&&(this.indicators.delete(i),i.remove())}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},om.prototype.getIndicators=function(){return Array.from(this.indicators)},om.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector(".".concat(om.Css.collection));return t||((t=document.createElement("div")).setAttribute("aria-label","map data"),t.setAttribute("role","listbox"),t.classList.add(om.Css.collection),this.map.getMapContainer().appendChild(t)),t},om.Css={collection:"accessible-indicator-collection-container"},om);function om(t){this.map=t,this.indicators=new Set}var nm,rm,Ut=window&&window.__extends||(nm=function(t,e){return(nm=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}nm(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),im=window&&window.__assign||function(){return(im=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},sm=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},am=window&&window.__generator||function(n,r){var i,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(o){return function(t){var e=[o,t];if(i)throw new TypeError("Generator is already executing.");for(;c=l&&e[l=0]?0:c;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,s=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))c.label=e[1];else if(6===e[0]&&c.label<a[1])c.label=a[1],a=e;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(e)}}e=r.call(n,c)}catch(t){e=[6,t],s=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},cm=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},lm=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},um=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ar=(Ut(T,rm=_t),Object.defineProperty(T.prototype,"isDisposed",{get:function(){return this.removed},enumerable:!1,configurable:!0}),T.prototype.getCanvas=function(){return this.map.getCanvas()},T.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},T.prototype.getMapContainer=function(){return this.map.getContainer()},T.prototype.getServiceOptions=function(){return P(this.serviceOptions,Ny._cloneCustomizer)},T.prototype.setServiceOptions=function(t){this.serviceOptions=(new Ny).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap();t=this.styles.serviceOptions.mapConfiguration!==this.serviceOptions.mapConfiguration||this.styles.serviceOptions.staticAssetsDomain!==this.serviceOptions.staticAssetsDomain||this.styles.serviceOptions.styleDefinitionsVersion!==this.serviceOptions.styleDefinitionsVersion||this.styles.serviceOptions.domain!==this.serviceOptions.domain||this.styles.serviceOptions.styleAPIVersion!==this.serviceOptions.styleAPIVersion;this.styles.serviceOptions=this.serviceOptions,t&&(this.styles.initPromise=null,this.setStyle({}))},T.prototype.addRequestTransformer=function(t){this.serviceOptions.addTransformer(t)},T.prototype.removeRequestTransformer=function(t){this.serviceOptions.removeTransformer(t)},T.prototype.setCamera=function(t,e){if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var o,n=(new Vf).merge({maxZoom:this.getCamera().maxZoom},t),r=this._generateSafeBounds(n.bounds),i={padding:n.padding,offset:n.offset,maxZoom:n.maxZoom};if(!(o=this.map.cameraForBounds(r,i)))throw s={message:"The map cannot be fit to the current canvas with the given CameraBoundsOptions.",containerWidth:null==(s=null==(s=this.map)?void 0:s.getContainer())?void 0:s.clientWidth,containerHeight:null==s?void 0:s.clientHeight,safeBounds:r,cameraForBoundsOptions:i},new Error(JSON.stringify(s));"pitch"in t&&(o.pitch=t.pitch),"bearing"in t&&(o.bearing=t.bearing),"minPitch"in t&&this.map.setMinPitch(t.minPitch),"maxPitch"in t&&this.map.setMaxPitch(t.maxPitch),this.map.setMaxZoom(n.maxZoom),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(n.maxBounds)}else{i=(new $f).merge(this.getCamera(),t);i.centerOffset&&2<=i.centerOffset.length&&(s=i.centerOffset,(n=xc([i.center],i.zoom))[0][0]+=s[0],n[0][1]+=s[1],i.center=bc(n,i.zoom)[0]),o={center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,around:void 0},this.map.setMinZoom(i.minZoom),this.map.setMaxZoom(i.maxZoom),i.minPitch&&this.map.setMinPitch(i.minPitch),i.maxPitch&&this.map.setMaxPitch(i.maxPitch),this._invokeEvent("minzoomchanged",this.map.getMinZoom()),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(i.maxBounds)}r?this.map.setMaxBounds(r):this.map.setMaxBounds(null);var s=(new Df).merge(t),n={duration:s.duration,easing:function(t){return t},offset:[0,0],animate:!0},i={fromControl:e};"jump"===s.type?this.map.jumpTo(o,i):"ease"===s.type?this.map.easeTo(im(im({},o),n),i):"fly"===s.type&&this.map.flyTo(im(im({},o),n),i)},T.prototype.setCameraBounds=function(t){this.setCamera(t)},T.prototype.getCamera=function(){var t=this.map.getBounds().getSouthWest().toArray(),e=this.map.getBounds().getNorthEast().toArray();return{zoom:this.map.getZoom(),center:this.map.getCenter().toArray(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),bounds:new S(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},T.prototype.setStyle=function(t,e){void 0===e&&(e=!0),delete t.preserveDrawingBuffer;t=(new Ey).merge(this.styleOptions,t),t.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(t.autoResize),t.language!==this.styleOptions.language&&(this.localizedStringsPromise=Mh.getStrings(t.language)),t.renderWorldCopies!==this.styleOptions.renderWorldCopies&&this.map.setRenderWorldCopies(t.renderWorldCopies),t.showFeedbackLink!==this.styleOptions.showFeedbackLink&&this.copyrightControl.setOptions({showFeedbackLink:t.showFeedbackLink}),t.customAttribution!==this.styleOptions.customAttribution&&this.copyrightControl.setOptions({customAttribution:t.customAttribution}),t.showLogo!==this.styleOptions.showLogo&&this.copyrightControl.setOptions({showLogo:t.showLogo}),t.showTileBoundaries!==this.styleOptions.showTileBoundaries&&(this.map.showTileBoundaries=t.showTileBoundaries),t.showBuildingModels&&console.warn("showBuildingModels is deprecated."),e=e&&this.styleOptions.language===t.language&&this.styleOptions.view===t.view;this.styleOptions=t,this._setStyleComponents(t,e)},T.prototype.getStyle=function(){return a(this.styleOptions)},T.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},T.prototype.addPins=function(t,e){var e=(new hy).merge(e),o=this.layers.getLayerById(e.name),n=!1;if(o||(n=!0,o=new Tp("".concat(e.name,"-source"),e.name,{source:"".concat(e.name,"-source"),minZoom:e.minZoom,maxZoom:e.maxZoom,iconOptions:{anchor:"center",size:e.iconSize,image:["case",["has","icon"],["get","icon"],e.icon],ignorePlacement:!e.cluster,opacity:e.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],e.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[e.textFont]]],size:["case",["has","point_count"],20,e.fontSize],ignorePlacement:!e.cluster,opacity:e.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[e.textOffset[0]/16,e.textOffset[1]/16]]],color:e.fontColor}})),!(o instanceof Tp))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a SymbolLayer.")+"A SymbolLayer should be used for rendering pins.");var r=o.getSource(),i=("string"==typeof r?(s=r,r=this.sources.getById(s)):s=r.getId(),!1);if(r||(i=!0,r=new kl(s,{cluster:e.cluster})),!(r instanceof kl))throw new Error("The source with name '".concat(s,"' already exists but it is not a DataSource.")+"New data can only be added to a DataSource.");i&&this.sources.add(r),n&&this.layers.add(o,e.before);var s=new Gc(t);e.overwrite?r.setShapes(s):r.add(s)},T.prototype.addCircles=function(t,e){var e=(new ry).merge(e),o=this.layers.getLayerById(e.name),n=!1;if(o||(n=!0,o=new Cu("".concat(e.name,"-source"),e.name,{source:"".concat(e.name,"-source"),minZoom:e.minZoom,maxZoom:e.maxZoom,opacity:e.opacity,radius:["case",["has","radius"],["get","radius"],e.radius],color:["case",["has","color"],["get","color"],e.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],e.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],e.outlineWidth]})),!(o instanceof Cu))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a BubbleLayer.")+"A BubbleLayer should be used for rendering circles.");var r=o.getSource(),i=("string"==typeof r?(s=r,r=this.sources.getById(s)):s=r.getId(),!1);if(r||(i=!0,r=new kl(s)),!(r instanceof kl))throw new Error("The source with name '".concat(s,"' already exists but it is not a DataSource.")+"New data can only be added to a DataSource.");i&&this.sources.add(r),n&&this.layers.add(o,e.before);var s=new Gc(t);e.overwrite?r.setShapes(s):r.add(s)},T.prototype.addLinestrings=function(t,e){var e=(new cy).merge(e),o=this.layers.getLayerById(e.name),n=!1;if(o||(n=!0,o=new ep("".concat(e.name,"-source"),e.name,{source:"".concat(e.name,"-source"),minZoom:e.minZoom,maxZoom:e.maxZoom,lineCap:e.cap,lineJoin:e.join,strokeOpacity:e.opacity,strokeColor:["case",["has","color"],["get","color"],e.color],strokeWidth:["case",["has","width"],["get","width"],e.width]})),!(o instanceof ep))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a LineLayer.")+"A LineLayer should be used for rendering linestrings.");var r=o.getSource(),i=("string"==typeof r?(s=r,r=this.sources.getById(s)):s=r.getId(),!1);if(r||(i=!0,r=new kl(s)),!(r instanceof kl))throw new Error("The source with name '".concat(s,"' already exists but it is not a DataSource.")+"New data can only be added to a DataSource.");i&&this.sources.add(r),n&&this.layers.add(o,e.before);var s=new Gc(t);e.overwrite?r.setShapes(s):r.add(s)},T.prototype.addPolygons=function(t,e){var e=(new my).merge(e),o=this.layers.getLayerById(e.name),n=!1;if(o||(n=!0,o=new gp("".concat(e.name,"-source"),e.name,{source:"".concat(e.name,"-source"),minZoom:e.minZoom,maxZoom:e.maxZoom,fillOpacity:e.opacity,fillColor:["case",["has","color"],["get","color"],e.color]})),!(o instanceof gp))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a PolygonLayer.")+"A PolygonLayer should be used for rendering linestrings.");var r=o.getSource(),i=("string"==typeof r?(s=r,r=this.sources.getById(s)):s=r.getId(),!1);if(r||(i=!0,r=new kl(s)),!(r instanceof kl))throw new Error("The source with name '".concat(s,"' already exists but it is not a DataSource.")+"New data can only be added to a DataSource.");i&&this.sources.add(r),n&&this.layers.add(o,e.before);var s=new Gc(t);e.overwrite?r.setShapes(s):r.add(s)},T.prototype.addRaster=function(t,e){var o,e=(new _y).merge(e),n=this.layers.getLayerById(e.name);if(!((n=n||new Yp({maxZoom:e.maxZoom,minZoom:e.minZoom,opacity:e.opacity,tileSize:256,tileUrl:"{subdomain}"},e.name))instanceof Yp))throw new Error("A layer with name '".concat(e.name,"' already exists but it is not a TileLayer.")+"A TileLayer should be used for rendering raster images.");if("{subdomain}"!==n.getOptions().tileUrl)throw new Error("A TileLayer with name '".concat(e.name,"' already exists but was configured ")+"for a single tile url [default for new TileLayer(...)].");(o=!e.overwrite&&n.getOptions().subdomains||[]).push.apply(o,lm([],cm(t),!1)),n._setOptionsNoUpdate({subdomains:o}),this.layers.add(n,e.before)},T.prototype.getLayers=function(){return this.layers.getLayers().map(function(t){return t.getId()})},T.prototype.removeLayers=function(t){var e,o;try{for(var n=um(t),r=n.next();!r.done;r=n.next()){var i,s=r.value;this.layers.getLayerById(s)&&(this.layers.remove(s),i="".concat(s,"-source"),this.sources.getById(i))&&this.sources.remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},T.prototype.addHtml=function(t,e){t.id||(t.id="marker_".concat(Ia()));var o=new Oh({htmlContent:t});return this.markers.add(o,e),t.id},T.prototype.removeHtml=function(t){this.markers.remove(t)},T.prototype.addEventListener=function(t,e,o){this.events._addLegacy(t,e,o)},T.prototype.removeEventListener=function(t,e,o){this.events._removeLegacy(t,e,o)},T.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},T.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},T.prototype.addControl=function(t,e){this.controls.add(t,e)},T.prototype.removeControl=function(t){this.controls.remove(t)},T.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,o=this.trafficOptions.flow;if(this.trafficOptions=(new zs).merge(this.trafficOptions,t),this.controls.getControls().filter(function(t){return t instanceof Hs}).forEach(function(t){return t.updateButtonState()}),this.incidentDelegate&&(this.trafficOptions.incidents?e||this.incidentDelegate.addToMap():this.incidentDelegate.removeFromMap()),this.trafficOptions.flow&&"none"!==this.trafficOptions.flow){["absolute","relative-delay"].includes(this.trafficOptions.flow)&&console.warn("The 'absolute' and 'relative-delay' flow options are deprecated. Please use 'relative' instead.");try{this.trafficOptions.flow!==o&&this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=o,t}}else this.flowDelegate.removeFromMap()},T.prototype.getTraffic=function(){return a(this.trafficOptions)},T.prototype.remove=function(){this.dispose()},T.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear(),this.indicators.clear()},T.prototype.dispose=function(){var t;for(this.clear(),this.map.remove(),null!=(t=this.authentication)&&t.dispose(),this.removed=!0,window.removeEventListener("resize",this._windowResizeCallback);this.getMapContainer().firstChild;){var e=this.getMapContainer().firstChild;this.getMapContainer().removeChild(e)}},T.prototype.resize=function(t,e,o){"number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e?o=t:(t=t,this.getMapContainer().style.height="number"==typeof t?"".concat(t,"px"):t,this.getMapContainer().style.width="number"==typeof e?"".concat(e,"px"):e);t=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden",this.map.resize(o),this.getMapContainer().style.overflow=t},T.prototype.pixelsToPositions=function(t){var e,o,n=[];try{for(var r=um(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.unproject(s);n.push(new Dc(a.lng,a.lat))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n},T.prototype.positionsToPixels=function(t){var e,o,n=[];try{for(var r=um(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.project(s);n.push(new Ba(a.x,a.y))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n},T.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},T.prototype.stop=function(){this.map.stop()},T.prototype.triggerRepaint=function(){this.map.triggerRepaint()},T.prototype.enableElevation=function(t,e){this.map.setTerrain("string"==typeof t?{source:t,exaggeration:e}:{source:t.getId(),exaggeration:e})},T.prototype.disableElevation=function(){this.map.setTerrain(null)},T.prototype._getMap=function(){return this.map},T.prototype._rebuildStyle=function(e){return void 0===e&&(e=!0),sm(this,void 0,void 0,function(){return am(this,function(t){return this.styles.setStyle(this.styleOptions,e),this.imageSprite._restoreImages(),[2]})})},T.prototype._isLoaded=function(){return this.loaded},T.prototype._isReady=function(){return this.ready},T.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise},T.prototype._sendRequest=function(t,e,o){var n;return(n="function"==typeof this.serviceOptions.transformRequest?this.serviceOptions.transformRequest(t,e):n)?fetch(n.url||t,{credentials:n.credentials,headers:im(im({},o),n.headers),method:"GET",mode:"cors"}):fetch(t,{headers:o,method:"GET",mode:"cors"})},T.prototype._substituteDomainLanguageViewAndSignInRequest=function(t,e){var o;(t.includes(U)||t.includes(H))&&(o=new RegExp("[^{]".concat(U,"[^}]")),t.match(o)&&(e.url=e.url.replace(U,H)),ct.protoRegEx.test(this.serviceOptions.domain)?(o=e.url.indexOf(H),e.url=this.serviceOptions.domain+e.url.substring(o+H.length)):e.url=e.url.replace(H,this.serviceOptions.domain)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&null!=(o=this.authentication)&&o.signRequest(e),t.includes(V)&&(e.url=e.url.replace(V,this.styleOptions.language)),t.includes(W)&&(e.url=this.styleOptions.view?e.url.replace(W,this.styleOptions.view):e.url.replace(W,"").replace("&".concat(G,"="),""))},T.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},T.prototype._setStyleComponents=function(a,c){var l=this;void 0===c&&(c=!0),this.removed||this.styles.definitions().then(function(t){var e,o,n=!0;if(l.styleOptions.style)try{for(var r=um(t.configurations),i=r.next();!i.done;i=r.next()){var s=i.value;if(l.styleOptions.style===s.name){n=!1;break}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}n&&(l.styleOptions.style=t.defaultConfiguration),l.styleOptions=a,l._rebuildStyle(c)})},T.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!od&&yd(t.authOptions),t.domain&&!Yh&&md(t.domain),t.styleDefinitionsPath&&!Jh&&gd(t.styleDefinitionsPath),t.workerCount&&!Xh&&vd(t.workerCount),t.maxParallelImageRequests&&!Qh&&wd(t.maxParallelImageRequests),!t.subscriptionKey&&!t["subscription-key"]||od||xd(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||ed||bd(t.sessionId||t["session-id"]),t.language&&!td&&_d(t.language),!t.userRegion&&!t.view||Kh||Sd(t.userRegion||t.view))},T.prototype._generateSafeBounds=function(t){if(t){var e=S.getSouth(t),o=S.getWest(t),n=S.getNorth(t),r=S.getEast(t);if(!(isFinite(e)&&isFinite(o)&&isFinite(n)&&isFinite(r)))throw new Error("The bounds specified are invalid: [".concat(t,"]"));for(;r<o;)r+=360;return new S([o,e,r,n])}return t},T.prototype._detectHighContrast=function(){var t,e;switch(Td.getHighContrastMode()){case"invert":case"light":t=T.Css.hcLight,e="high_contrast_light";break;case"dark":t=T.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},T.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},T);function T(t,e){var o,n,r=rm.call(this)||this;r.removed=!1,r.loaded=!1,r.ready=!1,r._windowResizeCallback=function(){return r.resize()},r._updateGlobalDefaults(e),r.serviceOptions=(new Ny).merge(e),r.styleOptions=(new Ey).merge(e),r.trafficOptions=new zs,r.styles=new Qy(r,r.serviceOptions),r.serviceOptions.authOptions.subscriptionKey&&(r.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(r.serviceOptions.authOptions.subscriptionKey)),o=r.serviceOptions.authOptions.clientId||(r.serviceOptions.authOptions.subscriptionKey?r.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting"),r.insights&&r.insights.setAuthenticatedUserContext(r.serviceOptions.sessionId,o),arguments[2]&&"ENVIRONMENT"in window&&window.ENVIRONMENT.hmr?(n=arguments[2],r.ready=!0,r.loaded=!0):(o={antialias:r.styleOptions.antialias,attributionControl:!1,container:t,fadeDuration:r.serviceOptions.fadeDuration,localIdeographFontFamily:r.serviceOptions.localIdeographFontFamily,preserveDrawingBuffer:r.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:r.serviceOptions.refreshExpiredTiles,renderWorldCopies:r.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var o={url:t};return"Tile"===e||"Source"===e?(t.includes(U)&&r.insights&&r.insights.trackEvent({name:"TileLoad"}),r._substituteDomainLanguageViewAndSignInRequest(t,o)):"Style"!==e&&"SpriteJSON"!==e&&"SpriteImage"!==e&&"Glyphs"!==e||r.styles._transformStyleRequest(t,o),r.serviceOptions.transformRequest&&Cs(o,r.serviceOptions.transformRequest(o.url,e)),o}},n=new D.Map(o));try{r.map=n,r.controls=new nf(r),r.events=new hf(r),r.imageSprite=new gf(r),r.layers=new Lf(r),r.markers=new yf(r),r.sources=new If(r),r.popups=new Af(r),r.indicators=new em(r),r.map.getContainer().classList.add(T.Css.container),r.map.getCanvasContainer().classList.add(T.Css.canvasContainer),r.map.getCanvas().classList.add(T.Css.canvas),r._detectHighContrast(),r.copyrightControl=new qd({showFeedbackLink:r.styleOptions.showFeedbackLink,showLogo:r.styleOptions.showLogo,customAttribution:r.styleOptions.customAttribution}),r.controls.add(r.copyrightControl,{position:u.ControlPosition.NonFixed});var i=r.authentication?r.authentication.initialize():Promise.resolve();if(r.removed)return r;var s=function(){r.loaded=!0,r.map.off("load",s)},a=(r.map.on("load",s),function(){r.ready=!0,r.map.off("styledata",a),r.events.invoke("ready",{map:r,type:"ready"})});r.map.on("styledata",a),r._setAutoResize(r.styleOptions.autoResize),r.map.showTileBoundaries=r.styleOptions.showTileBoundaries,r.localizedStringsPromise=Mh.getStrings(r.styleOptions.language),i.then(function(){return r.styles.definitions()}).then(function(t){if(!r.removed){if(r.authentication&&!r.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");r.serviceOptions["enable-accessibility"]&&r.accessibleMapDelegate.addToMap(),r._setStyleComponents(r.styleOptions),r.copyrightDelegate&&r.copyrightDelegate.addToMap()}}).catch(function(t){t=t instanceof Error?t:new Error(t);r.events.invoke("error",{map:r,type:"error",error:t})}),r.setCamera(im(im({minZoom:1},e),{type:"jump",duration:0})),r.flowDelegate=new Vd(r),r.accessibleMapDelegate=new Gd(r),r.userInteractionDelegate=new tf(r,e),r.userInteractionDelegate.addToMap(),r.copyrightControl.setOptions({copyrightMessage:r.copyrightControl.getDefaultAttributions().join(", ")})}catch(t){throw t}return r}var pm=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},hm=window&&window.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||((n=n||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},No=(z.applyTemplate=function(e,o){var n,r,t,i=this,s=document.createElement("div");return s.classList.add(z.Css.template),e&&("boolean"!=typeof(o=o||{}).singleDescription&&(o.singleDescription=!0),o.sandboxContent="boolean"!=typeof o.sandboxContent||o.sandboxContent,o.title&&"string"==typeof o.content&&(o.content.includes("{title}")||o.content.includes("{name}"))||(e.title?o.title="{title}":e.name&&(o.title="{name}")),"boolean"!=typeof o.detectHyperlinks&&(o.detectHyperlinks=!0),"boolean"!=typeof o.parsePropertyPaths&&(o.parsePropertyPaths=!0),o.textColor&&(s.style.color=o.textColor),o.fillColor&&(s.style.backgroundColor=o.fillColor),o.title&&((t=this._applyStringTemplate(e,o.title,o)).innerText=t.textContent||t.innerText||"",this._appendChild(s,t,z.Css.title)),(n=document.createElement("div")).classList.add(z.Css.content),Array.isArray(o.content)?0<o.content.length&&o.content[0].propertyPath?this._appendChild(n,this._generateContent(e,o.content,o),z.Css.item):o.content.forEach(function(t){i._appendChild(n,i._generateContent(e,t,o),z.Css.item)}):(r=0,t=void(e.description&&Object.keys(e).forEach(function(t){i._ignoreProperty(t,e[t])||r++})),1===r||o.singleDescription&&e.description||2===r&&e.Snippet?(t=document.createElement("div")).innerHTML=e.description:t=this._generateContent(e,o.content,o),this._appendChild(n,t,z.Css.item)),""!==n.innerHTML)&&(o.sandboxContent?s.appendChild(z._createSandboxedIframe(n,o)):s.appendChild(n)),s},z._createSandboxedIframe=function(t,e){var o=document.createElement("iframe"),t=(o.sandbox.add("allow-popups"),t.innerHTML),n=!1,r=100,i=550,s=10,a=(document.body.scrollWidth<=340&&(i=300,r=50),t.split(/<(tr|div|br|li|h[0-9]|p>)/)),c=Math.max.apply(Math,hm([],pm(a.map(function(t){return t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length})),!1))-1,l=Math.ceil(3.5*c),c=(l<i&&(i=l,r=c),t.includes("<img")||t.includes("<video")?(n=!0,o.width="550px"):(l=-1<t.indexOf(z.Css.table)?25:20,s+=Math.max(.5*a.length*l,Math.ceil(t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/r)*l)),o.width=i+"px",o.height=n||280<s?"280px":s+"px",e.textColor?"color:".concat(e.textColor,";"):""),a=e.fillColor?"background-color:".concat(e.fillColor,";"):"",r='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" />'+'<link rel="stylesheet" href="'.concat(z._cssUrl,'" type="text/css"/>')+"<style>html, body{margin:0;padding:0;".concat(c).concat(a,"}</style></head>")+'<body><div class="'.concat(z.Css.template,'" style="padding:0;width:').concat(i-20,'px">').concat(t,"</div></body></html>");return void 0===o.srcdoc?o.src="data:text/html;charset=utf-8,"+encodeURI(r):o.srcdoc=r,o},z._appendChild=function(t,e,o){e&&(o&&(e.className=(e.className?e.className+" ":"")+o),t.appendChild(e))},z._generateContent=function(t,e,o){return e?Array.isArray(e)?this._generatePropertyInfoTable(t,e,o):this._applyStringTemplate(t,e,o):(e=this._generateDynamicTableHtml(t,null,o))?((t=document.createElement("div")).innerHTML=e,t):null},z._applyStringTemplate=function(t,e,o){if(e){for(var n,r,i=e,s=this._placeholderRx.exec(e);s;)2<=s.length&&(n=this._getPropertyValue(t,s[1],o),i=i.replace(s[0],n)),s=this._placeholderRx.exec(e);if(i)return(i=i.trim()).includes("<")&&(i=i.replace(/[\r\n]+/g,"<br/>")),(r=document.createElement("div")).innerHTML=i,r}return null},z._getPropertyValue=function(t,e,o,n){var r=o.parsePropertyPaths?e.split("/"):[e],i=r.length;if(0<i&&t){var s=r[0],a=t[s];if(o.detectHyperlinks&&"link"===e&&(!n||n.hyperlinkFormat)){var c,l,u,p=[];if(Array.isArray(a)?a.forEach(function(t){t.href?p.push(t):"string"==typeof t&&p.push({href:t})}):a.href&&p.push(a),0<p.length)return n&&n.hyperlinkFormat?c=n.hyperlinkFormat:o&&o.hyperlinkFormat&&(c=o.hyperlinkFormat),l=c&&c.target?c.target:"_blank",u=[],p.forEach(function(t){t.title||c&&c.label||!t.rel||u.push(t.rel," - "),u.push('<a href="',t.href,'" target="',l,'">'),t.title?u.push(t.title):c&&c.label?u.push(c.label):u.push(t.href),u.push("</a>","<br/>")}),u.pop(),u.join("")}if(null!=a){for(var h=void 0,h=1;h<i&&(a=a[r[h]],s=r[h],null!=a);h++);if(h===i&&null!=a){t=void 0;if((t=void 0!==a.value?a.value:a)instanceof Date)return n&&n.dateFormat?t.toLocaleString(void 0,n.dateFormat):o.dateFormat?t.toLocaleString(void 0,o.dateFormat):t.toISOString();if("object"==typeof t)return(d=this._generateDynamicTableHtml(t,r.slice(1),o))||"";if("number"==typeof t){if(n){if(n.dateFormat)return new Date(t).toLocaleString(void 0,n.dateFormat);if(n.numberFormat)return t.toLocaleString(void 0,n.numberFormat)}else if(/(timestamp|date)/gi.test(s))return new Date(t).toISOString();return t.toLocaleString(void 0,o.numberFormat)}if("string"==typeof t&&""!==t&&!/[\n\r<>\s]/g.test(t)&&(o.detectHyperlinks||n&&n.hyperlinkFormat)){var d,t=t.trim(),e=this._isUrlRx.test(t)||n&&n.hyperlinkFormat,f=this._isImageUrlRx.test(t)&&(e||t.startsWith("data:image")),y=this._emailRx.test(t);if(e||f||y)return e=void 0,d=void(n&&n.hyperlinkFormat?e=n.hyperlinkFormat:o&&o.hyperlinkFormat&&(e=o.hyperlinkFormat)),d=e&&e.target?' target="'.concat(e.target,'"'):' target="_blank"',n="".concat(e&&e.label?e.label:t),e&&e.scheme?t=e.scheme+t:y&&(t="mailto:"+t),o=e&&e.label?' alt="'.concat(e.label,'"'):"",(e&&e.isImage||f)&&(n='<img src="'.concat(t,'" style="max-width:100%"').concat(o,'"/>')),'<a href="'.concat(t,'"').concat(d,">").concat(n,"</a>")}return t.toString()}}}return""},z._generatePropertyInfoTable=function(o,t,n){var r,i;return o&&t&&0<t.length?((r=[]).push('<table class="'.concat((i=this).Css.table,'">')),t.forEach(function(t){var e=i._getPropertyValue(o,t.propertyPath,n,t);t.hideLabel?r.push('<tr><td colspan="2">',e,"</td></tr>"):(t=t.label||t.propertyPath.split("/")[0],r.push("<tr><th>",t,"</th><td>",e,"</td></tr>"))}),r.push("</table>"),(t=document.createElement("div")).innerHTML=r.join(""),t):null},z._generateDynamicTableHtml=function(e,t,o){var n,r,i,s,a=this;return!e||((n=[]).push('<table class="'.concat((r=this).Css.table,'">')),i=t&&0<t.length?t.join("/")+"/":"",s=0,Object.keys(e).forEach(function(t){a._ignoreProperty(t,e[t])||(n.push("<tr><th>",t,"</th><td>",r._getPropertyValue(e,i+t,o),"</td></tr>"),s++)}),0===s)?null:(n.push("</table>"),n.join(""))},z._ignoreProperty=function(t,e){switch(t){case"title":case"name":case"base":case"popupTemplate":case"anchor":case"icon":case"image":case"imageUrl":case"rotation":case"color":case"size":case"offset":case"strokeColor":case"strokeWidth":case"strokeOpacity":case"subType":case"fillColor":case"fillOpacity":case"visibility":case"visible":return!0;default:if(0===t.indexOf("_")||null==e||""===e)return!0}return!1},z._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,z._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,z._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,z._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,z._cssUrl=new ct({domain:B,path:"sdk/javascript/mapcontrol/".concat(pt.getEndpointVersion(),"/atlas.min.css")}).toString(),z.Css={template:"azure-maps-control-popup-template",title:"azure-maps-control-popup-template-title",content:"azure-maps-control-popup-template-content",item:"azure-maps-control-popup-template-content-item",table:"azure-maps-control-popup-template-table"},z);function z(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}Gt=new ct({domain:B,path:"sdk/javascript/mapcontrol/".concat(pt.getEndpointVersion(),"/mapbox-gl-rtl-text.min.js")});D.setRTLTextPlugin(Gt.toString(),function(t){t&&console.warn(t)},!0),u.HtmlMarker=Oh,u.Map=ar,u.Pixel=Ba,u.Popup=gh,u.PopupTemplate=No,u.Shape=w,u._getAssetDomain=function(){return R},u._getDomain=function(){return qh},u._hasMaxParallelImageRequests=Md,u._hasSetAuthenticationOptions=Cd,u._hasSetDomain=Pd,u._hasSetLanguage=Ad,u._hasSetSessionId=Ed,u._hasSetStyleDefinitionsPath=Ld,u._hasSetStyleDefinitionsVersion=function(){return $h},u._hasSetView=jd,u._hasWorkerCount=kd,u.addImageTemplate=function(t,e,o){!o&&Id[t.toLowerCase()]||(Id[t.toLowerCase()]=e)},u.clearPrewarmedResources=function(){D.clearPrewarmedResources()},u.control=r,u.data=go,u.getAllImageTemplateNames=function(){return Object.keys(Id)},u.getAuthenticationOptions=nd,u.getDomain=id,u.getImageTemplate=Od,u.getLanguage=pd,u.getMaxParallelImageRequests=ud,u.getSessionId=hd,u.getStaticAssetsDomain=rd,u.getStyleAPIVersion=cd,u.getStyleDefinitionsPath=sd,u.getStyleDefinitionsVersion=ad,u.getSubscriptionKey=dd,u.getUserRegion=function(){return zh},u.getVersion=function(){return pt.getFullVersion()},u.getView=fd,u.getWorkerCount=ld,u.internal=rt,u.isSupported=function(t){return!Eh.isIE()},u.layer=br,u.math=o,u.prewarm=function(){D.prewarm()},u.setAuthenticationOptions=yd,u.setDomain=md,u.setLanguage=_d,u.setMaxParallelImageRequests=wd,u.setSessionId=bd,u.setStyleAPIVersion=function(t){Gh=t},u.setStyleDefinitionsPath=gd,u.setStyleDefinitionsVersion=function(t){Wh=t,$h=!0},u.setSubscriptionKey=xd,u.setUserRegion=Sd,u.setView=function(t){zh=t,Kh=!0},u.setWorkerCount=vd,u.source=cr});
|