azure-maps-control 2.1.17 → 3.0.0-preview.1
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/ReadMe.md +5 -1
- package/dist/atlas-core-bare-snr-min.js +55 -0
- package/dist/atlas-core-bare-snr.js +20852 -0
- package/dist/atlas-core-bare.js +583 -230
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +66907 -0
- package/dist/atlas-core.js +36063 -32782
- package/dist/atlas-core.min.js +53 -1
- package/dist/atlas.css +104 -104
- package/dist/atlas.js +36058 -32777
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +53 -1
- package/package.json +16 -26
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +195 -13
|
@@ -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=t||self).atlas=t.atlas||{},t.maplibregl)}(this,function(u,o){"use strict";var h="default"in o?o.default:o,t="atlas.microsoft.com",e="atlas.microsoft.com",n="styling",r="2021-02-01",i="https://login.microsoftonline.com/",l="api-version",s="Authorization",a="Bearer ",c="jwt-sas ",p="{{azMapsDomain}}",d="{azMapsDomain}",f="{{azMapsView}}",m="view",_="{{azMapsLanguage}}",g="{{azMapsStylingPath}}",y="{{azMapsStylePath}}",v="styling",b="styles",w="2.0",S="Map-Agent",x="x-ms-client-id",T="Ms-Am-Request-Origin",E="MapControl",C="https://atlas.microsoft.com/",k="Session-Id",O=function(t,e){return(O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function I(t,e){function n(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var L=function(){return(L=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function A(t,s,a,l){return new(a=a||Promise)(function(n,e){function o(t){try{i(l.next(t))}catch(t){e(t)}}function r(t){try{i(l.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?n(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(o,r)}i((l=l.apply(t,s||[])).next())})}function P(n,o){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=o.call(n,a)}catch(t){e=[6,t],i=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function R(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&o>=t.length?void 0:t)&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function N(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)s.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return s}function M(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(N(arguments[e]));return t}var D=(z.prototype.merge=function(){for(var e,t,n,o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];try{for(var i=R(o),s=i.next();!s.done;s=i.next()){var a=s.value;if(a)for(var l in a)a.hasOwnProperty(l)&&this.hasOwnProperty(l)&&(void 0!==a[l]&&null!=a[l]?this[l]instanceof z?this[l].merge(a[l]):this[l]=a[l]:(n=n||new(Object.getPrototypeOf(this).constructor),this[l]=n[l]))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return this},z);function z(){}var B,j=(I(F,B=D),F);function F(){var t=null!==B&&B.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}var U=(q.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 "+t.status+": "+t.statusText)})},q.prototype.toString=function(){var t=this,e=Object.entries(t.options.queryParams).map(function(t){t=N(t,2);return t[0]+"="+t[1]}).join("&"),n=[],o=t.options.path||"";return q.protoRegEx.test(o)?n.push(o):(t.options.domain&&(q.protoRegEx.test(t.options.domain)||(n.push(t.options.protocol+"://"),n.push(t.options.subdomain?t.options.subdomain+".":"")),n.push(t.options.domain)),n.push(t.options.path?"/"+o:"")),n.push(e?"?"+e:""),n.join("")},q.protoRegEx=new RegExp(/^(((file|http|https):\/\/)|blob:)/i),q);function q(t){this.options=(new j).merge(t)}var G="2.1.17",Z=(H.getFullVersion=function(){return G},H.getEndpointVersion=function(){var t=G.indexOf(".");return-1===(t=G.indexOf(".",t+1))?G:G.substring(0,t)},H);function H(){}function K(t){var e=document.createElement("span");e.innerText=t,e.classList.add("tooltiptext"),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&e.classList.add("dark");var n=window.matchMedia("(prefers-color-scheme: dark)"),t=function(t){t=t.matches;t&&!e.classList.contains("dark")?e.classList.add("dark"):!t&&e.classList.contains("dark")&&e.classList.remove("dark")};return"function"==typeof n.addEventListener?n.addEventListener("change",t):"function"==typeof n.addListener&&n.addListener(t),-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 W(r,i,s){function t(t){var e=i.getBoundingClientRect(),n=r.getBoundingClientRect(),o=e.x+n.width>window.innerWidth?window.innerWidth-n.width:e.x,n=e.y+e.height+n.height+4>window.innerHeight?e.y-n.height-4:e.y+e.height+4;s&&i.parentElement&&(e=i.parentElement?i.parentElement.getBoundingClientRect():null,r.style.position="absolute",o-=e.x,n-=e.y),r.style.transform="translate("+o+"px, "+n+"px)"}void 0===s&&(s=!1),i.addEventListener("mouseover",t),i.addEventListener("focusin",t)}(At=u.ControlPosition||(u.ControlPosition={})).TopLeft="top-left",At.TopRight="top-right",At.BottomLeft="bottom-left",At.BottomRight="bottom-right",At.NonFixed="non-fixed";var V,Y=(I(Q,V=D),Q);function Q(){var t=null!==V&&V.apply(this,arguments)||this;return t.position=u.ControlPosition.NonFixed,t}var J=(X.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],n=0;n<t.length;n++){var o=t[n]/255;e[n]=o<=.03928?o/12.92:Math.pow((.055+o)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},X.prototype.getRBGA=function(t){var e=document.createElement("canvas").getContext("2d");e.globalAlpha=1,e.fillStyle=t,e.fillRect(0,0,1,1);e=e.getImageData(0,0,1,1).data;return[e[0],e[1],e[2],e[3]]},X);function X(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])))}(Nt=u.ControlStyle||(u.ControlStyle={})).light="light",Nt.dark="dark",Nt.auto="auto";var $=Map,tt=(et.prototype._addEventListener=function(t,e,n){this.listeners.has(t)||this.listeners.set(t,new $),this.listeners.get(t).set(e,n)},et.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},et.prototype._invokeEvent=function(n,o){var r=this;this.listeners.has(n)&&this.listeners.get(n).forEach(function(t,e){t&&r._removeEventListener(n,e);try{e(o)}catch(t){console.error(t)}})},et);function et(){this.listeners=new $}var nt,ot=Object.freeze({__proto__:null,EventEmitter:tt}),rt=(I(it,nt=tt),it.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},it.prototype.buildContainer=function(t,e,n,o){var r=this;return this._map=t,this._container=document.createElement(o||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof n&&this._container.setAttribute("aria-label",n),e.toLowerCase()===u.ControlStyle.auto?this._map.styles.definitions().then(function(t){r._map&&r._map.events.add("stylechanged",r._onStyleChange)}):this._container.classList.add(e),this._container},it.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},it.activateClickDelay=100,it);function it(){var e=null!==nt&&nt.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 J(e._map.getMapContainer().style.backgroundColor).getLuminosity(),t=isNaN(t)||.5<t?u.ControlStyle.light:u.ControlStyle.dark;e._setTheme(t)},e}var st,at=(I(lt,st=D),lt);function lt(){var t=null!==st&&st.apply(this,arguments)||this;return t.rotationDegreesDelta=15,t.style=u.ControlStyle.light,t.inverted=!1,t}var ct,ut=(I(ht,ct=rt),ht.prototype.onAdd=function(t,e){var n=this,o=this.buildContainer(t,this.options.style,"Rotation Control"),r=this.constructRotationButton(t),i=this.constructRotationGrid(t,e),t=K("Reset to Default Rotation");return o.addEventListener("mouseover",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasMouse=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasFocus=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(delete n.lastActiveTime,o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(delete n.lastActiveTime,o.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(),o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&ht.InvertOrderPositions.includes(e.position)?(o.appendChild(i),o.appendChild(r),o.appendChild(t),W(t,r)):(o.appendChild(r),o.appendChild(t),W(t,r),o.appendChild(i)),o},ht.prototype.constructRotationGrid=function(t,e){var n=document.createElement("div");n.classList.add("sub-container"),n.classList.add("hidden-accessible-element");var o=this.constructRightRotationButton(t),r=this.constructLeftRotationButton(t),i=K("Rotate Left"),t=K("Rotate Right");return e&&ht.InvertOrderPositions.includes(e.position)?(n.appendChild(o),n.appendChild(t),W(t,o),n.appendChild(r),n.appendChild(i),W(i,r)):(n.appendChild(r),n.appendChild(i),W(i,r),n.appendChild(o),n.appendChild(t),W(t,o)),n},ht.prototype.constructRotationButton=function(e){var n=this,t=document.createElement("button");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");var o=document.createElement("div");return t.appendChild(o),t.addEventListener("click",function(t){t.timeStamp-n.lastActiveTime>rt.activateClickDelay&&e.setCamera({bearing:ht.DefaultRotation},!0)}),e.events.add("rotate",function(t){o.style.transform="rotate("+-t.map.getCamera().bearing+"deg)"}),t},ht.prototype.constructRightRotationButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("rotation-right"),n.setAttribute("aria-label","Rotate Right"),n.setAttribute("alt","Rotate Right"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing-(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:ht.RotationDuration,type:"ease"},!0)}),n},ht.prototype.constructLeftRotationButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("rotation-left"),n.setAttribute("aria-label","Rotate Left"),n.setAttribute("alt","Rotate Left"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing+(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:ht.RotationDuration,type:"ease"},!0)}),n},ht.DefaultRotation=0,ht.RotationDuration=100,ht.InvertOrderPositions=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],ht);function ht(t){var e=ct.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new at).merge(t),e}var pt,dt=(I(ft,pt=D),ft);function ft(){var t=null!==pt&&pt.apply(this,arguments)||this;return t.pitchDegreesDelta=10,t.style=u.ControlStyle.light,t.inverted=!1,t}var mt,gt=(I(yt,mt=rt),yt.prototype.onAdd=function(t,e){var n=this,o=this.buildContainer(t,this.options.style,"Pitch Control"),r=this.constructPitchButton(t),i=this.constructPitchGrid(t,e),s=K("Reset to Default Pitch");return o.addEventListener("mouseover",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasMouse=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasFocus=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(delete n.lastActiveTime,o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(delete n.lastActiveTime,o.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(),o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&yt.INVERT_ORDER_POSITIONS.includes(e.position)?(o.appendChild(i),o.appendChild(r),o.appendChild(s),W(s,o)):(o.appendChild(r),o.appendChild(s),W(s,o),o.appendChild(i)),this.map=t,this.container=o,this.pitchButton=r,t.events.add("pitch",this.pitchChanged),this.updatePitchButtonsState(),o},yt.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)},yt.prototype.constructPitchGrid=function(t,e){var n=document.createElement("div");n.classList.add("sub-container"),n.classList.add("hidden-accessible-element"),this.pitchIncrementButton=this.constructPitchIncrementButton(t),this.pitchDecrementButton=this.constructPitchDecrementButton(t);var o=K("Increase Pitch"),t=K("Decrease Pitch");return e&&yt.INVERT_ORDER_POSITIONS.includes(e.position)?(n.appendChild(this.pitchDecrementButton),n.appendChild(t),W(t,this.pitchDecrementButton),n.appendChild(this.pitchIncrementButton),n.appendChild(o),W(o,this.pitchIncrementButton)):(n.appendChild(this.pitchIncrementButton),n.appendChild(o),W(o,this.pitchIncrementButton),n.appendChild(this.pitchDecrementButton),n.appendChild(t),W(t,this.pitchDecrementButton)),n},yt.prototype.constructPitchButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch"),n.setAttribute("aria-label","Reset to Default Pitch"),n.setAttribute("alt","Reset to Default Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){event.timeStamp-e.lastActiveTime>rt.activateClickDelay&&t.setCamera({pitch:yt.DEFAULT_PITCH},!0)}),n},yt.prototype.constructPitchDecrementButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch-down"),n.setAttribute("aria-label","Decrease Pitch"),n.setAttribute("alt","Decrease Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch-(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:yt.PITCH_DURATION_MS,type:"ease"},!0)}),n},yt.prototype.constructPitchIncrementButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch-up"),n.setAttribute("aria-label","Increase Pitch"),n.setAttribute("alt","Increase Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch+(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:yt.PITCH_DURATION_MS,type:"ease"},!0)}),n},yt.PITCH_DURATION_MS=100,yt.DEFAULT_PITCH=0,yt.INVERT_ORDER_POSITIONS=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],yt);function yt(t){var n=mt.call(this)||this;return n.container=null,n.map=null,n.pitchButton=null,n.pitchIncrementButton=null,n.pitchDecrementButton=null,n.hasMouse=!1,n.hasFocus=!1,n.pitchChanged=function(t){return n.updatePitchButtonsState()},n.updatePitchButtonsState=function(){var t=n.map.getCamera().pitch<=0,e=60<=n.map.getCamera().pitch;n.hasFocus&&n.pitchButton&&(t||e)&&n.pitchButton.focus(),n.options.inverted?(n.pitchIncrementButton&&n.pitchIncrementButton.disabled!=t&&(n.pitchIncrementButton.disabled=t),n.pitchDecrementButton&&n.pitchDecrementButton.disabled!=e&&(n.pitchDecrementButton.disabled=e)):(n.pitchIncrementButton&&n.pitchIncrementButton.disabled!=e&&(n.pitchIncrementButton.disabled=e),n.pitchDecrementButton&&n.pitchDecrementButton.disabled!=t&&(n.pitchDecrementButton.disabled=t))},n.options=(new dt).merge(t),n}var vt=function(t,e){return t===e||t!=t&&e!=e};var _t=function(t,e){for(var n=t.length;n--;)if(vt(t[n][0],e))return n;return-1},bt=Array.prototype.splice;var wt=function(t){var e=this.__data__;return!((t=_t(e,t))<0)&&(t==e.length-1?e.pop():bt.call(e,t,1),--this.size,!0)};var St=function(t){var e=this.__data__;return(t=_t(e,t))<0?void 0:e[t][1]};var xt=function(t){return-1<_t(this.__data__,t)};var Tt=function(t,e){var n=this.__data__,o=_t(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function Et(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Et.prototype.clear=function(){this.__data__=[],this.size=0},Et.prototype.delete=wt,Et.prototype.get=St,Et.prototype.has=xt,Et.prototype.set=Tt;var Ct=Et;var kt=function(){this.__data__=new Ct,this.size=0};var Ot=function(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t};var It=function(t){return this.__data__.get(t)};var Lt=function(t){return this.__data__.has(t)},At="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Pt(t,e){return t(e={exports:{}},e.exports),e.exports}var Rt="object"==typeof At&&At&&At.Object===Object&&At,Nt="object"==typeof self&&self&&self.Object===Object&&self,Mt=Rt||Nt||Function("return this")(),wt=Mt.Symbol,St=Object.prototype,Dt=St.hasOwnProperty,zt=St.toString,Bt=wt?wt.toStringTag:void 0;var jt=function(t){var e=Dt.call(t,Bt),n=t[Bt];try{var o=!(t[Bt]=void 0)}catch(t){}var r=zt.call(t);return o&&(e?t[Bt]=n:delete t[Bt]),r},Ft=Object.prototype.toString;var Ut=function(t){return Ft.call(t)},qt=wt?wt.toStringTag:void 0;var Gt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(qt&&qt in Object(t)?jt:Ut)(t)};var Zt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Ht=function(t){return!!Zt(t)&&("[object Function]"==(t=Gt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)},xt=Mt["__core-js_shared__"],Kt=(Tt=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||""))?"Symbol(src)_1."+Tt:"";var Wt=function(t){return!!Kt&&Kt in t},Vt=Function.prototype.toString;var Yt=function(t){if(null!=t){try{return Vt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Qt=/^\[object .+?Constructor\]$/,At=Function.prototype,Nt=Object.prototype,St=At.toString,xt=Nt.hasOwnProperty,Jt=RegExp("^"+St.call(xt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Xt=function(t){return!(!Zt(t)||Wt(t))&&(Ht(t)?Jt:Qt).test(Yt(t))};var $t=function(t,e){return null==t?void 0:t[e]};var te=function(t,e){return e=$t(t,e),Xt(e)?e:void 0},ee=te(Mt,"Map"),ne=te(Object,"create");var Tt=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},oe=Object.prototype.hasOwnProperty;var At=function(t){var e=this.__data__;if(ne){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return oe.call(e,t)?e[t]:void 0},re=Object.prototype.hasOwnProperty;Nt=function(t){var e=this.__data__;return ne?void 0!==e[t]:re.call(e,t)};St=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ne&&void 0===e?"__lodash_hash_undefined__":e,this};function ie(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ie.prototype.clear=function(){this.__data__=ne?ne(null):{},this.size=0},ie.prototype.delete=Tt,ie.prototype.get=At,ie.prototype.has=Nt,ie.prototype.set=St;var se=ie;xt=function(){this.size=0,this.__data__={hash:new se,map:new(ee||Ct),string:new se}};var ae=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var le=function(t,e){return t=t.__data__,ae(e)?t["string"==typeof e?"string":"hash"]:t.map};Tt=function(t){return t=le(this,t).delete(t),this.size-=t?1:0,t};At=function(t){return le(this,t).get(t)};Nt=function(t){return le(this,t).has(t)};St=function(t,e){var n=le(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this};function ce(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ce.prototype.clear=xt,ce.prototype.delete=Tt,ce.prototype.get=At,ce.prototype.has=Nt,ce.prototype.set=St;var ue=ce;At=function(t,e){var n=this.__data__;if(n instanceof Ct){var o=n.__data__;if(!ee||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new ue(o)}return n.set(t,e),this.size=n.size,this};function he(t){t=this.__data__=new Ct(t);this.size=t.size}he.prototype.clear=kt,he.prototype.delete=Ot,he.prototype.get=It,he.prototype.has=Lt,he.prototype.set=At;var pe=he;var de=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o&&!1!==e(t[n],n,t););return t},fe=function(){try{var t=te(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var me=function(t,e,n){"__proto__"==e&&fe?fe(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},ge=Object.prototype.hasOwnProperty;var ye=function(t,e,n){var o=t[e];ge.call(t,e)&&vt(o,n)&&(void 0!==n||e in t)||me(t,e,n)};var ve=function(t,e,n,o){var r=!n;n=n||{};for(var i=-1,s=e.length;++i<s;){var a=e[i],l=o?o(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),(r?me:ye)(n,a,l)}return n};var _e=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o};var be=function(t){return null!=t&&"object"==typeof t};var Nt=function(t){return be(t)&&"[object Arguments]"==Gt(t)},St=Object.prototype,we=St.hasOwnProperty,Se=St.propertyIsEnumerable,xe=Nt(function(){return arguments}())?Nt:function(t){return be(t)&&we.call(t,"callee")&&!Se.call(t,"callee")},Te=Array.isArray;function Ee(){return!1}var Ce=Pt(function(t,e){var n=e&&!e.nodeType&&e,e=n&&t&&!t.nodeType&&t,n=e&&e.exports===n?Mt.Buffer:void 0,n=n?n.isBuffer:void 0;t.exports=n||Ee}),ke=/^(?:0|[1-9]\d*)$/;var Oe=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&ke.test(t))&&-1<t&&t%1==0&&t<e};var Ie=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991},Le={};Le["[object Float32Array]"]=Le["[object Float64Array]"]=Le["[object Int8Array]"]=Le["[object Int16Array]"]=Le["[object Int32Array]"]=Le["[object Uint8Array]"]=Le["[object Uint8ClampedArray]"]=Le["[object Uint16Array]"]=Le["[object Uint32Array]"]=!0,Le["[object Arguments]"]=Le["[object Array]"]=Le["[object ArrayBuffer]"]=Le["[object Boolean]"]=Le["[object DataView]"]=Le["[object Date]"]=Le["[object Error]"]=Le["[object Function]"]=Le["[object Map]"]=Le["[object Number]"]=Le["[object Object]"]=Le["[object RegExp]"]=Le["[object Set]"]=Le["[object String]"]=Le["[object WeakMap]"]=!1;kt=function(t){return be(t)&&Ie(t.length)&&!!Le[Gt(t)]};var Ot=function(e){return function(t){return e(t)}},It=Pt(function(t,e){var e=e&&!e.nodeType&&e,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&Rt.process,e=function(){try{var t=n&&n.require&&n.require("util").types;return t?t:o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=e}),Lt=It&&It.isTypedArray,Ae=Lt?Ot(Lt):kt,Pe=Object.prototype.hasOwnProperty;var Re=function(t,e){var n,o=Te(t),r=!o&&xe(t),i=!o&&!r&&Ce(t),s=!o&&!r&&!i&&Ae(t),a=o||r||i||s,l=a?_e(t.length,String):[],c=l.length;for(n in t)!e&&!Pe.call(t,n)||a&&("length"==n||i&&("offset"==n||"parent"==n)||s&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||Oe(n,c))||l.push(n);return l},Ne=Object.prototype;var Me=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ne)};var At=function(e,n){return function(t){return e(n(t))}},De=At(Object.keys,Object),ze=Object.prototype.hasOwnProperty;var Be=function(t){if(!Me(t))return De(t);var e,n=[];for(e in Object(t))ze.call(t,e)&&"constructor"!=e&&n.push(e);return n};var je=function(t){return null!=t&&Ie(t.length)&&!Ht(t)};var Fe=function(t){return(je(t)?Re:Be)(t)};var Ue=function(t,e){return t&&ve(e,Fe(e),t)};var qe=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},Ge=Object.prototype.hasOwnProperty;var Ze=function(t){if(!Zt(t))return qe(t);var e,n=Me(t),o=[];for(e in t)("constructor"!=e||!n&&Ge.call(t,e))&&o.push(e);return o};var He=function(t){return je(t)?Re(t,!0):Ze(t)};var Ke=function(t,e){return t&&ve(e,He(e),t)},We=Pt(function(t,e){var n=e&&!e.nodeType&&e,e=n&&t&&!t.nodeType&&t,n=e&&e.exports===n?Mt.Buffer:void 0,o=n?n.allocUnsafe:void 0;t.exports=function(t,e){return e?t.slice():(e=t.length,e=o?o(e):new t.constructor(e),t.copy(e),e)}});var Ve=function(t,e){var n=-1,o=t.length;for(e=e||Array(o);++n<o;)e[n]=t[n];return e};var Ye=function(t,e){for(var n=-1,o=null==t?0:t.length,r=0,i=[];++n<o;){var s=t[n];e(s,n,t)&&(i[r++]=s)}return i};var St=function(){return[]},Qe=Object.prototype.propertyIsEnumerable,Je=Object.getOwnPropertySymbols,Xe=Je?function(e){return null==e?[]:(e=Object(e),Ye(Je(e),function(t){return Qe.call(e,t)}))}:St;var $e=function(t,e){return ve(t,Xe(t),e)};var tn=function(t,e){for(var n=-1,o=e.length,r=t.length;++n<o;)t[r+n]=e[n];return t},en=At(Object.getPrototypeOf,Object),nn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)tn(e,Xe(t)),t=en(t);return e}:St;var on=function(t,e){return ve(t,nn(t),e)};var rn=function(t,e,n){return e=e(t),Te(t)?e:tn(e,n(t))};var sn=function(t){return rn(t,Fe,Xe)};function an(t){return rn(t,He,nn)}var Nt=te(Mt,"DataView"),Lt=te(Mt,"Promise"),kt=te(Mt,"Set"),At=te(Mt,"WeakMap"),ln="[object Map]",cn="[object Promise]",un="[object Set]",hn="[object WeakMap]",pn="[object DataView]",dn=Yt(Nt),fn=Yt(ee),mn=Yt(Lt),gn=Yt(kt),yn=Yt(At),St=Gt,vn=St=Nt&&St(new Nt(new ArrayBuffer(1)))!=pn||ee&&St(new ee)!=ln||Lt&&St(Lt.resolve())!=cn||kt&&St(new kt)!=un||At&&St(new At)!=hn?function(t){var e=Gt(t),t="[object Object]"==e?t.constructor:void 0,t=t?Yt(t):"";if(t)switch(t){case dn:return pn;case fn:return ln;case mn:return cn;case gn:return un;case yn:return hn}return e}:St,_n=Object.prototype.hasOwnProperty;var bn=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&_n.call(t,"index")&&(n.index=t.index,n.input=t.input),n},wn=Mt.Uint8Array;var Sn=function(t){var e=new t.constructor(t.byteLength);return new wn(e).set(new wn(t)),e};var xn=function(t,e){return e=e?Sn(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)},Tn=/\w*$/;var En=function(t){var e=new t.constructor(t.source,Tn.exec(t));return e.lastIndex=t.lastIndex,e},Nt=wt?wt.prototype:void 0,Cn=Nt?Nt.valueOf:void 0;var kn=function(t){return Cn?Object(Cn.call(t)):{}};var On=function(t,e){return e=e?Sn(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)};var In=function(t,e,n){var o=t.constructor;switch(e){case"[object ArrayBuffer]":return Sn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return xn(t,n);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 On(t,n);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return En(t);case"[object Set]":return new o;case"[object Symbol]":return kn(t)}},Ln=Object.create;function An(){}var Pn=function(t){if(!Zt(t))return{};if(Ln)return Ln(t);An.prototype=t;t=new An;return An.prototype=void 0,t};var Rn=function(t){return"function"!=typeof t.constructor||Me(t)?{}:Pn(en(t))};var Lt=function(t){return be(t)&&"[object Map]"==vn(t)},kt=It&&It.isMap,Nn=kt?Ot(kt):Lt;var At=function(t){return be(t)&&"[object Set]"==vn(t)},St=It&&It.isSet,Mn=St?Ot(St):At,Dn="[object Arguments]",zn="[object Function]",Bn="[object Object]",jn={};jn[Dn]=jn["[object Array]"]=jn["[object ArrayBuffer]"]=jn["[object DataView]"]=jn["[object Boolean]"]=jn["[object Date]"]=jn["[object Float32Array]"]=jn["[object Float64Array]"]=jn["[object Int8Array]"]=jn["[object Int16Array]"]=jn["[object Int32Array]"]=jn["[object Map]"]=jn["[object Number]"]=jn[Bn]=jn["[object RegExp]"]=jn["[object Set]"]=jn["[object String]"]=jn["[object Symbol]"]=jn["[object Uint8Array]"]=jn["[object Uint8ClampedArray]"]=jn["[object Uint16Array]"]=jn["[object Uint32Array]"]=!0,jn["[object Error]"]=jn[zn]=jn["[object WeakMap]"]=!1;var Fn=function n(o,r,i,t,e,s){var a,l=1&r,c=2&r,u=4&r;if(void 0!==(a=i?e?i(o,t,e,s):i(o):a))return a;if(!Zt(o))return o;var h=Te(o);if(h){if(a=bn(o),!l)return Ve(o,a)}else{var p=vn(o),t=p==zn||"[object GeneratorFunction]"==p;if(Ce(o))return We(o,l);if(p==Bn||p==Dn||t&&!e){if(a=c||t?{}:Rn(o),!l)return c?on(o,Ke(a,o)):$e(o,Ue(a,o))}else{if(!jn[p])return e?o:{};a=In(o,p,l)}}l=(s=s||new pe).get(o);if(l)return l;s.set(o,a),Mn(o)?o.forEach(function(t){a.add(n(t,r,i,t,o,s))}):Nn(o)&&o.forEach(function(t,e){a.set(e,n(t,r,i,e,o,s))});var c=u?c?an:sn:c?keysIn:Fe,d=h?void 0:c(o);return de(d||o,function(t,e){d&&(t=o[e=t]),ye(a,e,n(t,r,i,e,o,s))}),a};var Un=function(t){return Fn(t,5)};var qn=function(t,e,n){(void 0===n||vt(t[e],n))&&(void 0!==n||e in t)||me(t,e,n)};var Gn=function(l){return function(t,e,n){for(var o=-1,r=Object(t),i=n(t),s=i.length;s--;){var a=i[l?s:++o];if(!1===e(r[a],a,r))break}return t}}();var Zn=function(t){return be(t)&&je(t)},Nt=Function.prototype,kt=Object.prototype,Hn=Nt.toString,Kn=kt.hasOwnProperty,Wn=Hn.call(Object);var Vn=function(t){return!(!be(t)||"[object Object]"!=Gt(t))&&(null===(t=en(t))||"function"==typeof(t=Kn.call(t,"constructor")&&t.constructor)&&t instanceof t&&Hn.call(t)==Wn)};var Yn=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Qn=function(t){return ve(t,He(t))};var Jn=function(t,e,n,o,r,i,s){var a,l,c,u=Yn(t,n),h=Yn(e,n),p=s.get(h);p?qn(t,n,p):((a=void 0===(c=i?i(u,h,n+"",t,e,s):void 0))&&(p=!(l=Te(h))&&Ce(h),e=!l&&!p&&Ae(h),c=h,l||p||e?c=Te(u)?u:Zn(u)?Ve(u):p?We(h,!(a=!1)):e?On(h,!(a=!1)):[]:Vn(h)||xe(h)?xe(c=u)?c=Qn(u):Zt(u)&&!Ht(u)||(c=Rn(h)):a=!1),a&&(s.set(h,c),r(c,h,o,i,s),s.delete(h)),qn(t,n,c))};var Xn=function o(r,i,s,a,l){r!==i&&Gn(i,function(t,e){var n;l=l||new pe,Zt(t)?Jn(r,i,e,s,o,a,l):(n=a?a(Yn(r,e),t,e+"",r,i,l):void 0,qn(r,e,n=void 0===n?t:n))},He)};function $n(t){return t}var to=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},eo=Math.max;var no=function(i,s,a){return s=eo(void 0===s?i.length-1:s,0),function(){for(var t=arguments,e=-1,n=eo(t.length-s,0),o=Array(n);++e<n;)o[e]=t[s+e];for(var e=-1,r=Array(s+1);++e<s;)r[e]=t[e];return r[s]=a(o),to(i,this,r)}};var oo=function(t){return function(){return t}},ro=Date.now;var io=function(n){var o=0,r=0;return function(){var t=ro(),e=16-(t-r);if(r=t,0<e){if(800<=++o)return arguments[0]}else o=0;return n.apply(void 0,arguments)}}(fe?function(t,e){return fe(t,"toString",{configurable:!0,enumerable:!1,value:oo(e),writable:!0})}:$n);var so=function(t,e){return io(no(t,e,$n),t+"")};var ao=function(t,e,n){if(!Zt(n))return!1;var o=typeof e;return!!("number"==o?je(n)&&Oe(e,n.length):"string"==o&&e in n)&&vt(n[e],t)};var lo,co=function(a){return so(function(t,e){var n=-1,o=e.length,r=1<o?e[o-1]:void 0,i=2<o?e[2]:void 0,r=3<a.length&&"function"==typeof r?(o--,r):void 0;for(i&&ao(e[0],e[1],i)&&(r=o<3?void 0:r,o=1),t=Object(t);++n<o;){var s=e[n];s&&a(t,s,n,r)}return t})}(function(t,e,n){Xn(t,e,n)}),uo=(I(ho,lo=D),ho);function ho(){var t=null!==lo&&lo.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 po,Lt=(I(fo,po=rt),fo.prototype.onAdd=function(t,e){var n=this;this.map=t;var o=this.buildContainer(t,this.options.style,"Map Style Control"),r=this.buildStyleOpsGrid();this.styleOpsGrid=r;var i=this.buildCurrStyleBtn(),t=K("Select Style");return r.classList.add(e&&e.position||"top-right"),o.addEventListener("mouseover",function(){n.hasMouse=!0,o.classList.add(fo.Css.inUse),r.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(){n.hasFocus=!0,o.classList.add(fo.Css.inUse),r.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(o.classList.remove(fo.Css.inUse),r.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(o.classList.remove(fo.Css.inUse),r.classList.add("hidden-accessible-element")))}),r.addEventListener("keydown",function(t){27===t.keyCode&&(t.stopPropagation(),i.focus(),o.classList.contains(fo.Css.inUse)&&(o.classList.remove(fo.Css.inUse),r.classList.add("hidden-accessible-element")))}),i.addEventListener("click",function(t){o.classList.contains(fo.Css.inUse)?(o.classList.remove(fo.Css.inUse),r.classList.add("hidden-accessible-element")):(o.classList.add(fo.Css.inUse),r.classList.remove("hidden-accessible-element"),r.firstElementChild&&r.firstElementChild.focus())}),e&&fo.InvertOrderPositions.includes(e.position)?(o.appendChild(r),o.appendChild(i),o.appendChild(t),W(t,i)):(o.appendChild(i),o.appendChild(t),W(t,i),o.appendChild(r)),o},fo.prototype.onRemove=function(){po.prototype.onRemove.call(this),this.styleOpsGrid=null,this.styleButtons.clear(),this.map.events.remove("stylechanged",this.onStyleChange),this.map.events.remove("stylesetchanged",this.onStylesetChange)},fo.prototype.setSelectedStyle=function(n){var e,t,o=this;this.styleIcons.has(n)&&(e=this.currStyleImage,t=this.styleIcons.get(n),e.src!==t&&(e.src=t),Object.entries(this.styleButtons).forEach(function(t){var e=N(t,2),t=e[0];return e[1].setAttribute("aria-current",t===n?"true":"false")}),this.map.styles.definitions().then(function(t){t=o.mapToFriendlyStyleName(n,t);e.alt!==t&&(e.alt=t),e.parentElement.lastChild instanceof Text&&(e.parentElement.lastChild.textContent=t)}))},fo.prototype.disableStyle=function(t){t=this.styleButtons[t];t&&t.setAttribute("disabled","true")},fo.prototype.enableStyle=function(t){t=this.styleButtons[t];t&&t.removeAttribute("disabled")},fo.prototype.buildSelectStyleBtn=function(n,t,e){var o=this,r=document.createElement("button"),i=this.mapToFriendlyStyleName(n,t);r.setAttribute("aria-label",i),r.setAttribute("type","button");var s=new Image;e.then(function(t){return t.blob()}).then(function(t){t=URL.createObjectURL(t);s.src=t,n===o.map.getStyle().style&&(o.currStyleImage.src=t,o.currStyleImage.alt=i,o.currStyleImage.parentElement.lastChild.nodeType==Node.TEXT_NODE?o.currStyleImage.parentElement.lastChild.textContent=i:o.currStyleImage.parentElement.appendChild(document.createTextNode(i))),o.styleIcons.set(n,t)}),s.setAttribute("aria-hidden","true"),r.appendChild(s),"icons"===this.options.layout?r.classList.add(fo.Css.button):(r.classList.add(fo.Css.listButton),r.classList.add(fo.Css.expanded),r.appendChild(document.createTextNode(i))),r.addEventListener("click",function(){o.hasMouse=!1,o.hasFocus=!1;var t=o.styleButtons[n];t&&!t.hasAttribute("disabled")&&(o._invokeEvent("styleselected",n),o.options.autoSelectionMode&&o.map.setStyle({style:n}),Object.entries(o.styleButtons).forEach(function(t){var e=N(t,2),t=e[0];return e[1].setAttribute("aria-current",t===n?"true":"false")}))});e=document.createElement("div");return e.classList.add("selected-icon"),r.appendChild(e),r},fo.prototype.buildCurrStyleBtn=function(){var t=document.createElement("button");"icons"==this.options.layout?t.classList.add(fo.Css.button):t.classList.add(fo.Css.listButton),t.classList.add(fo.Css.currentStyle),t.setAttribute("aria-label","Select Style"),t.setAttribute("tabindex","-1"),this.currStyleImage=new Image,t.appendChild(this.currStyleImage);var e=document.createElement("div");return e.classList.add("icon"),t.appendChild(e),t},fo.prototype.buildStyleOpsGrid=function(){var t=this,e=document.createElement("div");return e.classList.add(fo.Css.styleOptions),"icons"===this.options.layout?e.classList.add(this.options.layout):e.classList.add(fo.Css.dropdown),e.setAttribute("aria-label","Style Options"),e.classList.add("hidden-accessible-element"),this.map.styles.definitions().then(function(e){return A(t,void 0,void 0,function(){return P(this,function(t){return this.onStylesetChange(e),this.map.events.add("stylechanged",this.onStyleChange),[2]})})}),this.map.events.add("stylesetchanged",this.onStylesetChange),e},fo.prototype.populateOpsGridFromDefinitions=function(o){var t,n,r=this;this.styleOpsGrid&&(t=o.styles,(t=Array.isArray(this.options.mapStyles)?t.filter(function(t){return r.options.mapStyles.includes(t.name.split("_indoor")[0])}):t).forEach(function(t){var e={url:t.thumbnail};t.thumbnail&&r.map.styles._transformStyleRequest(t.thumbnail,e);var n=r.map.getServiceOptions();n.transformRequest&&co(e,n.transformRequest(e.url,"Thumbnail"));e=fetch(e.url,{headers:e.headers}),e=r.buildSelectStyleBtn(t.name,o,e);r.styleOpsGrid.appendChild(e),r.styleButtons[t.name]=e,"icons"===r.options.layout&&(t=K(r.mapToFriendlyStyleName(t.name,o)),r.styleOpsGrid.appendChild(t),W(t,e))}),n=this.map.getStyle().style,Object.entries(this.styleButtons).forEach(function(t){var e=N(t,2),t=e[0];return e[1].setAttribute("aria-current",t===n?"true":"false")}))},fo.InvertOrderPositions=[u.ControlPosition.TopRight,u.ControlPosition.BottomRight],fo.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"},fo);function fo(t){var e=po.call(this)||this;return e.styleOpsGrid=null,e.hasMouse=!1,e.hasFocus=!1,e.styleButtons=new $,e.styleIcons=new $,e.onStyleChange=function(){var t;e.options.autoSelectionMode&&(t=e.map.getStyle().style,e.setSelectedStyle(t))},e.onStylesetChange=function(t){e.styleOpsGrid&&(Array.from(e.styleOpsGrid.children).forEach(function(t){return t.remove()}),e.styleButtons.clear(),e.populateOpsGridFromDefinitions(t))},e.mapToFriendlyStyleName=function(e,t){t=t.styles.find(function(t){return t.name===e});return(null==t?void 0:t.displayName)||e},e.options=(new uo).merge(Un(t)),e}var mo,go=(I(yo,mo=D),yo);function yo(){var t=null!==mo&&mo.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}var vo,_o=(I(bo,vo=go),bo);function bo(){var t=null!==vo&&vo.apply(this,arguments)||this;return t.isActive=!1,t.style=u.ControlStyle.light,t}var wo,So=(I(xo,wo=rt),Object.defineProperty(xo.prototype,"isActive",{get:function(){if(!this.map)return!1;var t=this.map.getTraffic();return"none"!==t.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}),xo.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 e=this.constructTrafficButton(t);this.container.appendChild(e);t=K("Toggle Traffic Display");return this.container.appendChild(t),W(t,e),this.container},xo.prototype.onRemove=function(){wo.prototype.onRemove.call(this),this.map=null},xo.prototype.getOptions=function(){return(new _o).merge({isActive:this.isActive,flow:this.options.flow,incidents:this.options.incidents,style:this.style})},xo.prototype.updateButtonState=function(){this.trafficButton&&(this.isActive?this.container.classList.add("in-use"):this.container.classList.remove("in-use"),this.trafficButton.setAttribute("aria-pressed",this.isActive?"true":"false"))},xo.prototype.constructTrafficButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("traffic"),n.setAttribute("aria-label","Toggle Traffic Display"),n.setAttribute("alt","Toggle Traffic Display"),n.setAttribute("type","button"),this.trafficButton=n,this.updateButtonState(),n.addEventListener("click",function(){e.isActive=!e.isActive}),n},xo);function xo(t){var e=wo.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new go).merge({flow:"relative",incidents:!0}),e.style=u.ControlStyle.light,e.container=null,e.trafficButton=null,e.map=null,t&&(e.initIsActive=t.isActive||!1,e.options.flow=t.flow||"relative",e.options.incidents=t.incidents||!0,e.style=t.style||u.ControlStyle.light),e}var To,It=(I(Eo,To=rt),Eo.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},Eo.prototype.onRemove=function(){To.prototype.onRemove.call(this),this.syncHiddenState&&(this.map.events.remove("styledata",this.syncHiddenState),this.syncHiddenState=null),this.map=null},Eo.prototype.buildTrafficLegendDiv=function(e){var n,t,o,r,i=document.createElement("div");i.classList.add("traffic-legend","hidden"),i.setAttribute("alt","Traffic Legend");var s=document.createElement("table"),a=document.createElement("tr"),l=document.createElement("td");l.setAttribute("alt","Traffic"),l.appendChild(document.createTextNode("Traffic"));var c=K("Traffic");l.classList.add("traffic-legend-title"),l.colSpan=6,a.appendChild(l),a.appendChild(c),W(c,l),s.appendChild(a);var u=document.createElement("tr");try{for(var h=R(this.table),p=h.next();!p.done;p=h.next()){var d=p.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{for(var m=(o=void 0,R(d)),g=m.next();!g.done;g=m.next()){var y=g.value,v=document.createElement("div");v.classList.add(y),f.appendChild(v)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(r=m.return)&&r.call(m)}finally{if(o)throw o.error}}}u.appendChild(f);var _=K(d instanceof Array?"Traffic Legend":d);u.appendChild(_),W(_,f)}}catch(t){n={error:t}}finally{try{p&&!p.done&&(t=h.return)&&t.call(h)}finally{if(n)throw n.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},Eo);function Eo(){var t=To.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t.map=null,t.syncHiddenState=null,t}Ot=function(t){return this.__data__.has(t)};function Co(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ue;++e<n;)this.add(t[e])}Co.prototype.add=Co.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Co.prototype.has=Ot;var ko=Co;var Oo=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1};var Io=function(t,e){return t.has(e)};var Lo=function(t,e,n,o,r,i){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&a<l))return!1;if((l=i.get(t))&&i.get(e))return l==e;var c=-1,u=!0,h=2&n?new ko:void 0;for(i.set(t,e),i.set(e,t);++c<a;){var p,d=t[c],f=e[c];if(void 0!==(p=o?s?o(f,d,c,e,t,i):o(d,f,c,t,e,i):p)){if(p)continue;u=!1;break}if(h){if(!Oo(e,function(t,e){if(!Io(h,e)&&(d===t||r(d,t,n,o,i)))return h.push(e)})){u=!1;break}}else if(d!==f&&!r(d,f,n,o,i)){u=!1;break}}return i.delete(t),i.delete(e),u};function Ao(t){var n=-1,o=Array(t.size);return t.forEach(function(t,e){o[++n]=[e,t]}),o}function Po(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}var St=wt?wt.prototype:void 0,Ro=St?St.valueOf:void 0;var No=function(t,e,n,o,r,i,s){switch(n){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 wn(t),new wn(e))?!0:!1;case"[object Boolean]":case"[object Date]":case"[object Number]":return vt(+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=Ao;case"[object Set]":a=a||Po;if(t.size!=e.size&&!(1&o))return!1;var l=s.get(t);if(l)return l==e;o|=2,s.set(t,e);a=Lo(a(t),a(e),o,r,i,s);return s.delete(t),a;case"[object Symbol]":if(Ro)return Ro.call(t)==Ro.call(e)}return!1},Mo=Object.prototype.hasOwnProperty;var Do=function(t,e,n,o,r,i){var s=1&n,a=sn(t),l=a.length;if(l!=sn(e).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:Mo.call(e,u)))return!1}var h=i.get(t);if(h&&i.get(e))return h==e;var p=!0;i.set(t,e),i.set(e,t);for(var d,f=s;++c<l;){var m,g=t[u=a[c]],y=e[u];if(!(void 0===(m=o?s?o(y,g,u,e,t,i):o(g,y,u,t,e,i):m)?g===y||r(g,y,n,o,i):m)){p=!1;break}f=f||"constructor"==u}return!p||f||(d=t.constructor)!=(h=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof d&&d instanceof d&&"function"==typeof h&&h instanceof h)&&(p=!1),i.delete(t),i.delete(e),p},zo="[object Arguments]",Bo="[object Array]",jo="[object Object]",Fo=Object.prototype.hasOwnProperty;var Uo=function(t,e,n,o,r,i){var s=Te(t),a=Te(e),l=s?Bo:vn(t),c=a?Bo:vn(e),u=(l=l==zo?jo:l)==jo,a=(c=c==zo?jo:c)==jo;if((c=l==c)&&Ce(t)){if(!Ce(e))return!1;u=!(s=!0)}if(c&&!u)return i=i||new pe,s||Ae(t)?Lo(t,e,n,o,r,i):No(t,e,l,n,o,r,i);if(!(1&n)){u=u&&Fo.call(t,"__wrapped__"),a=a&&Fo.call(e,"__wrapped__");if(u||a)return r(u?t.value():t,a?e.value():e,n,o,i=i||new pe)}return!!c&&(i=i||new pe,Do(t,e,n,o,r,i))};var qo=function t(e,n,o,r,i){return e===n||(null==e||null==n||!be(e)&&!be(n)?e!=e&&n!=n:Uo(e,n,o,r,t,i))};var Go,Zo=function(t,e){return qo(t,e)},Ho=(Go=Object.freeze({__proto__:null,default:{}}))&&Go.default||Go,Ko=Pt(function(a){!function(){for(var e,n,o=0,r=[],t=0;t<256;t++)r[t]=(t+256).toString(16).substr(1);function i(){var t,t=(t=16,(!e||s.BUFFER_SIZE<o+t)&&(o=0,e=s.randomBytes(s.BUFFER_SIZE)),e.slice(o,o+=t));return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}function s(){var t=i();return r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}s.BUFFER_SIZE=4096,s.bin=i,s.clearBuffer=function(){e=null,o=0},s.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?n=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(n=window.msCrypto),n=n||Ho,(a.exports=s).randomBytes=function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){t=new Uint8Array(t);return n.getRandomValues(t),Array.from(t)}:function(t){t=new Uint8Array(t);return n.getRandomValues(t),t}}return function(t){for(var e=[],n=0;n<t;n++)e.push(Math.floor(256*Math.random()));return e}}()}()}),Wo=(Vo.TYPE="Feature",Vo);function Vo(t,e,n,o){this.type="Feature",this.type=Vo.TYPE,this.properties=e||{},this.id=n,this.geometry=t,this.bbox=o}var Yo,Qo=(I(Jo,Yo=Array),Jo.fromData=function(n){var o=NaN,r=NaN,i=new Set(["y"]),s=new Set(["x"]);return Object.keys(n).forEach(function(t){var e=t.toLowerCase();isNaN(o)&&i.has(e)&&"number"==typeof n[t]?o=n[t]:isNaN(r)&&s.has(e)&&"number"==typeof n[t]&&(r=n[t])}),isNaN(o)||isNaN(r)?null:new Jo(o,r)},Jo.getX=function(t){return 0<t.length?t[0]:NaN},Jo.getY=function(t){return 1<t.length?t[1]:NaN},Jo.getDestination=function(t,e,n){return new Jo(Jo.getX(t)+n*Math.cos((e+270)*Math.PI/180),Jo.getY(t)+n*Math.sin((e+270)*Math.PI/180))},Jo.getDistance=function(t,e){var n=Jo.getX(t)-Jo.getX(e),e=Jo.getY(t)-Jo.getY(e);return Math.sqrt(n*n+e*e)},Jo.getHeading=function(t,e){var n=Jo.getX(e)-Jo.getX(t),e=Jo.getY(t)-Jo.getY(e);return 180*(2.5*Math.PI-Math.atan2(e,n))/Math.PI%360},Jo);function Jo(t,e){return Yo.call(this,t,e)||this}var Xo=($o.TYPE="Point",$o);function $o(t){this.type="Point",this.type=$o.TYPE,this.coordinates=t}var tr,er,nr,or,rr,ir=6378137,sr=Math.PI/180,ar=180/Math.PI,lr=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],cr=85.0511;function ur(t){return t*sr}function hr(t){return t*ar}function pr(t,e,n){return Math.min(Math.max(t,e),n)}function dr(t,e){var n=ur(e[1]-t[1]),o=ur(e[0]-t[0]),o=Math.pow(Math.sin(n/2),2)+Math.cos(ur(t[1]))*Math.cos(ur(e[1]))*Math.pow(Math.sin(o/2),2),o=2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o));return Math.round(ir*o*100)/100}function fr(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return er.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return er.kilometers;case"miles":case"mile":case"mi":return er.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return er.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return er.yards;default:return er.meters}return er.meters}function mr(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return rr.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return rr.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return rr.knotsPerSecond;case"standardgravity":case"g":return rr.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return rr.feetPerSecondSquared;case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return rr.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return rr.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return rr.kilometersPerHourSecond;default:return rr.metersPerSecondSquared}return rr.metersPerSecondSquared}function gr(t){if(t)switch(t){case"acres":case"ac":return tr.acres;case"hectares":case"ha":return tr.hectares;case"squareFeet":case"ft^2":case"ft2":return tr.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return tr.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return tr.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return tr.squareMiles;default:return tr.squareMeters}return tr.squareMeters}function yr(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return or.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return or.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return or.knots;case"mach":case"m":return or.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return or.kilometersPerHour;default:return or.metersPerSecond}return or.metersPerSecond}function vr(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return nr.ms;case"minutes":case"minute":case"mins":case"min":return nr.minutes;case"hours":case"hour":case"hr":case"h":return nr.hours;case"days":case"day":case"d":return nr.days;default:return nr.seconds}return nr.seconds}function _r(t){var e=0;if(t&&0<t.length)for(var e=Math.abs(br(t[0])),n=1,o=t.length;n<o;n++)e-=Math.abs(br(t[n]));return e}function br(t){var e=0;if(3<=t.length){for(var n=void 0,o=void 0,r=0,i=t.length;r<i;r++)e+=(ur(t[r===i-2?(n=i-2,o=i-1,0):r===i-1?(n=i-1,o=0,1):(o=(n=r)+1,r+2)][0])-ur(t[n][0]))*Math.sin(ur(t[o][1]));e=e*ir*ir/2}return e}function wr(t,e,n){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function Sr(t,e,n){if(2<=n.length){for(var o,r,i=1/0,s=null,a=Ur(n,22),l=0,c=a.length-1;l<c;l++)r=function(t,e,n){if(e[0]===n[0]&&e[1]===n[1])return e;var o=t[0]-e[0],r=t[1]-e[1],i=n[0]-e[0],t=n[1]-e[1],r=(i*o+t*r)/(i*i+t*t);return r<0?e:1<r?n:[e[0]+i*r,e[1]+t*r]}(e,a[l],a[l+1]),(o=Qo.getDistance(e,r))<i&&(i=o,s=r);if(s){var u=Fr([s],22)[0];return new Wo(new Xo(u),{distance:Cr(t,u)})}}else if(1===n.length)return new Wo(new Xo(n[0]),{distance:Cr(t,n[0])});return null}function xr(t,e){var n;return!isNaN(t)&&"number"==typeof e&&0<=e&&(n=void 0,n=e<lr.length?lr[e]:Math.pow(10,e),t=Math.round(t*n)/n),t}function Tr(t,e,n,o){switch(fr(e)){case er.meters:t/=1e3;break;case er.feet:t/=3280.8399;break;case er.miles:t/=.62137119;break;case er.yards:t/=1093.6133;break;case er.nauticalMiles:t/=.5399568;break;case er.kilometers:}switch(fr(n)){case er.meters:t*=1e3;break;case er.feet:t*=3280.8399;break;case er.miles:t*=.62137119;break;case er.yards:t*=1093.6133;break;case er.nauticalMiles:t*=.5399568;break;case er.kilometers:}return"number"==typeof o&&0<=o&&(o=Math.pow(10,o),t=Math.round(t*o)/o),t}function Er(t,e,n,o){o=o||"meters",t=Jr(t);var r=kr(o),o=ur(t[1]),t=ur(t[0]),e=e*sr,n=n/r,r=Math.asin(Math.sin(o)*Math.cos(n)+Math.cos(o)*Math.sin(n)*Math.cos(e)),o=t+Math.atan2(Math.sin(e)*Math.sin(n)*Math.cos(o),Math.cos(n)-Math.sin(o)*Math.sin(r)),r=pr(zr(r*ar),-85,85);return[Br(o*ar),r]}function Cr(t,e,n){e=dr(t=Jr(t),e=Jr(e));return"meters"===n?e:Tr(e,"meters",n||"meters")}function kr(t){t=fr(t);return Tr(ir,er.meters,t)}function Or(t,e,n){for(var o=[],r=ur(t[1]),i=ur(t[0]),s=ur(e[1]),a=ur(e[0]),l=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))),c=0;c<=n;c++){var u=c/n,h=Math.sin((1-u)*l)/Math.sin(l),p=Math.sin(u*l)/Math.sin(l),d=h*Math.cos(r)*Math.cos(i)+p*Math.cos(s)*Math.cos(a),u=h*Math.cos(r)*Math.sin(i)+p*Math.cos(s)*Math.sin(a),p=h*Math.sin(r)+p*Math.sin(s),p=Math.atan2(p,Math.sqrt(Math.pow(d,2)+Math.pow(u,2))),d=Math.atan2(u,d),p=pr(p*ar,-85,85);d*=ar,o.push([d,p])}return o}function Ir(t){return(Array.isArray(t)?t:t.coordinates).reduce(function(t,e){var n=0<t.length?t[t.length-1]:null;return n&&180<Math.abs(e[0]-n[0])?(n=n[0]<0?e[0]-360:e[0]+360,t.push([n,e[1]])):t.push(e),t},[])}function Lr(t){for(var e,n,o,r,i,s=Array.isArray(t)?t:t.coordinates,a=[],l=[],c=0;c<s.length;c++)a.push(s[c]),c+1>=s.length||(e=(o=N(s[c],2))[0],n=o[1],i=(r=N(s[c+1],2))[0],o=r[1],180<Math.abs(i-e)&&(r=0<e?180:-180,i=Math.abs((0<e?i+360:i-360)-e),i=n+(o-n)*(Math.abs(r-e)/i),a.push([r,i]),l.push(a),a=[[-r,i]]));return l.push(a),l}function Ar(t,e){if(t=Jr(t),e=Jr(e),t&&2<=t.length&&e&&2<=e.length){var n=ur(t[1]),o=ur(e[1]),e=ur(e[0]-t[0]),t=Math.sin(e)*Math.cos(o),e=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(e);return(hr(Math.atan2(t,e))+360)%360}return NaN}function Pr(t,e){var n,o=0;Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var r=0,i=n.length-1;r<i;r++)o+=dr(n[r],n[r+1]);return Tr(o,"meters",e||"meters")}function Rr(t,e,n){n=n||"meters";var o,r,i=0;if(Array.isArray(t)?r=t:t.type&&"LineString"===t.type&&(r=t.coordinates),2<=r.length){for(var s=r.length,a=1;a<s;a++){if(e<=i+(o=Cr(r[a-1],r[a],n))){var l=Ar(r[a-1],r[a]);return Er(r[a-1],l,e-i,n)}i+=o}return i<=e?r[s-1]:r[0]}return null}function Nr(t,e,n,o,r){o=o||"meters",r=r||0,t=Jr(t);for(var i=[],s=360/n,a=0;a<=n;a++)i.push(Er(t,(a*s+r)%360,e,o));return i}function Mr(t,e,n,o,r){return Ir(Nr(t,e,n,o,r))}function Dr(t,e,n){n=void 0===n?.5:n;var o=Cr(t=Jr(t),e=Jr(e),"kilometers");return Er(t,Ar(t,e),o*n,"kilometers")}function zr(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 Br(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function jr(t,e,n){if(0===n)return Object.assign({},t);e=Jr(e);for(var o,r,i=[],s=0,a=t.length;s<a;s++)o=Cr(e,t[s]),r=Ar(e,t[s]),i.push(Er(e,r+n,o));return i}function Fr(t,e){for(var n,o,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)n=t[s][0]/r-.5,o=.5-t[s][1]/r,i.push([360*n,90-360*Math.atan(Math.exp(2*-o*Math.PI))/Math.PI]);return i}function Ur(t,e){for(var n,o,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)o=Math.sin(t[s][1]*Math.PI/180),n=(t[s][0]+180)/360,o=.5-Math.log((1+o)/(1-o))/(4*Math.PI),i.push([Math.round(n*r),Math.round(o*r)]);return i}function qr(t,e,n,o){switch(mr(e)){case rr.kilometersPerHourSecond:t/=3.6;break;case rr.milesPerHourSecond:t/=2.236936292054;break;case rr.knotsPerSecond:t/=1.943844492441;break;case rr.standardGravity:t/=.1019716212978;break;case rr.kilometersPerSecondSquared:t/=.001;break;case rr.milesPerSecondSquared:t/=.000621371192;break;case rr.feetPerSecondSquared:t/=3.280839895012;break;case rr.yardsPerSecondSquared:t/=1.093613298338;break;case rr.metersPerSecondSquared:}switch(mr(n)){case rr.kilometersPerHourSecond:t*=3.6;break;case rr.milesPerHourSecond:t*=2.236936292054;break;case rr.knotsPerSecond:t*=1.943844492441;break;case rr.standardGravity:t*=.1019716212978;break;case rr.kilometersPerSecondSquared:t*=.001;break;case rr.milesPerSecondSquared:t*=.000621371192;break;case rr.feetPerSecondSquared:t*=3.280839895012;break;case rr.yardsPerSecondSquared:t*=1.093613298338;break;case rr.metersPerSecondSquared:}return xr(t,o)}function Gr(t,e,n,o){switch(gr(e)){case tr.acres:t*=4046.8564224;break;case tr.hectares:t*=1e4;break;case tr.squareFeet:t*=.09290304;break;case tr.squareKilometers:t*=1e6;break;case tr.squareMiles:t*=259e4;break;case tr.squareYards:t*=.83612736;break;case tr.squareMeters:}switch(gr(n)){case tr.acres:t/=4046.8564224;break;case tr.hectares:t/=1e4;break;case tr.squareFeet:t/=.09290304;break;case tr.squareKilometers:t/=1e6;break;case tr.squareMiles:t/=259e4;break;case tr.squareYards:t/=.83612736;break;case tr.squareMeters:}return xr(t,o)}function Zr(t,e,n,o){switch(yr(e)){case or.feetPerSecond:t*=1.09728;break;case or.milesPerHour:t*=1.6093;break;case or.knots:t*=1.852;break;case or.metersPerSecond:t*=3.6;break;case or.mach:t*=1234.8;break;case or.kilometersPerHour:}switch(yr(n)){case or.feetPerSecond:t/=1.09728;break;case or.milesPerHour:t/=1.6093;break;case or.knots:t/=1.852;break;case or.metersPerSecond:t/=3.6;break;case or.mach:t/=1234.8;break;case or.kilometersPerHour:}return xr(t,o)}function Hr(t,e,n,o){switch(vr(e)){case nr.ms:t/=1e3;break;case nr.hours:t*=3600;break;case nr.minutes:t*=60;break;case nr.days:t*=86400;break;case nr.seconds:}switch(vr(n)){case nr.ms:t*=1e3;break;case nr.hours:t/=3600;break;case nr.minutes:t/=60;break;case nr.days:t/=86400;break;case nr.seconds:}return xr(t,o)}function Kr(t,e,n,o,r,i,s,a){r=Tr(e,r,er.meters),i=Hr(n,i,nr.seconds);return qr(2*(r-Zr(t,o,or.metersPerSecond)*i)/(i*i),rr.metersPerSecondSquared,s,a)}function Wr(t,e,n,o,r,i,s){t=Zr(t,o,or.metersPerSecond);return qr((Zr(e,o,or.metersPerSecond)-t)/Hr(n,r,nr.seconds),rr.metersPerSecondSquared,i,s)}function Vr(t,e,n,o){t=Yr(t),e=Yr(e);return null!=t&&null!=e?Hr(e.getTime()-t.getTime(),nr.ms,n,o):NaN}function Yr(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(")){e=0,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);return new Date(e)}}else if("number"==typeof t)return new Date(t);return null}function Qr(t){var e=[],n=null,o=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(Qr(t[i]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":e=t.coordinates;break;case"Polygon":n=t.coordinates;break;case"MultiPoint":e=t.coordinates;break;case"MultiLineString":n=t.coordinates;break;case"MultiPolygon":o=t.coordinates;break;case"Feature":var s=t,e=si._isCircle(s)?si._getCirclePositions(s):Qr(s.geometry);break;case"FeatureCollection":e=Qr(t.features);break;case"GeometryCollection":e=Qr(t.geometries)}else if(t instanceof si)return Qr(t.toJson());if(n)for(r=n.length,i=0;i<r;i++)e=e.concat(n[i]);else if(o)for(var a=o.length,i=0;i<a;i++)for(var l=o[i].length,c=0;c<l;c++)e=e.concat(o[i][c]);return e}function Jr(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 si&&"Point"===t.getType())return t.getCoordinates();return null}function Xr(t,e,n){n=n||"meters";var o,r,i=0;if(Array.isArray(t)?r=t:t.type&&"LineString"===t.type&&(r=t.coordinates),2<=r.length){for(var s=r.length,a=1;a<s;a++){if(e<=i+(o=Cr(r[a-1],r[a],n))){var l=Ar(r[a-1],r[a]),c=Er(r[a-1],l,e-i,n);return new Wo(new Xo(c),{heading:l})}i+=o}return i<=e?new Wo(new Xo(r[s-1]),{heading:Ar(r[s-2],r[s-1])}):new Wo(new Xo(r[0]),{heading:Ar(r[0],r[1])})}return null}function $r(t,e,n,o){var r=Jr(t),i=Ur([r],22)[0],s=null,a=1/0;switch((e=e instanceof si?e.toJson():e).type){case"Feature":return $r(t,e.geometry,n);case"Point":d=[[e.coordinates]];break;case"MultiPoint":for(var l,c=e.coordinates,u=0,h=c.length;u<h;u++)(l=Cr(r,c[u]))<a&&(a=l,s=new Wo(new Xo(c[u]),{distance:l}));break;case"LineString":d=[e.coordinates];break;case"Polygon":case"MultiLineString":d=e.coordinates;break;case"MultiPolygon":var p=e.coordinates;if(0<p.length)for(var d=p[0],u=1,h=p.length;u<h;u++)d=d.concat(p[u])}if(d)for(var f,u=0,h=d.length;u<h;u++)(f=Sr(r,i,d[u]))&&f.properties.distance<a&&(a=f.properties.distance,s=f);return s&&(s.properties.distance=Tr(s.properties.distance,"meters",n,o)),s}(At=tr=tr||{}).squareMeters="squareMeters",At.acres="acres",At.hectares="hectares",At.squareFeet="squareFeet",At.squareKilometers="squareKilometers",At.squareMiles="squareMiles",At.squareYards="squareYards",(Nt=er=er||{}).meters="meters",Nt.kilometers="kilometers",Nt.feet="feet",Nt.miles="miles",Nt.nauticalMiles="nauticalMiles",Nt.yards="yards",(kt=nr=nr||{}).seconds="seconds",kt.hours="hours",kt.ms="ms",kt.minutes="minutes",kt.days="days",(Ot=or=or||{}).metersPerSecond="metersPerSecond",Ot.kilometersPerHour="kilometersPerHour",Ot.feetPerSecond="feetPerSecond",Ot.milesPerHour="milesPerHour",Ot.knots="knots",Ot.mach="mach",(wt=rr=rr||{}).milesPerSecondSquared="milesPerSecondSquared",wt.kilometersPerSecondSquared="kilometersPerSecondSquared",wt.knotsPerSecond="knotsPerSecond",wt.standardGravity="standardGravity",wt.feetPerSecondSquared="feetPerSecondSquared",wt.yardsPerSecondSquared="yardsPerSecondSquared",wt.milesPerHourSecond="milesPerHourSecond",wt.kilometersPerHourSecond="kilometersPerHourSecond",wt.metersPerSecondSquared="metersPerSecondSquared";var ti,ei=(I(ni,ti=Array),ni.fromPosition=function(t){return 2===t.length?new ni(t[0],t[1]):2<t.length?new ni(t[0],t[1],t[2]):null},ni.areEqual=function(t,e,n){if(void 0===n&&(n=6),t&&2<=t.length&&e&&2<=e.length){var o=Math.pow(10,n),r=zr(t[1]),n=zr(e[1]),t=Br(t[0]),e=Br(e[0]);if(0!=Math.round((r-n)*o)/o)return!1;o=Math.round((t-e)*o)/o;return 0!=o&&360!=o?!1:!0}return!1},ni.fromLatLng=function(r,t,e){var i,s,a,l,c,u,n=[];return"number"==typeof r?(n.push(r),"number"==typeof t&&n.push(t),"number"==typeof e&&n.push(e)):Array.isArray(r)?2<=r.length&&"number"==typeof r[0]&&"number"==typeof r[1]&&(3<=r.length&&"number"==typeof r[2]?n.push(r[0],r[1],r[2]):n.push(r[0],r[1])):"object"==typeof r&&(i=["lat","latitude","y"],s=["lng","longitude","lon","x"],a=["elv","elevation","alt","altitude","z"],u=c=l=NaN,Object.keys(r).forEach(function(t,e,n){var o=t.toLowerCase();isNaN(l)&&0<=i.indexOf(o)&&"number"==typeof r[t]?l=r[t]:isNaN(c)&&0<=s.indexOf(o)&&"number"==typeof r[t]?c=r[t]:isNaN(u)&&0<=a.indexOf(o)&&"number"==typeof r[t]&&(u=r[t])}),isNaN(l)||isNaN(c)||(n.push(c,l),isNaN(u)||n.push(u))),2<=n.length?n:null},ni.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var n=0,o=t.length;n<o;n++){var r=ni.fromLatLng(t[n]);r&&e.push(r)}return e},ni._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},ni);function ni(t,e,n){return n?ti.call(this,t,e,n)||this:ti.call(this,t,e)||this}var oi=(ri.TYPE="Polygon",ri);function ri(t,e){this.type="Polygon",this.type=ri.TYPE,1===ei._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var ii,si=(I(ai,ii=tt),ai.prototype.addProperty=function(t,e){Zo(this.data.properties[t],e)||(this.data.properties[t]=Un(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},ai.prototype.getBounds=function(){var e,t,n,o,r,i=this.getCoordinates(),s=this.getType();if("Point"===s)r=this.circlePolygon?(a=this.circlePolygon.geometry.coordinates,ci.fromPositions(a[0])):new ci(a=i,a);else if("MultiPoint"===s||"LineString"===s){var a=i;r=ci.fromPositions(a)}else if("Polygon"===s){a=i;r=ci.fromPositions(a[0])}else if("MultiLineString"===s){a=i;try{for(var l=R(a),c=l.next();!c.done;c=l.next()){var u=c.value;r=ci.merge(r,ci.fromPositions(u))}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}}else if("MultiPolygon"===s){a=i;try{for(var h=R(a),p=h.next();!p.done;p=h.next()){var d=p.value;r=ci.merge(r,ci.fromPositions(d[0]))}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}return r},ai.prototype.getCoordinates=function(){return Un(this.data.geometry.coordinates)},ai.prototype.getCircleCoordinates=function(){return this.circlePolygon?Un(this.circlePolygon.geometry.coordinates[0]):null},ai.prototype.getId=function(){return this.data.id},ai.prototype.getProperties=function(){return Un(this.data.properties)},ai.prototype.getType=function(){return this.data.geometry.type},ai.prototype.isCircle=function(){return ai._isCircle(this.data)},ai.prototype.isRectangle=function(){return ai._isRectangle(this.data)},ai.prototype.setCoordinates=function(t){t="Polygon"===this.getType()&&1===ei._getDimensions(t)?[t]:t;Zo(this.data.geometry.coordinates,t)||(this.data.geometry.coordinates=Un(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},ai.prototype.setProperties=function(t){t[ai._shapeIdPropName]=this.data.id,Zo(this.data.properties,t)||(this.data.properties=Un(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},ai.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},ai.prototype._toJson=function(){return this.circlePolygon||this.data},ai.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},ai.prototype._handleCircle=function(){var t;this.isCircle()?(t=ai._getCirclePositions(this.data),this.circlePolygon=new Wo(new oi([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"):delete this.circlePolygon},ai._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},ai._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},ai._getCirclePositions=function(t){return Mr(t.geometry.coordinates,t.properties.radius,72,"meters")},ai._shapeIdPropName="_azureMapsShapeId",ai);function ai(t,e,n){var o,r,i=ii.call(this)||this;return"Feature"===t.type?(r=Un((o=t).geometry),n=o.properties?Un(o.properties):{},e=null==o.id||""===o.id?Ko():o.id):(r=Un(t),e=null==e||""===e?Ko():e,n=n?Un(n):{}),n[ai._shapeIdPropName]=e,i.data=new Wo(r,n,e),i._handleCircle(),i}var li,ci=(I(ui,li=Array),ui.fromBoundingBox=function(t){var e=ui.getWest(t),n=ui.getSouth(t),o=ui.getEast(t),t=ui.getNorth(t);return new ui([e,n,o,t])},ui.fromDimensions=function(t,e,n){var o=t[0],r=t[1],t=Math.min(Math.max(r+n/2,-85.5),85.5),r=Math.min(Math.max(r-n/2,-85.5),85.5),n=Br(o+e/2);return new ui([Br(o-e/2),r,n,t])},ui.fromEdges=function(t,e,n,o){return new ui([t,e,n,o])},ui.containsPosition=function(t,e){var n=ui.getCenter(t),o=Math.abs(n[1]-e[1]),n=Math.abs(n[0]-e[0]);180<n&&(n=360-n);e=ui.getHeight(t),t=ui.getWidth(t);return o<=e/2+1e-8&&n<=t/2+1e-8},ui.containsBoundingBox=function(t,e){var n=t&&4===t.length,o=e&&4===e.length;return!(!n||!o)&&(ui.getWest(t)<ui.getWest(e)&&ui.getWest(e)<ui.getEast(t)&&ui.getWest(t)<ui.getEast(e)&&ui.getEast(e)<ui.getEast(t)&&ui.getSouth(t)<ui.getSouth(e)&&ui.getSouth(e)<ui.getNorth(t)&&ui.getSouth(t)<ui.getNorth(e)&&ui.getNorth(e)<ui.getNorth(t))},ui.crossesAntimeridian=function(t){return Br(ui.getEast(t))-Br(ui.getWest(t))<0||ui.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)||ui.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)},ui.getCenter=function(t){var e=Br(ui.getEast(t)),n=Br(ui.getWest(t));e<n&&(e+=360);n=Br((n+e)/2),e=zr(ui.getSouth(t)),t=zr(ui.getNorth(t));return[n,zr((e+t)/2)]},ui.getHeight=function(t){t=zr(ui.getNorth(t))-zr(ui.getSouth(t));return isNaN(t)?0:t},ui.getWidth=function(t){t=Br(ui.getEast(t))-Br(ui.getWest(t));return isNaN(t)?0:t<0?t+360:t},ui.getSouthWest=function(t){var e=this.getSouth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},ui.getNorthEast=function(t){var e=this.getNorth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},ui.getNorthWest=function(t){var e=this.getNorth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},ui.getSouthEast=function(t){var e=this.getSouth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},ui.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},ui.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},ui.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},ui.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},ui.intersect=function(t,e){var n=ui.getCenter(t),o=ui.getCenter(e),r=Math.abs(n[1]-o[1]),i=Math.abs(n[0]-o[0]);180<i&&(i=360-i);n=ui.getHeight(t),o=ui.getWidth(t),t=ui.getHeight(e),e=ui.getWidth(e);return r<=n/2+t/2&&i<=o/2+e/2},ui.merge=function(t,e){var n=t&&4===t.length,o=e&&4===e.length;if(n&&!o)return t;if(o&&!n)return e;if(!n&&!o)return null;for(var n=Math.max(zr(ui.getNorth(t)),zr(ui.getNorth(e))),o=Math.min(zr(ui.getSouth(t)),zr(ui.getSouth(e))),r=[t,e],i=[],s=0,s=0;s<r.length;s++){var a=r[s],l=Br(ui.getWest(a)),c=Br(ui.getEast(a));ui.crossesAntimeridian(a)?(i.push([l,180]),i.push([-180,c])):i.push([l,c])}i.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var u=[],h=i[0];for(s=1;s<i.length;){var p=i[s];h[1]>=p[0]?h[1]=Math.max(h[1],p[1]):(u.push(h),h=p),s++}u.push(h);var d=u.length,f=u[0][0]+360-u[d-1][1],m=[u[d-1][1],u[0][0]];for(s=1;s<d;s++){var g=u[s][0]-u[s-1][1];f<g&&(f=g,m=[u[s-1][1],u[s][0]])}return new ui([m[1],o],[m[0],n])},ui.fromPositions=function(t){for(var e,n,o=NaN,r=NaN,i=NaN,s=NaN,a=t.length,l=new Array(a),c=0;a--;)(n=t[a])&&2<=n.length&&(e=zr(n[1]),o=isNaN(o)?e:Math.max(o,e),r=isNaN(r)?e:Math.min(r,e),l[c++]=Br(n[0]));if(c){l.length=c,l.sort(function(t,e){return t-e});for(var u=l[0]+360-l[c-1],h=0,a=1;a<c;a++){var p=l[a]-l[a-1];u<p&&(u=p,h=a)}i=l[h],s=l[(h||c)-1]}return isNaN(i)||isNaN(r)||isNaN(s)||isNaN(o)?null:new ui([i,r,s,o])},ui.fromLatLngs=function(t){return ui.fromPositions(ei.fromLatLngs(t))},ui.fromData=function(t){var e,n,o=null;if(Array.isArray(t)&&0<t.length){try{for(var r=R(t),i=r.next();!i.done;i=r.next()){var s,a=i.value;null!=(s=ui.fromData(a))&&(o=null===o?s:ui.merge(o,s))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o}if(t instanceof si)return t.getBounds();if(t&&t.type){var l=t;if(l.bbox&&4===l.bbox.length)return l.bbox;switch(l.type){case"FeatureCollection":return ui.fromData(l.features);case"Feature":return si._isCircle(l)?ui.fromPositions(si._getCirclePositions(l)):ui.fromData(l.geometry);case"GeometryCollection":return ui.fromData(l.geometries);case"Point":var c=l.coordinates;if(c&&2<=c.length)return[c[0],c[1],c[0],c[1]];break;case"LineString":case"MultiPoint":return ui.fromPositions(l.coordinates);case"Polygon":case"MultiLineString":var u=l.coordinates;if(u&&0<u.length){for(var h=0,p=u.length;h<p;h++)null!=(s=ui.fromPositions(u[h]))&&(o=null===o?s:ui.merge(o,s));if(null!=o)return o}break;case"MultiPolygon":var d=l.coordinates;if(d&&0<d.length){for(h=0,p=d.length;h<p;h++)for(var f=0,m=d[h].length;f<m;f++)null!=(s=ui.fromPositions(d[h][f]))&&(o=null===o?s:ui.merge(o,s));return o}}}return null},ui.splitOnAntimeridian=function(t){var e,n,o,r,i,s,a=[];return ui.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)?[[-180,t[1],t[2],180,t[4],t[5]]]:ui.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)?[[-180,t[1],180,t[3]]]:(ui.crossesAntimeridian(t)?(s=e=void 0,n=Br(ui.getWest(t)),o=Br(ui.getEast(t)),r=zr(ui.getNorth(t)),i=zr(ui.getSouth(t)),s=6<=t.length?(e=[n,i,t[2],180,r,t[5]],[-180,i,t[2],o,r,t[5]]):(e=[n,i,180,r],[-180,i,o,r]),a.push(e,s)):a.push(t),a)},ui.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe=function(t){return 6<=t.length&&360<t[3]-t[0]},ui.isBoundingBoxWithLessThanSixElementsLargerThanGlobe=function(t){return t.length<6&&360<t[2]-t[0]},ui);function ui(t,e){var n,o=this;return t&&e?o=(n=t)[2]&&e[2]?li.call(this,n[0],n[1],n[2]||0,e[0],e[1],e[2]||0)||this:li.call(this,n[0],n[1],e[0],e[1])||this:!t||(t=t)&&(4===t.length?o=li.call(this,t[0],t[1],t[2],t[3])||this:6<=t.length&&(o=li.call(this,t[0],t[1],t[2],t[3],t[4],t[5])||this)),o}var hi=(pi.TYPE="FeatureCollection",pi);function pi(t,e){this.type="FeatureCollection",this.type=pi.TYPE,this.features=t,this.bbox=e}di.TYPE="GeometryCollection",St=di;function di(t){this.type="GeometryCollection",this.type=di.TYPE,this.geometries=t}fi.TYPE="LineString",At=fi;function fi(t,e){this.type="LineString",this.type=fi.TYPE,this.coordinates=t,this.bbox=e}mi.TYPE="MultiLineString",Nt=mi;function mi(t,e){this.type="MultiLineString",this.type=mi.TYPE,this.coordinates=t,this.bbox=e}gi.TYPE="MultiPoint",kt=gi;function gi(t,e){this.type="MultiPoint",this.type=gi.TYPE,this.coordinates=t,this.bbox=e}yi.TYPE="MultiPolygon",Ot=yi;function yi(t,e){this.type="MultiPolygon",this.type=yi.TYPE,this.coordinates=t,this.bbox=e}var vi,wt=Object.freeze({__proto__:null,Feature:Wo,FeatureCollection:hi,LineString:At,Point:Xo,Polygon:oi,Position:ei,BoundingBox:ci,MultiLineString:Nt,MultiPoint:kt,MultiPolygon:Ot,GeometryCollection:St}),_i=Pt(function(t,e){function m(t,e){return t*t+e*e}function i(t,e){for(var n,o,r,i=t[0],s=[i],a=1,l=t.length;a<l;a++)n=t[a],r=i,m((o=n)[0]-r[0],o[1]-r[1])>e&&(s.push(n),i=n);return i!==n&&s.push(n),s}function g(t,e,n,o,r){for(var i,s,a,l,c,u,h,p=o,d=e+1;d<n;d++){var f=(s=t[d],a=t[e],l=t[n],h=u=f=c=void 0,c=a[0],f=a[1],u=l[0]-c,h=l[1]-f,0==u&&0==h||(1<(a=((s[0]-c)*u+(s[1]-f)*h)/m(u,h))?(c=l[0],f=l[1]):0<a&&(c+=u*a,f+=h*a)),m(s[0]-c,s[1]-f));p<f&&(i=d,p=f)}o<p&&(1<i-e&&g(t,e,i,o,r),r.push(t[i]),1<n-i&&g(t,i,n,o,r))}e.__esModule=!0,e.SimplifyAP=function(t,e,n){if(t.length<=2)return t;var o,r=(e=void 0===e?1:e)*e;return t=(n=void 0===n?!1:n)?t:i(t,r),e=(o=t).length-1,n=[o[0]],g(o,0,e,r,n),n.push(o[e]),t=n}});(vi=_i)&&vi.__esModule&&Object.prototype.hasOwnProperty.call(vi,"default")&&vi.default;var bi=_i.SimplifyAP;var wi=(Si.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},Si.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},Si.prototype.transformArray=function(t,e,n){var o,r;if(t&&Array.isArray(t)&&Array.isArray(t[0])){var i=[];try{for(var s=R(t),a=s.next();!a.done;a=s.next()){var l=a.value;i.push(this.transform(l,e,n))}}catch(t){o={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}return null},Si.prototype.transform=function(t,e,n){var o=t[0]*e[0][3]+t[1]*e[1][3]+e[2][3],e=t[0]*e[0][4]+t[1]*e[1][4]+e[2][4];return"number"==typeof n&&0<=n?[xr(o,n),xr(e,n)]:[xr(o,6),xr(e,6)]},Si._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 n=Math.min(t[0].length,e[0].length),o=n+1;if(t.length<n)throw new Error("Erorr: At least "+n+" reference points required.");for(var r=[],i=[],s=0;s<o;s++){i[s]=[];for(var a=0;a<o;a++){a<n&&(r[a]=0);for(var l=i[s][a]=0;l<t.length;l++)a<n&&(r[a]+=s<n?t[l][s]*e[l][a]:e[l][a]),i[s][a]+=n<=s&&n<=a?1:n<=s?t[l][a]:n<=a?t[l][s]:t[l][s]*t[l][a]}i[s]=i[s].concat(r)}if(!this._gaussJordanElimination(i))throw new Error("Error: Singular matrix. Points are likely coplanar.");return i},Si._gaussJordanElimination=function(t){for(var e,n=t.length,o=2*n-1,r=0;r<n;r++){for(var i=r,s=r+1;s<n;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<n;a++)for(var l=t[a][r]/t[r][r],c=r;c<o;c++)t[a][c]-=t[r][c]*l}for(r=n-1;-1<r;r--){l=t[r][r];for(s=0;s<r;s++)for(var u=o-1;r-1<u;u--)t[s][u]-=t[r][u]*t[s][r]/l;t[r][r]/=l;for(var h=n;h<o;h++)t[r][h]/=l}return!0},Si);function Si(t,e){this.M=Si._calculateAffineTransform(t,e),this.inverseM=Si._calculateAffineTransform(e,t)}var xi,At=Object.freeze({__proto__:null,AffineTransform:wi,WEBMERCATOR_MAXLAT:cr,_precision:xr,get AreaUnits(){return tr},get DistanceUnits(){return er},get TimeUnits(){return nr},get SpeedUnits(){return or},get AccelerationUnits(){return rr},boundingBoxToPolygon:function(t){var e=Br(ci.getWest(t)),n=Br(ci.getEast(t)),o=zr(ci.getNorth(t)),r=zr(ci.getSouth(t)),t=ci.getCenter(t),o=[[e,o],[e,r],[t[0],r],[n,r],[n,o],[t[0],o],[e,o]];return new oi([o])},convertDistance:Tr,getCardinalSpline:function(t,e,n,o){if(!t||t.length<=2)return i;"number"!=typeof e&&(e=.5),("number"!=typeof n||n<=0)&&(n=15);var r=t.length,i=t.slice(0);o?(ei.areEqual(i[0],i[r-1])&&(i.pop(),r--),i.unshift(t[r-1]),i.push(t[0]),i.push(t[1]),r++):(i.unshift(t[0]),i.push(t[r-1]));var s,a,l,c=[];c.push([1,0,0,0]);for(var u=1;u<n-1;u++)c.push([2*(l=(s=u/n)*(a=s*s))-3*a+1,-2*l+3*a,l-2*a+s,l-a]);c.push([0,1,0,0]);for(var h,p,d,f,m,g,y=[],u=1;u<r;u++)for(h=e*(i[u+1][0]-i[u-1][0]),p=e*(i[u+1][1]-i[u-1][1]),d=e*(i[u+2][0]-i[u][0]),f=e*(i[u+2][1]-i[u][1]),s=0;s<n;s++)g=(m=c[s])[0]*i[u][0]+m[1]*i[u+1][0]+m[2]*h+m[3]*d,m=pr(m[0]*i[u][1]+m[1]*i[u+1][1]+m[2]*p+m[3]*f,-85,85),y.push([g,m]);return y},getDestination:Er,getDistanceTo:Cr,getEarthRadius:kr,getPathDenormalizedAtAntimerian:Ir,getPathSplitByAntimeridian:Lr,getGeodesicPath:function(t,e){var n;(!e||e<=0)&&(e=15),Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var o=n.length-1,r=[],i=0;i<o;i++)r=r.concat(Or(n[i],n[i+1],e));return Ir(r)},getGeodesicPaths:function(t,e){var n;(!e||e<=0)&&(e=15),Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var o=n.length-1,r=[],i=[],s=0;s<o;s++)for(var a,l,c,u,h,p=Or(n[s],n[s+1],e),d=0;d<p.length;d++)r.push(p[d]),d+1>=p.length||(a=(c=N(p[d],2))[0],l=c[1],h=(u=N(p[d+1],2))[0],c=u[1],180<Math.abs(h-a)&&(u=0<a?180:-180,h=Math.abs((0<a?h+360:h-360)-a),h=l+(c-l)*(Math.abs(u-a)/h),r.push([u,h]),i.push(r),r=[[-u,h]]));return i.push(r),i},getHeading:Ar,getLengthOfPath:Pr,getPositionAlongPath:Rr,getRegularPolygonPath:Mr,getRegularPolygonPaths:function(t,e,n,o,r){return Lr(Nr(t,e,n,o,r))},interpolate:Dr,normalizeLatitude:zr,normalizeLongitude:Br,rotatePositions:jr,getPixelHeading:function(t,e){var t=(n=N(Ur([t=Jr(t),e=Jr(e)],21),2))[0],n=(e=n[1])[0]-t[0],e=t[1]-e[1];return(2.5*Math.PI-Math.atan2(e,n))*ar%360},mercatorPixelsToPositions:Fr,mercatorPositionsToPixels:Ur,convertAcceleration:qr,convertArea:Gr,convertSpeed:Zr,convertTimespan:Hr,getAcceleration:Kr,getAccelerationFromSpeeds:Wr,getAccelerationFromFeatures:function(t,e,n,o,r,i,s){if("string"==typeof n&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var a=Vr(t.properties[n],e.properties[n],nr.seconds);if(!isNaN(a)){var l=0;if(o&&"string"==typeof o){n=t.properties[o],o=e.properties[o];if("number"==typeof n&&(l=n,"number"==typeof o))return Wr(n,o,a,r,nr.seconds,i,s)}return Kr(l,Cr(t.geometry.coordinates,e.geometry.coordinates,er.meters),a,r,er.meters,nr.seconds,i,s)}}return NaN},getArea:function t(e,n,o){if(e){var r=0;switch((e=e instanceof si?e.toJson():e).type){case"Feature":var i=e;if(e.geometry)return t(i.geometry,n,o);break;case"Polygon":(i=e).coordinates&&(r=_r(i.coordinates));break;case"MultiPolygon":var s=e;if(s.coordinates)for(var a=0,l=s.coordinates.length;a<l;a++)r+=_r(s.coordinates[a])}return Gr(r,tr.squareMeters,n,o)}return 0},getSpeed:function(t,e,n,o,r,i){if(t=Jr(t),e=Jr(e),t&&e){o=Hr(n,o,nr.seconds);return Zr(Cr(t,e,er.meters)/o,or.metersPerSecond,r,i)}return 0},getSpeedFromFeatures:function(t,e,n,o,r){if("string"==typeof n&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){n=this.getTimespan(t.properties[n],e.properties[n],nr.seconds);if(!isNaN(n)){e=this.getDistanceTo(t.geometry.coordinates,e.geometry.coordinates,er.meters);return this.convertSpeed(e/n,or.metersPerSecond,o,r)}}return NaN},getTimespan:Vr,getTravelDistance:function(t,e,n,o,r,i,s,a){return e=this.convertTimespan(e,r,nr.seconds),n=(n=this.convertSpeed(n,i,or.metersPerSecond))*e,"number"==typeof o&&(n+=.5*this.convertAcceleration(o,s,rr.metersPerSecondSquared)*e*e),this.convertDistance(n,er.meters,t,a)},parseTimestamp:Yr,getConvexHull:function(t){var e,n,o=Qr(t).map(function(t){return[Br(t[0]),zr(t[1])]});o.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var r=[];try{for(var i=R(o),s=i.next();!s.done;s=i.next()){for(var a=s.value;2<=r.length&&wr(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&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}for(var l=[],c=o.length-1;0<=c;c--){for(;2<=l.length&&wr(l[l.length-2],l[l.length-1],o[c])<=0;)l.pop();l.push(o[c])}return new oi([r.concat(l)])},getPositions:Qr,getPosition:Jr,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var n=[],o=Pr(t,er.meters)/(e-1),r=0;r<e;r++){var i=Rr(t,o*r,er.meters);null!=i&&n.push(i)}return n},getPointWithHeadingAlongPath:Xr,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var n=[],o=Pr(t,er.meters)/(e-1),r=0;r<e;r++){var i=Xr(t,o*r,er.meters);null!=i&&n.push(i)}return n},getClosestPointOnGeometry:$r,simplify:function(t,e){return bi(t,e,!0)}}),Ti=(I(Ei,xi=D),Ei);function Ei(){var t=null!==xi&&xi.apply(this,arguments)||this;return t.zoomDelta=1,t.style=u.ControlStyle.light,t}var Ci,Nt=(I(ki,Ci=rt),ki.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=K("Zoom In"),n=K("Zoom Out");return this.container.appendChild(this.zoomInButton),this.container.appendChild(e),this.container.appendChild(this.zoomOutButton),this.container.appendChild(n),W(e,this.zoomInButton),W(n,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},ki.prototype.onRemove=function(){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)},ki.prototype.updateZoomButtonsState=function(){var t=this.map.getCamera().zoom>=this.map._getMap().getMaxZoom(),e=ci.getSouth(this.map.getCamera().bounds)<=-cr&&ci.getNorth(this.map.getCamera().bounds)>=cr,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.zoomInButton.setAttribute("aria-label",t?"Zoom Out disabled":"Zoom Out"))},ki.prototype.constructZoomInButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("zoom-in"),n.setAttribute("aria-label","Zoom In"),n.setAttribute("alt","Zoom In"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom+e.options.zoomDelta,duration:ki.ZOOM_DURATION_MS,type:"ease"},!0)}),n},ki.prototype.constructZoomOutButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("zoom-out"),n.setAttribute("aria-label","Zoom Out"),n.setAttribute("alt","Zoom Out"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom-e.options.zoomDelta,duration:ki.ZOOM_DURATION_MS,type:"ease"},!0)}),n},ki.ZOOM_DURATION_MS=200,ki);function ki(t){var e=Ci.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 Ti).merge(t),e}kt=Object.freeze({__proto__:null,ControlBase:rt,PitchControl:gt,CompassControl:ut,ZoomControl:Nt,StyleControl:Lt,TrafficControl:So,TrafficLegendControl:It});var Oi,Ii=function(t,e){return Fn(t,5,e="function"==typeof e?e:void 0)},Li=(I(Ai,Oi=D),Ai);function Ai(){var t=null!==Oi&&Oi.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}var Pi,Ri=(I(Ni,Pi=tt),Ni.prototype.getId=function(){return this.id},Ni.prototype._setMap=function(t){var e;null==t||void 0===t?(e=this.map,delete this.map,this._invokeEvent("sourceremoved",this),e&&e.events.invoke("sourceremoved",this)):(this.map=t,this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this))},Ni);function Ni(t){var e=Pi.call(this)||this;return e.id=t||Ko(),e}var Mi,Di=(I(zi,Mi=Ri),zi.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},zi.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},zi.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},zi.prototype.getClusterExpansionZoom=function(e){var r=this;return new Promise(function(n,o){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterExpansionZoom(e,function(t,e){t?o(t):"number"==typeof e&&n(e)}):o("The DataSource hasn't been added to a map.")})},zi.prototype.getClusterChildren=function(e){var r=this;return new Promise(function(n,o){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterChildren(e,function(t,e){t?o(t):e&&n(r.map.sources._mapFeaturesToShapes(e,!1,r))}):o("The DataSource hasn't been added to a map.")})},zi.prototype.getClusterLeaves=function(e,r,i){var s=this;return new Promise(function(n,o){var t;s.map?(t=s.map._getMap().getSource(s.getId()))&&"geojson"===t.type&&t.getClusterLeaves(e,r,i,function(t,e){t?o(t):e&&n(s.map.sources._mapFeaturesToShapes(e,!1,s))}):o("The DataSource hasn't been added to a map.")})},zi.prototype.getOptions=function(){return Un(this.options)},zi.prototype.getShapes=function(){return Array.from(this.shapes)},zi.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 "+t.status+": "+t.statusText)}).then(function(t){e.add(t)})},zi.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},zi.prototype.remove=function(t){var e,n,t=Array.isArray(t)?t:[t];try{for(var o=R(t),r=o.next();!r.done;r=o.next()){var i=r.value;"number"==typeof i?this._removeByIndex(i):this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this._updateSource()},zi.prototype.removeById=function(t){var e,n,t=Array.isArray(t)?t:[t];try{for(var o=R(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this._updateSource()},zi.prototype.setOptions=function(t){t=(new Li).merge(this.options,Un(t));Zo(this.options,t)||(this._invokeEvent("datasourceupdated",this),this.options=t,this.map&&this.map._rebuildStyle())},zi.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},zi.prototype.toJson=function(){return new hi(this.shapes.map(function(t){return t.toJson()}))},zi.prototype._toJson=function(){return new hi(this.shapes.map(function(t){return t._toJson()}))},zi.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};return"number"==typeof this.options.clusterMaxZoom&&(t.clusterMaxZoom=this.options.clusterMaxZoom),t},zi.prototype._addNoUpdate=function(t,e){var n;t instanceof si?(this._addToSources(t,e),n=[t]):Array.isArray(t)?(n=t.map(function(t){return t instanceof si?t:new si(t)}),this._addToSources(n,e)):"FeatureCollection"===t.type?(n=t.features.map(function(t){return new si(t)}),this._addToSources(n,e)):"GeometryCollection"===t.type?(n=t.geometries.map(function(t){return new si(t)}),this._addToSources(n,e)):(t=new si(t),this._addToSources(t,e),n=[t]),this._invokeEvent("dataadded",n)},zi.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new $,t&&0<t.length&&this._invokeEvent("dataremoved",t)},zi.prototype._updateSource=function(){var t=this;void 0!==this.requestId||(this.requestId=requestAnimationFrame(function(){t._updateMboxSource(),t.requestId=void 0}))},zi.prototype._addToSources=function(t,e){var n,o,r,i;if(t=Array.isArray(t)?t:[t],"number"!=typeof e)try{for(var s=R(t),a=s.next();!a.done;a=s.next()){var l=a.value;this.shapes.push(l),this.shapesMap.set(l.getId(),this.shapes.length-1)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}else for(var c=t.length-1;0<=c;c--)this.shapes.splice(e,0,t[c]),this._updateShapesMap(e);try{for(var u=R(t),h=u.next();!h.done;h=u.next())(l=h.value)._setDataSource(this)}catch(t){r={error:t}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}},zi.prototype._removeById=function(t){var e=t instanceof si?t.getId():"string"==typeof t||"number"==typeof t?t:t.id,t=this.shapes[this.shapesMap.get(e)];t&&(t._setDataSource(null),this.shapes.splice(this.shapesMap.get(e),1),this._updateShapesMap(this.shapesMap.get(e)),this.shapesMap.delete(e),this._invokeEvent("dataremoved",[t]))},zi.prototype._removeByIndex=function(t){var e;if(t>=this.shapes.length)throw new Error("The specified remove index '"+t+"' is greater than the maximum possible index '"+(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])},zi.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},zi.prototype._updateMboxSource=function(){var t;this.map&&this.map._getMap()&&((t=this.map._getMap().getSource(this.getId()))&&"geojson"===t.type&&t.setData(this._toJson()))},zi);function zi(t,e){t=Mi.call(this,t)||this;return t.requestId=void 0,t.options=(new Li).merge(Un(e)),t.shapes=[],t.shapesMap=new $,t}var Bi,ji=(I(Fi,Bi=D),Fi);function Fi(){var t=null!==Bi&&Bi.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}var Ui,qi=(I(Gi,Ui=Ri),Gi.prototype.getOptions=function(){return Un(this.options)},Gi.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},Gi.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},Gi);function Gi(t,e){t=Ui.call(this,t)||this;return t.options=(new ji).merge(Un(e)),t}var Zi,Ot=Object.freeze({__proto__:null,Source:Ri,DataSource:Di,VectorTileSource:qi}),Hi=(I(Ki,Zi=tt),Ki.prototype.getId=function(){return this.id},Ki.prototype.getMap=function(){return this.map||null},Ki.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},Ki.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},Ki._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},Ki.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")},Ki.prototype._updateFilter=function(t,e){Zo(t,e)||this.map._getMap().setFilter(this.id,t)},Ki.prototype._updatePaintProperty=function(t,e,n,o){Zo(e,n)||this.map._getMap().setPaintProperty(this.id,t,o||e)},Ki.prototype._updateLayoutProperty=function(t,e,n,o){Zo(e,n)||this.map._getMap().setLayoutProperty(this.id,t,o||e)},Ki.prototype._updateZoomRange=function(t,e,n,o){t===e&&o===n||this.map._getMap().setLayerZoomRange(this.id,t,n)},Ki.LayerEvents={layeradded:void 0,layerremoved:void 0},Ki);function Ki(t){var e=Zi.call(this)||this;return e.id=t||Ko(),e}var Wi,St=(I(Vi,Wi=D),Vi._cloneCustomizer=function(t){if(t instanceof Ri)return t},Vi);function Vi(){var t=null!==Wi&&Wi.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}var Yi,Qi=(I(Ji,Yi=St),Ji);function Ji(){var t=null!==Yi&&Yi.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}var Xi,$i=(I(ts,Xi=Hi),ts.prototype.getOptions=function(){return Ii(this.options,Qi._cloneCustomizer)},ts.prototype.getSource=function(){return this.options.source},ts.prototype.setOptions=function(t){t=(new Qi).merge(this.options,Ii(t,Qi._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},ts.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof Ri?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]},ts.prototype._getLayerIds=function(){return[this.id]},ts.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ri?t.add(this.options.source.getId()):t.add(this.options.source),t},ts);function ts(t,e,n){e=Xi.call(this,e)||this;return e.options=(new Qi).merge(Ii(n,Qi._cloneCustomizer)),e.options.source=t||e.options.source,e}var es,ns=(I(os,es=St),os._cloneCustomizer=function(t){if(t instanceof Ri)return t},os);function os(){var t=null!==es&&es.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}var rs,gt=(I(is,rs=Hi),is.prototype.getOptions=function(){return Ii(this.options,ns._cloneCustomizer)},is.prototype.getSource=function(){return this.options.source},is.prototype.setOptions=function(t){t=(new ns).merge(this.options,Ii(t,ns._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},is.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof Ri?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]},is.prototype._getLayerIds=function(){return[this.id]},is.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ri?t.add(this.options.source.getId()):t.add(this.options.source),t},is);function is(t,e,n){e=rs.call(this,e)||this;return e.options=(new ns).merge(Ii(n,ns._cloneCustomizer)),e.options.source=t||e.options.source,e}var ss,Nt=(I(as,ss=St),as);function as(){var t=null!==ss&&ss.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}var ls,cs=(I(us,ls=Nt),us._cloneCustomizer=function(t){if(t instanceof Ri)return t},us);function us(){var t=null!==ls&&ls.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}var hs,ps=(I(ds,hs=Hi),ds.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},ds);function ds(){return null!==hs&&hs.apply(this,arguments)||this}var fs,Lt=(I(ms,fs=ps),ms.prototype.getOptions=function(){return Ii(this.options,cs._cloneCustomizer)},ms.prototype.setOptions=function(t){var e=(new cs).merge(this.options,Ii(t,cs._cloneCustomizer)),n="string"==typeof t.url&&t.url!==this.getOptions().url,o=void 0!==t.coordinates&&t.coordinates!==this.getOptions().coordinates;this.map&&(this._updateBaseProperties(e,this.options),this._updatePaintProperty("raster-contrast",e.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",e.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",e.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",e.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",e.saturation,this.options.saturation),(t=this.map._getMap().getSource(this._getSourceId()))&&t.updateImage(e)),this.options=e,n?this.reloadImage():o&&this.updateTransform()},ms.prototype.getPositions=function(e){return this.transform.then(function(t){return t.toTarget(e)})},ms.prototype.getPixels=function(e){return this.transform.then(function(t){return t.toSource(e)})},ms.getCoordinatesFromRefPoints=function(t,e,n,o){return new wi(n,o).toTarget([[0,0],[t,0],[t,e],[0,e]])},ms.getCoordinatesFromEdges=function(t,e,n,o,r){"number"!=typeof r&&(r=0);n=[Math.min(o,n),e,Math.max(o,n),t],t=ci.getCenter(n);return jr([ci.getNorthWest(n),ci.getNorthEast(n),ci.getSouthEast(n),ci.getSouthWest(n)],t,r)},ms.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]},ms.prototype._getLayerIds=function(){return[this.id]},ms.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},ms.prototype._getSourceId=function(){return this.getId()+"-ImageSource"},ms.prototype.reloadImage=function(){var n=this;this.options.url&&(this.transform=new Promise(function(e,t){n.img.onload=function(){var t=[[0,0],[n.img.width,0],[n.img.width,n.img.height],[0,n.img.height]];e(new wi(t,n.options.coordinates)),n.isLoading=!1},n.img.onerror=n.img.onabort=function(){t("Failed to load image")},n.isLoading=!0,n.img.src=n.options.url}))},ms.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 wi(t,this.options.coordinates)))},ms);function ms(t,e){e=fs.call(this,e)||this;return e.isLoading=!1,e.options=(new cs).merge(Ii(t,cs._cloneCustomizer)),e.img=new Image,e.reloadImage(),e}var gs,ys=(I(vs,gs=St),vs);function vs(){var t=null!==gs&&gs.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 Qo(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var _s,bs=(I(ws,_s=Hi),ws.prototype.getOptions=function(){return Ii(this.options,ys._cloneCustomizer)},ws.prototype.getSource=function(){return this.options.source},ws.prototype.setOptions=function(t){t=(new ys).merge(this.options,Ii(t,ys._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},ws.prototype._buildLayers=function(){return[L(L(L(L({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Ri?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:L(L(L({"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})]},ws.prototype._getLayerIds=function(){return[this.id]},ws.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ri?t.add(this.options.source.getId()):t.add(this.options.source),t},ws);function ws(t,e,n){e=_s.call(this,e)||this;return e.options=(new ys).merge(Ii(n,ys._cloneCustomizer)),e.options.source=t||e.options.source,e}var Ss,xs=(I(Ts,Ss=St),Ts);function Ts(){var t=null!==Ss&&Ss.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 Qo(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var Es,It=(I(Cs,Es=Hi),Cs.prototype.getOptions=function(){return Ii(this.options,xs._cloneCustomizer)},Cs.prototype.getSource=function(){return this.options.source},Cs.prototype.setOptions=function(t){t=(new xs).merge(this.options,Ii(t,xs._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},Cs.prototype._buildLayers=function(){return[L(L(L(L({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Ri?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:L(L({"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})]},Cs.prototype._getLayerIds=function(){return[this.id]},Cs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ri?t.add(this.options.source.getId()):t.add(this.options.source),t},Cs);function Cs(t,e,n){e=Es.call(this,e)||this;return e.options=(new xs).merge(Ii(n,xs._cloneCustomizer)),e.options.source=t||e.options.source,e}var ks,Os=(I(Is,ks=St),Is.prototype.merge=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=!1,r=!1;try{for(var i=R(e),s=i.next();!s.done;s=i.next()){var a=s.value;a&&(a.hasOwnProperty("fillColor")?r=!(o=!0):a.hasOwnProperty("fillPattern")&&(o=!(r=!0)))}}catch(t){l={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(l)throw l.error}}var l=ks.prototype.merge.apply(this,M(e));return o?l.fillPattern=void 0:r&&(l.fillColor=void 0),l},Is);function Is(){var t=null!==ks&&ks.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=void 0,t}var Ls,As=(I(Ps,Ls=Hi),Ps.prototype.getOptions=function(){return Ii(this.options,Os._cloneCustomizer)},Ps.prototype.getSource=function(){return this.options.source},Ps.prototype.setOptions=function(t){t=(new Os).merge(this.options,Ii(t,Os._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},Ps.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof Ri?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]},Ps.prototype._getLayerIds=function(){return[this.id]},Ps.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ri?t.add(this.options.source.getId()):t.add(this.options.source),t},Ps);function Ps(t,e,n){e=Ls.call(this,e)||this;return e.options=(new Os).merge(Ii(n,Os._cloneCustomizer)),e.options.source=t||e.options.source,e}var Rs,Ns=(I(Ms,Rs=D),Ms);function Ms(){var t=null!==Rs&&Rs.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new Qo(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}var Ds,zs=(I(Bs,Ds=D),Bs);function Bs(){var t=null!==Ds&&Ds.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 Qo(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}var js,Fs=(I(Us,js=St),Us);function Us(){var t=null!==js&&js.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new Ns,t.textOptions=new zs,t.placement="point",t.zOrder="auto",t.lineSpacing=250,t}var qs,Gs=(I(Zs,qs=Hi),Zs.prototype.getOptions=function(){return Ii(this.options,Fs._cloneCustomizer)},Zs.prototype.getSource=function(){return this.options.source},Zs.prototype.setOptions=function(t){var e=(new Fs).merge(this.options,Ii(t,Fs._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);var n=this.options,o=e.iconOptions,r=n.iconOptions,i=e.textOptions,t=n.textOptions;this._updateBaseProperties(e,n),this._updateLayoutProperty("symbol-spacing",e.lineSpacing,n.lineSpacing),this._updateLayoutProperty("symbol-placement",e.placement,n.placement),this._updateLayoutProperty("symbol-sort-key",e.sortKey,n.sortKey),this._updateLayoutProperty("symbol-z-order",e.zOrder,n.zOrder),this._updateLayoutProperty("icon-allow-overlap",o.allowOverlap,r.allowOverlap),this._updateLayoutProperty("icon-anchor",o.anchor,r.anchor),this._updateLayoutProperty("icon-ignore-placement",o.ignorePlacement,r.ignorePlacement),this._updateLayoutProperty("icon-image",o.image,r.image),this._updateLayoutProperty("icon-offset",o.offset,r.offset),this._updatePaintProperty("icon-opacity",o.opacity,r.opacity),this._updateLayoutProperty("icon-optional",o.optional,r.optional),this._updateLayoutProperty("icon-padding",o.padding,r.padding),this._updateLayoutProperty("icon-pitch-alignment",o.pitchAlignment,r.pitchAlignment),this._updateLayoutProperty("icon-rotate",o.rotation,r.rotation),this._updateLayoutProperty("icon-rotation-alignment",o.rotationAlignment,r.rotationAlignment),this._updateLayoutProperty("icon-size",o.size,r.size),this._updateLayoutProperty("text-allow-overlap",i.allowOverlap,t.allowOverlap),this._updateLayoutProperty("text-anchor",i.anchor,t.anchor),this._updatePaintProperty("text-color",i.color,t.color),this._updateLayoutProperty("text-font",i.font,t.font),this._updateLayoutProperty("text-ignore-placement",i.ignorePlacement,t.ignorePlacement),this._updateLayoutProperty("text-justify",i.justify,t.justify),this._updatePaintProperty("text-halo-blur",i.haloBlur,t.haloBlur),this._updatePaintProperty("text-halo-color",i.haloColor,t.haloColor),this._updatePaintProperty("text-halo-width",i.haloWidth,t.haloWidth),this._updateLayoutProperty("text-offset",i.offset,t.offset),this._updatePaintProperty("text-opacity",i.opacity,t.opacity),this._updateLayoutProperty("text-optional",i.optional,t.optional),this._updateLayoutProperty("text-padding",i.padding,t.padding),this._updateLayoutProperty("text-pitch-alignment",i.pitchAlignment,t.pitchAlignment),this._updateLayoutProperty("text-radial-offset",i.radialOffset,t.radialOffset),this._updateLayoutProperty("text-rotate",i.rotation,t.rotation),this._updateLayoutProperty("text-rotation-alignment",i.rotationAlignment,t.rotationAlignment),this._updateLayoutProperty("text-size",i.size,t.size),this._updateLayoutProperty("text-variable-anchor",i.variableAnchor,t.variableAnchor),this._updateLayoutProperty("text-field",i.textField,t.textField)}this.options=e},Zs.prototype._buildLayers=function(){var t=L(L(L(L({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Ri?this.options.source.getId():this.options.source,layout:L(L({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]},Zs.prototype._getLayerIds=function(){return[this.id]},Zs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ri?t.add(this.options.source.getId()):t.add(this.options.source),t},Zs);function Zs(t,e,n){e=qs.call(this,e)||this;return e.options=(new Fs).merge(Ii(n,Fs._cloneCustomizer)),e.options.source=t||e.options.source,e}var Hs,Ks=(I(Ws,Hs=Nt),Ws);function Ws(){var t=null!==Hs&&Hs.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 Vs,Ys=(I(Qs,Vs=ps),Qs.prototype.getOptions=function(){return Ii(this.options,Ks._cloneCustomizer)},Qs.prototype.setOptions=function(t){t=(new Ks).merge(this.options,Ii(t,Ks._cloneCustomizer));if(this.map){if(!Zo(t.bounds,this.options.bounds)||t.isTMS!==this.options.isTMS||t.maxSourceZoom!==this.options.maxSourceZoom||t.minSourceZoom!==this.options.minSourceZoom||!Zo(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},Qs.prototype._setOptionsNoUpdate=function(t){this.options=(new Ks).merge(this.options,Ii(t,Ks._cloneCustomizer))},Qs.prototype._buildLayers=function(){return[L(L({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})]},Qs.prototype._getLayerIds=function(){return[this.id]},Qs.prototype._buildSource=function(){var t,e;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 n=[];try{for(var o=R(this.options.subdomains),r=o.next();!r.done;r=o.next()){var i=r.value;n.push(this.options.tileUrl.replace(/{subdomain}/g,i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}e=n}else e=[this.options.tileUrl]}return L({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},e&&{tiles:e})},Qs.prototype._getSourceId=function(){return this.getId()+"-RasterSource"},Qs);function Qs(t,e){e=Vs.call(this,e)||this;return t&&e.setOptions(t),e}var gt=Object.freeze({__proto__:null,BubbleLayer:$i,Layer:Hi,LineLayer:bs,PolygonExtrusionLayer:It,PolygonLayer:As,SymbolLayer:Gs,TileLayer:Ys,HeatMapLayer:gt,ImageLayer:Lt}),Js=(Xs.convertHtmlString=function(t){if("string"!=typeof t)return t;var e=document.createElement("div");return e.innerHTML=t,e},Xs.parseWithFilter=function(t,e,n,o){var r=this;if(void 0===e&&(e=function(t){return!0}),void 0===n&&(n=function(t){return t}),void 0===o&&(o=function(){return document.createElement("div")}),"string"==typeof t){var i=(new DOMParser).parseFromString(t,"text/html").body;if(0==i.children.length)return n(i.innerHTML);var s,i=1==i.children.length&&1==i.childNodes.length?i.children[0]:(s=o(),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,n)}),e(i)?n(i):(i.parentNode&&i.parentNode.removeChild(i),null)},Xs);function Xs(){}var $s,ta=function(t){return be(t)&&1===t.nodeType&&!Vn(t)},ea=(I(na,$s=D),na._cloneCustomizer=function(t){if(ta(t))return t},na);function na(){var t=null!==$s&&$s.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 Qo(0,0),t.position=new ei(0,0),t.showPointer=!0,t}var oa,ra=(I(ia,oa=tt),ia.prototype.setPopupOptions=function(t){this.setOptions(t)},ia.prototype.setOptions=function(t){var e=(new ea).merge(this.options,Ii(t,ea._cloneCustomizer));e.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(e),this.contentDiv.prepend(this.htmlContent)):e.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,e.draggable),e.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn),t=K("close"),this.contentDiv.appendChild(t),W(t,this.closeBtn,!0)):!e.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn),e.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!e.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv),e.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=e.fillColor,this.contentDiv.style.backgroundColor=e.fillColor),this.marker&&(e.anchor!==this.options.anchor?"none"===this.options.anchor?(this.autoAnchor!==e.anchor&&this._replaceMarker(this.map,e),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,e),"none"===e.anchor&&this.map.events.add("move",this._onMove)):(Zo(e.position,this.options.position)||this.marker.setLngLat(e.position),Zo(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset))),this.options=e},ia.prototype.getPopupOptions=function(){return this.getOptions()},ia.prototype.getOptions=function(){return Ii(this.options,ea._cloneCustomizer)},ia.prototype.getPopupContainer=function(){return this.containerDiv},ia.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=N(this.map.pixelsToPositions([t]),1)[0];this.options.position=t,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},ia.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},ia.prototype._createContainerDiv=function(t){var e=this,n=document.createElement("div");n.classList.add(ia.Css.container),n.classList.add(ia.Css.hidden),n.style.borderColor=t.fillColor,n.setAttribute("role","dialog"),n.setAttribute("aria-label","Map Information Window");var o=!1;return n.addEventListener("keydown",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(o=!0)}),n.addEventListener("keyup",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(o=!1)}),n.addEventListener("focusin",function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement&&t.target.focus())}),n.addEventListener("focusout",function(t){o&&t.relatedTarget instanceof Node&&!n.contains(t.relatedTarget)&&(o=!1,e.isOpen()&&e.close())}),n},ia.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(ia.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},ia.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(ia.Css.arrow),t},ia.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(ia.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("tabindex","0"),t.innerHTML="×",t},ia.prototype._createHtmlContent=function(t){var e=Js.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},ia.prototype._createMarker=function(t,e){var n=this.marker?this.marker.getLngLat():t.position,n="none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new o.Marker({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(n)):(this.containerDiv.classList.add(t.anchor),new o.Marker({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(n));return n},ia.prototype._getAutoAnchor=function(t,e){var n,o,r,i=this.containerDiv.offsetWidth,s=this.containerDiv.offsetHeight,a=[];return(r=this.marker?(o=(n=t._getMap().project(this.marker.getLngLat())).x,n.y):(r=N(t.positionsToPixels([e.position]),1),o=(r=N(r[0],2))[0],r[1]))<s?a.push("top"):r>t.getCanvas().offsetHeight-s&&a.push("bottom"),o<i/2?a.push("left"):o>t.getCanvas().offsetWidth-i/2&&a.push("right"),0<a.length?a.join("-"):"bottom"},ia.prototype._replaceMarker=function(t,e,n){var o=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,n),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,o||null)},ia.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))},ia.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},ia);function ia(t){var n=oa.call(this)||this;return n.attach=function(t){n.map!==t&&(n.map&&n.remove(),n.map=t,n.marker=n._createMarker(n.options),n.marker.addTo(n.map._getMap()),n.map.popups._getCollectionDiv().appendChild(n.containerDiv),n.map.popups.add(n))},n.open=function(t){if(!t&&!n.map)throw new Error("Must specify a map to open on or attach to a map in advance");n.attach(t||n.map),n.containerDiv.classList.remove(ia.Css.hidden),n.map.events.add("move",n._onMove),n._onMove(),n._invokeEvent("open",{target:n,type:"open"})},n.close=function(){n.map&&n.map.events.remove("move",n._onMove),n.containerDiv.classList.add(ia.Css.hidden),n._invokeEvent("close",{target:n,type:"close"})},n.remove=function(){n.map&&(n.marker.remove(),n.containerDiv.classList.remove(n.autoAnchor||n.options.anchor),n.map.events.remove("move",n._onMove),n.map.popups.remove(n),delete n.map,delete n.marker,delete n.autoAnchor)},n.isOpen=function(){return n.map&&!n.containerDiv.classList.contains(ia.Css.hidden)},n._onMove=function(){var t=n._getAutoAnchor(n.map,n.options);t!==n.autoAnchor&&(n._replaceMarker(n.map,n.options,t),n.map.events.add("move",n._onMove))},n._onDown=function(t){n.map.popups._addDraggedPopup(n);var e=N(n.map.positionsToPixels([n.options.position]),1)[0];"mousedown"===t.type?n.dragOffset=[e[0]-t.clientX,e[1]-t.clientY]:"touchstart"===t.type&&(n.dragOffset=[e[0]-t.touches[0].clientX,e[1]-t.touches[0].clientY])},n._onDragStart=function(t){t.preventDefault()},n.options=(new ea).merge(Ii(t,ea._cloneCustomizer)),n.containerDiv=n._createContainerDiv(n.options),n.contentDiv=n._createContentDiv(n.options),n.containerDiv.appendChild(n.contentDiv),n.options.showPointer&&(n.arrowDiv=n._createArrowDiv(),n.containerDiv.appendChild(n.arrowDiv)),n.options.closeButton&&(n.closeBtn=n._createCloseButton(),n.contentDiv.appendChild(n.closeBtn),t=K("close"),n.contentDiv.appendChild(t),W(t,n.closeBtn,!0)),n}var sa,aa=(I(la,sa=D),la._cloneCustomizer=function(t){if(t instanceof ra||ta(t))return t},la);function la(){var t=null!==sa&&sa.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_'+Ko()+'" 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 Qo(0,0),t.position=new ei(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}var ca,ua=(I(ha,ca=tt),ha.prototype.getOptions=function(){return Ii(this.options,aa._cloneCustomizer)},ha.prototype.getElement=function(){return this.marker.getElement()},ha.prototype.setOptions=function(t){t=(new aa).merge(this.options,Ii(t,aa._cloneCustomizer));Zo(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)),Zo(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset),Zo(t.position,this.options.position)||this.marker.setLngLat(t.position),t.visible!==this.options.visible&&(t.visible?this.element.classList.remove(ha.hiddenClass):this.element.classList.add(ha.hiddenClass))):(this.marker.remove(),this._buildMarker(t),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=t},ha.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)}},ha.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=Un(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},ha.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},ha.prototype._getId=function(){if(this.element)return("string"==typeof this.options.htmlContent?this.element.firstChild:this.element).id},ha.prototype._buildMarker=function(t){var e;"string"==typeof t.htmlContent?(e=this._getSubbedHtmlString(t)||"",this.element=Js.convertHtmlString(e)):this.element=t.htmlContent,this.element.classList.add(ha.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(ha.hiddenClass),this.marker=new o.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)},ha.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},ha.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector("."+ha.collectionContainerClass);return t||((t=document.createElement("div")).classList.add(ha.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},ha.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},ha.collectionContainerClass="marker-collection-container",ha.hiddenClass="hidden-accessible-element",ha.containerClass="marker-container",ha);function ha(t){var e=ca.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new ei(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 aa).merge(Ii(t,aa._cloneCustomizer)),e._buildMarker(e.options),e}var pa=(da.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}},da);function da(){}var fa={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"}},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"}},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-Hant",strings:"zh-tw/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}}}},ma=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"},ga=(ya.getCode=function(t){var e=pa.parse(t);return-1===fa.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},ya.getStrings=function(t){t=this.getLocaleData(t);return fa.locales.defaultLanguage.defaultRegion.code===t.code?new Promise(function(t){t(new ma)}):new U({domain:e,path:fa.localizationsPath+"/"+t.strings}).get().then(function(t){return t},function(){return new ma})},ya.getLocaleData=function(t){if("string"==typeof t&&(t=pa.parse(t)),fa.locales[t.code])return fa.locales[t.code].defaultRegion;var e;if(fa.locales[t.language])e=fa.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=fa.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},ya);function ya(){}var va=(_a.getEdgeOrIEVersion=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(0<e)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(0<t.indexOf("Trident/")){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}n=t.indexOf("Edge/");return 0<n?parseInt(t.substring(n+5,t.indexOf(".",n)),10):-1},_a.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},_a.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11},_a);function _a(){}(Lt=u.AuthenticationType||(u.AuthenticationType={})).subscriptionKey="subscriptionKey",Lt.aad="aad",Lt.anonymous="anonymous",Lt.sas="sas";var ba,wa,Sa=(I(xa,ba=D),xa.prototype.setSubscriptionKey=function(t){this.authType=u.AuthenticationType.subscriptionKey,this.subscriptionKey=t},xa.prototype.setAadProperties=function(t,e,n,o,r){this.authType=u.AuthenticationType.aad,this.authContext=r||this.authContext,this.aadInstance=o||this.aadInstance,this.clientId=t,this.aadAppId=e,this.aadTenant=n},xa.prototype.setTokenCallbackFunction=function(t){this.authType=u.AuthenticationType.anonymous,this.getToken=t},xa.prototype.setSasCallbackFunction=function(t){this.authType=u.AuthenticationType.sas,this.getToken=t},xa.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ba.prototype.merge.apply(this,M(t));return n.authType===u.AuthenticationType.subscriptionKey?n.authContext=n.aadAppId=n.getToken=void 0:n.authType===u.AuthenticationType.aad?n.subscriptionKey=n.getToken=void 0:n.authType===u.AuthenticationType.anonymous?n.subscriptionKey=n.authContext=n.aadAppId=void 0:n.authType===u.AuthenticationType.sas&&(n.authContext=n.subscriptionKey=n.aadAppId=void 0),n},xa);function xa(){var t=null!==ba&&ba.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 Ta="NGT",Ea=Ko(),Ca=t,ka=e,Oa=n,Ia=r,La=w,Aa=new Sa,Pa=!1,Ra=!1,Na=!1,Ma=!1,Da=!1,za=!1,Ba=!1,ja=!1,Fa=!1;function Ua(){return Object.assign({},Aa)}function qa(){return ka}function Ga(){return Ca}function Za(){return Oa}function Ha(){return Ia}function Ka(){return La}function Wa(){return h.workerCount}function Va(){return h.maxParallelImageRequests}function Ya(){return Ta}function Qa(){return Ea}function Ja(){return Aa.authType===u.AuthenticationType.subscriptionKey?Aa.subscriptionKey:void 0}function Xa(){return wa}function $a(t){return!va.isIE()&&h.supported({failIfMajorPerformanceCaveat:t})}function tl(t){Aa=(new Sa).merge(Aa,t),Fa=!0}function el(t){Ca=t,Ra=!0}function nl(t){Oa=t,Na=!0}function ol(t){0<t&&(h.workerCount=t,Da=!0)}function rl(t){0<t&&(h.maxParallelImageRequests=t,za=!0)}function il(t){Ta=ga.getCode(t),Ba=!0}function sl(t){Ea=t,ja=!0}function al(t){Aa.setSubscriptionKey(t),Fa=!0}function ll(t){wa=t,Pa=!0}function cl(t,e){if(e=Math.abs(e||1),"string"==typeof t&&vl[t.toLowerCase()]){for(var n=vl[t.toLowerCase()],o=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,r=n,i=o.exec(n);i;)r=r.replace(i[0],parseFloat(i[1])*e+""),i=o.exec(n);return r=r.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function ul(){return Fa}function hl(){return Ra}function pl(){return Na}function dl(){return Da}function fl(){return za}function ml(){return Ba}function gl(){return ja}function yl(){return Pa}var vl={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>'},_l=(bl.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},bl);function bl(){}var wl,Sl=(I(xl,wl=D),xl);function xl(){var t=null!==wl&&wl.apply(this,arguments)||this;return t.copyrightMessage=void 0,t.copyrightContent=void 0,t.customAttribution=void 0,t.showFeedbackLink=!0,t.showLogo=!0,t}var Tl,El=(I(Cl,Tl=rt),Cl.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},Cl.prototype.onRemove=function(){Tl.prototype.onRemove.call(this),delete this.container},Cl.prototype.setOptions=function(t){var e=this,n=(new Sl).merge(this.options,t);n.copyrightMessage===this.options.copyrightMessage&&n.customAttribution===this.options.customAttribution||(this.copyrightDiv.innerText=this.textAttribution(n)),n.copyrightContent!==this.options.copyrightContent&&(this.options.copyrightContent&&(t=Array.from(this.copyrightDiv.children).find(function(t){return t===e.options.copyrightContent}),this.copyrightDiv.removeChild(t)),0<this.copyrightDiv.childNodes.length?this.copyrightDiv.insertBefore(n.copyrightContent,this.copyrightDiv.childNodes[0]):this.copyrightDiv.appendChild(n.copyrightContent),this.options.copyrightContent=n.copyrightContent),!n.showLogo&&this.logoAnchor?this.addRemoveLogo(!1):n.showLogo&&!this.logoAnchor&&this.addRemoveLogo(!0),!n.showFeedbackLink&&this.feedbackAnchor?this.addRemoveFeedbackDiv(!1):n.showFeedbackLink&&!this.feedbackAnchor&&this.addRemoveFeedbackDiv(!0),this.options=n},Cl.prototype.getDefaultAttributions=function(){var t=(new Date).getFullYear(),e=["©"+t+" TomTom"];return this.options.showLogo||e.push("©"+t+" Microsoft"),e},Cl.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.textAttribution(this.options)||"",t},Cl.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},Cl.prototype.addRemoveFeedbackDiv=function(t){t?(this.feedbackAnchor=this.buildFeedbackLink(),this.tooltip=K("Give Feedback"),this.container.appendChild(this.feedbackAnchor),this.container.appendChild(this.tooltip),W(this.tooltip,this.feedbackAnchor)):(this.feedbackAnchor.remove(),this.tooltip.remove(),delete this.tooltip,delete this.feedbackAnchor)},Cl.prototype.addRemoveLogo=function(t){t?(this.logoAnchor=document.createElement("a"),this.logoAnchor.className="azure-map-logo",this.logoAnchor.href="https://microsoft.com",this.logoAnchor.setAttribute("aria-label","Microsoft"),this.container.appendChild(this.logoAnchor),this.logoTooltip=K("Visit microsoft.com"),this.container.appendChild(this.logoTooltip),W(this.logoTooltip,this.logoAnchor)):(this.logoAnchor.remove(),this.logoTooltip.remove(),delete this.logoAnchor)},Cl);function Cl(t){var e=Tl.call(this)||this;return e.textAttribution=function(t){return[e.options.copyrightMessage,e.options.customAttribution].filter(function(t){return t}).join("")},e.options=(new Sl).merge(t),e}var kl=(Ol.throwOnError=function(t,e){function n(t){throw o.off("error",n),t.error}var o=t instanceof Du?t._getMap():t;o.on("error",n);e=e();return o.off("error",n),e},Ol.tryCatch=function(t,e,n,o){try{return this.throwOnError(t,e)}catch(t){return n(t)}finally{"function"==typeof o&&o()}},Ol.tryFinally=function(t,e,n){try{return this.throwOnError(t,e)}finally{n()}},Ol);function Ol(){}var Il=(Ll.prototype.request=function(t){var e={domain:this.map.getServiceOptions().domain,path:"search/address/reverse/json",queryParams:L({"api-version":"1.0",language:t.style.language,limit:1,query:zr(t.position[1])+","+Br(t.position[0])},t.style.view&&{view:t.style.view})};return new U((null===(t=this.map.authentication)||void 0===t?void 0:t.signRequest(e))||e).get()},Ll);function Ll(t){this.map=t}var Al=(Pl.prototype.cache=function(t,e,n,o){o=t+"_"+n[0]+"_"+n[1]+"_"+o;this._labelIdx[e.labelType]||(this._labelIdx[e.labelType]=[],this._labelCache[e.labelType]=[]),-1===this._labelIdx[e.labelType].indexOf(o)&&(this._labelCache[e.labelType].push({name:t,radius:e.radius,minZoom:e.minZoom,maxZoom:e.maxZoom||24,position:n}),this._labelIdx[e.labelType].push(o))},Pl.prototype.getNearestLabel=function(t,e,n){var o=null,r=this._labelCache[t];if(r)for(var i,s=1/0,a=0,l=r.length;a<l;a++)n>=r[a].minZoom&&n<=r[a].maxZoom&&((i=Cr(r[a].position,e))<=r[a].radius&&i<=s&&(s=i,o=r[a]));return o},Pl.prototype._preloadCache=function(t){if(!this._preloadedCache.has(t)){this._preloadedCache.add(t);var e={source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},n=t,o=n.indexOf("-");switch(n=-1!==o?n.substr(0,o):n){case"fr":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océan Atlantique",e,[-40,32],t),this.cache("Océan Atlantique",e,[-17,-29],t);break;case"es":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océano Atlántico",e,[-40,32],t),this.cache("Océano Atlántico",e,[-17,-29],t);break;case"pt":this.cache("Oceano Pacífico",e,[-170,32],t),this.cache("Oceano Pacífico",e,[-138,-27],t),this.cache("Oceano Atlântico",e,[-40,32],t),this.cache("Oceano Atlântico",e,[-17,-29],t);break;case"ja":this.cache("太平洋",e,[-170,32],t),this.cache("太平洋",e,[-138,-27],t);break;case"en":this.cache("Pacific Ocean",e,[-170,32],t),this.cache("Pacific Ocean",e,[-138,-27],t),this.cache("Atlantic Ocean",e,[-40,32],t),this.cache("Atlantic Ocean",e,[-17,-29],t),this.cache("Indian Ocean",e,[77,-26],t)}}},Pl);function Pl(){this._labelCache={},this._labelIdx={},this._preloadedCache=new Set}var Rl=(Nl.prototype.dispose=function(){this._disposed=!0;var t=this._map._getMap();t.off("move",this._onMove),t.off("moveend",this._onMoveEnd),t.off("styledata",this._onStyleData),t.off("rotate",this._onRotate);t=this._map.getCanvas();t.removeEventListener("mousedown",this._onPointerDown),t.removeEventListener("touchstart",this._onPointerDown),this._map.getMapContainer().removeEventListener("keydown",this._shortcutListener)},Nl.prototype._getEventPos=function(t){if("touches"in t){var e=t.touches[0],n=t.target.getBoundingClientRect();return[e.pageX-n.left,e.pageY-n.top]}return[t.offsetX,t.offsetY]},Nl.prototype._checkThresholds=function(t,e){return this._checkZoomThreshold(t.zoom,e.zoom)||this._checkPitchThreshold(t.pitch,e.pitch)||this._checkLocThreshold(t.center,e.center)||this._checkHeadingThreshold(t.bearing,e.bearing)},Nl.prototype._checkZoomThreshold=function(t,e){return this._round(t)!==this._round(e)},Nl.prototype._checkPitchThreshold=function(t,e){return Math.abs(t-e)>=this._pitchThreshold},Nl.prototype._checkLocThreshold=function(t,e){e=N(this._map.positionsToPixels([e,t]),2),t=e[0],e=e[1];return Qo.getDistance(t,e)>=this._moveThreshold},Nl.prototype._checkHeadingThreshold=function(t,e){t<0&&(t+=360),e<0&&(e+=360);e=Math.abs(t-e);return(e=180<e?360-e:e)>=this._headingThreshold},Nl.prototype._getLocDesc=function(h,p,d){return A(this,void 0,void 0,function(){var e,n,o,r,i,s,a,l,c,u=this;return P(this,function(t){switch(t.label){case 0:return"blank"===d?[3,3]:this._map._getMap().loaded()?[3,2]:[4,new Promise(function(t){return u._map._getMap().once("idle",t)})];case 1:t.sent(),t.label=2;case 2:for(e={},n=this._map.positionsToPixels([h.center])[0],kl.tryCatch(this._map,function(){o=u._map._getMap().queryRenderedFeatures(n,{layers:u._polygonStyleLayer,filter:["==",["geometry-type"],"Polygon"]})},function(){}),r=null,o&&0<o.length&&(r=o[0]),i=null,s=0,a=this._lableConfig.length;s<a;s++)l=this._lableConfig[s],h.zoom>=l.minZoom?l.polygonSources?r&&-1!==l.polygonSources.indexOf(r.layer["source-layer"])?(i=l.labelType,this._getClosestLabel(l,h,p,e,!1)):this._getClosestLabel(l,h,p,e,!0):this._getClosestLabel(l,h,p,e,!1):this._getClosestLabel(l,h,p,e,!0);return 8<=h.zoom&&this._processRoads(e,h,p),this._labelCache.forEach(function(t){e[t]||(c=null,(c="water"!==t&&"majorPoi"!==t||t===i?Nl._labelCache.getNearestLabel(t,h.center,h.zoom):c)&&(e[t]=c.name))}),[2,this._processLocInfo(h,i,e,!0,this._restFallback)];case 3:return[2,this._processLocInfo(h,null,null,!1,!1)]}})})},Nl.prototype._getHeadingDesc=function(t){var e=t.bearing;switch(e<0&&(e+=360),e=this._round(e,this._headingThreshold)){case 0:case 360:return"north";case 45:return"north east";case 90:return"east";case 135:return"south east";case 180:return"south";case 225:return"south west";case 270:return"west";case 315:return"north west";default:return e+" degrees"}},Nl.prototype._getClosestLabel=function(t,e,n,o,r){for(var i=t.radius,s=0,a=t.source.length;s<a;s++){var l={sourceLayer:t.source[s]},c=this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId,l),u=null,h=1/0,p=this._labelCache.has(t.labelType);if(!r||p)for(var d=0,f=c.length;d<f;d++){var m,g="Point"===c[d].geometry.type?c[d]:$r(e.center,c[d].geometry);r||(m="Point"===c[d].geometry.type?Cr(e.center,g.geometry.coordinates):g.properties.distance)<h&&(h=m,u=c[d]),p&&Nl._labelCache.cache(c[d].properties.name,t,g.geometry.coordinates,n)}r||(l=t.labelType+"Dis",u&&h<=i&&("number"!=typeof o[l]||h<=o[l])&&(o[t.labelType]=u.properties.name,o[l]=h))}},Nl.prototype._processRoads=function(t,e,n,o){var r=this._map._getMap().queryRenderedFeatures(o,{filter:["==",["geometry-type"],"LineString"]});if(r){for(var i,s=void 0,a=void 0,l=void 0,c=void 0,u=0,h=r.length;u<h;u++)this._roadLayers.has(r[u].layer["source-layer"])&&r[u].properties.name&&""!==r[u].properties.name&&(i=$r(e.center,r[u]),(!l||i.properties.distance<l.properties.distance)&&(s&&r[u].properties.name===s.properties.name?l=i:s&&r[u].properties.name===s.properties.name?(!c||i.properties.distance<c.properties.distance)&&(c=i,a=r[u]):(c=l,a=s,l=i,s=r[u])));s&&(t.country||(t.country=s.properties.country_code,t.countryDis=0,Nl._labelCache.cache(t.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},l.geometry.coordinates,n)),t.state||(t.state=s.properties.country_subdivision,t.stateDis=0,Nl._labelCache.cache(t.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},l.geometry.coordinates,n)),15<=e.zoom&&(o=this._map.positionsToPixels([e.center,l.geometry.coordinates]),(Qo.getDistance(o[0],o[1])<this._roadPixelRadius||l.properties.distance<this._minRoadDistance)&&(t.road=s.properties.name),a&&(n=this._map.positionsToPixels([c.geometry.coordinates]),(Qo.getDistance(o[0],n[0])<this._minIntersectionPixelDistance||c.properties.distance<this._minRoadDistance)&&(t.secondRoad=a.properties.name,t.secondRoadDis=c.properties.distance))))}},Nl.prototype._getActionDesc=function(t){if(this._lastCam){var e,n,o=[];return this._checkLocThreshold(t.center,this._lastCam.center)&&(n=["panned"],0===(e=Math.round(Ar(this._lastCam.center,t.center)))||360===e?n.push("north"):e<90?n.push("north east"):90===e?n.push("east"):e<180?n.push("south east"):180===e?n.push("south"):e<270?n.push("south west"):270===e?n.push("west"):e<360&&n.push("north west"),e=Cr(this._lastCam.center,t.center,er.meters),n.push(1e3<e?xr(e/1e3,2)+" kilometers":xr(e,2)+" meters"),o.push(n.join(" "))),this._checkZoomThreshold(t.zoom,this._lastCam.zoom)&&((n=["zoomed"]).push(this._lastCam.zoom<t.zoom?"in":"out"),1<=(e=Math.abs(this._lastCam.zoom-t.zoom))&&(e=Math.ceil(e),n.push(1<e?e+" levels":e+" level")),this._getCanonicalZoom(this._lastCam.zoom)!==this._getCanonicalZoom(t.zoom)&&n.push("to "+this._getCanonicalZoom(t.zoom)+" level"),t.zoom>=t.maxZoom&&n.push("Zoom In button disabled, maximum zoom level reached"),e=ci.getSouth(t.bounds)<=-cr&&ci.getNorth(t.bounds)>=cr,(t.zoom<=t.minZoom||e)&&n.push("Zoom Out button disabled, minimum zoom level reached"),o.push(n.join(" "))),this._checkPitchThreshold(t.pitch,this._lastCam.pitch)&&(n=this._round(t.pitch,this._pitchThreshold),o.push("pitched to "+n+" degrees"),60!==t.pitch&&0!==t.pitch||(n=60===t.pitch?"maximum":"minimum",o.push("reached "+n+" of "+t.pitch+" degrees"))),this._checkHeadingThreshold(this._lastCam.bearing,t.bearing)&&o.push("rotated to "+this._getHeadingDesc(t)),o.join(" and ")||null}return null},Nl.prototype._getCanonicalZoom=function(t){return(t=this._round(t))<2?"world":t<5?"country":t<11?"state province":t<15?"city":"street"},Nl.prototype._processLocInfo=function(r,i,s,a,l){var c=this;return new Promise(function(e,t){var n=[];if(a){var o=[];if(s&&(i&&("water"===i&&s.water?o.push(s.water):"majorPoi"===i&&s.majorPoi&&o.push(s.majorPoi)),0===o.length&&(s.majorPoi&&8<=r.zoom?o.push(s.majorPoi):(s.poi&&14<=r.zoom?o.push(s.poi):s.road&&15<=r.zoom&&(s.secondRoad?o.push(s.road+" & "+s.secondRoad):o.push(s.road)),s.neighbourhood&&12<=r.zoom&&o.push(s.neighbourhood),s.city&&6<=r.zoom&&o.push(s.city)),s.state&&4<=r.zoom&&o.push(s.state),0===o.length?s.water?o.push(s.water):s.country&&o.push(s.country):1===o.length&&s.state&&4<=r.zoom&&s.country&&o.push(s.country))),0<o.length)n.push("<p>Location: ",o.join(", "),".</p>");else if(l&&"water"!==i)return void c._reverseGeocodeDescription(r).then(function(t){e(t)},function(){t("<p>Location: unknown</p>")})}c._returnDetailedDescriptions&&(n.push("<p>Zoom: ",xr(r.zoom,2),".</p>"),n.push("<p>Latitude: ",xr(r.center[1],5),".</p>"),n.push("<p>Longitude: ",xr(r.center[0],5),".</p>")),e(n.join(""))})},Nl.prototype._reverseGeocodeDescription=function(r){var i=this;return new Promise(function(n){var o=i._map.getStyle();i._reverseSearch.request({position:r.center,style:o}).then(function(t){var e={};t&&t.addresses&&0<t.addresses.length&&t.addresses[0].address&&((t=t.addresses[0].address).country&&(e.country=t.country,Nl._labelCache.cache(e.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},r.center,o.language)),t.countrySubdivision&&(e.state=t.countrySubdivision,Nl._labelCache.cache(e.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},r.center,o.language)),t.municipality&&(e.city=t.municipality,Nl._labelCache.cache(e.state,{source:["Small city"],labelType:"city",radius:1e3,minZoom:10},r.center,o.language)),t.streetNameAndNumber?e.road=t.streetNameAndNumber:t.street&&(e.road=t.street)),i._processLocInfo(r,null,e,!0,!1).then(function(t){n(t)})},function(t){i._processLocInfo(r,null,null,!0,!1).then(function(t){n(t)})}).catch(function(t){i._processLocInfo(r,null,null,!0,!1).then(function(t){n(t)})})})},Nl.prototype._round=function(t,e){return void 0===e&&(e=1),Math.round(t/e)*e},Nl);function Nl(t,e){var i=this;this._disposed=!1,this._lastHeadingTime=0,this._actionQueue=[],this._pointerUpdateDelay=3e3,this._camUpdateDelay=1e3,this._headUpdateLimit=1e3,this._controlEventDelay=500,this._moveThreshold=25,this._headingThreshold=5,this._pitchThreshold=5,this._roadPixelRadius=120,this._minRoadDistance=25,this._minIntersectionPixelDistance=50,this._baseVectorTileSourceId="microsoft.base",this._lableConfig=[{source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},{source:["Sea label"],labelType:"water",minZoom:3,radius:1e6,polygonSources:["Sea","Ocean or sea"]},{source:["Country name"],labelType:"country",minZoom:0,maxZoom:5,radius:3e5},{source:["State name","State name short"],labelType:"state",minZoom:4,maxZoom:7,radius:3e5},{source:["Capital city","Large city"],labelType:"city",minZoom:8,radius:4e4},{source:["Medium city"],labelType:"city",minZoom:8,radius:3e4},{source:["Small city"],labelType:"city",minZoom:8,radius:2e4},{source:["Island label"],labelType:"city",minZoom:8,radius:1e4},{source:["Town"],labelType:"city",minZoom:10,radius:1e4},{source:["Village"],labelType:"neighbourhood",minZoom:12,radius:6e3},{source:["Amusement area label"],labelType:"poi",minZoom:14,radius:2e3,polygonSources:["Amusement park"]},{source:["Hospital label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Hospital"]},{source:["Shopping centre label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Shopping"]},{source:["Stadium label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Stadium"]},{source:["University/School label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["University"]},{source:["Zoo label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Zoo"]},{source:["Airport Label","Airport name","Airport POI"],labelType:"majorPoi",minZoom:11,radius:3e3,polygonSources:["Airport","Runway"]},{source:["National park label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["National or state park","National park","Forest"]},{source:["Reservation label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["Reservation"]}],this._polygonStyleLayer=["National or state park","National park","Reservation","Airport","Runway","Stadium","University","Zoo","Shopping","Hospital","Amusement park","Ocean","Sea","Ocean or sea"],this._labelCache=new Set(["city","state","country","water","majorPoi"]),this._roadLayers=new Set(["Connecting road","Connecting road tunnel","International road","International road tunnel","Local road","Local road tunnel","Major local road","Major local road tunnel","Major road","Major road tunnel","Minor local road","Minor local road tunnel","Motorway","Motorway tunnel","Secondary road","Secondary road tunnel","Toll connecting road","Toll connecting road tunnel","Toll international road","Toll international road tunnel","Toll local road","Toll local road tunnel","Toll major local road","Toll major local road tunnel","Toll major road","Toll major road tunnel","Toll minor local road","Toll minor local road tunnel","Toll motorway","Toll motorway tunnel","Toll secondary road","Toll secondary road tunnel"]),this._returnDetailedDescriptions=!1,this._shortcutListener=function(r){return A(i,void 0,void 0,function(){var e,n,o;return P(this,function(t){switch(t.label){case 0:return r.altKey&&r.ctrlKey&&68===r.keyCode?(this._returnDetailedDescriptions=!this._returnDetailedDescriptions,e=this._map.getCamera(),o=this._map.getStyle(),n=o.language.toLowerCase(),o=o.style.toLowerCase(),[4,this._getLocDesc(e,n,o)]):[3,2];case 1:o=t.sent(),this._descCallback(o),t.label=2;case 2:return[2]}})})},this._onRotate=function(){i._rotateTimeout||(Date.now()-i._lastHeadingTime>=i._headUpdateLimit?i._rotateTimeout=setTimeout(i._updateHeading,ut.RotationDuration+25):i._rotateTimeout=setTimeout(i._updateHeading,i._headUpdateLimit-(Date.now()-i._lastHeadingTime)))},this._onMove=function(){i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._controlTimeout&&(clearTimeout(i._controlTimeout),delete i._controlTimeout)},this._onMoveEnd=function(t){t.fromControl?i._controlTimeout=setTimeout(i._updateCam,i._controlEventDelay):i._updateCam()},this._onStyleData=function(){setTimeout(i._updateStyle)},this._onPointerDown=function(t){i._lastPointerPos=i._getEventPos(t),i._pointerTimeout=setTimeout(function(){return A(i,void 0,void 0,function(){var e,n,o;return P(this,function(t){switch(t.label){case 0:return n=this._map.getStyle(),e=n.language.toLowerCase(),o=n.style.toLowerCase(),(n=this._map.getCamera()).center=this._map.pixelsToPositions([this._lastPointerPos])[0],[4,this._getLocDesc(n,e,o)];case 1:return o=t.sent(),this._descCallback(o),this._onPointerUp(),[2]}})})},i._pointerUpdateDelay),i._map.getCanvas().addEventListener("mousemove",i._onPointerMove),i._map.getCanvas().addEventListener("touchmove",i._onPointerMove),i._map.getCanvas().addEventListener("mouseup",i._onPointerUp),i._map.getCanvas().addEventListener("touchend",i._onPointerUp)},this._onPointerMove=function(t){var e=i._getEventPos(t),t=i._lastPointerPos[0]-e[0],e=i._lastPointerPos[1]-e[1];Math.sqrt(t*t+e*e)>i._moveThreshold&&i._onPointerUp()},this._onPointerUp=function(){clearTimeout(i._pointerTimeout),delete i._pointerTimeout,i._map.getCanvas().removeEventListener("mousemove",i._onPointerMove),i._map.getCanvas().removeEventListener("touchmove",i._onPointerMove),i._map.getCanvas().removeEventListener("mouseup",i._onPointerUp),i._map.getCanvas().removeEventListener("touchend",i._onPointerUp)},this._updateHeading=function(){var t,e=i._map.getCamera();i._lastHead&&!i._checkHeadingThreshold(e.bearing,i._lastHead)||(t=i._getHeadingDesc(e),i._lastHead=e.bearing,i._descCallback("<p>Map heading "+t+".</p>"),i._lastHeadingTime=Date.now()),delete i._rotateTimeout},this._updateStyle=function(){return A(i,void 0,void 0,function(){var e,n,o,r;return P(this,function(t){switch(t.label){case 0:return(e=this._map.getCamera(),o=this._map.getStyle(),n=o.language.toLowerCase(),o=o.style.toLowerCase(),this._lastLang===n)?[3,2]:(Nl._labelCache._preloadCache(n),[4,this._getLocDesc(e,n,o)]);case 1:return r=t.sent(),[3,4];case 2:return this._lastStyle===o||"blank"!==this._lastStyle?[3,4]:[4,this._getLocDesc(e,n,o)];case 3:r=t.sent(),t.label=4;case 4:return this._lastLang=n,this._lastStyle=o,r&&this._descCallback(r),[2]}})})},this._updateCam=function(t){void 0===t&&(t=!1);var n,o,e,r=i._map.getCamera();(!i._lastCam||0<i._actionQueue.length||i._checkThresholds(r,i._lastCam))&&(e=i._map.getStyle(),n=e.language.toLowerCase(),o=e.style.toLowerCase(),(e=i._getActionDesc(r))&&i._actionQueue.push(e),i._lastCam=r,i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._moveTimeout=setTimeout(function(){return A(i,void 0,void 0,function(){var e;return P(this,function(t){switch(t.label){case 0:return clearTimeout(this._rotateTimeout),delete this._rotateTimeout,[4,this._getLocDesc(r,n,o)];case 1:return e=t.sent(),0<this._actionQueue.length?(this._descCallback("<p>Map "+this._actionQueue.join(", then ")+".</p>"+e),this._actionQueue=[]):this._descCallback(e),[2]}})})},t?0:i._camUpdateDelay))},this._map=t,this._restFallback=t.getServiceOptions().enableAccessibilityLocationFallback,this._descCallback=e,this._reverseSearch=new Il(t),Nl._labelCache||(Nl._labelCache=new Al),this._lastLang=this._map.getStyle().language.toLowerCase(),Nl._labelCache._preloadCache(this._lastLang),this._map.events.addOnce("idle",function(){var t;i._disposed||(i._updateCam(!0),(t=i._map._getMap()).on("move",i._onMove),t.on("moveend",i._onMoveEnd),t.on("styledata",i._onStyleData),t.on("rotate",i._onRotate),(t=i._map.getCanvas()).addEventListener("mousedown",i._onPointerDown),t.addEventListener("touchstart",i._onPointerDown))}),this._map.getMapContainer().addEventListener("keydown",this._shortcutListener)}var Ml,Dl,zl=function(t){var n=this;this.addToMap=function(){n.initializeMapLiveStateInfo(),n.initializeMapStyleInfo(),n.createMapKeyBindingInfo(),n.map.getMapContainer().setAttribute("role","application"),n.map.getMapContainer().setAttribute("aria-label","Map Application"),n.map.getCanvasContainer().setAttribute("aria-live","polite"),n.map.getCanvasContainer().setAttribute("aria-describedby","atlas-map-state atlas-map-style"),n.map.getCanvas().setAttribute("aria-label","Interactive Map"),n.map.getCanvas().setAttribute("aria-describedby","atlas-map-shortcuts"),n.map.getCanvas().setAttribute("alt","Interactive Map")},this.removeFromMap=function(){null!=n.mapViewDesc&&n.mapViewDesc.dispose(),delete n.mapViewDesc,null!=n.atlasMapKeyBindings&&n.map.getCanvasContainer().removeChild(n.atlasMapKeyBindings),delete n.atlasMapKeyBindings,null!=n.atlasMapLiveStateInfo&&n.map.getCanvasContainer().removeChild(n.atlasMapLiveStateInfo),delete n.atlasMapLiveStateInfo,null!=n.atlasMapStyleInfo&&n.map.getCanvasContainer().removeChild(n.atlasMapStyleInfo),delete n.atlasMapStyleInfo,n.map.getMapContainer().removeAttribute("role"),n.map.getMapContainer().removeAttribute("aria-label"),n.map.getCanvasContainer().removeAttribute("aria-live"),n.map.getCanvasContainer().removeAttribute("aria-describedby"),n.map.getCanvas().removeAttribute("aria-label"),n.map.getCanvas().removeAttribute("aria-describedby"),n.map.getCanvas().removeAttribute("alt"),n.map.events.remove("stylechanged",n.updateMapStyle)},this.createMapKeyBindingInfo=function(){n.atlasMapKeyBindings=document.createElement("div"),n.atlasMapKeyBindings.setAttribute("tabindex","-1"),n.atlasMapKeyBindings.setAttribute("aria-hidden","true"),n.atlasMapKeyBindings.id="atlas-map-shortcuts",n.atlasMapKeyBindings.classList.add("hidden-accessible-element"),n.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"),n.map.getCanvasContainer().appendChild(n.atlasMapKeyBindings);var t=[189,187,38,37,39,40],e=n.map._getMap()._canvas;null!=e&&e.addEventListener("keyup",function(e){t.find(function(t){return e.keyCode===t})&&(n.atlasMapKeyBindings.innerHTML="")})},this.initializeMapLiveStateInfo=function(){n.mapViewDesc=new Rl(n.map,n.updateMapState),n.atlasMapLiveStateInfo=document.createElement("div"),n.atlasMapLiveStateInfo.setAttribute("tabindex","-1"),n.atlasMapLiveStateInfo.setAttribute("aria-hidden","true"),n.atlasMapLiveStateInfo.id="atlas-map-state",n.atlasMapLiveStateInfo.classList.add("hidden-accessible-element"),n.map.getCanvasContainer().appendChild(n.atlasMapLiveStateInfo)},this.initializeMapStyleInfo=function(){n.atlasMapStyleInfo=document.createElement("div"),n.atlasMapStyleInfo.setAttribute("tabindex","-1"),n.atlasMapStyleInfo.setAttribute("aria-hidden","true"),n.atlasMapStyleInfo.id="atlas-map-style",n.atlasMapStyleInfo.classList.add("hidden-accessible-element"),n.map.events.add("stylechanged",n.updateMapStyle),n.map.getCanvasContainer().appendChild(n.atlasMapStyleInfo)},this.updateMapStyle=function(){n.atlasMapStyleInfo.innerHTML="<p>Map style: "+n.map.getStyle().style+".</p>"},this.updateMapState=function(t){n.atlasMapLiveStateInfo.innerHTML=t},this.map=t},Bl=function(t){var n=this;this.listenerEnabled=!1,this.lastFlowMode="none",this.addToMap=function(){if(!n.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.");n.listenerEnabled||(n.map.events.add("styledata",n.addToMap),n.listenerEnabled=!0);var t,e=n.map.getTraffic();"none"===e.flow||(t=n.map.layers.getLayerById("traffic_"+e.flow))&&(n.lastFlowMode=e.flow,t._updateLayoutProperty("visibility","visible","none"))},this.removeFromMap=function(){var t;n.map.getTraffic();"none"!=n.lastFlowMode&&((t=n.map.layers.getLayerById("traffic_"+n.lastFlowMode))&&t._updateLayoutProperty("visibility","none","visible"),n.lastFlowMode="none"),n.listenerEnabled&&(n.map.events.remove("styledata",n.addToMap),n.listenerEnabled=!1)},this.map=t},jl=(I(Fl,Ml=Wo),Fl.getIncidentTypeName=function(t,e){switch(t){case 0:return e.Unknown;case 1:return e.Accident;case 2:return e.Fog;case 3:return e.Danger;case 4:return e.Rain;case 5:return e.Ice;case 6:return e.Jam;case 7:return e.LaneClosed;case 8:return e.RoadClosed;case 9:return e.RoadWorks;case 10:return e.Wind;case 11:return e.Flood;case 12:return e.Detour;default:return e.Unknown}},Fl.getIncidentTypeIconName=function(t){switch(t){case 0:return"unknown";case 1:return"accident";case 2:return"fog";case 3:return"danger";case 4:return"rain";case 5:return"ice";case 6:return"jam";case 7:return"lane-closed";case 8:return"road-closed";case 9:return"road-work";case 10:return"wind";case 11:return"flood";case 12:return"detour";default:return"unknown"}},Fl.getSeverityColorName=function(t){switch(t){case 0:return"grey";case 1:return"yellow";case 2:return"orange";case 3:return"red";default:return"grey"}},Fl.getSeverityColorHexCode=function(t){switch(t){case 0:return"#B5B6B7";case 1:return"#F4C951";case 2:return"#F4873F";case 3:return"#F04F4E";default:return"#B5B6B7"}},Fl);function Fl(t,e,n){var o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=t.icon_category_12)&&void 0!==r?r:t.icon_category_11)&&void 0!==o?o:t.icon_category_10)&&void 0!==r?r:t.icon_category_9)&&void 0!==o?o:t.icon_category_8)&&void 0!==r?r:t.icon_category_7)&&void 0!==o?o:t.icon_category_6)&&void 0!==r?r:t.icon_category_5)&&void 0!==o?o:t.icon_category_4)&&void 0!==r?r:t.icon_category_3)&&void 0!==o?o:t.icon_category_2)&&void 0!==r?r:t.icon_category_1)&&void 0!==o?o:t.icon_category_0)&&void 0!==r?r:t.icon_category,r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=t.description_12)&&void 0!==r?r:t.description_11)&&void 0!==r?r:t.description_10)&&void 0!==r?r:t.description_9)&&void 0!==r?r:t.description_8)&&void 0!==r?r:t.description_7)&&void 0!==r?r:t.description_6)&&void 0!==r?r:t.description_5)&&void 0!==r?r:t.description_4)&&void 0!==r?r:t.description_3)&&void 0!==r?r:t.description_2)&&void 0!==r?r:t.description_1)&&void 0!==r?r:t.description_0)&&void 0!==r?r:t.description,t={icon:Fl.getSeverityColorName(t.magnitude)+"-"+Fl.getIncidentTypeIconName(o),incidentType:Fl.getIncidentTypeName(o,n),description:r,delay:t.delay,color:Fl.getSeverityColorHexCode(t.magnitude),id:t.id};return Ml.call(this,e,t)||this}(w=Dl=Dl||{}).DELAY="delay",w.LENGTH="length",w.FROM="from",w.TO="to";var Ul=(ql.build=function(t,e){void 0===e&&(e="en-US");var n=document.createElement("div");n.classList.add("incident-popup-title"),n.classList.add("font-segoeui-b"),n.innerText=t.properties.incidentType,n.setAttribute("aria-label","Incident Type "+t.properties.incidentType);var o=document.createElement("div");o.classList.add("incident-popup-subtitle"),o.classList.add("font-segoeui-b"),o.setAttribute("aria-label","Incident Description "+t.properties.description),o.innerText=t.properties.description;var r=document.createElement("div");r.classList.add("incident-popup-header"),r.style.backgroundColor=t.properties.color,r.appendChild(n),r.appendChild(o);var i,s,a,o=document.createElement("div");o.classList.add("incident-popup-body"),t.properties.delay&&(i=Math.floor(t.properties.delay/60)+" min",i=this.createInfoSection(i,Dl.DELAY),o.appendChild(i)),t.properties.length&&(i=new Intl.NumberFormat([e,"en-US"],{maximumFractionDigits:2}),a=void 0,a="en-US"===e?(s=Tr(t.properties.length,"meters","miles"),i.format(s)+" miles"):(s=Tr(t.properties.length,"meters","kilometers"),i.format(s)+" km"),a=this.createInfoSection(a,Dl.LENGTH),o.appendChild(a)),t.properties.from&&(a=this.createInfoSection(t.properties.from,Dl.FROM),o.appendChild(a)),t.properties.to&&(l=this.createInfoSection(t.properties.to,Dl.TO),o.appendChild(l));var l=document.createElement("div");return l.classList.add("incident-popup-content"),l.appendChild(r),l.appendChild(o),new ra({content:l,position:t.geometry.coordinates})},ql.createInfoSection=function(t,e){var n=document.createElement("div");n.classList.add("incident-popup-info");var o=document.createElement("div");o.classList.add("icon"),o.classList.add(e);var r=document.createElement("span");return r.classList.add("message"),r.classList.add("font-segoeui"),r.setAttribute("aria-label","Incident "+e+" "+t),r.innerText=t,n.appendChild(o),n.appendChild(r),n},ql);function ql(){}var Gl=(Zl.prototype.getIncidentIconImageExpression=function(){return["concat",["let","magnitude",["get","magnitude"],["case",["==",["var","magnitude"],0],"grey",["==",["var","magnitude"],1],"yellow",["==",["var","magnitude"],2],"orange",["==",["var","magnitude"],3],"red",["==",["var","magnitude"],4],"grey","grey"]],"-",["let","category",["coalesce",["get","icon_category_12"],["get","icon_category_11"],["get","icon_category_10"],["get","icon_category_9"],["get","icon_category_8"],["get","icon_category_7"],["get","icon_category_6"],["get","icon_category_5"],["get","icon_category_4"],["get","icon_category_3"],["get","icon_category_2"],["get","icon_category_0"],["get","icon_category"],0],["case",["==",["var","category"],0],"unknown",["==",["var","category"],1],"accident",["==",["var","category"],2],"fog",["==",["var","category"],3],"danger",["==",["var","category"],4],"rain",["==",["var","category"],5],"ice",["==",["var","category"],6],"jam",["==",["var","category"],7],"lane-closed",["==",["var","category"],8],"road-closed",["==",["var","category"],9],"road-work",["==",["var","category"],10],"wind",["==",["var","category"],11],"flood",["==",["var","category"],12],"detour","unknown"]]]},Zl);function Zl(t){var r=this;this.incidentLayerName="incidents",this.incidentSourceName="mapcontrol_traffic_incident",this.addToMap=function(){r.map.sources.getById(r.incidentSourceName)||r.map.sources.add(r.vectorTileSource),r.map.layers.getLayerById(r.incidentLayerName)||r.map.layers.add(r.incidentLayer,"labels"),r.clickPopup=new ra({position:[0,0],pixelOffset:[0,-18]}),r.map.addEventListener("mouseover",r.incidentLayerName,r.cursorToPointer),r.map.addEventListener("mouseleave",r.incidentLayerName,r.cursorToDefault),r.map.addEventListener("click",r.incidentLayerName,r.openIncidentPopup),r.map.events.addOnce("idle",r.setAccessiblePopups),r.map.events.add("moveend",r.setAccessiblePopups)},this.accessiblePopups=[],this.setAccessiblePopups=function(){return A(r,void 0,void 0,function(){var e,i,s,a,l,c,u=this;return P(this,function(t){switch(t.label){case 0:return this.accessiblePopups.forEach(function(t){return t.remove()}),this.accessiblePopups=[],e=this.map.layers.getRenderedShapes(this.map.getCamera().bounds,this.incidentLayer),[4,this.map._getLocalizedStrings()];case 1:return i=t.sent(),s=function(e,n){var t=e[n],o=t.geometry.coordinates,o=new Xo(new ei(o[0],o[1])),o=new jl(t.properties,o,i),r=Ul.build(o,u.incidentLanguage),o=r.getPopupContainer();return o.addEventListener("focusin",function(t){u.clickPopup.remove(),u.accessiblePopups.filter(function(t){return t!==r}).forEach(function(t){return t.remove()}),0<=n-1&&a(r,s(e,n-1)),n+1<e.length&&c(s(e,n+1)),2<=n&&n==e.length-1&&l(s(e,0)),0==n&&2<=e.length&&c(s(e,e.length-1))}),n==e.length-1&&o.addEventListener("focusout",function(t){null===t.relatedTarget&&r.close()}),u.accessiblePopups.push(r),r},a=function(t,e){e.open(u.map),e.close();e=e.getPopupContainer(),t=t.getPopupContainer();t.parentElement.insertBefore(e,t)},l=function(t){t.open(u.map),t.close();var e=t.getPopupContainer(),t=e.parentElement;t.insertBefore(e,t.firstElementChild)},c=function(t){t.open(u.map),t.close()},0<e.length&&c(s(e,0)),1<e.length&&c(s(e,e.length-1)),[2]}})})},this.removeFromMap=function(){var t;r.map.removeEventListener("mouseover",r.incidentLayerName,r.cursorToPointer),r.map.removeEventListener("mouseleave",r.incidentLayerName,r.cursorToDefault),r.map.removeEventListener("click",r.incidentLayerName,r.openIncidentPopup),r.map.events.remove("idle",r.setAccessiblePopups),r.map.events.remove("moveend",r.setAccessiblePopups),r.accessiblePopups.forEach(function(t){return t.remove()}),r.accessiblePopups=[],null!==(t=r.clickPopup)&&void 0!==t&&t.remove(),null!=r.map.layers.getLayerById(r.incidentLayerName)&&r.map.layers.remove(r.incidentLayerName),null!=r.map.sources.getById(r.incidentSourceName)&&r.map.sources.remove(r.incidentSourceName)},this.cursorToPointer=function(t){r.map.getCanvas().style.cursor="pointer"},this.cursorToDefault=function(t){r.map.getCanvas().style.cursor=""},this.openIncidentPopup=function(t){r.clickPopup.remove(),r.accessiblePopups.forEach(function(t){return t.close()});var n=t.position,o=t.features[0];r.map._getLocalizedStrings().then(function(t){var e=new Xo(new ei(n[0],n[1])),t=new jl(o.properties,e,t);r.clickPopup=Ul.build(t,r.incidentLanguage),r.clickPopup.open(r.map),r.clickPopup.getPopupContainer().addEventListener("focusout",function(t){null===t.relatedTarget&&r.clickPopup.close()})})},this.map=t,this.vectorTileSource=new qi(this.incidentSourceName,{maxZoom:22,tiles:["https://"+p+"/traffic/incident/tile/pbf?api-version=1.0&zoom={z}&x={x}&y={y}"]});t=this.getIncidentIconImageExpression();this.incidentLayer=new Gs(this.incidentSourceName,this.incidentLayerName,{sourceLayer:"Traffic incident POI",iconOptions:{ignorePlacement:!0,allowOverlap:!0,image:t,size:.75}})}var Hl,Kl=(I(Wl,Hl=D),Wl);function Wl(){var t=null!==Hl&&Hl.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}var Vl=(Yl.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},Yl.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)},Yl);function Yl(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}var Ql=(Jl.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)},Jl.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)},Jl);function Jl(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}var Xl=($l.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},$l.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},$l.prototype.setOptions=function(t){this.options=(new Kl).merge(this.options,t),this.added&&this._setInteractions(this.options)},$l.prototype.getOptions=function(){return Object.assign({},this.options)},$l.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())},$l);function $l(t,e){this.added=!1,this.map=t,this.focusShortcut=new Vl(t),this.pinchZoom=new Ql(t),this.options=(new Kl).merge(e)}function tc(t,e,n){var o={type:"Feature"};return 0!==(n=void 0===n?{}:n).id&&!n.id||(o.id=n.id),n.bbox&&(o.bbox=n.bbox),o.properties=e||{},o.geometry=t,o}function ec(t){return"Feature"===t.type?t.geometry:t}var nc=Pt(function(t,e){t.exports=function(){function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||false;o.configurable=true;if("value"in o)o.writable=true;Object.defineProperty(t,o.key,o)}}function s(t,e,n){if(e)o(t.prototype,e);if(n)o(t,n);return t}var u=function(){function t(t,e){this.next=null;this.key=t;this.data=e;this.left=null;this.right=null}return t}();function e(t,e){return t>e?1:t<e?-1:0}function a(t,e,n){var o=new u(null,null);var r=o;var i=o;while(true){var s=n(t,e.key);if(s<0){if(e.left===null)break;if(n(t,e.left.key)<0){var a=e.left;e.left=a.right;a.right=e;e=a;if(e.left===null)break}i.left=e;i=e;e=e.left}else if(s>0){if(e.right===null)break;if(n(t,e.right.key)>0){var a=e.right;e.right=a.left;a.left=e;e=a;if(e.right===null)break}r.right=e;r=e;e=e.right}else break}r.right=e.left;i.left=e.right;e.left=o.right;e.right=o.left;return e}function l(t,e,n,o){var r=new u(t,e);if(n===null){r.left=r.right=null;return r}n=a(t,n,o);var i=o(t,n.key);if(i<0){r.left=n.left;r.right=n;n.left=null}else if(i>=0){r.right=n.right;r.left=n;n.right=null}return r}function h(t,e,n){var o=null;var r=null;if(e){e=a(t,e,n);var i=n(e.key,t);if(i===0){o=e.left;r=e.right}else if(i<0){r=e.right;e.right=null;o=e}else{o=e.left;e.left=null;r=e}}return{left:o,right:r}}function p(t,e,n){if(e===null)return t;if(t===null)return e;e=a(t.key,e,n);e.left=t;return e}function d(t,e,n,o,r){if(t){o(""+e+(n?"└── ":"├── ")+r(t)+"\n");var i=e+(n?" ":"│ ");if(t.left)d(t.left,i,false,o,r);if(t.right)d(t.right,i,true,o,r)}}var A=function(){function t(t){if(t===void 0)t=e;this._root=null;this._size=0;this._comparator=t}t.prototype.insert=function(t,e){this._size++;return this._root=l(t,e,this._root,this._comparator)};t.prototype.add=function(t,e){var n=new u(t,e);if(this._root===null){n.left=n.right=null;this._size++;this._root=n}var o=this._comparator;var r=a(t,this._root,o);var i=o(t,r.key);if(i===0)this._root=r;else{if(i<0){n.left=r.left;n.right=r;r.left=null}else if(i>0){n.right=r.right;n.left=r;r.right=null}this._size++;this._root=n}return this._root};t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)};t.prototype._remove=function(t,e,n){var o;if(e===null)return null;e=a(t,e,n);var r=n(t,e.key);if(r===0){if(e.left===null)o=e.right;else{o=a(t,e.left,n);o.right=e.right}this._size--;return o}return e};t.prototype.pop=function(){var t=this._root;if(t){while(t.left)t=t.left;this._root=a(t.key,this._root,this._comparator);this._root=this._remove(t.key,this._root,this._comparator);return{key:t.key,data:t.data}}return null};t.prototype.findStatic=function(t){var e=this._root;var n=this._comparator;while(e){var o=n(t,e.key);if(o===0)return e;else if(o<0)e=e.left;else e=e.right}return null};t.prototype.find=function(t){if(this._root){this._root=a(t,this._root,this._comparator);if(this._comparator(t,this._root.key)!==0)return null}return this._root};t.prototype.contains=function(t){var e=this._root;var n=this._comparator;while(e){var o=n(t,e.key);if(o===0)return true;else if(o<0)e=e.left;else e=e.right}return false};t.prototype.forEach=function(t,e){var n=this._root;var o=[];var r=false;while(!r)if(n!==null){o.push(n);n=n.left}else if(o.length!==0){n=o.pop();t.call(e,n);n=n.right}else r=true;return this};t.prototype.range=function(t,e,n,o){var r=[];var i=this._comparator;var s=this._root;var a;while(r.length!==0||s)if(s){r.push(s);s=s.left}else{s=r.pop();a=i(s.key,e);if(a>0)break;else if(i(s.key,t)>=0)if(n.call(o,s))return this;s=s.right}return this};t.prototype.keys=function(){var n=[];this.forEach(function(t){var e=t.key;return n.push(e)});return n};t.prototype.values=function(){var n=[];this.forEach(function(t){var e=t.data;return n.push(e)});return n};t.prototype.min=function(){if(this._root)return this.minNode(this._root).key;return null};t.prototype.max=function(){if(this._root)return this.maxNode(this._root).key;return null};t.prototype.minNode=function(t){if(t===void 0)t=this._root;if(t)while(t.left)t=t.left;return t};t.prototype.maxNode=function(t){if(t===void 0)t=this._root;if(t)while(t.right)t=t.right;return t};t.prototype.at=function(t){var e=this._root;var n=false;var o=0;var r=[];while(!n)if(e){r.push(e);e=e.left}else if(r.length>0){e=r.pop();if(o===t)return e;o++;e=e.right}else n=true;return null};t.prototype.next=function(t){var e=this._root;var n=null;if(t.right){n=t.right;while(n.left)n=n.left;return n}var o=this._comparator;while(e){var r=o(t.key,e.key);if(r===0)break;else if(r<0){n=e;e=e.left}else e=e.right}return n};t.prototype.prev=function(t){var e=this._root;var n=null;if(t.left!==null){n=t.left;while(n.right)n=n.right;return n}var o=this._comparator;while(e){var r=o(t.key,e.key);if(r===0)break;else if(r<0)e=e.left;else{n=e;e=e.right}}return n};t.prototype.clear=function(){this._root=null;this._size=0;return this};t.prototype.toList=function(){return n(this._root)};t.prototype.load=function(t,e,n){if(e===void 0)e=[];if(n===void 0)n=false;var o=t.length;var r=this._comparator;if(n)v(t,e,0,o-1,r);if(this._root===null){this._root=f(t,e,0,o);this._size=o}else{var i=y(this.toList(),m(t,e),r);o=this._size+o;this._root=g({head:i},0,o)}return this};t.prototype.isEmpty=function(){return this._root===null};Object.defineProperty(t.prototype,"size",{get:function t(){return this._size},enumerable:true,configurable:true});Object.defineProperty(t.prototype,"root",{get:function t(){return this._root},enumerable:true,configurable:true});t.prototype.toString=function(t){if(t===void 0)t=function t(e){return String(e.key)};var e=[];d(this._root,"",true,function(t){return e.push(t)},t);return e.join("")};t.prototype.update=function(t,e,n){var o=this._comparator;var r=h(t,this._root,o),i=r.left,s=r.right;if(o(t,e)<0)s=l(e,n,s,o);else i=l(e,n,i,o);this._root=p(i,s,o)};t.prototype.split=function(t){return h(t,this._root,this._comparator)};return t}();function f(t,e,n,o){var r=o-n;if(r>0){var i=n+Math.floor(r/2);var s=t[i];var a=e[i];var l=new u(s,a);l.left=f(t,e,n,i);l.right=f(t,e,i+1,o);return l}return null}function m(t,e){var n=new u(null,null);var o=n;for(var r=0;r<t.length;r++)o=o.next=new u(t[r],e[r]);o.next=null;return n.next}function n(t){var e=t;var n=[];var o=false;var r=new u(null,null);var i=r;while(!o)if(e){n.push(e);e=e.left}else if(n.length>0){e=i=i.next=n.pop();e=e.right}else o=true;i.next=null;return r.next}function g(t,e,n){var o=n-e;if(o>0){var r=e+Math.floor(o/2);var i=g(t,e,r);var s=t.head;s.left=i;t.head=t.head.next;s.right=g(t,r+1,n);return s}return null}function y(t,e,n){var o=new u(null,null);var r=o;var i=t;var s=e;while(i!==null&&s!==null){if(n(i.key,s.key)<0){r.next=i;i=i.next}else{r.next=s;s=s.next}r=r.next}if(i!==null)r.next=i;else if(s!==null)r.next=s;return o.next}function v(t,e,n,o,r){if(n>=o)return;var i=t[n+o>>1];var s=n-1;var a=o+1;while(true){do{s++}while(r(t[s],i)<0);do{a--}while(r(t[a],i)>0);if(s>=a)break;var l=t[s];t[s]=t[a];t[a]=l;l=e[s];e[s]=e[a];e[a]=l}v(t,e,n,a,r);v(t,e,a+1,o,r)}var _=function t(e,n){return e.ll.x<=n.x&&n.x<=e.ur.x&&e.ll.y<=n.y&&n.y<=e.ur.y},P=function t(e,n){if(n.ur.x<e.ll.x||e.ur.x<n.ll.x||n.ur.y<e.ll.y||e.ur.y<n.ll.y)return null;var o=e.ll.x<n.ll.x?n.ll.x:e.ll.x;var r=e.ur.x<n.ur.x?e.ur.x:n.ur.x;var i=e.ll.y<n.ll.y?n.ll.y:e.ll.y;var s=e.ur.y<n.ur.y?e.ur.y:n.ur.y;return{ll:{x:o,y:i},ur:{x:r,y:s}}},r=Number.EPSILON;if(r===undefined)r=Math.pow(2,-52);var i=r*r,b=function t(e,n){if(-r<e&&e<r)if(-r<n&&n<r)return 0;var o=e-n;if(o*o<i*e*n)return 0;return e<n?-1:1},t=function(){function t(){c(this,t);this.reset()}s(t,[{key:"reset",value:function t(){this.xRounder=new w;this.yRounder=new w}},{key:"round",value:function t(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]);return t}(),w=function(){function t(){c(this,t);this.tree=new A;this.round(0)}s(t,[{key:"round",value:function t(e){var n=this.tree.add(e);var o=this.tree.prev(n);if(o!==null&&b(n.key,o.key)===0){this.tree.remove(e);return o.key}var r=this.tree.next(n);if(r!==null&&b(n.key,r.key)===0){this.tree.remove(e);return r.key}return e}}]);return t}(),R=new t,S=function t(e,n){return e.x*n.y-e.y*n.x},x=function t(e,n){return e.x*n.x+e.y*n.y},T=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};var s=S(r,i);return b(s,0)},E=function t(e){return Math.sqrt(x(e,e))},C=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};return S(i,r)/E(i)/E(r)},k=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};return x(i,r)/E(i)/E(r)},O=function t(e,n,o){if(n.y===0)return null;return{x:e.x+n.x/n.y*(o-e.y),y:o}},I=function t(e,n,o){if(n.x===0)return null;return{x:o,y:e.y+n.y/n.x*(o-e.x)}},L=function t(e,n,o,r){if(n.x===0)return I(o,r,e.x);if(r.x===0)return I(e,n,o.x);if(n.y===0)return O(o,r,e.y);if(r.y===0)return O(e,n,o.y);var i=S(n,r);if(i==0)return null;var s={x:o.x-e.x,y:o.y-e.y};var a=S(s,n)/i;var l=S(s,r)/i;var c=e.x+l*n.x,u=o.x+a*r.x;var h=e.y+l*n.y,p=o.y+a*r.y;var d=(c+u)/2;var f=(h+p)/2;return{x:d,y:f}},N=function(){s(r,null,[{key:"compare",value:function t(e,n){var o=r.comparePoints(e.point,n.point);if(o!==0)return o;if(e.point!==n.point)e.link(n);if(e.isLeft!==n.isLeft)return e.isLeft?1:-1;return D.compare(e.segment,n.segment)}},{key:"comparePoints",value:function t(e,n){if(e.x<n.x)return-1;if(e.x>n.x)return 1;if(e.y<n.y)return-1;if(e.y>n.y)return 1;return 0}}]);function r(t,e){c(this,r);if(t.events===undefined)t.events=[this];else t.events.push(this);this.point=t;this.isLeft=e}s(r,[{key:"link",value:function t(e){if(e.point===this.point)throw new Error("Tried to link already linked events");var n=e.point.events;for(var o=0,r=n.length;o<r;o++){var i=n[o];this.point.events.push(i);i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function t(){var e=this.point.events.length;for(var n=0;n<e;n++){var o=this.point.events[n];if(o.segment.consumedBy!==undefined)continue;for(var r=n+1;r<e;r++){var i=this.point.events[r];if(i.consumedBy!==undefined)continue;if(o.otherSE.point.events!==i.otherSE.point.events)continue;o.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function t(){var e=[];for(var n=0,o=this.point.events.length;n<o;n++){var r=this.point.events[n];if(r!==this&&!r.segment.ringOut&&r.segment.isInResult())e.push(r)}return e}},{key:"getLeftmostComparator",value:function t(o){var r=this;var l=new Map;var c=function t(e){var n=e.otherSE;l.set(e,{sine:C(r.point,o.point,n.point),cosine:k(r.point,o.point,n.point)})};return function(t,e){if(!l.has(t))c(t);if(!l.has(e))c(e);var n=l.get(t),o=n.sine,r=n.cosine;var i=l.get(e),s=i.sine,a=i.cosine;if(o>=0&&s>=0){if(r<a)return 1;if(r>a)return-1;return 0}if(o<0&&s<0){if(r<a)return-1;if(r>a)return 1;return 0}if(s<o)return-1;if(s>o)return 1;return 0}}}]);return r}(),M=0,D=function(){s(p,null,[{key:"compare",value:function t(e,n){var o=e.leftSE.point.x;var r=n.leftSE.point.x;var i=e.rightSE.point.x;var s=n.rightSE.point.x;if(s<o)return 1;if(i<r)return-1;var a=e.leftSE.point.y;var l=n.leftSE.point.y;var c=e.rightSE.point.y;var u=n.rightSE.point.y;if(o<r){if(l<a&&l<c)return 1;if(l>a&&l>c)return-1;var h=e.comparePoint(n.leftSE.point);if(h<0)return 1;if(h>0)return-1;var p=n.comparePoint(e.rightSE.point);if(p!==0)return p;return-1}if(o>r){if(a<l&&a<u)return-1;if(a>l&&a>u)return 1;var d=n.comparePoint(e.leftSE.point);if(d!==0)return d;var f=e.comparePoint(n.rightSE.point);if(f<0)return 1;if(f>0)return-1;return 1}if(a<l)return-1;if(a>l)return 1;if(i<s){var m=n.comparePoint(e.rightSE.point);if(m!==0)return m}if(i>s){var g=e.comparePoint(n.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==s){var y=c-a;var v=i-o;var _=u-l;var b=s-r;if(y>v&&_<b)return 1;if(y<v&&_>b)return-1}if(i>s)return 1;if(i<s)return-1;if(c<u)return-1;if(c>u)return 1;if(e.id<n.id)return-1;if(e.id>n.id)return 1;return 0}}]);function p(t,e,n,o){c(this,p);this.id=++M;this.leftSE=t;t.segment=this;t.otherSE=e;this.rightSE=e;e.segment=this;e.otherSE=t;this.rings=n;this.windings=o}s(p,[{key:"replaceRightSE",value:function t(e){this.rightSE=e;this.rightSE.segment=this;this.rightSE.otherSE=this.leftSE;this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function t(){var e=this.leftSE.point.y;var n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function t(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function t(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function t(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point;var o=this.rightSE.point;var r=this.vector();if(n.x===o.x){if(e.x===n.x)return 0;return e.x<n.x?1:-1}var i=(e.y-n.y)/r.y;var s=n.x+i*r.x;if(e.x===s)return 0;var a=(e.x-n.x)/r.x;var l=n.y+a*r.y;if(e.y===l)return 0;return e.y<l?-1:1}},{key:"getIntersection",value:function t(e){var n=this.bbox();var o=e.bbox();var r=P(n,o);if(r===null)return null;var i=this.leftSE.point;var s=this.rightSE.point;var a=e.leftSE.point;var l=e.rightSE.point;var c=_(n,a)&&this.comparePoint(a)===0;var u=_(o,i)&&e.comparePoint(i)===0;var h=_(n,l)&&this.comparePoint(l)===0;var p=_(o,s)&&e.comparePoint(s)===0;if(u&&c){if(p&&!h)return s;if(!p&&h)return l;return null}if(u){if(h)if(i.x===l.x&&i.y===l.y)return null;return i}if(c){if(p)if(s.x===a.x&&s.y===a.y)return null;return a}if(p&&h)return null;if(p)return s;if(h)return l;var d=L(i,this.vector(),a,e.vector());if(d===null)return null;if(!_(r,d))return null;return R.round(d.x,d.y)}},{key:"split",value:function t(e){var n=[];var o=e.events!==undefined;var r=new N(e,true);var i=new N(e,false);var s=this.rightSE;this.replaceRightSE(i);n.push(i);n.push(r);var a=new p(r,s,this.rings.slice(),this.windings.slice());if(N.comparePoints(a.leftSE.point,a.rightSE.point)>0)a.swapEvents();if(N.comparePoints(this.leftSE.point,this.rightSE.point)>0)this.swapEvents();if(o){r.checkForConsuming();i.checkForConsuming()}return n}},{key:"swapEvents",value:function t(){var e=this.rightSE;this.rightSE=this.leftSE;this.leftSE=e;this.leftSE.isLeft=true;this.rightSE.isLeft=false;for(var n=0,o=this.windings.length;n<o;n++)this.windings[n]*=-1}},{key:"consume",value:function t(e){var n=this;var o=e;while(n.consumedBy)n=n.consumedBy;while(o.consumedBy)o=o.consumedBy;var r=p.compare(n,o);if(r===0)return;if(r>0){var i=n;n=o;o=i}if(n.prev===o){var s=n;n=o;o=s}for(var a=0,l=o.rings.length;a<l;a++){var c=o.rings[a];var u=o.windings[a];var h=n.rings.indexOf(c);if(h===-1){n.rings.push(c);n.windings.push(u)}else n.windings[h]+=u}o.rings=null;o.windings=null;o.consumedBy=n;o.leftSE.consumedBy=n.leftSE;o.rightSE.consumedBy=n.rightSE}},{key:"prevInResult",value:function t(){if(this._prevInResult!==undefined)return this._prevInResult;if(!this.prev)this._prevInResult=null;else if(this.prev.isInResult())this._prevInResult=this.prev;else this._prevInResult=this.prev.prevInResult();return this._prevInResult}},{key:"beforeState",value:function t(){if(this._beforeState!==undefined)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function t(){if(this._afterState!==undefined)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};var n=this._afterState.rings;var o=this._afterState.windings;var r=this._afterState.multiPolys;for(var i=0,s=this.rings.length;i<s;i++){var a=this.rings[i];var l=this.windings[i];var c=n.indexOf(a);if(c===-1){n.push(a);o.push(l)}else o[c]+=l}var u=[];var h=[];for(var p=0,d=n.length;p<d;p++){if(o[p]===0)continue;var f=n[p];var m=f.poly;if(h.indexOf(m)!==-1)continue;if(f.isExterior)u.push(m);else{if(h.indexOf(m)===-1)h.push(m);var g=u.indexOf(f.poly);if(g!==-1)u.splice(g,1)}}for(var y=0,v=u.length;y<v;y++){var _=u[y].multiPoly;if(r.indexOf(_)===-1)r.push(_)}return this._afterState}},{key:"isInResult",value:function t(){if(this.consumedBy)return false;if(this._isInResult!==undefined)return this._isInResult;var e=this.beforeState().multiPolys;var n=this.afterState().multiPolys;switch(W.type){case"union":{var o=e.length===0;var r=n.length===0;this._isInResult=o!==r;break}case"intersection":{var i;var s;if(e.length<n.length){i=e.length;s=n.length}else{i=n.length;s=e.length}this._isInResult=s===W.numMultiPolys&&i<s;break}case"xor":{var a=Math.abs(e.length-n.length);this._isInResult=a%2===1;break}case"difference":{var l=function t(e){return e.length===1&&e[0].isSubject};this._isInResult=l(e)!==l(n);break}default:throw new Error("Unrecognized operation type found ".concat(W.type))}return this._isInResult}}],[{key:"fromRing",value:function t(e,n,o){var r,i,s;var a=N.comparePoints(e,n);if(a<0){r=e;i=n;s=1}else if(a>0){r=n;i=e;s=-1}else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var l=new N(r,true);var c=new N(i,false);return new p(l,c,[o],[s])}}]);return p}(),z=function(){function l(t,e,n){c(this,l);if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.poly=e;this.isExterior=n;this.segments=[];if(typeof t[0][0]!=="number"||typeof t[0][1]!=="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=R.round(t[0][0],t[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};var r=o;for(var i=1,s=t.length;i<s;i++){if(typeof t[i][0]!=="number"||typeof t[i][1]!=="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var a=R.round(t[i][0],t[i][1]);if(a.x===r.x&&a.y===r.y)continue;this.segments.push(D.fromRing(r,a,this));if(a.x<this.bbox.ll.x)this.bbox.ll.x=a.x;if(a.y<this.bbox.ll.y)this.bbox.ll.y=a.y;if(a.x>this.bbox.ur.x)this.bbox.ur.x=a.x;if(a.y>this.bbox.ur.y)this.bbox.ur.y=a.y;r=a}if(o.x!==r.x||o.y!==r.y)this.segments.push(D.fromRing(r,o,this))}s(l,[{key:"getSweepEvents",value:function t(){var e=[];for(var n=0,o=this.segments.length;n<o;n++){var r=this.segments[n];e.push(r.leftSE);e.push(r.rightSE)}return e}}]);return l}(),B=function(){function i(t,e){c(this,i);if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new z(t[0],this,true);this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}};this.interiorRings=[];for(var n=1,o=t.length;n<o;n++){var r=new z(t[n],this,false);if(r.bbox.ll.x<this.bbox.ll.x)this.bbox.ll.x=r.bbox.ll.x;if(r.bbox.ll.y<this.bbox.ll.y)this.bbox.ll.y=r.bbox.ll.y;if(r.bbox.ur.x>this.bbox.ur.x)this.bbox.ur.x=r.bbox.ur.x;if(r.bbox.ur.y>this.bbox.ur.y)this.bbox.ur.y=r.bbox.ur.y;this.interiorRings.push(r)}this.multiPoly=e}s(i,[{key:"getSweepEvents",value:function t(){var e=this.exteriorRing.getSweepEvents();for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getSweepEvents();for(var i=0,s=r.length;i<s;i++)e.push(r[i])}return e}}]);return i}(),j=function(){function i(t,e){c(this,i);if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{if(typeof t[0][0][0]==="number")t=[t]}catch(t){}this.polys=[];this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,o=t.length;n<o;n++){var r=new B(t[n],this);if(r.bbox.ll.x<this.bbox.ll.x)this.bbox.ll.x=r.bbox.ll.x;if(r.bbox.ll.y<this.bbox.ll.y)this.bbox.ll.y=r.bbox.ll.y;if(r.bbox.ur.x>this.bbox.ur.x)this.bbox.ur.x=r.bbox.ur.x;if(r.bbox.ur.y>this.bbox.ur.y)this.bbox.ur.y=r.bbox.ur.y;this.polys.push(r)}this.isSubject=e}s(i,[{key:"getSweepEvents",value:function t(){var e=[];for(var n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getSweepEvents();for(var i=0,s=r.length;i<s;i++)e.push(r[i])}return e}}]);return i}(),F=function(){s(w,null,[{key:"factory",value:function t(e){var n=[];for(var o=0,r=e.length;o<r;o++){var i=e[o];if(!i.isInResult()||i.ringOut)continue;var s=null;var a=i.leftSE;var l=i.rightSE;var c=[a];var u=a.point;var h=[];while(true){s=a;a=l;c.push(a);if(a.point===u)break;while(true){var p=a.getAvailableLinkedEvents();if(p.length===0){var d=c[0].point;var f=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(d.x,",")+" ".concat(d.y,"]. Last matching segment found ends at")+" [".concat(f.x,", ").concat(f.y,"]."))}if(p.length===1){l=p[0].otherSE;break}var m=null;for(var g=0,y=h.length;g<y;g++)if(h[g].point===a.point){m=g;break}if(m!==null){var v=h.splice(m)[0];var _=c.splice(v.index);_.unshift(_[0].otherSE);n.push(new w(_.reverse()));continue}h.push({index:c.length,point:a.point});var b=a.getLeftmostComparator(s);l=p.sort(b)[0].otherSE;break}}n.push(new w(c))}return n}}]);function w(t){c(this,w);this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}s(w,[{key:"getGeom",value:function t(){var e=this.events[0].point;var n=[e];for(var o=1,r=this.events.length-1;o<r;o++){var i=this.events[o].point;var s=this.events[o+1].point;if(T(i,e,s)===0)continue;n.push(i);e=i}if(n.length===1)return null;var a=n[0];var l=n[1];if(T(a,e,l)===0)n.shift();n.push(n[0]);var c=this.isExteriorRing()?1:-1;var u=this.isExteriorRing()?0:n.length-1;var h=this.isExteriorRing()?n.length:-1;var p=[];for(var d=u;d!=h;d+=c)p.push([n[d].x,n[d].y]);return p}},{key:"isExteriorRing",value:function t(){if(this._isExteriorRing===undefined){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():true}return this._isExteriorRing}},{key:"enclosingRing",value:function t(){if(this._enclosingRing===undefined)this._enclosingRing=this._calcEnclosingRing();return this._enclosingRing}},{key:"_calcEnclosingRing",value:function t(){var e=this.events[0];for(var n=1,o=this.events.length;n<o;n++){var r=this.events[n];if(N.compare(e,r)>0)e=r}var i=e.segment.prevInResult();var s=i?i.prevInResult():null;while(true){if(!i)return null;if(!s)return i.ringOut;if(s.ringOut!==i.ringOut)if(s.ringOut.enclosingRing()!==i.ringOut)return i.ringOut;else return i.ringOut.enclosingRing();i=s.prevInResult();s=i?i.prevInResult():null}}}]);return w}(),U=function(){function e(t){c(this,e);this.exteriorRing=t;t.poly=this;this.interiorRings=[]}s(e,[{key:"addInterior",value:function t(e){this.interiorRings.push(e);e.poly=this}},{key:"getGeom",value:function t(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getGeom();if(r===null)continue;e.push(r)}return e}}]);return e}(),q=function(){function e(t){c(this,e);this.rings=t;this.polys=this._composePolys(t)}s(e,[{key:"getGeom",value:function t(){var e=[];for(var n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getGeom();if(r===null)continue;e.push(r)}return e}},{key:"_composePolys",value:function t(e){var n=[];for(var o=0,r=e.length;o<r;o++){var i=e[o];if(i.poly)continue;if(i.isExteriorRing())n.push(new U(i));else{var s=i.enclosingRing();if(!s.poly)n.push(new U(s));s.poly.addInterior(i)}}return n}}]);return e}(),G=function(){function n(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:D.compare;c(this,n);this.queue=t;this.tree=new A(e);this.segments=[]}s(n,[{key:"process",value:function t(e){var n=e.segment;var o=[];if(e.consumedBy){if(e.isLeft)this.queue.remove(e.otherSE);else this.tree.remove(n);return o}var r=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!r)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");var i=r;var s=r;var a=undefined;var l=undefined;while(a===undefined){i=this.tree.prev(i);if(i===null)a=null;else if(i.key.consumedBy===undefined)a=i.key}while(l===undefined){s=this.tree.next(s);if(s===null)l=null;else if(s.key.consumedBy===undefined)l=s.key}if(e.isLeft){var c=null;if(a){var u=a.getIntersection(n);if(u!==null){if(!n.isAnEndpoint(u))c=u;if(!a.isAnEndpoint(u)){var h=this._splitSafely(a,u);for(var p=0,d=h.length;p<d;p++)o.push(h[p])}}}var f=null;if(l){var m=l.getIntersection(n);if(m!==null){if(!n.isAnEndpoint(m))f=m;if(!l.isAnEndpoint(m)){var g=this._splitSafely(l,m);for(var y=0,v=g.length;y<v;y++)o.push(g[y])}}}if(c!==null||f!==null){var _=null;if(c===null)_=f;else if(f===null)_=c;else{var b=N.comparePoints(c,f);_=b<=0?c:f}this.queue.remove(n.rightSE);o.push(n.rightSE);var w=n.split(_);for(var S=0,x=w.length;S<x;S++)o.push(w[S])}if(o.length>0){this.tree.remove(n);o.push(e)}else{this.segments.push(n);n.prev=a}}else{if(a&&l){var T=a.getIntersection(l);if(T!==null){if(!a.isAnEndpoint(T)){var E=this._splitSafely(a,T);for(var C=0,k=E.length;C<k;C++)o.push(E[C])}if(!l.isAnEndpoint(T)){var O=this._splitSafely(l,T);for(var I=0,L=O.length;I<L;I++)o.push(O[I])}}}this.tree.remove(n)}return o}},{key:"_splitSafely",value:function t(e,n){this.tree.remove(e);var o=e.rightSE;this.queue.remove(o);var r=e.split(n);r.push(o);if(e.consumedBy===undefined)this.tree.insert(e);return r}}]);return n}(),Z=typeof process!=="undefined"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,H=typeof process!=="undefined"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,K,W=new(function(){function t(){c(this,t)}s(t,[{key:"run",value:function t(e,n,o){W.type=e;R.reset();var r=[new j(n,true)];for(var i=0,s=o.length;i<s;i++)r.push(new j(o[i],false));W.numMultiPolys=r.length;if(W.type==="difference"){var a=r[0];var l=1;while(l<r.length)if(P(r[l].bbox,a.bbox)!==null)l++;else r.splice(l,1)}if(W.type==="intersection")for(var c=0,u=r.length;c<u;c++){var h=r[c];for(var p=c+1,d=r.length;p<d;p++)if(P(h.bbox,r[p].bbox)===null)return[]}var f=new A(N.compare);for(var m=0,g=r.length;m<g;m++){var y=r[m].getSweepEvents();for(var v=0,_=y.length;v<_;v++){f.insert(y[v]);if(f.size>Z)throw new Error("Infinite loop when putting segment endpoints in a priority queue "+"(queue size too big). Please file a bug report.")}}var b=new G(f);var w=f.size;var S=f.pop();while(S){var x=S.key;if(f.size===w){var T=x.segment;throw new Error("Unable to pop() ".concat(x.isLeft?"left":"right"," SweepEvent ")+"[".concat(x.point.x,", ").concat(x.point.y,"] from segment #").concat(T.id," ")+"[".concat(T.leftSE.point.x,", ").concat(T.leftSE.point.y,"] -> ")+"[".concat(T.rightSE.point.x,", ").concat(T.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(f.size>Z)throw new Error("Infinite loop when passing sweep line over endpoints "+"(queue size too big). Please file a bug report.");if(b.segments.length>H)throw new Error("Infinite loop when passing sweep line over endpoints "+"(too many sweep line segments). Please file a bug report.");var E=b.process(x);for(var C=0,k=E.length;C<k;C++){var O=E[C];if(O.consumedBy===undefined)f.insert(O)}w=f.size;S=f.pop()}R.reset();var I=F.factory(b.segments);var L=new q(I);return L.getGeom()}}]);return t}()),V,Y,Q,J,X;return{union:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("union",e,o)},intersection:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("intersection",e,o)},xor:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("xor",e,o)},difference:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("difference",e,o)}}}()});function oc(t,e,n){void 0===n&&(n={});var o,t=ec(t),e=ec(e),e=nc.intersection(t.coordinates,e.coordinates);return 0===e.length?null:1===e.length?function(t,e,n){void 0===n&&(n={});for(var o=0,r=t;o<r.length;o++){var i=r[o];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<i[i.length-1].length;s++)if(i[i.length-1][s]!==i[0][s])throw new Error("First and last Position are not equivalent.")}return tc({type:"Polygon",coordinates:t},e,n)}(e[0],n.properties):(n=n.properties,tc({type:"MultiPolygon",coordinates:e},n,o=void 0===o?{}:o))}var rc,ic=["DIV","SPAN","A"],sc=["data-azure-maps-attribution-minzoom","data-azure-maps-attribution-maxzoom","data-azure-maps-attribution-geometry","data-azure-maps-attribution-tileset","data-azure-maps-attribution-order","data-azure-maps-attribution-dynamic"],ac=M(["href"],sc),lc=(cc.prototype.equals=function(t){return this.stringRepresentation===t.stringRepresentation},Object.defineProperty(cc.prototype,"stringRepresentation",{get:function(){return[void 0!==this.minZoom?"minzoom="+this.minZoom:"",void 0!==this.maxZoom?"maxzoom="+this.maxZoom:"",void 0!==this.geometry?this.element.attributes.getNamedItem("data-azure-maps-attribution-geometry").value:"",void 0!==this.tilesetId?"tilesetId="+this.tilesetId:"",this.dynamic?"dynamic":""].filter(function(t){return 0<t.length}).join(";")},enumerable:!1,configurable:!0}),cc.applicable=function(t){return Array.from(t.attributes).map(function(t){return sc.includes(t.name)}).reduce(function(t,e){return t||e},!1)},Object.defineProperty(cc.prototype,"minZoom",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-minzoom");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(cc.prototype,"maxZoom",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-maxzoom");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(cc.prototype,"geometry",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-geometry");if(t&&t.value)try{return JSON.parse(t.value)}catch(t){return}},enumerable:!1,configurable:!0}),Object.defineProperty(cc.prototype,"tilesetId",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-tileset");return t&&t.value?t.value:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(cc.prototype,"order",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-order");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(cc.prototype,"dynamic",{get:function(){return null!==this.element.attributes.getNamedItem("data-azure-maps-attribution-dynamic")},enumerable:!1,configurable:!0}),Object.defineProperty(cc.prototype,"hidesElement",{get:function(){return"none"==this.element.style.display},enumerable:!1,configurable:!0}),cc.prototype.forceHide=function(){this.element.style.display="none"},cc.prototype.satisfied=function(t){var e=!this.minZoom||!t.zoom||t.zoom>=this.minZoom,n=!this.maxZoom||!t.zoom||t.zoom<=this.maxZoom,o=!0;return this.geometry&&t.bounds&&(o=null!==oc({type:"Feature",geometry:this.geometry,properties:{}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[ci.getNorthWest(t.bounds),ci.getNorthEast(t.bounds),ci.getSouthEast(t.bounds),ci.getSouthWest(t.bounds),ci.getNorthWest(t.bounds)]]},properties:{}})),e&&n&&o},cc.prototype.apply=function(e,t){var n=this;void 0===t&&(t=null);var o=this.satisfied(e.getCamera()),r=this.dynamic&&this.tilesetId,i=this.hidesElement,t=t&&["dragend","zoomend","pitchend"].includes(t.type);return o||i?o&&(i||r)&&(o&&i&&this.element.style.removeProperty("display"),r&&(t?e.events.addOnce("idle",function(t){return n.fetchAndApplyDynamicAttribution(e)}):this.fetchAndApplyDynamicAttribution(e))):this.element.style.display="none",o===i},cc.prototype.fetchAndApplyDynamicAttribution=function(o){var e,n,t,r=this,i=o.getCamera();this.lastFetchState&&ci.containsBoundingBox(this.lastFetchState.bounds,i.bounds)&&Math.floor(this.lastFetchState.zoom)==Math.floor(i.zoom)||(e=Dr(i.center,ci.getSouthWest(i.bounds),cc.viewportBufferExpansionRatio),t=((n=Dr(i.center,ci.getNorthEast(i.bounds),cc.viewportBufferExpansionRatio))[0]<e[0]?[[e[0],e[1],180,n[1]],[-180,e[1],n[0],n[1]]]:[[e[0],e[1],n[0],n[1]]]).map(function(t){var e=new URLSearchParams({"api-version":"2.1",tilesetId:r.tilesetId,zoom:void 0!==i.zoom?""+Math.floor(i.zoom):void 0,bounds:t.join(",")}),n="https://{{azMapsDomain}}/map/attribution",t={url:n,headers:{}};o._substituteDomainLanguageViewAndSignInRequest(n,t);e=t.url+(t.url.includes("?")?"&":"?")+e.toString();return o._sendRequest(e,"Attribution",t.headers).then(function(t){return t.json()})}),Promise.all(t).then(function(t){r.applyAttributionResponse(t),r.lastFetchState={bounds:new ci([e[0],e[1],n[0],n[1]]),zoom:i.zoom}}).catch(function(t){return console.error(t)}))},cc.prototype.applyAttributionResponse=function(t){var e,n,o=this,r=t.map(function(t){return t.copyrights||[]}).reduce(function(t,e){return M(t,e)},[]);0!=r.length&&(null!==(t=Js.parseWithFilter(r.join(""),function(t){return!0},function(t){return t},function(){return o.element.innerHTML="",o.element}))?(t="string"==typeof t?((r=document.createElement("span")).innerHTML=t,r):t,n=t===this.element?(e=document.createElement("span"),Array.from(this.element.childNodes).forEach(function(t){return e.appendChild(t)}),e):t,Array.from(this.element.attributes).filter(function(t){return sc.includes(t.name)}).forEach(function(t){return n.attributes.setNamedItem(t.cloneNode())}),n.style.display=this.element.style.display,t=this.element.parentElement,this.element.remove(),t.append(n),this.element=n,this.attributionChangeCallback(this)):console.warn("Dynamic attribution is empty after filtering"))},cc.viewportBufferExpansionRatio=2,function(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(i<3?r(s):3<i?r(e,n,s):r(e,n))||s);3<i&&s&&Object.defineProperty(e,n,s)}([(rc=1e3,function(t,e,n){var o=n.value,r=new Map;return n.value=function(){var t=this,e=arguments;r.get(t)||!1||(o.apply(t,e),r.set(t,!0),setTimeout(function(){return r.delete(t)},rc))},n})],cc.prototype,"fetchAndApplyDynamicAttribution",null),cc);function cc(t,e){var n=this;this.lastFetchState={bounds:null,zoom:null},this.getElement=function(){return n.element},this.element=t,this.attributionChangeCallback=e}var uc=[/all rights reserved/gi],hc=(pc.prototype.addToMap=function(){this.map.events.add("stylechanged",this.loadAttributionOnceSourcesLoaded),this.map.events.add("dragend",this.applyRules),this.map.events.add("zoomend",this.applyRules),this.map.events.add("pitchend",this.applyRules)},pc.prototype.removeFromMap=function(){this.map.events.remove("stylechanged",this.loadAttributionOnceSourcesLoaded),this.map.events.remove("dragend",this.applyRules),this.map.events.remove("zoomend",this.applyRules),this.map.events.remove("pitchend",this.applyRules)},pc.prototype.getDefaultAttribution=function(){return this.copyrightControl.getDefaultAttributions().map(function(t){return e=t,(t=document.createElement("a")).textContent=e,t;var e})},pc);function pc(t,e,n){var o,a=this;this.rules=[],this.virtualContext=((o=document.createElement("span")).className="azure-map-copyright-context",o),this.renderContext=this.virtualContext.cloneNode(!1),this.addAttributionFromSource=function(t){},this.removeAttributionFromSource=function(t){},this.getMapStyleVisibleSources=function(){var e=a.map._getMap(),n=e.getStyle();return Object.entries(n.sources).filter(function(t){var e=N(t,1)[0];return n.layers.filter(function(t){return t&&t.source==e}).reduce(function(t,e){return!(e.layout&&"none"===e.layout.visibility||e.paint&&0===e.paint["icon-opacity"]&&0===e.paint["text-opacity"])||t},!1)}).map(function(t){t=N(t,1)[0];return e.getSource(t)})},this.loadAttributionOnceSourcesLoaded=function(){var t=a.getMapStyleVisibleSources();Promise.all(t.map(function(r){return new Promise(function(n,o){"tiles"in r?n(r):(r.load(),r.on("data",function t(e){"metadata"==e.sourceDataType&&(r.off("data",t),n(r))}),r.on("error",function t(e){r.off("error",t),o(e)}))}).then(function(t){return{status:"fulfilled",value:t}}).catch(function(t){return{status:"rejected",reason:t}})})).then(function(t){a.reloadAttribution()})},this.reloadAttribution=function(){var t=a.getMapStyleVisibleSources(),o=new Set,r={},e=Object.values(t).filter(function(t){return"attribution"in t&&t.attribution&&"tiles"in t&&0<t.tiles.length}).map(function(t){return t}).map(function(t){t=t.attribution;return Js.parseWithFilter(t,function(t){return ic.includes(t.tagName)&&Array.from(t.attributes).map(function(t){return ac.includes(t.name)}).reduce(function(t,e){return t&&e},!0)},function(t){var e,n=null;return t instanceof HTMLElement&&lc.applicable(t)&&(n=new lc(t,function(){return a.renderAttribution()}),o.add(n),void 0!==n.order&&(t.style.order=""+n.order)),n&&t instanceof HTMLElement&&((!((e=n.stringRepresentation)in r)||void 0!==n.order&&void 0!==r[e].order&&n.order<r[e].order||void 0!==n.order&&void 0===r[e].order)&&(r[e]=n)),t},function(){return document.createElement("span")})}),n=new Set(Object.values(r)),t=new Set(M(o).filter(function(t){return!n.has(t)})),i=new Set(M(t).map(function(t){return t.getElement()}));M(i).filter(function(t){return null!==t.parentElement}).forEach(function(t){return t.parentElement.removeChild(t)}),a.rules=Object.values(r);var e=e.filter(function(t){return"string"==typeof t||!i.has(t)}).map(function(t){return"string"==typeof t?new Text(t):t}),s=document.createElement("span");0<e.length?e.forEach(function(t){return s.appendChild(t)}):a.getDefaultAttribution().forEach(function(t){return s.appendChild(t)}),a.virtualContext=s,a.copyrightControl.setOptions({copyrightContent:a.renderContext}),a.applyRules(),a.renderAttribution()},this.applyRules=function(n){void 0===n&&(n=null),a.rules.reduce(function(t,e){e=e.apply(a.map,n);return t||e},!1)&&a.renderAttribution()},this.renderAttribution=function(){var e=function(t){return Array.from("none"!=t.style.display?t.children:[]).map(function(t){return e(t)}).reduce(function(t,e){return M(t,e)},Array.from("none"!=t.style.display?t.childNodes:[]).filter(function(t){return t.nodeType==t.TEXT_NODE}))},t=a.virtualContext.cloneNode(!0),n=e(t);n.forEach(function(t){return t.textContent=M(uc).reduce(function(t,e){return t.replace(e,"").trim()},t.textContent)}),n.reduce(function(t,e){return t.has(e.textContent)?(e.textContent="",e.parentElement&&e.parentElement.removeChild(e)):t.add(e.textContent),t},new Set),a.renderContext.innerHTML="",Array.from(t.childNodes).forEach(function(t){return a.renderContext.appendChild(t)})},this.map=t,this.copyrightControl=e,this.options=n}var dc=Pt(function(t){var e=(e=function(t){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},e.prototype._singletonInstance)return e.prototype._singletonInstance;if((e.prototype._singletonInstance=this).instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,t.displayCall&&"function"!=typeof t.displayCall)throw new Error("displayCall is not a function");if(!t.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(t),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(t){}}),e.prototype.login=function(){var t,e;this._loginInProgress?this.info("Login in progress"):(this._loginInProgress=!0,t=this._guid(),this.config.state=t,this._idTokenNonce=this._guid(),(e=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST))&&""!==e?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):e=window.location.href,this.verbose("Expected state: "+t+" startPage:"+e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,t,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),e=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce),this.config.displayCall?this.config.displayCall(e):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(t),this.registerCallback(t,this.config.clientId,this.callback),this._loginPopup(e)):this.promptUser(e))},e.prototype._openPopup=function(t,e,n,o){try{var r=window.screenLeft||window.screenX,i=window.screenTop||window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=s/2-n/2+r,c=a/2-o/2+i,u=window.open(t,e,"width="+n+", height="+o+", top="+c+", left="+l);return u.focus&&u.focus(),u}catch(t){return this.warn("Error opening popup, "+t.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},e.prototype._handlePopupError=function(t,e,n,o,r){this.warn(o),this._saveItem(this.CONSTANTS.STORAGE.ERROR,n),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,o),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,r),e&&this._activeRenewals[e]&&(this._activeRenewals[e]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,t&&t(o,null,n)},e.prototype._loginPopup=function(t,o,e){var r,i,s,a=this._openPopup(t,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),l=e||this.callback;null!=a?(this._openedWindows.push(a),r=-1!=this.config.redirectUri.indexOf("#")?this.config.redirectUri.split("#")[0]:this.config.redirectUri,i=this,s=window.setInterval(function(){if(!a||a.closed||void 0===a.closed){var t="Popup Window closed",e="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return i.isAngular&&i._broadcast("adal:popUpClosed",e+i.CONSTANTS.RESOURCE_DELIMETER+t),i._handlePopupError(l,o,t,e,e),void window.clearInterval(s)}try{var n=a.location;if(-1!=encodeURI(n.href).indexOf(encodeURI(r)))return i.isAngular?i._broadcast("adal:popUpHashChanged",n.hash):i.handleWindowCallback(n.hash),window.clearInterval(s),i._loginInProgress=!1,i._acquireTokenInProgress=!1,i.info("Closing popup window"),i._openedWindows=[],void a.close()}catch(t){}},1)):this._handlePopupError(l,o,"Error opening popup",e="Popup Window is null. This can happen if you are using IE",e)},e.prototype._broadcast=function(t,e){function n(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}"function"!=typeof window.CustomEvent&&(n.prototype=window.Event.prototype,window.CustomEvent=n);e=new CustomEvent(t,{detail:e});window.dispatchEvent(e)},e.prototype.loginInProgress=function(){return this._loginInProgress},e.prototype._hasResource=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return e&&!this._isEmpty(e)&&-1<e.indexOf(t+this.CONSTANTS.RESOURCE_DELIMETER)},e.prototype.getCachedToken=function(t){if(!this._hasResource(t))return null;var e=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t),n=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t),o=this.config.expireOffsetSeconds||300;return n&&n>this._now()+o?e:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0),null)},e.prototype.getCachedUser=function(){if(this._user)return this._user;var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(t),this._user},e.prototype.registerCallback=function(i,s,t){this._activeRenewals[s]=i,this._callBacksMappedToRenewStates[i]||(this._callBacksMappedToRenewStates[i]=[]);var a=this;this._callBacksMappedToRenewStates[i].push(t),this._callBackMappedToRenewStates[i]||(this._callBackMappedToRenewStates[i]=function(t,e,n,o){a._activeRenewals[s]=null;for(var r=0;r<a._callBacksMappedToRenewStates[i].length;++r)try{a._callBacksMappedToRenewStates[i][r](t,e,n,o)}catch(n){a.warn(n)}a._callBacksMappedToRenewStates[i]=null,a._callBackMappedToRenewStates[i]=null})},e.prototype._renewToken=function(t,e,n){this.info("renewToken is called for resource:"+t);var o=this._addAdalFrame("adalRenewFrame"+t),r=this._guid()+"|"+t;this.config.state=r,this._renewStates.push(r),this.verbose("Renew token Expected state: "+r);var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl(n=n||"token",t),"prompt");n===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),i+="&nonce="+encodeURIComponent(this._idTokenNonce)),i=this._addHintParameters(i+="&prompt=none"),this.registerCallback(r,t,e),this.verbosePii("Navigate to:"+i),o.src="about:blank",this._loadFrameTimeout(i,"adalRenewFrame"+t,t)},e.prototype._renewIdToken=function(t,e){this.info("renewIdToken is called");var n=this._addAdalFrame("adalIdTokenFrame"),o=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this.config.state=o,this._renewStates.push(o),this.verbose("Renew Idtoken Expected state: "+o);var r=null==e?null:this.config.clientId,e=e||"id_token",r=this._urlRemoveQueryStringParameter(this._getNavigateUrl(e,r),"prompt"),r=this._addHintParameters(r+="&prompt=none");r+="&nonce="+encodeURIComponent(this._idTokenNonce),this.registerCallback(o,this.config.clientId,t),this.verbosePii("Navigate to:"+r),n.src="about:blank",this._loadFrameTimeout(r,"adalIdTokenFrame",this.config.clientId)},e.prototype._urlContainsQueryStringParameter=function(t,e){return new RegExp("[\\?&]"+t+"=").test(e)},e.prototype._urlRemoveQueryStringParameter=function(t,e){var n=new RegExp("(\\&"+e+"=)[^&]+");return t=t.replace(n,""),n=new RegExp("("+e+"=)[^&]+&"),t=t.replace(n,""),n=new RegExp("("+e+"=)[^&]+"),t=t.replace(n,"")},e.prototype._loadFrameTimeout=function(t,e,n){this.verbose("Set loading state to pending for: "+n),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+n,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),this._loadFrame(t,e);var o=this;setTimeout(function(){var t;o._getItem(o.CONSTANTS.STORAGE.RENEW_STATUS+n)===o.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS&&(o.verbose("Loading frame has timed out after: "+o.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+n),(t=o._activeRenewals[n])&&o._callBackMappedToRenewStates[t]&&o._callBackMappedToRenewStates[t]("Token renewal operation failed due to timeout",null,"Token Renewal Failed"),o._saveItem(o.CONSTANTS.STORAGE.RENEW_STATUS+n,o.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED))},o.CONSTANTS.LOADFRAME_TIMEOUT)},e.prototype._loadFrame=function(e,t){var n=this;n.info("LoadFrame: "+t);var o=t;setTimeout(function(){var t=n._addAdalFrame(o);""!==t.src&&"about:blank"!==t.src||(t.src=e,n._loadFrame(e,o))},500)},e.prototype.acquireToken=function(t,e){if(this._isEmpty(t))return this.warn("resource is required"),void e("resource is required",null,"resource is required");var n=this.getCachedToken(t);return n?(this.info("Token is already in cache for resource:"+t),void e(null,n,null)):this._user||this.config.extraQueryParameter&&-1!==this.config.extraQueryParameter.indexOf("login_hint")?void(this._activeRenewals[t]?this.registerCallback(this._activeRenewals[t],t,e):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,t===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(e)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(t,e)):(this.verbose("renewing idtoken and access_token"),this._renewToken(t,e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))):(this.warn("User login is required"),void e("User login is required",null,"login required"))},e.prototype.acquireTokenPopup=function(t,e,n,o){if(this._isEmpty(t))return this.warn("resource is required"),void o("resource is required",null,"resource is required");if(!this._user)return this.warn("User login is required"),void o("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void o("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+t;this.config.state=r,this._renewStates.push(r),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+r);var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(i+="&prompt=select_account",e&&(i+=e),n&&-1===i.indexOf("&claims"))i+="&claims="+encodeURIComponent(n);else if(n&&-1!==i.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");i=this._addHintParameters(i),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this.registerCallback(r,t,o),this._loginPopup(i,t,o)},e.prototype.acquireTokenRedirect=function(t,e,n){if(this._isEmpty(t))return this.warn("resource is required"),void o("resource is required",null,"resource is required");var o=this.callback;if(!this._user)return this.warn("User login is required"),void o("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void o("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+t;this.config.state=r,this.verbose("Renew token Expected state: "+r);o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(o+="&prompt=select_account",e&&(o+=e),n&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(n);else if(n&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,r,!0),this.promptUser(o)},e.prototype.promptUser=function(t){t?(this.infoPii("Navigate to:"+t),window.location.replace(t)):this.info("Navigate url is empty")},e.prototype.clearCache=function(){this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);if(!this._isEmpty(t))for(var t=t.split(this.CONSTANTS.RESOURCE_DELIMETER),e=0;e<t.length&&""!==t[e];e++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t[e],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t[e],0);this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},e.prototype.clearCacheForResource=function(t){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._hasResource(t)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0))},e.prototype.logOut=function(){var t,e;this.clearCache(),this._user=null,e=this.config.logOutUri||(t="common",e="",this.config.tenant&&(t=this.config.tenant),this.config.postLogoutRedirectUri&&(e="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),this.instance+t+"/oauth2/logout?"+e),this.infoPii("Logout navigate to: "+e),this.promptUser(e)},e.prototype._isEmpty=function(t){return void 0===t||!t||0===t.length},e.prototype.getUser=function(t){if("function"!=typeof t)throw new Error("callback is not a function");var e;this._user?t(null,this._user):(e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN),this._isEmpty(e)?(this.warn("User information is not available"),t("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(e),t(null,this._user)))},e.prototype._addHintParameters=function(t){var e;return this._user&&this._user.profile&&(this._user.profile.sid&&-1!==t.indexOf("&prompt=none")?this._urlContainsQueryStringParameter("sid",t)||(t+="&sid="+encodeURIComponent(this._user.profile.sid)):this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",t)||(t+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",t)&&-1<this._user.profile.upn.indexOf("@")&&(e=this._user.profile.upn.split("@"),t+="&domain_hint="+encodeURIComponent(e[e.length-1])))),t},e.prototype._createUser=function(t){var e=null,t=this._extractIdToken(t);return t&&t.hasOwnProperty("aud")&&(t.aud.toLowerCase()===this.config.clientId.toLowerCase()?(e={userName:"",profile:t},t.hasOwnProperty("upn")?e.userName=t.upn:t.hasOwnProperty("email")&&(e.userName=t.email)):this.warn("IdToken has invalid aud field")),e},e.prototype._getHash=function(t){return-1<t.indexOf("#/")?t=t.substring(t.indexOf("#/")+2):-1<t.indexOf("#")&&(t=t.substring(1)),t},e.prototype.isCallback=function(t){t=this._getHash(t);t=this._deserialize(t);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},e.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},e.prototype.getRequestInfo=function(t){t=this._getHash(t);var e=this._deserialize(t),n={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(e&&((n.parameters=e).hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||e.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||e.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){n.valid=!0;t="";if(!e.hasOwnProperty("state"))return this.warn("No state returned"),n;if(this.verbose("State: "+e.state),t=e.state,n.stateResponse=t,this._matchState(n))return n;if(!n.stateMatch&&window.parent){n.requestType=this._requestType;for(var o=this._renewStates,r=0;r<o.length;r++)if(o[r]===n.stateResponse){n.stateMatch=!0;break}}}return n},e.prototype._matchNonce=function(t){if(e=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN))for(var e=e.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<e.length;n++)if(e[n]&&e[n]===t.profile.nonce)return!0;return!1},e.prototype._matchState=function(t){if(e=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN))for(var e=e.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<e.length;n++)if(e[n]&&e[n]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.LOGIN,t.stateMatch=!0;if(o=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW))for(var o=o.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<o.length;n++)if(o[n]&&o[n]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.RENEW_TOKEN,t.stateMatch=!0;return!1},e.prototype._getResourceFromState=function(t){if(t){var e=t.indexOf("|");if(-1<e&&e+1<t.length)return t.substring(e+1)}return""},e.prototype.saveTokenFromHash=function(t){this.info("State status:"+t.stateMatch+"; Request type:"+t.requestType),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var e,n=this._getResourceFromState(t.stateResponse);t.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)?(this.infoPii("Error :"+t.parameters.error+"; Error description:"+t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,t.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),t.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,t.parameters.error_description))):t.stateMatch?(this.info("State is right"),t.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,t.parameters[this.CONSTANTS.SESSION_STATE]),t.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(n)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+n+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n,t.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n,this._expiresIn(t.parameters[this.CONSTANTS.EXPIRES_IN]))),t.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(t.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,t.parameters[this.CONSTANTS.ID_TOKEN]),n=this.config.loginResource||this.config.clientId,this._hasResource(n)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+n+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n,t.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(t.parameters.error="invalid id_token",t.parameters.error_description="Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN])))):(t.parameters.error="Invalid_state",t.parameters.error_description="Invalid_state. state: "+t.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+t.stateResponse)),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+n,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},e.prototype.getResourceForEndpoint=function(t){if(this.config&&this.config.anonymousEndpoints)for(var e=0;e<this.config.anonymousEndpoints.length;e++)if(-1<t.indexOf(this.config.anonymousEndpoints[e]))return null;if(this.config&&this.config.endpoints)for(var n in this.config.endpoints)if(-1<t.indexOf(n))return this.config.endpoints[n];return!(-1<t.indexOf("http://")||-1<t.indexOf("https://"))||this._getHostFromUri(t)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null},e.prototype._getHostFromUri=function(t){return String(t).replace(/^(https?:)\/\//,"").split("/")[0]},e.prototype.handleWindowCallback=function(t){if(null==t&&(t=window.location.hash),this.isCallback(t)){var e=null,n=!1;0<this._openedWindows.length&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(e=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,n=!0):window.parent&&window.parent._adalInstance&&(e=window.parent._adalInstance);var o,r=e.getRequestInfo(t),i=null,s=n||window.parent!==window?e._callBackMappedToRenewStates[r.stateResponse]:e.callback;e.info("Returned from redirect url"),e.saveTokenFromHash(r),r.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?e.verbose("Window is in iframe, acquiring token silently"):e.verbose("acquiring token interactive in progress"),o=r.parameters[e.CONSTANTS.ACCESS_TOKEN]||r.parameters[e.CONSTANTS.ID_TOKEN],i=e.CONSTANTS.ACCESS_TOKEN):r.requestType===this.REQUEST_TYPE.LOGIN&&(o=r.parameters[e.CONSTANTS.ID_TOKEN],i=e.CONSTANTS.ID_TOKEN);t=r.parameters[e.CONSTANTS.ERROR_DESCRIPTION],r=r.parameters[e.CONSTANTS.ERROR];try{s&&s(t,o,r,i)}catch(t){e.error("Error occurred in user defined callback function: "+t)}window.parent!==window||n||(e.config.navigateToLoginRequestUrl?window.location.href=e._getItem(e.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},e.prototype._getNavigateUrl=function(t,e){var n="common";this.config.tenant&&(n=this.config.tenant);e=this.instance+n+"/oauth2/authorize"+this._serialize(t,this.config,e)+this._addLibMetadata();return this.info("Navigate url:"+e),e},e.prototype._extractIdToken=function(t){t=this._decodeJwt(t);if(!t)return null;try{var e=t.JWSPayload,n=this._base64DecodeStringUrlSafe(e);return n?JSON.parse(n):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(t){this.error("The returned id_token could not be decoded",t)}return null},e.prototype._base64DecodeStringUrlSafe=function(t){return t=t.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(t))):decodeURIComponent(escape(this._decode(t)))},e.prototype._decode=function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=(t=String(t).replace(/=+$/,"")).length;if(n%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var o,r,i,s,a,l,c,u="",h=0;h<n;h+=4){if(o=e.indexOf(t.charAt(h)),r=e.indexOf(t.charAt(h+1)),i=e.indexOf(t.charAt(h+2)),s=e.indexOf(t.charAt(h+3)),h+2===n-1){l=(a=o<<18|r<<12|i<<6)>>16&255,c=a>>8&255,u+=String.fromCharCode(l,c);break}if(h+1===n-1){l=(a=o<<18|r<<12)>>16&255,u+=String.fromCharCode(l);break}l=(a=o<<18|r<<12|i<<6|s)>>16&255,c=a>>8&255,u+=String.fromCharCode(l,c,255&a)}return u},e.prototype._decodeJwt=function(t){if(this._isEmpty(t))return null;t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);return!t||t.length<4?(this.warn("The returned id_token is not parseable."),null):{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},e.prototype._convertUrlSafeToRegularBase64EncodedString=function(t){return t.replace("-","+").replace("_","/")},e.prototype._serialize=function(t,e,n){var o=[];return null!==e&&(o.push("?response_type="+t),o.push("client_id="+encodeURIComponent(e.clientId)),n&&o.push("resource="+encodeURIComponent(n)),o.push("redirect_uri="+encodeURIComponent(e.redirectUri)),o.push("state="+encodeURIComponent(e.state)),e.hasOwnProperty("slice")&&o.push("slice="+encodeURIComponent(e.slice)),e.hasOwnProperty("extraQueryParameter")&&o.push(e.extraQueryParameter),e=e.correlationId||this._guid(),o.push("client-request-id="+encodeURIComponent(e))),o.join("&")},e.prototype._deserialize=function(t){for(var e=/\+/g,n=/([^&=]+)=([^&]*)/g,o=function(t){return decodeURIComponent(t.replace(e," "))},r={},i=n.exec(t);i;)r[o(i[1])]=o(i[2]),i=n.exec(t);return r},e.prototype._decimalToHex=function(t){for(var e=t.toString(16);e.length<2;)e="0"+e;return e},e.prototype._guid=function(){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues){var e=new Uint8Array(16);return t.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,this._decimalToHex(e[0])+this._decimalToHex(e[1])+this._decimalToHex(e[2])+this._decimalToHex(e[3])+"-"+this._decimalToHex(e[4])+this._decimalToHex(e[5])+"-"+this._decimalToHex(e[6])+this._decimalToHex(e[7])+"-"+this._decimalToHex(e[8])+this._decimalToHex(e[9])+"-"+this._decimalToHex(e[10])+this._decimalToHex(e[11])+this._decimalToHex(e[12])+this._decimalToHex(e[13])+this._decimalToHex(e[14])+this._decimalToHex(e[15])}for(var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",o="0123456789abcdef",r=0,i="",s=0;s<36;s++)"-"!==n[s]&&"4"!==n[s]&&(r=16*Math.random()|0),"x"===n[s]?i+=o[r]:"y"===n[s]?(r&=3,i+=o[r|=8]):i+=n[s];return i},e.prototype._expiresIn=function(t){return t=t||3599,this._now()+parseInt(t,10)},e.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},e.prototype._addAdalFrame=function(t){if(void 0!==t){this.info("Add adal frame to document:"+t);var e,n=document.getElementById(t);return n||(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))?((e=document.createElement("iframe")).setAttribute("id",t),e.setAttribute("aria-hidden","true"),e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height=e.borderWidth="0px",n=document.getElementsByTagName("body")[0].appendChild(e)):document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+t+'" id="'+t+'" style="display:none"></iframe>'),window.frames&&window.frames[t]&&(n=window.frames[t])),n}},e.prototype._saveItem=function(t,e,n){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?(n?(n=this._getItem(t)||"",localStorage.setItem(t,n+e+this.CONSTANTS.CACHE_DELIMETER)):localStorage.setItem(t,e),!0):(this.info("Local storage is not supported"),!1):this._supportsSessionStorage()?(sessionStorage.setItem(t,e),!0):(this.info("Session storage is not supported"),!1)},e.prototype._getItem=function(t){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(t):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(t):(this.info("Session storage is not supported"),null)},e.prototype._supportsLocalStorage=function(){try{return window.localStorage?(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest"))):!1}catch(t){return!1}},e.prototype._supportsSessionStorage=function(){try{return window.sessionStorage?(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest"))):!1}catch(t){return!1}},e.prototype._cloneConfig=function(t){if(null===t||"object"!=typeof t)return t;var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},e.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},e.prototype.log=function(t,e,n,o){var r;t<=Logging.level&&(!Logging.piiLoggingEnabled&&o||(r=(new Date).toUTCString(),o="",o=this.config.correlationId?r+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e:r+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e,n&&(o+="\nstack:\n"+n.stack),Logging.log(o)))},e.prototype.error=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e)},e.prototype.warn=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null)},e.prototype.info=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null)},e.prototype.verbose=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null)},e.prototype.errorPii=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e,!0)},e.prototype.warnPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null,!0)},e.prototype.infoPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null,!0)},e.prototype.verbosePii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null,!0)},e.prototype._libVersion=function(){return"1.0.18"},t.exports&&(t.exports=e,t.exports.inject=function(t){return new e(t)}),e)});dc.inject;function fc(t){this.message=t}(fc.prototype=new Error).name="InvalidCharacterError";var mc="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new fc("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,r=0,i=0,s="";o=e.charAt(i++);~o&&(n=r%4?64*n+o:o,r++%4)&&(s+=String.fromCharCode(255&n>>(-2*r&6))))o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return s};function gc(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(mc(e).replace(/(.)/g,function(t,e){e=e.charCodeAt(0).toString(16).toUpperCase();return"%"+(e=e.length<2?"0"+e:e)}))}catch(t){return mc(e)}}function yc(t){this.message=t}(yc.prototype=new Error).name="InvalidTokenError";function vc(t,e){if("string"!=typeof t)throw new yc("Invalid token specified");e=!0===(e=e||{}).header?0:1;try{return JSON.parse(gc(t.split(".")[e]))}catch(t){throw new yc("Invalid token specified: "+t.message)}}vc.InvalidTokenError=yc;var _c=(bc.prototype.initialize=function(){var o=this;return this.initPromise||(this.initPromise=new Promise(function(t,e){if(o.options.authType===u.AuthenticationType.subscriptionKey)t();else if(o.options.authType===u.AuthenticationType.aad)o.options.authContext=o.options.authContext||bc.getDefaultAuthContext(o.options),o.options.authContext.handleWindowCallback(),o.options.authContext.getLoginError()?e(new Error("Error logging in the AAD users: "+o.options.authContext.getLoginError())):o.options.authContext.isCallback(window.location.hash)?o.map.dispose():setTimeout(function(){return o._loginAndAcquire(t,e)});else if(o.options.authType===u.AuthenticationType.anonymous)t(o._triggerTokenFetch(!0));else if(o.options.authType===u.AuthenticationType.sas){if(o.options.sasToken){var n=-1;try{n=o._getTokenExpiry(o.options.sasToken)}catch(t){return void e(new Error("An invalid sasToken was provided."))}if(n>bc.constants.tokenRefreshClockSkew)return o._storeToken(o.options.sasToken),o._setTimeoutTokenFetch(n-bc.constants.tokenRefreshClockSkew),void t()}t(o._triggerTokenFetch())}else e(new Error("An invalid authentication type was specified."))})),this.initPromise},bc.getDefaultAuthContext=function(t){if(!t.aadAppId)throw new Error("No AAD app ID was specified.");if(!t.aadTenant)throw new Error("No AAD tenant was specified.");return this.defaultAuthContext||(this.defaultAuthContext=new dc({instance:t.aadInstance||i,tenant:t.aadTenant,clientId:t.aadAppId,cacheLocation:this.constants.preferredCacheLocation})),this.defaultAuthContext},bc.prototype._loginAndAcquire=function(e,n){function t(){r.options.authContext.acquireToken(C,function(t){t?n(new Error(t)):(t={map:r.map,type:bc.constants.events.tokenAcquired},r.map.events.invoke(bc.constants.events.tokenAcquired,t),e())})}var o,r=this,i=this.options.authContext.getCachedToken(this.options.aadAppId),s=this.options.authContext.getCachedUser();i&&s?t():(this.options.authContext.loginInProgress()||this.options.authContext.login(),o=setInterval(function(){r.options.authContext.loginInProgress()||(clearInterval(o),r.options.authContext.getCachedToken(r.options.aadAppId)?t():n(new Error(r.options.authContext.getLoginError()||"The AAD authentication context is not logged-in for the specified app ID: "+r.options.aadAppId)))},25))},bc.prototype.getAuthType=function(){return this.options.authType},bc.prototype.getClientId=function(){return this.options.clientId},bc.prototype.getToken=function(){var n=this;if(this.options.authType===u.AuthenticationType.aad){var o=this.options.authContext.getCachedToken(C);return o||(this.options.authContext.getCachedUser()||this.options.authContext.login(),this.options.authContext.acquireToken(C,function(t,e){t||(o=e,e={map:n.map,type:bc.constants.events.tokenAcquired},n.map.events.invoke(bc.constants.events.tokenAcquired,e))})),o}if(this.options.authType===u.AuthenticationType.anonymous||this.options.authType===u.AuthenticationType.sas){var t=this._getItem(bc.constants.storage.tokenKey);if(t){var e=this._getTokenExpiry(t);if(e<300&&0<e)this._triggerTokenFetch();else if(e<=0)throw this._saveItem(bc.constants.storage.tokenKey,""),new Error(bc.constants.errors.tokenExpired)}else this._triggerTokenFetch();return t}if(this.options.authType===u.AuthenticationType.subscriptionKey)return this.options.subscriptionKey},bc.prototype._getTokenExpiry=function(t){var e=vc(t).exp,t=this._getCurrentTime();return 0<e-t?e-t:-1},bc.prototype._storeToken=function(t){this._saveItem(bc.constants.storage.tokenKey,t);t={map:this.map,type:bc.constants.events.tokenAcquired};this.map.events.invoke(bc.constants.events.tokenAcquired,t)},bc.prototype._saveItem=function(t,e){return this._supportsLocalStorage()?localStorage.setItem(t,e):this._supportsSessionStorage()?sessionStorage.setItem(t,e):this.fallbackStorage[t]=e,!0},bc.prototype._getItem=function(t){return this._supportsLocalStorage()?localStorage.getItem(t):this._supportsSessionStorage()?sessionStorage.getItem(t):t in this.fallbackStorage?this.fallbackStorage[t]:null},bc.prototype._supportsLocalStorage=function(){try{return window.localStorage?(window.localStorage.setItem(bc.constants.storage.testStorageKey,"A"),"A"===window.localStorage.getItem(bc.constants.storage.testStorageKey)&&(window.localStorage.removeItem(bc.constants.storage.testStorageKey),!window.localStorage.getItem(bc.constants.storage.testStorageKey))):!1}catch(t){return!1}},bc.prototype._supportsSessionStorage=function(){try{return window.sessionStorage?(window.sessionStorage.setItem(bc.constants.storage.testStorageKey,"A"),"A"===window.sessionStorage.getItem(bc.constants.storage.testStorageKey)&&(window.sessionStorage.removeItem(bc.constants.storage.testStorageKey),!window.sessionStorage.getItem(bc.constants.storage.testStorageKey))):!1}catch(t){return!1}},bc.prototype._getCurrentTime=function(){return Math.round((new Date).getTime()/1e3)},bc.prototype.signRequest=function(t){t.headers=t.headers||{},t.headers[k]=this.sessionId,t.headers[T]=E,t.headers[S]="MapControl/"+G+" (Web)";var e=this.getToken();switch(this.options.authType){case u.AuthenticationType.aad:case u.AuthenticationType.anonymous:t.headers[x]=this.options.clientId,t.headers[s]=a+e;break;case u.AuthenticationType.sas:t.headers[s]=c+e;break;case u.AuthenticationType.subscriptionKey:t.headers["subscription-key"]=e;break;default:throw new Error("An invalid authentication type was specified")}return t},bc.constants={preferredCacheLocation:"localStorage",storage:{tokenKey:"access.token.key",testStorageKey:"testStorage"},events:{tokenAcquired:"tokenacquired"},tokenExpiresIn:3599,tokenRefreshClockSkew:300,errors:{tokenExpired:"Token Expired, Try again"}},bc);function bc(t){var r=this;this.fallbackStorage={},this._triggerTokenFetch=function(t){return void 0===t&&(t=!1),new Promise(function(n,o){"function"==typeof r.options.getToken?r.options.getToken(function(t){try{var e=r._getTokenExpiry(t)-bc.constants.tokenRefreshClockSkew;r._storeToken(t),r._setTimeoutTokenFetch(e),n()}catch(t){o(new Error("Invalid token returned by getToken function"))}},function(t){o(t)},r.map):o(new Error("Token cannot be "+(t?"fetched":"renewed")+" because getToken was not set or is not a function."))})},this._setTimeoutTokenFetch=function(t){clearTimeout(r.tokenTimeOutHandle),r.tokenTimeOutHandle=setTimeout(r._triggerTokenFetch,Math.min(1e3*t,2147483647))};var e=t.getServiceOptions();this.options=e.authOptions,this.sessionId=e.sessionId,this.map=t}var wc=(Sc.prototype.add=function(t,e){var n,o;if(Array.isArray(t))try{for(var r=R(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._add(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._add(t,e)},Sc.prototype.getControls=function(){return Array.from(this.controls)},Sc.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=R(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._remove(t)},Sc.prototype._add=function(t,e){this.controls.add(t);var n=(new Y).merge(e),t=t.onAdd(this.map,e),e=this.controlContainer.getElementsByClassName(n.position);if(!(0<e.length))throw new Error("Control position "+n.position+" does not exist.");e.item(0).appendChild(t)},Sc.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},Sc);function Sc(t){for(var e in this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),u.ControlPosition){var n;u.ControlPosition.hasOwnProperty(e)&&((n=document.createElement("div")).classList.add(u.ControlPosition[e]),n.classList.add("subcontrol-container"),this.controlContainer.appendChild(n))}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}var xc=(Tc.prototype.addCallback=function(s,a,l,t,c){var e,u,h=this;if(t)e=function(t){var e=t.lngLat?new ei(t.lngLat.lng,t.lngLat.lat):void 0,n=t.point?[t.point.x,t.point.y]:void 0,o=t.features?t.features.map(function(t){return new Wo(t.geometry,t.properties,t.id)}):[],o={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:n,features:o};l(o)};else switch(s){case"data":case"sourcedata":case"styledata":e=function(t){t=L(L({dataType:t.dataType},"source"===t.dataType&&L(L(L({isSourceLoaded:t.isSourceLoaded},t.sourceDataType&&{sourceDataType:t.sourceDataType}),{source:h.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:h.map,type:t.type});c&&h.map.events._removeListener(s,a,l),l(t)};break;case"error":e=function(t){t={error:t.error,map:h.map,type:t.type};c&&h.map.events._removeListener(s,a,l),l(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 Qo(t.point.x,t.point.y):void 0,n=t.points?t.points.map(function(t){return new Qo(t.x,t.y)}):[],o=t.lngLat?new ei(t.lngLat.lng,t.lngLat.lat):void 0,r=t.lngLats?t.lngLats.map(function(t){return new ei(t.lng,t.lat)}):[],i=o?h.map.layers.getRenderedShapes(new Xo(o),a?[a]:void 0):[],i={map:h.map,originalEvent:t.originalEvent,pixel:e,pixels:n,position:o,positions:r,shapes:i,layerId:a||void 0,preventDefault:function(){return t.preventDefault()},type:t.type};c&&h.map.events._removeListener(s,a,l),l(i)};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 ei(t.lngLat.lng,t.lngLat.lat):void 0,n=t.point?new Qo(t.point.x,t.point.y):void 0,o=e?h.map.layers.getRenderedShapes(new Xo(e),a?[a]:void 0):[],o={map:h.map,originalEvent:t.originalEvent,position:e,pixel:n,preventDefault:function(){return t.preventDefault()},shapes:o,layerId:a||void 0,type:t.type};c&&h.map.events._removeListener(s,a,l),l(o)};break;case"styleimagemissing":e=function(t){c&&h.map.events._removeListener(s,a,l),l(t.id)};break;case"wheel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e={map:h.map,originalEvent:t.originalEvent,preventDefault:function(){return t.preventDefault()},type:t.type};c&&h.map.events._removeListener(s,a,l),l(e)};break;case"resize":e=function(t){var e,n={map:h.map,type:t.type};for(e in t)"type"!==e&&"target"!==e&&(n[e]=t[e]);c&&h.map.events._removeListener(s,a,l),l(n)};break;default:e=function(t){var e={map:h.map,type:t.type};t.originalEvent&&(e.originalEvent=t.originalEvent),c&&h.map.events._removeListener(s,a,l),l(e)}}this.callbacks.has(a)||this.callbacks.set(a,new $),this.callbacks.get(a).has(s)||this.callbacks.get(a).set(s,new Map),this.callbacks.get(a).get(s).set(l,[e,c])},Tc.prototype.removeCallback=function(t,e,n){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(n)&&this.callbacks.get(e).get(t).delete(n)},Tc.prototype.getModifiedCallback=function(t,e,n){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(n))return this.callbacks.get(e).get(t).get(n)[0]},Tc.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},Tc.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){e=this.callbacks.get(e);if(e.has(t))return e.get(t)}},Tc);function Tc(t){this.callbacks=new $,this.map=t}var Ec=(Cc.prototype.add=function(t,e,n){var o,r;if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else{e=Array.isArray(e)?e:[e];try{for(var i=R(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof Hi&&Hi._isMBoxEvent(t)?this._addLayerListener(t,a,n,!1,!1):a._addEventListener(t,n,!1)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}}},Cc.prototype.addOnce=function(t,e,n){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof Hi&&Hi._isMBoxEvent(t)?this._addLayerListener(t,e,n,!1,!0):e._addEventListener(t,n,!0)},Cc.prototype._addLegacy=function(t,e,n){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,n,!0,!1)},Cc.prototype._addLayerListener=function(t,e,n,o,r){var i,s,a,l,c=e instanceof Hi?e.getId():e,e=this.map.layers.getLayerById(c),u=this.mapCallbackHandler.getModifiedCallback(t,c,n);if(u&&e)try{for(var h=R(e._getLayerIds()),p=h.next();!p.done;p=h.next()){var d=p.value;this.map._getMap().off(t,d,u)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}if(this.mapCallbackHandler.addCallback(t,c,n,o,r),e){u=this.mapCallbackHandler.getModifiedCallback(t,c,n);try{for(var f=R(e._getLayerIds()),m=f.next();!m.done;m=f.next()){d=m.value;this.map._getMap().on(t,d,u)}}catch(t){a={error:t}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}}},Cc.prototype._addGlobalListener=function(t,e,n,o){var r=this.mapCallbackHandler.getModifiedCallback(t,"",e);this.mapCallbackHandler.addCallback(t,"",e,n,o);var i,s,a=this.mapCallbackHandler.getModifiedCallback(t,"",e);"load"===t&&this.map._isLoaded()?(i={type:"load",map:this.map},setTimeout(function(){return a(i)})):"ready"===t?this.map._isReady()&&(s={type:"ready",map:this.map},setTimeout(function(){return a(s)})):["minzoomchanged","maxzoomchanged","stylesetchanged"].includes(t)?this.map._addEventListener(t,e,o):(r&&this.map._getMap().off(t,r),this.map._getMap().on(t,a))},Cc.prototype.invoke=function(t,e,n){if(void 0===n)this._invokeListeners(t,"",e);else if(e instanceof Hi&&Hi._isMBoxEvent(t))this._invokeListeners(t,e.getId(),n);else{if(!(e instanceof tt))throw new Error("The invoke target is invalid.");e._invokeEvent(t,n)}},Cc.prototype._invokeListeners=function(n,o,r){var i=this,t=new $(this.mapCallbackHandler.getEventCallbacks(n,o));t?t.forEach(function(t,e){t=N(t,2),t[0];t[1]&&i._removeListener(n,o,e),e(r)}):"error"===n&&console.error("error"in r?r.error:r)},Cc.prototype.remove=function(t,e,n){var o,r;if("function"==typeof e)this._removeListener(t,"",e);else{e=Array.isArray(e)?e:[e];try{for(var i=R(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof Hi&&Hi._isMBoxEvent(t)?this._removeListener(t,a,n):a._removeEventListener(t,n)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}}},Cc.prototype._removeLegacy=function(t,e,n){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,n)},Cc.prototype._removeListener=function(t,e,n){var o,r,i=e instanceof Hi?e.getId():e,s=this.mapCallbackHandler.getModifiedCallback(t,i,n);if(s)if(i){e=this.map.layers.getLayerById(i);if(e)try{for(var a=R(e._getLayerIds()),l=a.next();!l.done;l=a.next()){var c=l.value;this.map._getMap().off(t,c,s)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}}else this.map._getMap().off(t,s);this.mapCallbackHandler.removeCallback(t,i,n)},Cc.prototype._enableLayerEvents=function(l){var c=this,t=this.mapCallbackHandler.getLayerCallbacks(l.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,n,o=N(t,1)[0];try{for(var r=R(l._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;c.map._getMap().on(a,s,o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}})})},Cc.prototype._disableLayerEvents=function(l){var c=this,t=this.mapCallbackHandler.getLayerCallbacks(l.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,n,o=N(t,1)[0];try{for(var r=R(l._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;c.map._getMap().off(a,s,o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}})})},Cc);function Cc(t){this.map=t,this.mapCallbackHandler=new xc(this.map)}var kc=(Oc.prototype.add=function(t,e){var n,o;if(Array.isArray(t))try{for(var r=R(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addMarker(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._addMarker(t,e)},Oc.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},Oc.prototype.getMarkers=function(){return Array.from(this.markers)},Oc.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=R(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeMarker(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._removeMarker(t)},Oc.prototype._removeMarker=function(e){var n=this;e instanceof ua?(e._removeFromMap(),this.markers.delete(e)):this.markers.forEach(function(t){t._getId()===e&&(t._removeFromMap(),n.markers.delete(t))})},Oc.prototype.clear=function(){var e=this;this.markers.forEach(function(t){t._removeFromMap(),e.markers.delete(t)})},Oc);function Oc(t){this.markers=new Set,this.map=t}var Ic=(Lc.prototype.add=function(s,e,a){var l=this;return new Promise(function(n,o){var r,t,i;l.userImages.has(s)?n():e instanceof HTMLImageElement||e instanceof ImageData?(l.map._getMap().addImage(s,e,a),l.userImages.set(s,{image:e,meta:a}),n()):"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,l.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(){l.map._getMap().addImage(s,e,a),l.userImages.set(s,{image:e,meta:a}),n()},e.onerror=e.onabort=function(){o("Failed to load image into HTML element.")},e.src=URL.createObjectURL(t))}).catch(function(){i||(clearTimeout(r),o("Failed to load image into HTML element."))}),r=setTimeout(function(){i=!0,o("Failed to load image within specified timeout: "+l.imageLoadTimeout+" ms.")},l.imageLoadTimeout))})},Lc.prototype.clear=function(){var n=this;this.userImages.forEach(function(t,e){n.map._getMap().removeImage(e)}),this.userImages.clear()},Lc.prototype.getImageIds=function(){var n=[];return this.userImages.forEach(function(t,e){n.push(e)}),n},Lc.prototype.createFromTemplate=function(t,e,n,o,r){n=n||"#1A73AA",o=o||"#fff";r=(r=cl(e,r)).replace(/{color}/g,n).replace(/{secondaryColor}/g,o).replace(/{text}/g,"");return this.add(t,r)},Lc.prototype.hasImage=function(t){return this.userImages.has(t)},Lc.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},Lc.prototype._restoreImages=function(){var n=this;this.userImages.forEach(function(t,e){n.map._getMap().hasImage(e)||n.map._getMap().addImage(e,t.image,t.meta)})},Lc);function Lc(t){this.userImages=new $,this.imageLoadTimeout=5e3,this.map=t}var Ac,Pc=(I(Rc,Ac=Hi),Rc.prototype._buildLayers=function(){return this.layers},Rc.prototype._getLayerIds=function(){return this.layers.map(function(t){return t.id})},Rc.prototype._getSourceIds=function(){var e,t,n=new Set;try{for(var o=R(this.layers),r=o.next();!r.done;r=o.next()){var i=r.value;"string"==typeof i.source?n.add(i.source):i.source&&n.add(i.id)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},Rc.prototype._updateLayoutProperty=function(e,n,o,r){var i=this;this.layers.forEach(function(t){Zo(n,o)||i.map._getMap().setLayoutProperty(t.id,e,r||n)})},Rc);function Rc(t,e){e=Ac.call(this,e)||this;return e.layers=t,e}var Nc=(Mc.prototype.add=function(t,e){var n,o,r=e instanceof Hi?e.getId():e;if(Array.isArray(t))try{for(var i=R(t),s=i.next();!s.done;s=i.next()){var a=s.value;this._addLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}else this._addLayer(t,r)},Mc.prototype._addLayer=function(e,n){if(!(this.map._isReady()||e instanceof Pc))throw new Error("The layer '"+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,o,r;n!==e.getId()&&this.layerIndex.find(function(t){return n===t.getId()})?this._getMapboxLayerExists(e)?(o=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.layerIndex[o],this._removeMapboxLayers(e),this._addMapboxLayers(e,n),this.map.events._disableLayerEvents(r),this.map.events._enableLayerEvents(e),this.layerIndex.splice(o,1),t=this.layerIndex.findIndex(function(t){return t.getId()===n}),this.layerIndex.splice(t,0,e),e instanceof Pc||this.userLayers.push({layer:e,before:n}),r.onRemove()):(this._addMapboxLayers(e,n),this.map.events._enableLayerEvents(e),t=this.layerIndex.findIndex(function(t){return t.getId()===n}),this.layerIndex.splice(t,0,e),e instanceof Pc||this.userLayers.push({layer:e,before:n})):0<=(o=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}))?(r=this.layerIndex[o],this._removeMapboxLayers(r),this._addMapboxLayers(e,o+1),this.map.events._disableLayerEvents(r),this.map.events._enableLayerEvents(e),this.layerIndex[o]=e,r.onRemove()):(this._addMapboxLayers(e),this.map.events._enableLayerEvents(e),this.layerIndex.push(e),e instanceof Pc||this.userLayers.push({layer:e,before:n})),e.onAdd(this.map)},Mc.prototype._addMapboxLayers=function(t,e){var n,o;if(!(t instanceof Ys)||t.getOptions().tileUrl)if(t instanceof Pc)this.map.events._enableLayerEvents(t);else{t instanceof ps&&this.map._getMap().addSource(t._getSourceId(),t._buildSource());var r=this._getMapboxBefore(e);try{for(var i=R(t._buildLayers()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().addLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}this.map.events._enableLayerEvents(t)}},Mc.prototype._removeMapboxLayers=function(t,e){var n,o;if(t instanceof Pc&&!e)this.map.events._disableLayerEvents(t);else{try{for(var r=R(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){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}this.map.events._disableLayerEvents(t),t instanceof ps&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())}},Mc.prototype._getMapboxLayerExists=function(e){var n=this,o=!1;return"string"==typeof e?!!(e=this.layerIndex.find(function(t){return t.getId()===e})):(e._getLayerIds().forEach(function(t){n.map._getMap().getLayer(t)&&(o=!0)}),o)},Mc.prototype._getMapboxBefore=function(e){var n,t,o,r;if("string"==typeof e){var i=this.layerIndex.find(function(t){return t.getId()===e});if(!i)return;try{for(var s=R(i._getLayerIds()),a=s.next();!a.done;a=s.next()){var l=a.value;if(this.map._getMap().getLayer(l))return l}}catch(t){n={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(n)throw n.error}}e=this.layerIndex.findIndex(function(t){return t.getId()===e})+1}for(var c=e;c<this.layerIndex.length;c++)try{for(var u=(o=void 0,R(this.layerIndex[c]._getLayerIds())),h=u.next();!h.done;h=u.next()){l=h.value;if(this.map._getMap().getLayer(l))return l}}catch(t){o={error:t}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}},Mc.prototype.clear=function(){for(var t=this.layerIndex.length-1;0<=t;t--){var e=this.layerIndex[t];this._removeMapboxLayers(e,!0),this.layerIndex.splice(t,1),e.onRemove()}this.userLayers=[]},Mc.prototype.getLayerById=function(e){var t=this.layerIndex.find(function(t){return t.getId()===e});if(t)return t},Mc.prototype.getLayers=function(){return this.layerIndex.slice(0)},Mc.prototype._getSourceIds=function(){var e,t,n=new Set;try{for(var o=R(this.layerIndex),r=o.next();!r.done;r=o.next())r.value._getSourceIds().forEach(function(t){return n.add(t)})}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},Mc.prototype._getUserLayers=function(){return Array.from(this.userLayers)},Mc.prototype.move=function(t,e){var n=t instanceof Hi?t.getId():t,o=e instanceof Hi?e.getId():e;if(!this.layerIndex.find(function(t){return t.getId()===n}))throw new Error("The layer '"+n+"' has not been added to the map and cannot be moved.");e=this.layerIndex.findIndex(function(t){return t.getId()===n});this._moveMapboxLayers(this.layerIndex[e],o),t=this.layerIndex[e],this.layerIndex.splice(e,1);e=this.layerIndex.findIndex(function(t){return t.getId()===o});-1<e?this.layerIndex.splice(e,0,t):this.layerIndex.push(t)},Mc.prototype._moveMapboxLayers=function(t,e){var n,o,r=this._getMapboxBefore(e);try{for(var i=R(t._getLayerIds()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().moveLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},Mc.prototype.getRenderedShapes=function(t,e,n){var o,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([ci.getSouthWest(t),ci.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=[],l=this;try{for(var c=R(e),u=c.next();!u.done;u=c.next())!function(t){var e=t instanceof Hi?t.getId():t,t=l.layerIndex.findIndex(function(t){return t.getId()===e});if(!(-1<t))throw new Error("The layer '"+e+"' has not been added to the map and its rendered features cannot be retrieved.");a.push.apply(a,M(l.layerIndex[t]._getLayerIds().filter(function(t){return!!s.map._getMap().getLayer(t)})))}(u.value)}catch(t){o={error:t}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(o)throw o.error}}}n=this.map._getMap().queryRenderedFeatures(i,{layers:a,filter:n});return this.map.sources._mapFeaturesToShapes(n)},Mc.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=R(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeLayer(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._removeLayer(t)},Mc.prototype._removeLayer=function(t){var e=t instanceof Hi?t.getId():t;if(!this.layerIndex.find(function(t){return t.getId()===e}))throw new Error("The layer '"+e+"' has not been added to the map and cannot be removed.");var t=this.layerIndex.findIndex(function(t){return t.getId()===e}),n=this.layerIndex[t];this._removeMapboxLayers(n),this.layerIndex.splice(t,1);t=this.userLayers.findIndex(function(t){return t.layer.getId()===n.getId()});0<=t&&this.userLayers.splice(t,1),n.onRemove()},Mc);function Mc(t){this.layerIndex=[],this.userLayers=[],this.map=t}var Dc=(zc.prototype.add=function(t){var e,n;t=Array.isArray(t)?t:[t];try{for(var o=R(t),r=o.next();!r.done;r=o.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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},zc.prototype.clear=function(){var e=this;this.popups.forEach(function(t){e.popups.delete(t),t.remove()})},zc.prototype.remove=function(t){var e,n;t=Array.isArray(t)?t:[t];try{for(var o=R(t),r=o.next();!r.done;r=o.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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},zc.prototype.getPopups=function(){return Array.from(this.popups)},zc.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector("."+zc.Css.collection);return t||((t=document.createElement("div")).classList.add(zc.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},zc.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)},zc.Css={collection:"popup-collection-container"},zc);function zc(t){var o=this;this._onDrag=function(t){var e,n;"mousemove"===t.type?(e=t.clientX,n=t.clientY):"touchmove"===t.type&&(e=t.touches[0].clientX,n=t.touches[0].clientY),o.draggedPopups.forEach(function(t){t._dragToPixel([e,n])})},this._onUp=function(){o.map.getMapContainer().removeEventListener("mousemove",o._onDrag),o.map.getMapContainer().removeEventListener("touchmove",o._onDrag),o.map.getMapContainer().removeEventListener("mouseup",o._onUp),o.map.getMapContainer().removeEventListener("touchend",o._onUp),o.draggedPopups.forEach(function(t){o.draggedPopups.delete(t),t._onUp()})},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var Bc,jc=(I(Fc,Bc=Ri),Fc.prototype._buildSource=function(){return this.source},Fc.prototype._modifySource=function(t,e){if(t.tiles){var n=t.tiles.map(function(t){return"string"==typeof t?t:new U({domain:p,path:t.path,queryParams:L(L({},e),t.queryParams)}).toString()});t.tiles=n}else{if(!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 U({domain:p,path:t.url.path,queryParams:L(L({},e),t.url.queryParams)}).toString()}return t},Fc);function Fc(t,e,n){t=Bc.call(this,t)||this;return t.source=t._modifySource(e,n),t}var Uc=(qc.prototype.add=function(t,e){var n,o;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=R(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addSource(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._addSource(t,e)},qc.prototype.getRenderedShapes=function(t,e,n){t="string"==typeof t?t:t.getId(),e=this.map._getMap().querySourceFeatures(t,{sourceLayer:n,filter:e});return this.map.sources._mapFeaturesToShapes(e,!0,this.sources.get(t))},qc.prototype._buildSources=function(){var e={};return this.sources.forEach(function(t){e[t.getId()]=t._buildSource()}),e},qc.prototype.clear=function(){var e=this;this.sources.forEach(function(t){e.remove(t)})},qc.prototype.getById=function(t){return this.sources.get(t)},qc.prototype.getSources=function(){return Array.from(this.sources.values())},qc.prototype.isSourceLoaded=function(t){t=t instanceof Ri?t.getId():t;return this.map._getMap().isSourceLoaded(t)},qc.prototype.remove=function(t,e){var n,o;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=R(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._removeSource(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._removeSource(t,e)},qc.prototype._removeSource=function(t,e){t=t instanceof Ri?t.getId():t;if(this.sources.has(t)){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 '"+t+"'");return this.sources.get(t)._setMap(null),void this.sources.delete(t)}throw new Error("'"+t+"' is not added to the map")},qc.prototype._addSource=function(t,e){if(this.sources.has(t.getId())){if(e)throw new Error("'"+t.getId()+"' is already added to the map");this.sources.get(t.getId())._setMap(null),this.sources.delete(t.getId())}if(e){if(!this.map._isReady())throw new Error("The source '"+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.sources.set(t.getId(),t),t._setMap(this.map)},qc.prototype._mapFeaturesToShapes=function(t,e,n){var o,r,i=[];try{for(var s=R(t),a=s.next();!a.done;a=s.next()){var l=a.value;if((n||"string"==typeof l.source)&&"string"==typeof l.properties[si._shapeIdPropName]){var c=n||this.sources.get(l.source);if(c instanceof Di){var u=c.getShapeById(l.properties[si._shapeIdPropName]);if(u instanceof si){i.push(u);continue}}}e||i.push(l)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i},qc.prototype._syncSources=function(o){var r=this;o&&(Object.keys(o).forEach(function(t){if(!r.sources.has(t)){var e=o[t];if("vector"===e.type){var n=new jc(t,{name:t,tiles:e.tiles,type:"vector",url:e.url});r.sources.set(t,n),n._setMap(r.map)}else{if("raster"!==e.type)throw new Error("Unable to construct source with ID "+t+".");n=new jc(t,{name:t,tiles:e.tiles,type:"raster",url:e.url});r.sources.set(t,n),n._setMap(r.map)}}}),Object.keys(this.sources).forEach(function(t){o.hasOwnProperty(t)||(r.sources.get(t)._setMap(null),r.sources.delete(t))}))},qc);function qc(t){this.map=t,this.sources=new $}var Gc,Zc=(I(Hc,Gc=D),Hc);function Hc(){var t=null!==Gc&&Gc.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}var Kc,Wc=(I(Vc,Kc=D),Vc);function Vc(){var t=null!==Kc&&Kc.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var Yc,Qc=(I(Jc,Yc=D),Jc.prototype.merge=function(){for(var e,t,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];try{for(var r=R(n),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 Yc.prototype.merge.apply(this,M(n))},Jc);function Jc(){var t=null!==Yc&&Yc.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new Qo(0,0),t.padding=new Wc,t}var Xc,$c=(I(tu,Xc=D),tu);function tu(){var t=null!==Xc&&Xc.apply(this,arguments)||this;return t.zoom=1,t.center=new ei(0,0),t.centerOffset=new Qo(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.maxBounds=void 0,t}var eu,w=(I(nu,eu=D),nu);function nu(){var t=null!==eu&&eu.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}var ou,ru=(I(iu,ou=w),iu);function iu(){var t=null!==ou&&ou.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}var su,au=(I(lu,su=w),lu);function lu(){var t=null!==su&&su.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}var cu,uu=(I(hu,cu=w),hu);function hu(){var t=null!==cu&&cu.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}var pu,du=(I(fu,pu=w),fu);function fu(){var t=null!==pu&&pu.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}var mu,gu=(I(yu,mu=w),yu);function yu(){var t=null!==mu&&mu.apply(this,arguments)||this;return t.name="default-raster",t}var vu,_u=(I(bu,vu=D),bu);function bu(){var t=null!==vu&&vu.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var wu,Su=(I(xu,wu=D),xu.prototype.merge=function(){for(var e,t,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];try{for(var r=R(n),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=ga.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 wu.prototype.merge.apply(this,M(n))},xu);function xu(){var t=null!==wu&&wu.apply(this,arguments)||this;return t.autoResize=!0,t.language=Ta,t.light=new _u,t.preserveDrawingBuffer=!1,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=wa,t.userRegion=t.view,t}function Tu(t){return 0==t.length?void 0:t.slice(1).reduce(function(n,o){return function(t,e){t=n(t,e);return L(L({},t),o(t.url,e))}},t[0])}var Eu,Cu=(I(ku,Eu=D),ku.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{for(var n=R(t),o=n.next();!o.done;o=n.next()){var r=o.value;r&&(r.authOptions?"string"==typeof r.authOptions.subscriptionKey&&(r.subscriptionKey=r["subscription-key"]=r.authOptions.subscriptionKey):"string"==typeof r.subscriptionKey?(r["subscription-key"]=r.subscriptionKey,r.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:r.subscriptionKey}):"string"==typeof r["subscription-key"]&&(r.subscriptionKey=r["subscription-key"],r.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:r["subscription-key"]}),"string"==typeof r.sessionId?r["session-id"]=r.sessionId:"string"==typeof r["session-id"]&&(r.sessionId=r["session-id"]),"boolean"==typeof r.disableTelemetry?r["disable-telemetry"]=r.disableTelemetry:"boolean"==typeof r["disable-telemetry"]&&(r.disableTelemetry=r["disable-telemetry"]),"boolean"==typeof r.enableAccessibility?r["enable-accessibility"]=r.enableAccessibility:"boolean"==typeof r["enable-accessibility"]&&(r.enableAccessibility=r["enable-accessibility"]))}}catch(t){a={error:t}}finally{try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}var i=this._transformers,s=t?t.filter(function(t){return void 0!==t}).reduce(function(t,e){return M(t,e._transformers||[])},[]):[],a=Eu.prototype.merge.apply(this,M(t));return a.authOptions.authType!==u.AuthenticationType.subscriptionKey&&(a["subscription-key"]=a.subscriptionKey=void 0),this._transformers=M(i||[],s.filter(function(t){return!i.includes(t)})),this.transformRequest&&!this._transformers.includes(this.transformRequest)&&this._transformers.push(this.transformRequest),this.transformRequest=Tu(this._transformers),a},ku.prototype.addTransformer=function(t){this._transformers||(this._transformers=[]),this._transformers.push(t),this.transformRequest=Tu(this._transformers)},ku.prototype.removeTransformer=function(e){this._transformers&&(this._transformers=this._transformers.filter(function(t){return e!==t}),this.transformRequest=Tu(this._transformers))},ku._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},ku);function ku(){var t=null!==Eu&&Eu.apply(this,arguments)||this;return t.authOptions=Ua(),t.disableTelemetry=!1,t["disable-telemetry"]=t.disableTelemetry,t.domain=Ca,t.staticAssetsDomain=ka,t.styleDefinitionsPath=Oa,t.styleDefinitionsVersion=Ia,t.styleAPIVersion=La,t.styleSet=void 0,t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.enableAccessibilityLocationFallback=!0,t.maxParallelImageRequests=Va(),t.refreshExpiredTiles=!0,t.subscriptionKey=Ja(),t["subscription-key"]=t.subscriptionKey,t.sessionId=Ea,t["session-id"]=t.sessionId,t._transformers=[],t.transformRequest=void 0,t.workerCount=Wa(),t.fadeDuration=300,t.localIdeographFontFamily="sans-serif",t.validateStyle=!0,t}var Ou=(Iu.getLayerGroup=function(t){var e;if(null!=t&&t.metadata&&t.metadata["microsoft.maps:layerGroup"])return t.metadata["microsoft.maps:layerGroup"];t=null!==(e=null==t?void 0:t.id)&&void 0!==e?e:t;if(t.startsWith("microsoft.")){t=t.split(".");return 4<=t.length?t[3]:void 0}},Iu);function Iu(){}var Lu=(Au.resolve=function(t){return new Au(Promise.resolve(t))},Au.reject=function(t){return new Au(Promise.reject(t))},Au.prototype.then=function(t,e){var n=this;return new Promise(function(t,e){n._resolve=t,n._reject=e,n._thenResolver(t,e)}).then(t,e)},Au.prototype.catch=function(t){var n=this;return new Promise(function(t,e){n._resolve=t,n._reject=e,n._thenResolver(t,e)}).catch(t)},Au.prototype.finally=function(t){var n=this;return new Promise(function(t,e){n._resolve=t,n._reject=e,n._thenResolver(t,e)}).finally(t)},Au.prototype.hijackAndResolve=function(t){this._hijackedToResolve=t,this._resolve&&this._resolve(t)},Au.prototype.hijackAndReject=function(t){this._hijackedToReject=t,this._reject&&this._reject(t)},Au.prototype.switchWith=function(t){this.origin=t,this._toResolve=void 0,this._toReject=void 0},Au);function Au(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,n){var o;r._hijackedToResolve?e(r._hijackedToResolve):r._hijackedToReject?n(r._hijackedToReject):(o=r.origin,r.origin.then(function(t){r.isHijacked()||(o!==r.origin?r._thenResolver(e,n):(r._toResolve=t,e(t)))}).catch(function(t){r.isHijacked()||(o!==r.origin?r._thenResolver(e,n):(r._toReject=t,n(t)))}))},this.origin=t,this[Symbol.toStringTag]=this.origin[Symbol.toStringTag]}var Pu={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)"},Ru=(Nu.prototype.updateIndoorState=function(t,e){var n,o,r=this,i=this.map.styles.getMapConfiguration();i?(this.preservedPreindoorStyleset=i,n=this.map.getStyle().style?this.map.getStyle().style+"_indoor"+("dark"===t?"_dark":"")+"_tileset_"+e:void 0,this.map.styles.setMapConfiguration("defaultIndoor_"+e,"microsoft-maps:default"===i?n:void 0)):(o=(null===(n=this.indoorState)||void 0===n?void 0:n.tilesetId)!==e,this.indoorState={tilesetId:e,theme:t},this.initStyleset(),this.definitions().then(function(t){var e=(r.map.getStyle().style||t.defaultStyle).replace("_indoor_dark","").replace("_indoor","")+"_indoor",t=t.styles.find(function(t){return t.name.startsWith(e)});t&&r.map.setStyle({style:t.name},!o)}))},Nu.prototype.unsetIndoorState=function(){var n=this,t=this.preservedPreindoorStyleset;t?this.map.styles.setMapConfiguration(t):(this.indoorState=void 0,this.initStyleset(),this.definitions().then(function(t){var e=n.map.getStyle().style;e.includes("_indoor")&&e.split("_indoor")[0]?n.map.setStyle({style:e.split("_indoor")[0]}):n.map.setStyle({style:void 0})}))},Nu.prototype.initStyleset=function(){var e=this,t=this.serviceOptions.styleSet?"string"==typeof this.serviceOptions.styleSet?new Lu(this._request(this.serviceOptions.domain,b+"/mapconfigurations/metadata/"+this.serviceOptions.styleSet,"StyleDefinitions")):Lu.resolve(this.serviceOptions.styleSet):new Lu(this._request(this.serviceOptions.staticAssetsDomain,v+"/"+b,"StyleDefinitions",{version:this.serviceOptions.styleDefinitionsVersion}).then(function(t){return{version:isNaN(t.version)?0:parseFloat(t.version),defaultStyle:t.defaultStyle,styles:t.styles.filter(function(t){return e.indoorState?"auto"===e.indoorState.theme?t.name.endsWith("dark"===t.theme?"_indoor_dark":"_indoor"):t.name.endsWith("dark"===e.indoorState.theme?"_indoor_dark":"_indoor"):!t.name.includes("indoor")}).map(function(t){return{copyright:t.copyright.join(" "),name:t.name,displayName:function(t){t=e.indoorState&&t.includes("_indoor")?t.split("_indoor")[0]:t;return t in Pu?Pu[t]:t}(t.name),theme:t.theme,thumbnail:new U({domain:e.serviceOptions.staticAssetsDomain,path:t.thumbnail,protocol:"https"}).toString(),url:new U({domain:e.serviceOptions.staticAssetsDomain,path:v+"/"+b+"/"+t.name,queryParams:{styleVersion:e.serviceOptions.styleDefinitionsVersion},protocol:"https"}).toString()}})}}));return this.initPromise&&this.initPromise.switchWith(t),this.initPromise=t,this.initPromise.then(function(t){return e.map._invokeEvent("stylesetchanged",t)}),this.initPromise},Nu.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 does not contain neither URL nor style object.")},Nu.prototype.setStyle=function(t,e){void 0===e&&(e=!0);try{this.map._getMap().setStyle(this.getStyle(t),{diff:e,stylePatch:this._stylePatch.bind(this),validate:this.serviceOptions.validateStyle})}catch(t){throw t}},Nu.prototype.getTheme=function(t){t=this._lookUp(t);if(t)return t.theme.toLowerCase()},Nu.prototype.getThemeAsync=function(e){return A(this,void 0,void 0,function(){return P(this,function(t){switch(t.label){case 0:return[4,this._lookUpAsync(e)];case 1:return[2,t.sent().theme]}})})},Nu.prototype.setMapConfiguration=function(t,n){var o=this;"string"==typeof(this.serviceOptions.styleSet=t)?this.initStyleset():this.initPromise?this.initPromise.hijackAndResolve(t):this.initPromise=Lu.resolve(t),this.definitions().then(function(t){var e=t.defaultStyle;t.styles.find(function(t){return t.name===n})&&(e=n),o.map.setStyle({style:e})})},Nu.prototype.getMapConfiguration=function(){return this.serviceOptions.styleSet},Nu.prototype.setStyleSet=function(t){this.updateIndoorState("indoor_dark"===t?"dark":"light",null)},Nu.prototype.getStyleSet=function(){return void 0!==this.indoorState?"dark"===this.indoorState.theme?"indoor_dark":"indoor":"base"},Nu.prototype.clearStyleSet=function(){this.unsetIndoorState()},Nu.prototype._stylePatch=function(t,e,o,n,i,r){var s=this,a=this.map.getStyle(),l=this.map.getTraffic();e.sources=Object.entries(e.sources).reduce(function(t,e){var n=N(e,2),e=n[0],n=n[1],n=L({},n);return"url"in n&&"string"==typeof n.url&&n.url.includes(_)&&(n.url=n.url.replace(_,a.language)),t[e]=n,t},{});function c(t){h.push(s._buildFundamentalLayerFrom(d,p)),p=t,d=[]}var u=this.map.layers.getLayers(),h=[],p="",d=[];e.layers.forEach(function(t){var e,n,o,r=Ou.getLayerGroup(t);p=p||r,a.showBuildingModels||"fill-extrusion"!==t.type?"fill-extrusion"===t.type&&(i(t.id,"visibility","visible"),t.layout=null!==(e=t.layout)&&void 0!==e?e:{},t.layout.visibility="visible"):(i(t.id,"visibility","none"),t.layout=null!==(n=t.layout)&&void 0!==n?n:{},t.layout.visibility="none"),"none"!==l.flow&&r&&r==="traffic_"+l.flow&&"line"==t.type&&(i(t.id,"visibility","visible"),t.layout=null!==(n=t.layout)&&void 0!==n?n:{},t.layout.visibility="visible"),"labels"!==r&&"labels_places"!==r&&"labels_indoor"!==r||"symbol"!==t.type||(a.showLabels?(i(t.id,"visibility","visible"),t.layout=null!==(o=t.layout)&&void 0!==o?o:{},t.layout.visibility="visible"):(i(t.id,"visibility","none"),t.layout=null!==(o=t.layout)&&void 0!==o?o:{},t.layout.visibility="none")),r?(0<d.length&&r!=p&&c(r),d.push(t)):0<d.length&&c(r)}),0<d.length&&c("");var f=this.map.layers._getUserLayers(),m=f[0],g=u.filter(function(e){return h.findIndex(function(t){return e.getId()===t.getId()})<0&&f.findIndex(function(t){return e.getId()===t.layer.getId()})<0}),y=h.filter(function(e){return u.find(function(t){return t.getId()===e.getId()})}).entries(),v=y.next();h.forEach(function(e){var t;v.value&&v.value[1].getId()===e.getId()?(t=u.findIndex(function(t){return t.getId()===e.getId()}),s.map.layers.remove(e.getId()),s.map.layers.add(e,u[t].getId()),v=y.next()):v.value?s.map.layers.add(e,v.value[1]):s.map.layers.add(e,null==m?void 0:m.layer)}),g.forEach(function(t){s.map.layers.remove(t)}),f.forEach(function(t){var e,n=void 0;s.map.layers.getLayerById(t.before)&&(n=0<(e=s.map.layers.getLayerById(t.before)._buildLayers()).length?e[0]:void 0),o(t.layer.getId(),null==n?void 0:n.id)}),this.map.sources._syncSources(e.sources),this.map.events.remove("styledata",this._onStyleData),this.map.events.addOnce("styledata",this._onStyleData)},Nu.prototype._buildFundamentalLayerFrom=function(t,e){if(t&&0<t.length){t=new Pc(t,e);return t.onAdd(this.map),t}throw new Error("Unable to construct fundamental map layer for ID: "+e+".")},Nu.prototype._transformStyleRequest=function(t,e){t.includes(p)&&(e.url=e.url.replace(p,this.serviceOptions.domain)),t.includes(g)&&(e.url=e.url.replace(g,v)),t.includes(y)&&(e.url=e.url.replace(y,b)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&((t=new URL(e.url)).searchParams.get(l)||(t.searchParams.set(l,this.serviceOptions.styleAPIVersion),e.url=t.href),null!==(t=this.map.authentication)&&void 0!==t&&t.signRequest(e))},Nu.prototype._request=function(o,r,i,s){var a;return void 0===s&&(s={}),A(this,void 0,void 0,function(){var e,n;return P(this,function(t){switch(t.label){case 0:return e={url:new U({protocol:"https",domain:o,path:r,queryParams:L(((n={})[l]=this.serviceOptions.styleAPIVersion,n),s)}).toString()},"function"==typeof this.serviceOptions.transformRequest&&i&&(e=this.serviceOptions.transformRequest(e.url,i)),null!==(a=this.map.authentication)&&void 0!==a&&a.signRequest(e),n={method:"GET",mode:"cors"},e.credentials&&(n.credentials=e.credentials),e.headers&&(n.headers=e.headers),[4,fetch(e.url,n).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText+" ")})];case 1:return[2,t.sent()]}})})},Nu);function Nu(t,e){var o=this;this.definitions=function(){return o.initPromise||o.initStyleset()},this.indoorState=void 0,this.preservedPreindoorStyleset=void 0,this._onStyleData=function(){o._lookUpAsync(o.map.getStyle()).then(function(t){o.map.events.invoke("stylechanged",{style:t.name,map:o.map,type:"stylechanged"})})},this._lookUp=function(e){var t=o.definitions().errorIfRejected(),n=o.definitions().resultIfResolved();return t||void 0===n?null:n.styles.find(function(t){return t.name===(e.style||n.defaultStyle)})||n.styles.find(function(t){return t.name===n.defaultStyle})||n.styles[0]},this._lookUpAsync=function(n){return A(o,void 0,void 0,function(){var e;return P(this,function(t){switch(t.label){case 0:return[4,this.definitions()];case 1:return e=t.sent(),[2,e.styles.find(function(t){return t.name===(n.style||e.defaultStyle)})||e.styles.find(function(t){return t.name===e.defaultStyle})||e.styles[0]]}})})},this.map=t,this.serviceOptions=e}var Mu,Du=(I(zu,Mu=tt),zu.prototype.getCanvas=function(){return this.map.getCanvas()},zu.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},zu.prototype.getMapContainer=function(){return this.map.getContainer()},zu.prototype.getServiceOptions=function(){return Ii(this.serviceOptions,Cu._cloneCustomizer)},zu.prototype.setServiceOptions=function(t){this.serviceOptions=(new Cu).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap()},zu.prototype.addRequestTransformer=function(t){this.serviceOptions.addTransformer(t)},zu.prototype.removeRequestTransformer=function(t){this.serviceOptions.removeTransformer(t)},zu.prototype.setCamera=function(t,e){if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var n,o=(new Qc).merge({maxZoom:this.getCamera().maxZoom},t),r=this._generateSafeBounds(o.bounds);if(!(n=this.map.cameraForBounds(r,{padding:o.padding,offset:o.offset,maxZoom:o.maxZoom})))throw new Error("The map cannot be fit to the current canvas with the given CameraBoundsOptions.");this.map.setMaxZoom(o.maxZoom),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),s=this._generateSafeBounds(o.maxBounds)}else{var i=(new $c).merge(this.getCamera(),t);i.centerOffset&&2<=i.centerOffset.length&&(r=i.centerOffset,(o=Ur([i.center],i.zoom))[0][0]+=r[0],o[0][1]+=r[1],i.center=Fr(o,i.zoom)[0]),n={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),this._invokeEvent("minzoomchanged",this.map.getMinZoom()),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),s=this._generateSafeBounds(i.maxBounds)}s?this.map.setMaxBounds(s):this.map.setMaxBounds(null);var s=(new Zc).merge(t),t={duration:s.duration,easing:function(t){return t},offset:[0,0],animate:!0},e={fromControl:e};"jump"===s.type?this.map.jumpTo(n,e):"ease"===s.type?this.map.easeTo(L(L({},n),t),e):"fly"===s.type&&this.map.flyTo(L(L({},n),t),e)},zu.prototype.setCameraBounds=function(t){this.setCamera(t)},zu.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 ci(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},zu.prototype.setStyle=function(t,e){void 0===e&&(e=!0),delete t.preserveDrawingBuffer;t=(new Su).merge(this.styleOptions,t);t.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(t.autoResize),t.language!==this.styleOptions.language&&(this.localizedStringsPromise=ga.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),this.styleOptions=t,this._setStyleComponents(t,e)},zu.prototype.getStyle=function(){return Un(this.styleOptions)},zu.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},zu.prototype.addPins=function(t,e){var n,o=(new uu).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new Gs(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,iconOptions:{anchor:"center",size:o.iconSize,image:["case",["has","icon"],["get","icon"],o.icon],ignorePlacement:!o.cluster,opacity:o.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],o.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[o.textFont]]],size:["case",["has","point_count"],20,o.fontSize],ignorePlacement:!o.cluster,opacity:o.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[o.textOffset[0]/16,o.textOffset[1]/16]]],color:o.fontColor}})),!(r instanceof Gs))throw new Error("A layer with name '"+o.name+"' already exists but it is not a SymbolLayer.A SymbolLayer should be used for rendering pins.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new Di(n,{cluster:o.cluster})),!(s instanceof Di))throw new Error("The source with name '"+n+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,o.before);t=new hi(t);o.overwrite?s.setShapes(t):s.add(t)},zu.prototype.addCircles=function(t,e){var n,o=(new ru).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new $i(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,opacity:o.opacity,radius:["case",["has","radius"],["get","radius"],o.radius],color:["case",["has","color"],["get","color"],o.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],o.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],o.outlineWidth]})),!(r instanceof $i))throw new Error("A layer with name '"+o.name+"' already exists but it is not a BubbleLayer.A BubbleLayer should be used for rendering circles.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new Di(n)),!(s instanceof Di))throw new Error("The source with name '"+n+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,o.before);t=new hi(t);o.overwrite?s.setShapes(t):s.add(t)},zu.prototype.addLinestrings=function(t,e){var n,o=(new au).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new bs(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,lineCap:o.cap,lineJoin:o.join,strokeOpacity:o.opacity,strokeColor:["case",["has","color"],["get","color"],o.color],strokeWidth:["case",["has","width"],["get","width"],o.width]})),!(r instanceof bs))throw new Error("A layer with name '"+o.name+"' already exists but it is not a LineLayer.A LineLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new Di(n)),!(s instanceof Di))throw new Error("The source with name '"+n+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,o.before);t=new hi(t);o.overwrite?s.setShapes(t):s.add(t)},zu.prototype.addPolygons=function(t,e){var n,o=(new du).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new As(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,fillOpacity:o.opacity,fillColor:["case",["has","color"],["get","color"],o.color]})),!(r instanceof As))throw new Error("A layer with name '"+o.name+"' already exists but it is not a PolygonLayer.A PolygonLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new Di(n)),!(s instanceof Di))throw new Error("The source with name '"+n+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,o.before);t=new hi(t);o.overwrite?s.setShapes(t):s.add(t)},zu.prototype.addRaster=function(t,e){var n=(new gu).merge(e),o=this.layers.getLayerById(n.name);if(!((o=o||new Ys({maxZoom:n.maxZoom,minZoom:n.minZoom,opacity:n.opacity,tileSize:256,tileUrl:"{subdomain}"},n.name))instanceof Ys))throw new Error("A layer with name '"+n.name+"' already exists but it is not a TileLayer.A TileLayer should be used for rendering raster images.");if("{subdomain}"!==o.getOptions().tileUrl)throw new Error("A TileLayer with name '"+n.name+"' already exists but was configured for a single tile url [default for new TileLayer(...)].");(e=!n.overwrite&&o.getOptions().subdomains||[]).push.apply(e,M(t)),o._setOptionsNoUpdate({subdomains:e}),this.layers.add(o,n.before)},zu.prototype.getLayers=function(){return this.layers.getLayers().map(function(t){return t.getId()})},zu.prototype.removeLayers=function(t){var e,n;try{for(var o=R(t),r=o.next();!r.done;r=o.next()){var i,s=r.value;this.layers.getLayerById(s)&&(this.layers.remove(s),i=s+"-source",this.sources.getById(i)&&this.sources.remove(i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},zu.prototype.addHtml=function(t,e){t.id||(t.id="marker_"+Ko());var n=new ua({htmlContent:t});return this.markers.add(n,e),t.id},zu.prototype.removeHtml=function(t){this.markers.remove(t)},zu.prototype.addEventListener=function(t,e,n){this.events._addLegacy(t,e,n)},zu.prototype.removeEventListener=function(t,e,n){this.events._removeLegacy(t,e,n)},zu.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},zu.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},zu.prototype.addControl=function(t,e){this.controls.add(t,e)},zu.prototype.removeControl=function(t){this.controls.remove(t)},zu.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,n=this.trafficOptions.flow;if(this.trafficOptions=(new go).merge(this.trafficOptions,t),this.controls.getControls().filter(function(t){return t instanceof So}).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)try{this.trafficOptions.flow!==n&&this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=n,t}else this.flowDelegate.removeFromMap()},zu.prototype.getTraffic=function(){return Un(this.trafficOptions)},zu.prototype.remove=function(){this.dispose()},zu.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear()},zu.prototype.dispose=function(){for(this.clear(),this.map.remove(),this.removed=!0;this.getMapContainer().firstChild;){var t=this.getMapContainer().firstChild;this.getMapContainer().removeChild(t)}},zu.prototype.resize=function(t,e,n){"number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e?n=t:(t=t,this.getMapContainer().style.height="number"==typeof t?t+"px":t,this.getMapContainer().style.width="number"==typeof e?e+"px":e);e=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden",this.map.resize(n),this.getMapContainer().style.overflow=e},zu.prototype.pixelsToPositions=function(t){var e,n,o=[];try{for(var r=R(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.unproject(s);o.push(new ei(a.lng,a.lat))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o},zu.prototype.positionsToPixels=function(t){var e,n,o=[];try{for(var r=R(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.project(s);o.push(new Qo(a.x,a.y))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o},zu.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},zu.prototype.stop=function(){this.map.stop()},zu.prototype._getMap=function(){return this.map},zu.prototype._rebuildStyle=function(e){return void 0===e&&(e=!0),A(this,void 0,void 0,function(){return P(this,function(t){return this.styles.setStyle(this.styleOptions,e),this.imageSprite._restoreImages(),[2]})})},zu.prototype._isLoaded=function(){return this.loaded},zu.prototype._isReady=function(){return this.ready},zu.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise},zu.prototype._sendRequest=function(t,e,n){var o;return(o="function"==typeof this.serviceOptions.transformRequest?this.serviceOptions.transformRequest(t,e):o)?fetch(o.url||t,{credentials:o.credentials,headers:L(L({},n),o.headers),method:"GET",mode:"cors"}):fetch(t,{headers:n,method:"GET",mode:"cors"})},zu.prototype._substituteDomainLanguageViewAndSignInRequest=function(t,e){var n,o;(t.includes(d)||t.includes(p))&&(o=new RegExp("[^{]"+d+"[^}]"),t.match(o)&&(e.url=e.url.replace(d,p)),U.protoRegEx.test(this.serviceOptions.domain)?(o=e.url.indexOf(p),e.url=this.serviceOptions.domain+e.url.substring(o+p.length)):e.url=e.url.replace(p,this.serviceOptions.domain)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&null!==(n=this.authentication)&&void 0!==n&&n.signRequest(e),t.includes(_)&&(e.url=e.url.replace(_,this.styleOptions.language)),t.includes(f)&&(e.url=this.styleOptions.view?e.url.replace(f,this.styleOptions.view):e.url.replace(f,"").replace("&"+m+"=",""))},zu.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},zu.prototype._setStyleComponents=function(e,n){var o=this;void 0===n&&(n=!0),this.removed||this.styles.definitions().then(function(t){o.styleOptions.style&&t.styles.map(function(t){return t.name}).includes(o.styleOptions.style)||(o.styleOptions.style=t.defaultStyle),o.styleOptions=e,o._rebuildStyle(n)})},zu.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!Fa&&tl(t.authOptions),t.domain&&!Ra&&el(t.domain),t.styleDefinitionsPath&&!Na&&nl(t.styleDefinitionsPath),t.workerCount&&!Da&&ol(t.workerCount),t.maxParallelImageRequests&&!za&&rl(t.maxParallelImageRequests),!t.subscriptionKey&&!t["subscription-key"]||Fa||al(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||ja||sl(t.sessionId||t["session-id"]),t.language&&!Ba&&il(t.language),!t.userRegion&&!t.view||Pa||ll(t.userRegion||t.view))},zu.prototype._generateSafeBounds=function(t){if(t){var e=ci.getSouth(t),n=ci.getWest(t),o=ci.getNorth(t),r=ci.getEast(t);if(!(isFinite(e)&&isFinite(n)&&isFinite(o)&&isFinite(r)))throw new Error("The bounds specified are invalid: ["+t+"]");for(;r<n;)r+=360;return new ci([n,e,r,o])}return t},zu.prototype._detectHighContrast=function(){var t,e;switch(_l.getHighContrastMode()){case"invert":case"light":t=zu.Css.hcLight,e="high_contrast_light";break;case"dark":t=zu.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},zu.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},zu);function zu(t,e){var o=Mu.call(this)||this;o.removed=!1,o.loaded=!1,o.ready=!1,o._windowResizeCallback=function(){return o.resize()};var n,r,i=!0;o._updateGlobalDefaults(e),o.serviceOptions=(new Cu).merge(e),o.styleOptions=(new Su).merge(e),o.trafficOptions=new go,o.styles=new Ru(o,o.serviceOptions),o.serviceOptions.authOptions.subscriptionKey&&(o.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(o.serviceOptions.authOptions.subscriptionKey)),n=o.serviceOptions.authOptions.clientId||(o.serviceOptions.authOptions.subscriptionKey?o.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting"),o.insights&&o.insights.setAuthenticatedUserContext(o.serviceOptions.sessionId,n),arguments[2]&&"ENVIRONMENT"in window&&window.ENVIRONMENT.hmr?(r=arguments[2],o.ready=!0,o.loaded=!0):(t={attributionControl:!1,container:t,fadeDuration:o.serviceOptions.fadeDuration,localIdeographFontFamily:o.serviceOptions.localIdeographFontFamily,preserveDrawingBuffer:o.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:o.serviceOptions.refreshExpiredTiles,renderWorldCopies:o.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var n={url:t};return"Tile"===e||"Source"===e?(t.includes(d)&&o.insights&&o.insights.trackEvent({name:"TileLoad"}),o._substituteDomainLanguageViewAndSignInRequest(t,n)):"Style"!==e&&"SpriteJSON"!==e&&"SpriteImage"!==e&&"Glyphs"!==e||o.styles._transformStyleRequest(t,n),o.serviceOptions.transformRequest&&co(n,o.serviceOptions.transformRequest(n.url,e)),n}},r=new h.Map(t));try{o.map=r,o.authentication=new _c(o),o.controls=new wc(o),o.events=new Ec(o),o.imageSprite=new Ic(o),o.layers=new Nc(o),o.markers=new kc(o),o.sources=new Uc(o),o.popups=new Dc(o),o.map.getContainer().classList.add(zu.Css.container),o.map.getCanvasContainer().classList.add(zu.Css.canvasContainer),o.map.getCanvas().classList.add(zu.Css.canvas),o._detectHighContrast(),o.copyrightControl=new El({showFeedbackLink:o.styleOptions.showFeedbackLink,showLogo:o.styleOptions.showLogo,customAttribution:o.styleOptions.customAttribution}),o.controls.add(o.copyrightControl,{position:u.ControlPosition.NonFixed});var s=o.authentication?o.authentication.initialize():Promise.resolve();if(o.removed)return o;var a=function(){o.loaded=!0,o.map.off("load",a)};o.map.on("load",a);var l=function(){o.ready=!0,o.map.off("styledata",l),o.events.invoke("ready",{map:o,type:"ready"})};o.map.on("styledata",l),o._setAutoResize(o.styleOptions.autoResize),o.map.showTileBoundaries=o.styleOptions.showTileBoundaries,o.localizedStringsPromise=ga.getStrings(o.styleOptions.language);var c=o.styles.initStyleset();Promise.all([s,c]).then(function(t){t=N(t,2),t[0],t[1];if(!o.removed){if(o.authentication&&!o.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");o.serviceOptions["enable-accessibility"]&&o.accessibleMapDelegate.addToMap(),o._setStyleComponents(o.styleOptions),o.copyrightDelegate&&o.copyrightDelegate.addToMap()}}).catch(function(t){t=t instanceof Error?t:new Error(t);o.insights&&o.insights.trackException({error:t}),o.events.invoke("error",{map:o,type:"error",error:t})}),o.setCamera(L(L({},e),{type:"jump",duration:0})),o.incidentDelegate=new Gl(o),o.flowDelegate=new Bl(o),o.accessibleMapDelegate=new zl(o),o.userInteractionDelegate=new Xl(o,e),o.userInteractionDelegate.addToMap(),o.copyrightDelegate=new hc(o,o.copyrightControl,o.styleOptions)}catch(t){throw i=!1,o.insights&&o.insights.trackException({error:t instanceof Error?t:new Error(t)}),t}finally{o.insights&&(o.insights.trackEvent({name:"MapLoad"},{success:i,supported:$a(!1),supportedWithPerformance:$a(!0)}),o.insights.flush())}return o}Bu.applyTemplate=function(e,n){var o,r,t,i=this,s=document.createElement("div");return s.classList.add(Bu.Css.template),e&&("boolean"!=typeof(n=n||{}).singleDescription&&(n.singleDescription=!0),n.sandboxContent="boolean"!=typeof n.sandboxContent||n.sandboxContent,n.title&&"string"==typeof n.content&&(n.content.includes("{title}")||n.content.includes("{name}"))||(e.title?n.title="{title}":e.name&&(n.title="{name}")),"boolean"!=typeof n.detectHyperlinks&&(n.detectHyperlinks=!0),"boolean"!=typeof n.parsePropertyPaths&&(n.parsePropertyPaths=!0),n.textColor&&(s.style.color=n.textColor),n.fillColor&&(s.style.backgroundColor=n.fillColor),n.title&&((t=this._applyStringTemplate(e,n.title,n)).innerText=t.textContent||t.innerText||"",this._appendChild(s,t,Bu.Css.title)),(o=document.createElement("div")).classList.add(Bu.Css.content),Array.isArray(n.content)?0<n.content.length&&n.content[0].propertyPath?this._appendChild(o,this._generateContent(e,n.content,n),Bu.Css.item):n.content.forEach(function(t){i._appendChild(o,i._generateContent(e,t,n),Bu.Css.item)}):(r=0,e.description&&Object.keys(e).forEach(function(t){i._ignoreProperty(t,e[t])||r++}),t=void 0,1===r||n.singleDescription&&e.description||2===r&&e.Snippet?(t=document.createElement("div")).innerHTML=e.description:t=this._generateContent(e,n.content,n),this._appendChild(o,t,Bu.Css.item)),""!==o.innerHTML&&(n.sandboxContent?s.appendChild(Bu._createSandboxedIframe(o,n)):s.appendChild(o))),s},Bu._createSandboxedIframe=function(t,e){var n=document.createElement("iframe");n.sandbox.add("allow-popups");var o=t.innerHTML,r=!1,i=100,s=550,a=10,l=0;document.body.scrollWidth<=340&&(s=300,i=50);var c=o.split(/<(tr|div|br|li|h[0-9]|p>)/),l=Math.max.apply(Math,M(c.map(function(t){return t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length})))-1,t=Math.ceil(3.5*l);t<s&&(s=t,i=l),o.includes("<img")||o.includes("<video")?(r=!0,n.width="550px"):(l=-1<o.indexOf(Bu.Css.table)?25:20,a+=Math.max(.5*c.length*l,Math.ceil(o.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/i)*l)),n.width=s+"px",n.height=r||280<a?"280px":a+"px";a=e.textColor?"color:"+e.textColor+";":"",e=e.fillColor?"background-color:"+e.fillColor+";":"",o='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" /><link rel="stylesheet" href="'+Bu._cssUrl+'" type="text/css"/><style>html, body{margin:0;padding:0;'+a+e+'}</style></head><body><div class="'+Bu.Css.template+'" style="padding:0;width:'+(s-20)+'px">'+o+"</div></body></html>";return void 0===n.srcdoc?n.src="data:text/html;charset=utf-8,"+encodeURI(o):n.srcdoc=o,n},Bu._appendChild=function(t,e,n){e&&(n&&(e.className=(e.className?e.className+" ":"")+n),t.appendChild(e))},Bu._generateContent=function(t,e,n){if(e)return Array.isArray(e)?this._generatePropertyInfoTable(t,e,n):this._applyStringTemplate(t,e,n);t=this._generateDynamicTableHtml(t,null,n);if(t){n=document.createElement("div");return n.innerHTML=t,n}return null},Bu._applyStringTemplate=function(t,e,n){if(e){for(var o,r=e,i=this._placeholderRx.exec(e);i;)2<=i.length&&(o=this._getPropertyValue(t,i[1],n),r=r.replace(i[0],o)),i=this._placeholderRx.exec(e);if(r){(r=r.trim()).includes("<")&&(r=r.replace(/[\r\n]+/g,"<br/>"));var s=document.createElement("div");return s.innerHTML=r,s}}return null},Bu._getPropertyValue=function(t,e,n,o){var r=n.parsePropertyPaths?e.split("/"):[e],i=r.length;if(0<i&&t){var s=r[0],a=t[s];if(n.detectHyperlinks&&"link"===e&&(!o||o.hyperlinkFormat)){var l,c=[];if(Array.isArray(a)?a.forEach(function(t){t.href?c.push(t):"string"==typeof t&&c.push({href:t})}):a.href&&c.push(a),0<c.length){o&&o.hyperlinkFormat?l=o.hyperlinkFormat:n&&n.hyperlinkFormat&&(l=n.hyperlinkFormat);var u=l&&l.target?l.target:"_blank",h=[];return c.forEach(function(t){t.title||l&&l.label||!t.rel||h.push(t.rel," - "),h.push('<a href="',t.href,'" target="',u,'">'),t.title?h.push(t.title):l&&l.label?h.push(l.label):h.push(t.href),h.push("</a>","<br/>")}),h.pop(),h.join("")}}if(null!=a){for(var p=void 0,p=1;p<i&&(a=a[r[p]],s=r[p],null!=a);p++);if(p===i&&null!=a){var d=void 0;if((d=void 0!==a.value?a.value:a)instanceof Date)return o&&o.dateFormat?d.toLocaleString(void 0,o.dateFormat):n.dateFormat?d.toLocaleString(void 0,n.dateFormat):d.toISOString();if("object"==typeof d)return(m=this._generateDynamicTableHtml(d,r.slice(1),n))||"";if("number"==typeof d){if(o){if(o.dateFormat)return new Date(d).toLocaleString(void 0,o.dateFormat);if(o.numberFormat)return d.toLocaleString(void 0,o.numberFormat)}else if(/(timestamp|date)/gi.test(s))return new Date(d).toISOString();return d.toLocaleString(void 0,n.numberFormat)}if("string"==typeof d&&""!==d&&!/[\n\r<>\s]/g.test(d)&&(n.detectHyperlinks||o&&o.hyperlinkFormat)){var d=d.trim(),f=this._isUrlRx.test(d)||o&&o.hyperlinkFormat,t=this._isImageUrlRx.test(d)&&(f||d.startsWith("data:image")),e=this._emailRx.test(d);if(f||t||e){f=void 0;o&&o.hyperlinkFormat?f=o.hyperlinkFormat:n&&n.hyperlinkFormat&&(f=n.hyperlinkFormat);var m=void 0;m=f&&f.target?' target="'+f.target+'"':' target="_blank"';n=""+(f&&f.label?f.label:d);f&&f.scheme?d=f.scheme+d:e&&(d="mailto:"+d);e=f&&f.label?' alt="'+f.label+'"':"";return'<a href="'+d+'"'+m+">"+(n=f&&f.isImage||t?'<img src="'+d+'" style="max-width:100%"'+e+'"/>':n)+"</a>"}}return d.toString()}}}return""},Bu._generatePropertyInfoTable=function(n,t,o){if(n&&t&&0<t.length){var r=[],i=this;r.push('<table class="'+i.Css.table+'">'),t.forEach(function(t){var e=i._getPropertyValue(n,t.propertyPath,o,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");return t.innerHTML=r.join(""),t}return null},Bu._generateDynamicTableHtml=function(e,t,n){var o=this;if(e){var r=[],i=this;r.push('<table class="'+i.Css.table+'">');var s=t&&0<t.length?t.join("/")+"/":"",a=0;return(Object.keys(e).forEach(function(t){o._ignoreProperty(t,e[t])||(r.push("<tr><th>",t,"</th><td>",i._getPropertyValue(e,s+t,n),"</td></tr>"),a++)}),0===a)?null:(r.push("</table>"),r.join(""))}return null},Bu._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},Bu._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,Bu._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,Bu._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,Bu._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,Bu._cssUrl=new U({domain:e,path:"sdk/javascript/mapcontrol/"+Z.getEndpointVersion()+"/atlas.min.css"}).toString(),Bu.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"},w=Bu;function Bu(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}D=new U({domain:e,path:"sdk/javascript/mapcontrol/"+Z.getEndpointVersion()+"/mapbox-gl-rtl-text.min.js"});o.setRTLTextPlugin(D.toString(),function(t){t&&console.warn(t)},!0),u.HtmlMarker=ua,u.Map=Du,u.Pixel=Qo,u.Popup=ra,u.PopupTemplate=w,u.Shape=si,u._getAssetDomain=function(){return t},u._getDomain=function(){return Ca},u._hasMaxParallelImageRequests=fl,u._hasSetAuthenticationOptions=ul,u._hasSetDomain=hl,u._hasSetLanguage=ml,u._hasSetSessionId=gl,u._hasSetStyleDefinitionsPath=pl,u._hasSetStyleDefinitionsVersion=function(){return Ma},u._hasSetView=yl,u._hasWorkerCount=dl,u.addImageTemplate=function(t,e,n){!n&&vl[t.toLowerCase()]||(vl[t.toLowerCase()]=e)},u.clearPrewarmedResources=function(){h.clearPrewarmedResources()},u.control=kt,u.data=wt,u.getAllImageTemplateNames=function(){return Object.keys(vl)},u.getAuthenticationOptions=Ua,u.getDomain=Ga,u.getImageTemplate=cl,u.getLanguage=Ya,u.getMaxParallelImageRequests=Va,u.getSessionId=Qa,u.getStaticAssetsDomain=qa,u.getStyleAPIVersion=Ka,u.getStyleDefinitionsPath=Za,u.getStyleDefinitionsVersion=Ha,u.getSubscriptionKey=Ja,u.getUserRegion=function(){return wa},u.getVersion=function(){return Z.getFullVersion()},u.getView=Xa,u.getWorkerCount=Wa,u.internal=ot,u.isSupported=$a,u.layer=gt,u.math=At,u.prewarm=function(){h.prewarm()},u.setAuthenticationOptions=tl,u.setDomain=el,u.setLanguage=il,u.setMaxParallelImageRequests=rl,u.setSessionId=sl,u.setStyleAPIVersion=function(t){La=t},u.setStyleDefinitionsPath=nl,u.setStyleDefinitionsVersion=function(t){Ia=t,Ma=!0},u.setSubscriptionKey=al,u.setUserRegion=ll,u.setView=function(t){wa=t,Pa=!0},u.setWorkerCount=ol,u.source=Ot,Object.defineProperty(u,"__esModule",{value:!0})});
|
|
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=t||self).atlas=t.atlas||{},t.maplibregl)}(this,function(u,h){"use strict";h=h&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h;var t="atlas.microsoft.com",e="atlas.microsoft.com",n="styling",o="2022-08-05",r="https://login.microsoftonline.com/",l="api-version",i="Authorization",s="Bearer ",a="jwt-sas ",c="{{azMapsDomain}}",p="{azMapsDomain}",d="{{azMapsView}}",f="view",m="{{azMapsLanguage}}",g="{{azMapsStylingPath}}",y="{{azMapsStylePath}}",v="styling",_="styles",b="2.0",w="Map-Agent",S="x-ms-client-id",x="Ms-Am-Request-Origin",T="MapControl",C="https://atlas.microsoft.com/",E="Session-Id",k=function(t,e){return(k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function O(t,e){function n(){this.constructor=t}k(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var I=function(){return(I=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function L(t,s,a,l){return new(a=a||Promise)(function(n,e){function o(t){try{i(l.next(t))}catch(t){e(t)}}function r(t){try{i(l.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?n(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(o,r)}i((l=l.apply(t,s||[])).next())})}function A(n,o){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=o.call(n,a)}catch(t){e=[6,t],i=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function P(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&o>=t.length?void 0:t)&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)s.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return s}function N(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(R(arguments[e]));return t}var M=(D.prototype.merge=function(){for(var e,t,n,o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];try{for(var i=P(o),s=i.next();!s.done;s=i.next()){var a=s.value;if(a)for(var l in a)a.hasOwnProperty(l)&&this.hasOwnProperty(l)&&(void 0!==a[l]&&null!=a[l]?this[l]instanceof D?this[l].merge(a[l]):this[l]=a[l]:(n=n||new(Object.getPrototypeOf(this).constructor),this[l]=n[l]))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return this},D);function D(){}var z,B=(O(j,z=M),j);function j(){var t=null!==z&&z.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}var F=(U.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 "+t.status+": "+t.statusText)})},U.prototype.toString=function(){var t=this,e=Object.entries(t.options.queryParams).map(function(t){t=R(t,2);return t[0]+"="+t[1]}).join("&"),n=[],o=t.options.path||"";return U.protoRegEx.test(o)?n.push(o):(t.options.domain&&(U.protoRegEx.test(t.options.domain)||(n.push(t.options.protocol+"://"),n.push(t.options.subdomain?t.options.subdomain+".":"")),n.push(t.options.domain)),n.push(t.options.path?"/"+o:"")),n.push(e?"?"+e:""),n.join("")},U.protoRegEx=new RegExp(/^(((file|http|https):\/\/)|blob:)/i),U);function U(t){this.options=(new B).merge(t)}var q="3.0.0-preview.1",G=(Z.getFullVersion=function(){return q},Z.getEndpointVersion=function(){var t=q.indexOf(".");return-1===(t=q.indexOf(".",t+1))?q:q.substring(0,t)},Z);function Z(){}function H(t){var e=document.createElement("span");e.innerText=t,e.classList.add("tooltiptext"),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&e.classList.add("dark");var n=window.matchMedia("(prefers-color-scheme: dark)"),t=function(t){t=t.matches;t&&!e.classList.contains("dark")?e.classList.add("dark"):!t&&e.classList.contains("dark")&&e.classList.remove("dark")};return"function"==typeof n.addEventListener?n.addEventListener("change",t):"function"==typeof n.addListener&&n.addListener(t),-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 K(r,i,s){function t(t){var e=i.getBoundingClientRect(),n=r.getBoundingClientRect(),o=e.x+n.width>window.innerWidth?window.innerWidth-n.width:e.x,n=e.y+e.height+n.height+4>window.innerHeight?e.y-n.height-4:e.y+e.height+4;s&&i.parentElement&&(e=i.parentElement?i.parentElement.getBoundingClientRect():null,r.style.position="absolute",o-=e.x,n-=e.y),r.style.transform="translate("+o+"px, "+n+"px)"}void 0===s&&(s=!1),i.addEventListener("mouseover",t),i.addEventListener("focusin",t)}(Lt=u.ControlPosition||(u.ControlPosition={})).TopLeft="top-left",Lt.TopRight="top-right",Lt.BottomLeft="bottom-left",Lt.BottomRight="bottom-right",Lt.NonFixed="non-fixed";var W,V=(O(Y,W=M),Y);function Y(){var t=null!==W&&W.apply(this,arguments)||this;return t.position=u.ControlPosition.NonFixed,t}var Q=(J.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],n=0;n<t.length;n++){var o=t[n]/255;e[n]=o<=.03928?o/12.92:Math.pow((.055+o)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},J.prototype.getRBGA=function(t){var e=document.createElement("canvas").getContext("2d");e.globalAlpha=1,e.fillStyle=t,e.fillRect(0,0,1,1);e=e.getImageData(0,0,1,1).data;return[e[0],e[1],e[2],e[3]]},J);function J(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])))}(Rt=u.ControlStyle||(u.ControlStyle={})).light="light",Rt.dark="dark",Rt.auto="auto";var X=Map,$=(tt.prototype._addEventListener=function(t,e,n){this.listeners.has(t)||this.listeners.set(t,new X),this.listeners.get(t).set(e,n)},tt.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},tt.prototype._invokeEvent=function(n,o){var r=this;this.listeners.has(n)&&this.listeners.get(n).forEach(function(t,e){t&&r._removeEventListener(n,e);try{e(o)}catch(t){console.error(t)}})},tt);function tt(){this.listeners=new X}var et,nt=Object.freeze({__proto__:null,EventEmitter:$}),ot=(O(rt,et=$),rt.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},rt.prototype.buildContainer=function(t,e,n,o){var r=this;return this._map=t,this._container=document.createElement(o||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof n&&this._container.setAttribute("aria-label",n),e.toLowerCase()===u.ControlStyle.auto?this._map.styles.definitions().then(function(t){r._map&&r._map.events.add("stylechanged",r._onStyleChange)}):this._container.classList.add(e),this._container},rt.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},rt.activateClickDelay=100,rt);function rt(){var e=null!==et&&et.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 Q(e._map.getMapContainer().style.backgroundColor).getLuminosity(),t=isNaN(t)||.5<t?u.ControlStyle.light:u.ControlStyle.dark;e._setTheme(t)},e}var it,st=(O(at,it=M),at);function at(){var t=null!==it&&it.apply(this,arguments)||this;return t.rotationDegreesDelta=15,t.style=u.ControlStyle.light,t.inverted=!1,t}var lt,ct=(O(ut,lt=ot),ut.prototype.onAdd=function(t,e){var n=this,o=this.buildContainer(t,this.options.style,"Rotation Control"),r=this.constructRotationButton(t),i=this.constructRotationGrid(t,e),t=H("Reset to Default Rotation");return o.addEventListener("mouseover",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasMouse=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasFocus=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(delete n.lastActiveTime,o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(delete n.lastActiveTime,o.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(),o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&ut.InvertOrderPositions.includes(e.position)?(o.appendChild(i),o.appendChild(r),o.appendChild(t),K(t,r)):(o.appendChild(r),o.appendChild(t),K(t,r),o.appendChild(i)),o},ut.prototype.constructRotationGrid=function(t,e){var n=document.createElement("div");n.classList.add("sub-container"),n.classList.add("hidden-accessible-element");var o=this.constructRightRotationButton(t),r=this.constructLeftRotationButton(t),i=H("Rotate Left"),t=H("Rotate Right");return e&&ut.InvertOrderPositions.includes(e.position)?(n.appendChild(o),n.appendChild(t),K(t,o),n.appendChild(r),n.appendChild(i),K(i,r)):(n.appendChild(r),n.appendChild(i),K(i,r),n.appendChild(o),n.appendChild(t),K(t,o)),n},ut.prototype.constructRotationButton=function(e){var n=this,t=document.createElement("button");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");var o=document.createElement("div");return t.appendChild(o),t.addEventListener("click",function(t){t.timeStamp-n.lastActiveTime>ot.activateClickDelay&&e.setCamera({bearing:ut.DefaultRotation},!0)}),e.events.add("rotate",function(t){o.style.transform="rotate("+-t.map.getCamera().bearing+"deg)"}),t},ut.prototype.constructRightRotationButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("rotation-right"),n.setAttribute("aria-label","Rotate Right"),n.setAttribute("alt","Rotate Right"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing-(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:ut.RotationDuration,type:"ease"},!0)}),n},ut.prototype.constructLeftRotationButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("rotation-left"),n.setAttribute("aria-label","Rotate Left"),n.setAttribute("alt","Rotate Left"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing+(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:ut.RotationDuration,type:"ease"},!0)}),n},ut.DefaultRotation=0,ut.RotationDuration=100,ut.InvertOrderPositions=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],ut);function ut(t){var e=lt.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new st).merge(t),e}var ht,pt=(O(dt,ht=M),dt);function dt(){var t=null!==ht&&ht.apply(this,arguments)||this;return t.pitchDegreesDelta=10,t.style=u.ControlStyle.light,t.inverted=!1,t}var ft,mt=(O(gt,ft=ot),gt.prototype.onAdd=function(t,e){var n=this,o=this.buildContainer(t,this.options.style,"Pitch Control"),r=this.constructPitchButton(t),i=this.constructPitchGrid(t,e),s=H("Reset to Default Pitch");return o.addEventListener("mouseover",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasMouse=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(t){n.lastActiveTime=n.lastActiveTime||t.timeStamp,n.hasFocus=!0,o.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(delete n.lastActiveTime,o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(delete n.lastActiveTime,o.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(),o.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&>.INVERT_ORDER_POSITIONS.includes(e.position)?(o.appendChild(i),o.appendChild(r),o.appendChild(s),K(s,o)):(o.appendChild(r),o.appendChild(s),K(s,o),o.appendChild(i)),this.map=t,this.container=o,this.pitchButton=r,t.events.add("pitch",this.pitchChanged),this.updatePitchButtonsState(),o},gt.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)},gt.prototype.constructPitchGrid=function(t,e){var n=document.createElement("div");n.classList.add("sub-container"),n.classList.add("hidden-accessible-element"),this.pitchIncrementButton=this.constructPitchIncrementButton(t),this.pitchDecrementButton=this.constructPitchDecrementButton(t);var o=H("Increase Pitch"),t=H("Decrease Pitch");return e&>.INVERT_ORDER_POSITIONS.includes(e.position)?(n.appendChild(this.pitchDecrementButton),n.appendChild(t),K(t,this.pitchDecrementButton),n.appendChild(this.pitchIncrementButton),n.appendChild(o),K(o,this.pitchIncrementButton)):(n.appendChild(this.pitchIncrementButton),n.appendChild(o),K(o,this.pitchIncrementButton),n.appendChild(this.pitchDecrementButton),n.appendChild(t),K(t,this.pitchDecrementButton)),n},gt.prototype.constructPitchButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch"),n.setAttribute("aria-label","Reset to Default Pitch"),n.setAttribute("alt","Reset to Default Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){event.timeStamp-e.lastActiveTime>ot.activateClickDelay&&t.setCamera({pitch:gt.DEFAULT_PITCH},!0)}),n},gt.prototype.constructPitchDecrementButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch-down"),n.setAttribute("aria-label","Decrease Pitch"),n.setAttribute("alt","Decrease Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch-(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:gt.PITCH_DURATION_MS,type:"ease"},!0)}),n},gt.prototype.constructPitchIncrementButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("pitch-up"),n.setAttribute("aria-label","Increase Pitch"),n.setAttribute("alt","Increase Pitch"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch+(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:gt.PITCH_DURATION_MS,type:"ease"},!0)}),n},gt.PITCH_DURATION_MS=100,gt.DEFAULT_PITCH=0,gt.INVERT_ORDER_POSITIONS=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],gt);function gt(t){var n=ft.call(this)||this;return n.container=null,n.map=null,n.pitchButton=null,n.pitchIncrementButton=null,n.pitchDecrementButton=null,n.hasMouse=!1,n.hasFocus=!1,n.pitchChanged=function(t){return n.updatePitchButtonsState()},n.updatePitchButtonsState=function(){var t=n.map.getCamera().pitch<=0,e=60<=n.map.getCamera().pitch;n.hasFocus&&n.pitchButton&&(t||e)&&n.pitchButton.focus(),n.options.inverted?(n.pitchIncrementButton&&n.pitchIncrementButton.disabled!=t&&(n.pitchIncrementButton.disabled=t),n.pitchDecrementButton&&n.pitchDecrementButton.disabled!=e&&(n.pitchDecrementButton.disabled=e)):(n.pitchIncrementButton&&n.pitchIncrementButton.disabled!=e&&(n.pitchIncrementButton.disabled=e),n.pitchDecrementButton&&n.pitchDecrementButton.disabled!=t&&(n.pitchDecrementButton.disabled=t))},n.options=(new pt).merge(t),n}var yt=function(t,e){return t===e||t!=t&&e!=e};var vt=function(t,e){for(var n=t.length;n--;)if(yt(t[n][0],e))return n;return-1},_t=Array.prototype.splice;var bt=function(t){var e=this.__data__;return!((t=vt(e,t))<0)&&(t==e.length-1?e.pop():_t.call(e,t,1),--this.size,!0)};var wt=function(t){var e=this.__data__;return(t=vt(e,t))<0?void 0:e[t][1]};var St=function(t){return-1<vt(this.__data__,t)};var xt=function(t,e){var n=this.__data__,o=vt(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function Tt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Tt.prototype.clear=function(){this.__data__=[],this.size=0},Tt.prototype.delete=bt,Tt.prototype.get=wt,Tt.prototype.has=St,Tt.prototype.set=xt;var Ct=Tt;var Et=function(){this.__data__=new Ct,this.size=0};var kt=function(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t};var Ot=function(t){return this.__data__.get(t)};var It=function(t){return this.__data__.has(t)},Lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function At(t,e){return t(e={exports:{}},e.exports),e.exports}var Pt="object"==typeof Lt&&Lt&&Lt.Object===Object&&Lt,Rt="object"==typeof self&&self&&self.Object===Object&&self,Nt=Pt||Rt||Function("return this")(),bt=Nt.Symbol,wt=Object.prototype,Mt=wt.hasOwnProperty,Dt=wt.toString,zt=bt?bt.toStringTag:void 0;var Bt=function(t){var e=Mt.call(t,zt),n=t[zt];try{var o=!(t[zt]=void 0)}catch(t){}var r=Dt.call(t);return o&&(e?t[zt]=n:delete t[zt]),r},jt=Object.prototype.toString;var Ft=function(t){return jt.call(t)},Ut=bt?bt.toStringTag:void 0;var qt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(Ut&&Ut in Object(t)?Bt:Ft)(t)};var Gt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Zt=function(t){return!!Gt(t)&&("[object Function]"==(t=qt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)},St=Nt["__core-js_shared__"],Ht=(xt=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+xt:"";var Kt=function(t){return!!Ht&&Ht in t},Wt=Function.prototype.toString;var Vt=function(t){if(null!=t){try{return Wt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Yt=/^\[object .+?Constructor\]$/,Lt=Function.prototype,Rt=Object.prototype,wt=Lt.toString,St=Rt.hasOwnProperty,Qt=RegExp("^"+wt.call(St).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Jt=function(t){return!(!Gt(t)||Kt(t))&&(Zt(t)?Qt:Yt).test(Vt(t))};var Xt=function(t,e){return null==t?void 0:t[e]};var $t=function(t,e){return e=Xt(t,e),Jt(e)?e:void 0},te=$t(Nt,"Map"),ee=$t(Object,"create");var xt=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},ne=Object.prototype.hasOwnProperty;var Lt=function(t){var e=this.__data__;if(ee){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ne.call(e,t)?e[t]:void 0},oe=Object.prototype.hasOwnProperty;Rt=function(t){var e=this.__data__;return ee?void 0!==e[t]:oe.call(e,t)};wt=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ee&&void 0===e?"__lodash_hash_undefined__":e,this};function re(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}re.prototype.clear=function(){this.__data__=ee?ee(null):{},this.size=0},re.prototype.delete=xt,re.prototype.get=Lt,re.prototype.has=Rt,re.prototype.set=wt;var ie=re;St=function(){this.size=0,this.__data__={hash:new ie,map:new(te||Ct),string:new ie}};var se=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ae=function(t,e){return t=t.__data__,se(e)?t["string"==typeof e?"string":"hash"]:t.map};xt=function(t){return t=ae(this,t).delete(t),this.size-=t?1:0,t};Lt=function(t){return ae(this,t).get(t)};Rt=function(t){return ae(this,t).has(t)};wt=function(t,e){var n=ae(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this};function le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}le.prototype.clear=St,le.prototype.delete=xt,le.prototype.get=Lt,le.prototype.has=Rt,le.prototype.set=wt;var ce=le;Lt=function(t,e){var n=this.__data__;if(n instanceof Ct){var o=n.__data__;if(!te||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new ce(o)}return n.set(t,e),this.size=n.size,this};function ue(t){t=this.__data__=new Ct(t);this.size=t.size}ue.prototype.clear=Et,ue.prototype.delete=kt,ue.prototype.get=Ot,ue.prototype.has=It,ue.prototype.set=Lt;var he=ue;var pe=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o&&!1!==e(t[n],n,t););return t},de=function(){try{var t=$t(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var fe=function(t,e,n){"__proto__"==e&&de?de(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},me=Object.prototype.hasOwnProperty;var ge=function(t,e,n){var o=t[e];me.call(t,e)&&yt(o,n)&&(void 0!==n||e in t)||fe(t,e,n)};var ye=function(t,e,n,o){var r=!n;n=n||{};for(var i=-1,s=e.length;++i<s;){var a=e[i],l=o?o(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),(r?fe:ge)(n,a,l)}return n};var ve=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o};var _e=function(t){return null!=t&&"object"==typeof t};var Rt=function(t){return _e(t)&&"[object Arguments]"==qt(t)},wt=Object.prototype,be=wt.hasOwnProperty,we=wt.propertyIsEnumerable,Se=Rt(function(){return arguments}())?Rt:function(t){return _e(t)&&be.call(t,"callee")&&!we.call(t,"callee")},xe=Array.isArray;function Te(){return!1}var Ce=At(function(t,e){var n=e&&!e.nodeType&&e,e=n&&t&&!t.nodeType&&t,n=e&&e.exports===n?Nt.Buffer:void 0,n=n?n.isBuffer:void 0;t.exports=n||Te}),Ee=/^(?:0|[1-9]\d*)$/;var ke=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ee.test(t))&&-1<t&&t%1==0&&t<e};var Oe=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991},Ie={};Ie["[object Float32Array]"]=Ie["[object Float64Array]"]=Ie["[object Int8Array]"]=Ie["[object Int16Array]"]=Ie["[object Int32Array]"]=Ie["[object Uint8Array]"]=Ie["[object Uint8ClampedArray]"]=Ie["[object Uint16Array]"]=Ie["[object Uint32Array]"]=!0,Ie["[object Arguments]"]=Ie["[object Array]"]=Ie["[object ArrayBuffer]"]=Ie["[object Boolean]"]=Ie["[object DataView]"]=Ie["[object Date]"]=Ie["[object Error]"]=Ie["[object Function]"]=Ie["[object Map]"]=Ie["[object Number]"]=Ie["[object Object]"]=Ie["[object RegExp]"]=Ie["[object Set]"]=Ie["[object String]"]=Ie["[object WeakMap]"]=!1;Et=function(t){return _e(t)&&Oe(t.length)&&!!Ie[qt(t)]};var kt=function(e){return function(t){return e(t)}},Ot=At(function(t,e){var e=e&&!e.nodeType&&e,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&Pt.process,e=function(){try{var t=n&&n.require&&n.require("util").types;return t?t:o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=e}),It=Ot&&Ot.isTypedArray,Le=It?kt(It):Et,Ae=Object.prototype.hasOwnProperty;var Pe=function(t,e){var n,o=xe(t),r=!o&&Se(t),i=!o&&!r&&Ce(t),s=!o&&!r&&!i&&Le(t),a=o||r||i||s,l=a?ve(t.length,String):[],c=l.length;for(n in t)!e&&!Ae.call(t,n)||a&&("length"==n||i&&("offset"==n||"parent"==n)||s&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||ke(n,c))||l.push(n);return l},Re=Object.prototype;var Ne=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Re)};var Lt=function(e,n){return function(t){return e(n(t))}},Me=Lt(Object.keys,Object),De=Object.prototype.hasOwnProperty;var ze=function(t){if(!Ne(t))return Me(t);var e,n=[];for(e in Object(t))De.call(t,e)&&"constructor"!=e&&n.push(e);return n};var Be=function(t){return null!=t&&Oe(t.length)&&!Zt(t)};var je=function(t){return(Be(t)?Pe:ze)(t)};var Fe=function(t,e){return t&&ye(e,je(e),t)};var Ue=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},qe=Object.prototype.hasOwnProperty;var Ge=function(t){if(!Gt(t))return Ue(t);var e,n=Ne(t),o=[];for(e in t)("constructor"!=e||!n&&qe.call(t,e))&&o.push(e);return o};var Ze=function(t){return Be(t)?Pe(t,!0):Ge(t)};var He=function(t,e){return t&&ye(e,Ze(e),t)},Ke=At(function(t,e){var n=e&&!e.nodeType&&e,e=n&&t&&!t.nodeType&&t,n=e&&e.exports===n?Nt.Buffer:void 0,o=n?n.allocUnsafe:void 0;t.exports=function(t,e){return e?t.slice():(e=t.length,e=o?o(e):new t.constructor(e),t.copy(e),e)}});var We=function(t,e){var n=-1,o=t.length;for(e=e||Array(o);++n<o;)e[n]=t[n];return e};var Ve=function(t,e){for(var n=-1,o=null==t?0:t.length,r=0,i=[];++n<o;){var s=t[n];e(s,n,t)&&(i[r++]=s)}return i};var wt=function(){return[]},Ye=Object.prototype.propertyIsEnumerable,Qe=Object.getOwnPropertySymbols,Je=Qe?function(e){return null==e?[]:(e=Object(e),Ve(Qe(e),function(t){return Ye.call(e,t)}))}:wt;var Xe=function(t,e){return ye(t,Je(t),e)};var $e=function(t,e){for(var n=-1,o=e.length,r=t.length;++n<o;)t[r+n]=e[n];return t},tn=Lt(Object.getPrototypeOf,Object),en=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)$e(e,Je(t)),t=tn(t);return e}:wt;var nn=function(t,e){return ye(t,en(t),e)};var on=function(t,e,n){return e=e(t),xe(t)?e:$e(e,n(t))};var rn=function(t){return on(t,je,Je)};function sn(t){return on(t,Ze,en)}var Rt=$t(Nt,"DataView"),It=$t(Nt,"Promise"),Et=$t(Nt,"Set"),Lt=$t(Nt,"WeakMap"),an="[object Map]",ln="[object Promise]",cn="[object Set]",un="[object WeakMap]",hn="[object DataView]",pn=Vt(Rt),dn=Vt(te),fn=Vt(It),mn=Vt(Et),gn=Vt(Lt),wt=qt,yn=wt=Rt&&wt(new Rt(new ArrayBuffer(1)))!=hn||te&&wt(new te)!=an||It&&wt(It.resolve())!=ln||Et&&wt(new Et)!=cn||Lt&&wt(new Lt)!=un?function(t){var e=qt(t),t="[object Object]"==e?t.constructor:void 0,t=t?Vt(t):"";if(t)switch(t){case pn:return hn;case dn:return an;case fn:return ln;case mn:return cn;case gn:return un}return e}:wt,vn=Object.prototype.hasOwnProperty;var _n=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&vn.call(t,"index")&&(n.index=t.index,n.input=t.input),n},bn=Nt.Uint8Array;var wn=function(t){var e=new t.constructor(t.byteLength);return new bn(e).set(new bn(t)),e};var Sn=function(t,e){return e=e?wn(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)},xn=/\w*$/;var Tn=function(t){var e=new t.constructor(t.source,xn.exec(t));return e.lastIndex=t.lastIndex,e},Rt=bt?bt.prototype:void 0,Cn=Rt?Rt.valueOf:void 0;var En=function(t){return Cn?Object(Cn.call(t)):{}};var kn=function(t,e){return e=e?wn(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)};var On=function(t,e,n){var o=t.constructor;switch(e){case"[object ArrayBuffer]":return wn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return Sn(t,n);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 kn(t,n);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return Tn(t);case"[object Set]":return new o;case"[object Symbol]":return En(t)}},In=Object.create;function Ln(){}var An=function(t){if(!Gt(t))return{};if(In)return In(t);Ln.prototype=t;t=new Ln;return Ln.prototype=void 0,t};var Pn=function(t){return"function"!=typeof t.constructor||Ne(t)?{}:An(tn(t))};var It=function(t){return _e(t)&&"[object Map]"==yn(t)},Et=Ot&&Ot.isMap,Rn=Et?kt(Et):It;var Lt=function(t){return _e(t)&&"[object Set]"==yn(t)},wt=Ot&&Ot.isSet,Nn=wt?kt(wt):Lt,Mn="[object Arguments]",Dn="[object Function]",zn="[object Object]",Bn={};Bn[Mn]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object DataView]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn[zn]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object Symbol]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=!0,Bn["[object Error]"]=Bn[Dn]=Bn["[object WeakMap]"]=!1;var jn=function n(o,r,i,t,e,s){var a,l=1&r,c=2&r,u=4&r;if(void 0!==(a=i?e?i(o,t,e,s):i(o):a))return a;if(!Gt(o))return o;var h=xe(o);if(h){if(a=_n(o),!l)return We(o,a)}else{var p=yn(o),t=p==Dn||"[object GeneratorFunction]"==p;if(Ce(o))return Ke(o,l);if(p==zn||p==Mn||t&&!e){if(a=c||t?{}:Pn(o),!l)return c?nn(o,He(a,o)):Xe(o,Fe(a,o))}else{if(!Bn[p])return e?o:{};a=On(o,p,l)}}l=(s=s||new he).get(o);if(l)return l;s.set(o,a),Nn(o)?o.forEach(function(t){a.add(n(t,r,i,t,o,s))}):Rn(o)&&o.forEach(function(t,e){a.set(e,n(t,r,i,e,o,s))});var c=u?c?sn:rn:c?keysIn:je,d=h?void 0:c(o);return pe(d||o,function(t,e){d&&(t=o[e=t]),ge(a,e,n(t,r,i,e,o,s))}),a};var Fn=function(t){return jn(t,5)};var Un=function(t,e,n){(void 0===n||yt(t[e],n))&&(void 0!==n||e in t)||fe(t,e,n)};var qn=function(l){return function(t,e,n){for(var o=-1,r=Object(t),i=n(t),s=i.length;s--;){var a=i[l?s:++o];if(!1===e(r[a],a,r))break}return t}}();var Gn=function(t){return _e(t)&&Be(t)},Rt=Function.prototype,Et=Object.prototype,Zn=Rt.toString,Hn=Et.hasOwnProperty,Kn=Zn.call(Object);var Wn=function(t){return!(!_e(t)||"[object Object]"!=qt(t))&&(null===(t=tn(t))||"function"==typeof(t=Hn.call(t,"constructor")&&t.constructor)&&t instanceof t&&Zn.call(t)==Kn)};var Vn=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Yn=function(t){return ye(t,Ze(t))};var Qn=function(t,e,n,o,r,i,s){var a,l,c,u=Vn(t,n),h=Vn(e,n),p=s.get(h);p?Un(t,n,p):((a=void 0===(c=i?i(u,h,n+"",t,e,s):void 0))&&(p=!(l=xe(h))&&Ce(h),e=!l&&!p&&Le(h),c=h,l||p||e?c=xe(u)?u:Gn(u)?We(u):p?Ke(h,!(a=!1)):e?kn(h,!(a=!1)):[]:Wn(h)||Se(h)?Se(c=u)?c=Yn(u):Gt(u)&&!Zt(u)||(c=Pn(h)):a=!1),a&&(s.set(h,c),r(c,h,o,i,s),s.delete(h)),Un(t,n,c))};var Jn=function o(r,i,s,a,l){r!==i&&qn(i,function(t,e){var n;l=l||new he,Gt(t)?Qn(r,i,e,s,o,a,l):(n=a?a(Vn(r,e),t,e+"",r,i,l):void 0,Un(r,e,n=void 0===n?t:n))},Ze)};function Xn(t){return t}var $n=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},to=Math.max;var eo=function(i,s,a){return s=to(void 0===s?i.length-1:s,0),function(){for(var t=arguments,e=-1,n=to(t.length-s,0),o=Array(n);++e<n;)o[e]=t[s+e];for(var e=-1,r=Array(s+1);++e<s;)r[e]=t[e];return r[s]=a(o),$n(i,this,r)}};var no=function(t){return function(){return t}},oo=Date.now;var ro=function(n){var o=0,r=0;return function(){var t=oo(),e=16-(t-r);if(r=t,0<e){if(800<=++o)return arguments[0]}else o=0;return n.apply(void 0,arguments)}}(de?function(t,e){return de(t,"toString",{configurable:!0,enumerable:!1,value:no(e),writable:!0})}:Xn);var io=function(t,e){return ro(eo(t,e,Xn),t+"")};var so=function(t,e,n){if(!Gt(n))return!1;var o=typeof e;return!!("number"==o?Be(n)&&ke(e,n.length):"string"==o&&e in n)&&yt(n[e],t)};var ao,lo=function(a){return io(function(t,e){var n=-1,o=e.length,r=1<o?e[o-1]:void 0,i=2<o?e[2]:void 0,r=3<a.length&&"function"==typeof r?(o--,r):void 0;for(i&&so(e[0],e[1],i)&&(r=o<3?void 0:r,o=1),t=Object(t);++n<o;){var s=e[n];s&&a(t,s,n,r)}return t})}(function(t,e,n){Jn(t,e,n)}),co=(O(uo,ao=M),uo);function uo(){var t=null!==ao&&ao.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 ho,It=(O(po,ho=ot),po.prototype.onAdd=function(t,e){var n=this;this.map=t;var o=this.buildContainer(t,this.options.style,"Map Style Control"),r=this.buildStyleOpsGrid();this.styleOpsGrid=r;var i=this.buildCurrStyleBtn(),t=H("Select Style");return r.classList.add(e&&e.position||"top-right"),o.addEventListener("mouseover",function(){n.hasMouse=!0,o.classList.add(po.Css.inUse),r.classList.remove("hidden-accessible-element")}),o.addEventListener("focusin",function(){n.hasFocus=!0,o.classList.add(po.Css.inUse),r.classList.remove("hidden-accessible-element")}),o.addEventListener("mouseleave",function(){n.hasMouse=!1,n.hasFocus||(o.classList.remove(po.Css.inUse),r.classList.add("hidden-accessible-element"))}),o.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&o.contains(t.relatedTarget)||(n.hasFocus=!1,n.hasMouse||(o.classList.remove(po.Css.inUse),r.classList.add("hidden-accessible-element")))}),r.addEventListener("keydown",function(t){27===t.keyCode&&(t.stopPropagation(),i.focus(),o.classList.contains(po.Css.inUse)&&(o.classList.remove(po.Css.inUse),r.classList.add("hidden-accessible-element")))}),i.addEventListener("click",function(t){o.classList.contains(po.Css.inUse)?(o.classList.remove(po.Css.inUse),r.classList.add("hidden-accessible-element")):(o.classList.add(po.Css.inUse),r.classList.remove("hidden-accessible-element"),r.firstElementChild&&r.firstElementChild.focus())}),e&&po.InvertOrderPositions.includes(e.position)?(o.appendChild(r),o.appendChild(i),o.appendChild(t),K(t,i)):(o.appendChild(i),o.appendChild(t),K(t,i),o.appendChild(r)),o},po.prototype.onRemove=function(){ho.prototype.onRemove.call(this),this.styleOpsGrid=null,this.styleButtons.clear(),this.map.events.remove("stylechanged",this.onStyleChange),this.map.events.remove("mapconfigurationchanged",this.onMapConfigurationChange)},po.prototype.setSelectedStyle=function(n){var e,t,o=this;this.styleIcons.has(n)&&(e=this.currStyleImage,t=this.styleIcons.get(n),e.src!==t&&(e.src=t),Object.entries(this.styleButtons).forEach(function(t){var e=R(t,2),t=e[0];return e[1].setAttribute("aria-current",t===n?"true":"false")}),this.map.styles.definitions().then(function(t){t=o.mapToFriendlyStyleName(n,t);e.alt!==t&&(e.alt=t),e.parentElement.lastChild instanceof Text&&(e.parentElement.lastChild.textContent=t)}))},po.prototype.disableStyle=function(t){t=this.styleButtons[t];t&&t.setAttribute("disabled","true")},po.prototype.enableStyle=function(t){t=this.styleButtons[t];t&&t.removeAttribute("disabled")},po.prototype.buildSelectStyleBtn=function(n,t,e){var o=this,r=document.createElement("button"),i=this.mapToFriendlyStyleName(n,t);r.setAttribute("aria-label",i),r.setAttribute("type","button");var s=new Image;e.then(function(t){return t.blob()}).then(function(t){t=URL.createObjectURL(t);s.src=t,n===o.map.getStyle().style&&(o.currStyleImage.src=t,o.currStyleImage.alt=i,o.currStyleImage.parentElement.lastChild.nodeType==Node.TEXT_NODE?o.currStyleImage.parentElement.lastChild.textContent=i:o.currStyleImage.parentElement.appendChild(document.createTextNode(i))),o.styleIcons.set(n,t)}),s.setAttribute("aria-hidden","true"),r.appendChild(s),"icons"===this.options.layout?r.classList.add(po.Css.button):(r.classList.add(po.Css.listButton),r.classList.add(po.Css.expanded),r.appendChild(document.createTextNode(i))),r.addEventListener("click",function(){o.hasMouse=!1,o.hasFocus=!1;var t=o.styleButtons[n];t&&!t.hasAttribute("disabled")&&(o._invokeEvent("styleselected",n),o.options.autoSelectionMode&&o.map.setStyle({style:n}),Object.entries(o.styleButtons).forEach(function(t){var e=R(t,2),t=e[0];return e[1].setAttribute("aria-current",t===n?"true":"false")}))});e=document.createElement("div");return e.classList.add("selected-icon"),r.appendChild(e),r},po.prototype.buildCurrStyleBtn=function(){var t=document.createElement("button");"icons"==this.options.layout?t.classList.add(po.Css.button):t.classList.add(po.Css.listButton),t.classList.add(po.Css.currentStyle),t.setAttribute("aria-label","Select Style"),t.setAttribute("tabindex","-1"),this.currStyleImage=new Image,t.appendChild(this.currStyleImage);var e=document.createElement("div");return e.classList.add("icon"),t.appendChild(e),t},po.prototype.buildStyleOpsGrid=function(){var t=this,e=document.createElement("div");return e.classList.add(po.Css.styleOptions),"icons"===this.options.layout?e.classList.add(this.options.layout):e.classList.add(po.Css.dropdown),e.setAttribute("aria-label","Style Options"),e.classList.add("hidden-accessible-element"),this.map.styles.definitions().then(function(e){return L(t,void 0,void 0,function(){return A(this,function(t){return this.onMapConfigurationChange(e),this.map.events.add("stylechanged",this.onStyleChange),[2]})})}),this.map.events.add("mapconfigurationchanged",this.onMapConfigurationChange),e},po.prototype.populateOpsGridFromDefinitions=function(o){var t,n,r=this;this.styleOpsGrid&&(t=o.configurations,(t=Array.isArray(this.options.mapStyles)?t.filter(function(t){return r.options.mapStyles.includes(t.name.split("_indoor")[0])}):t).forEach(function(t){var e={url:t.thumbnail};t.thumbnail&&r.map.styles._transformStyleRequest(t.thumbnail,e);var n=r.map.getServiceOptions();n.transformRequest&&lo(e,n.transformRequest(e.url,"Thumbnail"));e=fetch(e.url,{headers:e.headers}),e=r.buildSelectStyleBtn(t.name,o,e);r.styleOpsGrid.appendChild(e),r.styleButtons[t.name]=e,"icons"===r.options.layout&&(t=H(r.mapToFriendlyStyleName(t.name,o)),r.styleOpsGrid.appendChild(t),K(t,e))}),n=this.map.getStyle().style,Object.entries(this.styleButtons).forEach(function(t){var e=R(t,2),t=e[0];return e[1].setAttribute("aria-current",t===n?"true":"false")}))},po.InvertOrderPositions=[u.ControlPosition.TopRight,u.ControlPosition.BottomRight],po.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"},po);function po(t){var e=ho.call(this)||this;return e.styleOpsGrid=null,e.hasMouse=!1,e.hasFocus=!1,e.styleButtons=new X,e.styleIcons=new X,e.onStyleChange=function(){var t;e.options.autoSelectionMode&&(t=e.map.getStyle().style,e.setSelectedStyle(t))},e.onMapConfigurationChange=function(t){e.styleOpsGrid&&(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 co).merge(Fn(t)),e}var fo,mo=(O(go,fo=M),go);function go(){var t=null!==fo&&fo.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}var yo,vo=(O(_o,yo=mo),_o);function _o(){var t=null!==yo&&yo.apply(this,arguments)||this;return t.isActive=!1,t.style=u.ControlStyle.light,t}var bo,wo=(O(So,bo=ot),Object.defineProperty(So.prototype,"isActive",{get:function(){if(!this.map)return!1;var t=this.map.getTraffic();return"none"!==t.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}),So.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 e=this.constructTrafficButton(t);this.container.appendChild(e);t=H("Toggle Traffic Display");return this.container.appendChild(t),K(t,e),this.container},So.prototype.onRemove=function(){bo.prototype.onRemove.call(this),this.map=null},So.prototype.getOptions=function(){return(new vo).merge({isActive:this.isActive,flow:this.options.flow,incidents:this.options.incidents,style:this.style})},So.prototype.updateButtonState=function(){this.trafficButton&&(this.isActive?this.container.classList.add("in-use"):this.container.classList.remove("in-use"),this.trafficButton.setAttribute("aria-pressed",this.isActive?"true":"false"))},So.prototype.constructTrafficButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("traffic"),n.setAttribute("aria-label","Toggle Traffic Display"),n.setAttribute("alt","Toggle Traffic Display"),n.setAttribute("type","button"),this.trafficButton=n,this.updateButtonState(),n.addEventListener("click",function(){e.isActive=!e.isActive}),n},So);function So(t){var e=bo.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new mo).merge({flow:"relative",incidents:!0}),e.style=u.ControlStyle.light,e.container=null,e.trafficButton=null,e.map=null,t&&(e.initIsActive=t.isActive||!1,e.options.flow=t.flow||"relative",e.options.incidents=t.incidents||!0,e.style=t.style||u.ControlStyle.light),e}var xo,Ot=(O(To,xo=ot),To.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},To.prototype.onRemove=function(){xo.prototype.onRemove.call(this),this.syncHiddenState&&(this.map.events.remove("styledata",this.syncHiddenState),this.syncHiddenState=null),this.map=null},To.prototype.buildTrafficLegendDiv=function(e){var n,t,o,r,i=document.createElement("div");i.classList.add("traffic-legend","hidden"),i.setAttribute("alt","Traffic Legend");var s=document.createElement("table"),a=document.createElement("tr"),l=document.createElement("td");l.setAttribute("alt","Traffic"),l.appendChild(document.createTextNode("Traffic"));var c=H("Traffic");l.classList.add("traffic-legend-title"),l.colSpan=6,a.appendChild(l),a.appendChild(c),K(c,l),s.appendChild(a);var u=document.createElement("tr");try{for(var h=P(this.table),p=h.next();!p.done;p=h.next()){var d=p.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{for(var m=(o=void 0,P(d)),g=m.next();!g.done;g=m.next()){var y=g.value,v=document.createElement("div");v.classList.add(y),f.appendChild(v)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(r=m.return)&&r.call(m)}finally{if(o)throw o.error}}}u.appendChild(f);var _=H(d instanceof Array?"Traffic Legend":d);u.appendChild(_),K(_,f)}}catch(t){n={error:t}}finally{try{p&&!p.done&&(t=h.return)&&t.call(h)}finally{if(n)throw n.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},To);function To(){var t=xo.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t.map=null,t.syncHiddenState=null,t}kt=function(t){return this.__data__.has(t)};function Co(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ce;++e<n;)this.add(t[e])}Co.prototype.add=Co.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Co.prototype.has=kt;var Eo=Co;var ko=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1};var Oo=function(t,e){return t.has(e)};var Io=function(t,e,n,o,r,i){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&a<l))return!1;if((l=i.get(t))&&i.get(e))return l==e;var c=-1,u=!0,h=2&n?new Eo:void 0;for(i.set(t,e),i.set(e,t);++c<a;){var p,d=t[c],f=e[c];if(void 0!==(p=o?s?o(f,d,c,e,t,i):o(d,f,c,t,e,i):p)){if(p)continue;u=!1;break}if(h){if(!ko(e,function(t,e){if(!Oo(h,e)&&(d===t||r(d,t,n,o,i)))return h.push(e)})){u=!1;break}}else if(d!==f&&!r(d,f,n,o,i)){u=!1;break}}return i.delete(t),i.delete(e),u};function Lo(t){var n=-1,o=Array(t.size);return t.forEach(function(t,e){o[++n]=[e,t]}),o}function Ao(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}var wt=bt?bt.prototype:void 0,Po=wt?wt.valueOf:void 0;var Ro=function(t,e,n,o,r,i,s){switch(n){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 bn(t),new bn(e))?!0:!1;case"[object Boolean]":case"[object Date]":case"[object Number]":return yt(+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=Lo;case"[object Set]":a=a||Ao;if(t.size!=e.size&&!(1&o))return!1;var l=s.get(t);if(l)return l==e;o|=2,s.set(t,e);a=Io(a(t),a(e),o,r,i,s);return s.delete(t),a;case"[object Symbol]":if(Po)return Po.call(t)==Po.call(e)}return!1},No=Object.prototype.hasOwnProperty;var Mo=function(t,e,n,o,r,i){var s=1&n,a=rn(t),l=a.length;if(l!=rn(e).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:No.call(e,u)))return!1}var h=i.get(t);if(h&&i.get(e))return h==e;var p=!0;i.set(t,e),i.set(e,t);for(var d,f=s;++c<l;){var m,g=t[u=a[c]],y=e[u];if(!(void 0===(m=o?s?o(y,g,u,e,t,i):o(g,y,u,t,e,i):m)?g===y||r(g,y,n,o,i):m)){p=!1;break}f=f||"constructor"==u}return!p||f||(d=t.constructor)!=(h=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof d&&d instanceof d&&"function"==typeof h&&h instanceof h)&&(p=!1),i.delete(t),i.delete(e),p},Do="[object Arguments]",zo="[object Array]",Bo="[object Object]",jo=Object.prototype.hasOwnProperty;var Fo=function(t,e,n,o,r,i){var s=xe(t),a=xe(e),l=s?zo:yn(t),c=a?zo:yn(e),u=(l=l==Do?Bo:l)==Bo,a=(c=c==Do?Bo:c)==Bo;if((c=l==c)&&Ce(t)){if(!Ce(e))return!1;u=!(s=!0)}if(c&&!u)return i=i||new he,s||Le(t)?Io(t,e,n,o,r,i):Ro(t,e,l,n,o,r,i);if(!(1&n)){u=u&&jo.call(t,"__wrapped__"),a=a&&jo.call(e,"__wrapped__");if(u||a)return r(u?t.value():t,a?e.value():e,n,o,i=i||new he)}return!!c&&(i=i||new he,Mo(t,e,n,o,r,i))};var Uo=function t(e,n,o,r,i){return e===n||(null==e||null==n||!_e(e)&&!_e(n)?e!=e&&n!=n:Fo(e,n,o,r,t,i))};var qo,Go=function(t,e){return Uo(t,e)},Zo=(qo=Object.freeze({__proto__:null,default:{}}))&&qo.default||qo,Ho=At(function(a){!function(){for(var e,n,o=0,r=[],t=0;t<256;t++)r[t]=(t+256).toString(16).substr(1);function i(){var t,t=(t=16,(!e||s.BUFFER_SIZE<o+t)&&(o=0,e=s.randomBytes(s.BUFFER_SIZE)),e.slice(o,o+=t));return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}function s(){var t=i();return r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}s.BUFFER_SIZE=4096,s.bin=i,s.clearBuffer=function(){e=null,o=0},s.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?n=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(n=window.msCrypto),n=n||Zo,(a.exports=s).randomBytes=function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){t=new Uint8Array(t);return n.getRandomValues(t),Array.from(t)}:function(t){t=new Uint8Array(t);return n.getRandomValues(t),t}}return function(t){for(var e=[],n=0;n<t;n++)e.push(Math.floor(256*Math.random()));return e}}()}()}),Ko=(Wo.TYPE="Feature",Wo);function Wo(t,e,n,o){this.type="Feature",this.type=Wo.TYPE,this.properties=e||{},this.id=n,this.geometry=t,this.bbox=o}var Vo,Yo=(O(Qo,Vo=Array),Qo.fromData=function(n){var o=NaN,r=NaN,i=new Set(["y"]),s=new Set(["x"]);return Object.keys(n).forEach(function(t){var e=t.toLowerCase();isNaN(o)&&i.has(e)&&"number"==typeof n[t]?o=n[t]:isNaN(r)&&s.has(e)&&"number"==typeof n[t]&&(r=n[t])}),isNaN(o)||isNaN(r)?null:new Qo(o,r)},Qo.getX=function(t){return 0<t.length?t[0]:NaN},Qo.getY=function(t){return 1<t.length?t[1]:NaN},Qo.getDestination=function(t,e,n){return new Qo(Qo.getX(t)+n*Math.cos((e+270)*Math.PI/180),Qo.getY(t)+n*Math.sin((e+270)*Math.PI/180))},Qo.getDistance=function(t,e){var n=Qo.getX(t)-Qo.getX(e),e=Qo.getY(t)-Qo.getY(e);return Math.sqrt(n*n+e*e)},Qo.getHeading=function(t,e){var n=Qo.getX(e)-Qo.getX(t),e=Qo.getY(t)-Qo.getY(e);return 180*(2.5*Math.PI-Math.atan2(e,n))/Math.PI%360},Qo);function Qo(t,e){return Vo.call(this,t,e)||this}var Jo=(Xo.TYPE="Point",Xo);function Xo(t){this.type="Point",this.type=Xo.TYPE,this.coordinates=t}var $o,tr,er,nr,or,rr=6378137,ir=Math.PI/180,sr=180/Math.PI,ar=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],lr=85.0511;function cr(t){return t*ir}function ur(t){return t*sr}function hr(t,e,n){return Math.min(Math.max(t,e),n)}function pr(t,e){var n=cr(e[1]-t[1]),o=cr(e[0]-t[0]),o=Math.pow(Math.sin(n/2),2)+Math.cos(cr(t[1]))*Math.cos(cr(e[1]))*Math.pow(Math.sin(o/2),2),o=2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o));return Math.round(rr*o*100)/100}function dr(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return tr.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return tr.kilometers;case"miles":case"mile":case"mi":return tr.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return tr.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return tr.yards;default:return tr.meters}return tr.meters}function fr(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return or.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return or.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return or.knotsPerSecond;case"standardgravity":case"g":return or.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return or.feetPerSecondSquared;case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return or.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return or.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return or.kilometersPerHourSecond;default:return or.metersPerSecondSquared}return or.metersPerSecondSquared}function mr(t){if(t)switch(t){case"acres":case"ac":return $o.acres;case"hectares":case"ha":return $o.hectares;case"squareFeet":case"ft^2":case"ft2":return $o.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return $o.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return $o.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return $o.squareMiles;default:return $o.squareMeters}return $o.squareMeters}function gr(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return nr.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return nr.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return nr.knots;case"mach":case"m":return nr.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return nr.kilometersPerHour;default:return nr.metersPerSecond}return nr.metersPerSecond}function yr(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return er.ms;case"minutes":case"minute":case"mins":case"min":return er.minutes;case"hours":case"hour":case"hr":case"h":return er.hours;case"days":case"day":case"d":return er.days;default:return er.seconds}return er.seconds}function vr(t){var e=0;if(t&&0<t.length)for(var e=Math.abs(_r(t[0])),n=1,o=t.length;n<o;n++)e-=Math.abs(_r(t[n]));return e}function _r(t){var e=0;if(3<=t.length){for(var n=void 0,o=void 0,r=0,i=t.length;r<i;r++)e+=(cr(t[r===i-2?(n=i-2,o=i-1,0):r===i-1?(n=i-1,o=0,1):(o=(n=r)+1,r+2)][0])-cr(t[n][0]))*Math.sin(cr(t[o][1]));e=e*rr*rr/2}return e}function br(t,e,n){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function wr(t,e,n){if(2<=n.length){for(var o,r,i=1/0,s=null,a=Fr(n,22),l=0,c=a.length-1;l<c;l++)r=function(t,e,n){if(e[0]===n[0]&&e[1]===n[1])return e;var o=t[0]-e[0],r=t[1]-e[1],i=n[0]-e[0],t=n[1]-e[1],r=(i*o+t*r)/(i*i+t*t);return r<0?e:1<r?n:[e[0]+i*r,e[1]+t*r]}(e,a[l],a[l+1]),(o=Yo.getDistance(e,r))<i&&(i=o,s=r);if(s){var u=jr([s],22)[0];return new Ko(new Jo(u),{distance:Cr(t,u)})}}else if(1===n.length)return new Ko(new Jo(n[0]),{distance:Cr(t,n[0])});return null}function Sr(t,e){var n;return!isNaN(t)&&"number"==typeof e&&0<=e&&(n=void 0,n=e<ar.length?ar[e]:Math.pow(10,e),t=Math.round(t*n)/n),t}function xr(t,e,n,o){switch(dr(e)){case tr.meters:t/=1e3;break;case tr.feet:t/=3280.8399;break;case tr.miles:t/=.62137119;break;case tr.yards:t/=1093.6133;break;case tr.nauticalMiles:t/=.5399568;break;case tr.kilometers:}switch(dr(n)){case tr.meters:t*=1e3;break;case tr.feet:t*=3280.8399;break;case tr.miles:t*=.62137119;break;case tr.yards:t*=1093.6133;break;case tr.nauticalMiles:t*=.5399568;break;case tr.kilometers:}return"number"==typeof o&&0<=o&&(o=Math.pow(10,o),t=Math.round(t*o)/o),t}function Tr(t,e,n,o){o=o||"meters",t=Qr(t);var r=Er(o),o=cr(t[1]),t=cr(t[0]),e=e*ir,n=n/r,r=Math.asin(Math.sin(o)*Math.cos(n)+Math.cos(o)*Math.sin(n)*Math.cos(e)),o=t+Math.atan2(Math.sin(e)*Math.sin(n)*Math.cos(o),Math.cos(n)-Math.sin(o)*Math.sin(r)),r=hr(Dr(r*sr),-85,85);return[zr(o*sr),r]}function Cr(t,e,n){e=pr(t=Qr(t),e=Qr(e));return"meters"===n?e:xr(e,"meters",n||"meters")}function Er(t){t=dr(t);return xr(rr,tr.meters,t)}function kr(t,e,n){for(var o=[],r=cr(t[1]),i=cr(t[0]),s=cr(e[1]),a=cr(e[0]),l=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))),c=0;c<=n;c++){var u=c/n,h=Math.sin((1-u)*l)/Math.sin(l),p=Math.sin(u*l)/Math.sin(l),d=h*Math.cos(r)*Math.cos(i)+p*Math.cos(s)*Math.cos(a),u=h*Math.cos(r)*Math.sin(i)+p*Math.cos(s)*Math.sin(a),p=h*Math.sin(r)+p*Math.sin(s),p=Math.atan2(p,Math.sqrt(Math.pow(d,2)+Math.pow(u,2))),d=Math.atan2(u,d),p=hr(p*sr,-85,85);d*=sr,o.push([d,p])}return o}function Or(t){return(Array.isArray(t)?t:t.coordinates).reduce(function(t,e){var n=0<t.length?t[t.length-1]:null;return n&&180<Math.abs(e[0]-n[0])?(n=n[0]<0?e[0]-360:e[0]+360,t.push([n,e[1]])):t.push(e),t},[])}function Ir(t){for(var e,n,o,r,i,s=Array.isArray(t)?t:t.coordinates,a=[],l=[],c=0;c<s.length;c++)a.push(s[c]),c+1>=s.length||(e=(o=R(s[c],2))[0],n=o[1],i=(r=R(s[c+1],2))[0],o=r[1],180<Math.abs(i-e)&&(r=0<e?180:-180,i=Math.abs((0<e?i+360:i-360)-e),i=n+(o-n)*(Math.abs(r-e)/i),a.push([r,i]),l.push(a),a=[[-r,i]]));return l.push(a),l}function Lr(t,e){if(t=Qr(t),e=Qr(e),t&&2<=t.length&&e&&2<=e.length){var n=cr(t[1]),o=cr(e[1]),e=cr(e[0]-t[0]),t=Math.sin(e)*Math.cos(o),e=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(e);return(ur(Math.atan2(t,e))+360)%360}return NaN}function Ar(t,e){var n,o=0;Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var r=0,i=n.length-1;r<i;r++)o+=pr(n[r],n[r+1]);return xr(o,"meters",e||"meters")}function Pr(t,e,n){n=n||"meters";var o,r,i=0;if(Array.isArray(t)?r=t:t.type&&"LineString"===t.type&&(r=t.coordinates),2<=r.length){for(var s=r.length,a=1;a<s;a++){if(e<=i+(o=Cr(r[a-1],r[a],n))){var l=Lr(r[a-1],r[a]);return Tr(r[a-1],l,e-i,n)}i+=o}return i<=e?r[s-1]:r[0]}return null}function Rr(t,e,n,o,r){o=o||"meters",r=r||0,t=Qr(t);for(var i=[],s=360/n,a=0;a<=n;a++)i.push(Tr(t,(a*s+r)%360,e,o));return i}function Nr(t,e,n,o,r){return Or(Rr(t,e,n,o,r))}function Mr(t,e,n){n=void 0===n?.5:n;var o=Cr(t=Qr(t),e=Qr(e),"kilometers");return Tr(t,Lr(t,e),o*n,"kilometers")}function Dr(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 zr(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function Br(t,e,n){if(0===n)return Object.assign({},t);e=Qr(e);for(var o,r,i=[],s=0,a=t.length;s<a;s++)o=Cr(e,t[s]),r=Lr(e,t[s]),i.push(Tr(e,r+n,o));return i}function jr(t,e){for(var n,o,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)n=t[s][0]/r-.5,o=.5-t[s][1]/r,i.push([360*n,90-360*Math.atan(Math.exp(2*-o*Math.PI))/Math.PI]);return i}function Fr(t,e){for(var n,o,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)o=Math.sin(t[s][1]*Math.PI/180),n=(t[s][0]+180)/360,o=.5-Math.log((1+o)/(1-o))/(4*Math.PI),i.push([Math.round(n*r),Math.round(o*r)]);return i}function Ur(t,e,n,o){switch(fr(e)){case or.kilometersPerHourSecond:t/=3.6;break;case or.milesPerHourSecond:t/=2.236936292054;break;case or.knotsPerSecond:t/=1.943844492441;break;case or.standardGravity:t/=.1019716212978;break;case or.kilometersPerSecondSquared:t/=.001;break;case or.milesPerSecondSquared:t/=.000621371192;break;case or.feetPerSecondSquared:t/=3.280839895012;break;case or.yardsPerSecondSquared:t/=1.093613298338;break;case or.metersPerSecondSquared:}switch(fr(n)){case or.kilometersPerHourSecond:t*=3.6;break;case or.milesPerHourSecond:t*=2.236936292054;break;case or.knotsPerSecond:t*=1.943844492441;break;case or.standardGravity:t*=.1019716212978;break;case or.kilometersPerSecondSquared:t*=.001;break;case or.milesPerSecondSquared:t*=.000621371192;break;case or.feetPerSecondSquared:t*=3.280839895012;break;case or.yardsPerSecondSquared:t*=1.093613298338;break;case or.metersPerSecondSquared:}return Sr(t,o)}function qr(t,e,n,o){switch(mr(e)){case $o.acres:t*=4046.8564224;break;case $o.hectares:t*=1e4;break;case $o.squareFeet:t*=.09290304;break;case $o.squareKilometers:t*=1e6;break;case $o.squareMiles:t*=259e4;break;case $o.squareYards:t*=.83612736;break;case $o.squareMeters:}switch(mr(n)){case $o.acres:t/=4046.8564224;break;case $o.hectares:t/=1e4;break;case $o.squareFeet:t/=.09290304;break;case $o.squareKilometers:t/=1e6;break;case $o.squareMiles:t/=259e4;break;case $o.squareYards:t/=.83612736;break;case $o.squareMeters:}return Sr(t,o)}function Gr(t,e,n,o){switch(gr(e)){case nr.feetPerSecond:t*=1.09728;break;case nr.milesPerHour:t*=1.6093;break;case nr.knots:t*=1.852;break;case nr.metersPerSecond:t*=3.6;break;case nr.mach:t*=1234.8;break;case nr.kilometersPerHour:}switch(gr(n)){case nr.feetPerSecond:t/=1.09728;break;case nr.milesPerHour:t/=1.6093;break;case nr.knots:t/=1.852;break;case nr.metersPerSecond:t/=3.6;break;case nr.mach:t/=1234.8;break;case nr.kilometersPerHour:}return Sr(t,o)}function Zr(t,e,n,o){switch(yr(e)){case er.ms:t/=1e3;break;case er.hours:t*=3600;break;case er.minutes:t*=60;break;case er.days:t*=86400;break;case er.seconds:}switch(yr(n)){case er.ms:t*=1e3;break;case er.hours:t/=3600;break;case er.minutes:t/=60;break;case er.days:t/=86400;break;case er.seconds:}return Sr(t,o)}function Hr(t,e,n,o,r,i,s,a){r=xr(e,r,tr.meters),i=Zr(n,i,er.seconds);return Ur(2*(r-Gr(t,o,nr.metersPerSecond)*i)/(i*i),or.metersPerSecondSquared,s,a)}function Kr(t,e,n,o,r,i,s){t=Gr(t,o,nr.metersPerSecond);return Ur((Gr(e,o,nr.metersPerSecond)-t)/Zr(n,r,er.seconds),or.metersPerSecondSquared,i,s)}function Wr(t,e,n,o){t=Vr(t),e=Vr(e);return null!=t&&null!=e?Zr(e.getTime()-t.getTime(),er.ms,n,o):NaN}function Vr(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(")){e=0,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);return new Date(e)}}else if("number"==typeof t)return new Date(t);return null}function Yr(t){var e=[],n=null,o=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(Yr(t[i]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":e=t.coordinates;break;case"Polygon":n=t.coordinates;break;case"MultiPoint":e=t.coordinates;break;case"MultiLineString":n=t.coordinates;break;case"MultiPolygon":o=t.coordinates;break;case"Feature":var s=t,e=ii._isCircle(s)?ii._getCirclePositions(s):Yr(s.geometry);break;case"FeatureCollection":e=Yr(t.features);break;case"GeometryCollection":e=Yr(t.geometries)}else if(t instanceof ii)return Yr(t.toJson());if(n)for(r=n.length,i=0;i<r;i++)e=e.concat(n[i]);else if(o)for(var a=o.length,i=0;i<a;i++)for(var l=o[i].length,c=0;c<l;c++)e=e.concat(o[i][c]);return e}function Qr(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 ii&&"Point"===t.getType())return t.getCoordinates();return null}function Jr(t,e,n){n=n||"meters";var o,r,i=0;if(Array.isArray(t)?r=t:t.type&&"LineString"===t.type&&(r=t.coordinates),2<=r.length){for(var s=r.length,a=1;a<s;a++){if(e<=i+(o=Cr(r[a-1],r[a],n))){var l=Lr(r[a-1],r[a]),c=Tr(r[a-1],l,e-i,n);return new Ko(new Jo(c),{heading:l})}i+=o}return i<=e?new Ko(new Jo(r[s-1]),{heading:Lr(r[s-2],r[s-1])}):new Ko(new Jo(r[0]),{heading:Lr(r[0],r[1])})}return null}function Xr(t,e,n,o){var r=Qr(t),i=Fr([r],22)[0],s=null,a=1/0;switch((e=e instanceof ii?e.toJson():e).type){case"Feature":return Xr(t,e.geometry,n);case"Point":d=[[e.coordinates]];break;case"MultiPoint":for(var l,c=e.coordinates,u=0,h=c.length;u<h;u++)(l=Cr(r,c[u]))<a&&(a=l,s=new Ko(new Jo(c[u]),{distance:l}));break;case"LineString":d=[e.coordinates];break;case"Polygon":case"MultiLineString":d=e.coordinates;break;case"MultiPolygon":var p=e.coordinates;if(0<p.length)for(var d=p[0],u=1,h=p.length;u<h;u++)d=d.concat(p[u])}if(d)for(var f,u=0,h=d.length;u<h;u++)(f=wr(r,i,d[u]))&&f.properties.distance<a&&(a=f.properties.distance,s=f);return s&&(s.properties.distance=xr(s.properties.distance,"meters",n,o)),s}(Lt=$o=$o||{}).squareMeters="squareMeters",Lt.acres="acres",Lt.hectares="hectares",Lt.squareFeet="squareFeet",Lt.squareKilometers="squareKilometers",Lt.squareMiles="squareMiles",Lt.squareYards="squareYards",(Rt=tr=tr||{}).meters="meters",Rt.kilometers="kilometers",Rt.feet="feet",Rt.miles="miles",Rt.nauticalMiles="nauticalMiles",Rt.yards="yards",(Et=er=er||{}).seconds="seconds",Et.hours="hours",Et.ms="ms",Et.minutes="minutes",Et.days="days",(kt=nr=nr||{}).metersPerSecond="metersPerSecond",kt.kilometersPerHour="kilometersPerHour",kt.feetPerSecond="feetPerSecond",kt.milesPerHour="milesPerHour",kt.knots="knots",kt.mach="mach",(bt=or=or||{}).milesPerSecondSquared="milesPerSecondSquared",bt.kilometersPerSecondSquared="kilometersPerSecondSquared",bt.knotsPerSecond="knotsPerSecond",bt.standardGravity="standardGravity",bt.feetPerSecondSquared="feetPerSecondSquared",bt.yardsPerSecondSquared="yardsPerSecondSquared",bt.milesPerHourSecond="milesPerHourSecond",bt.kilometersPerHourSecond="kilometersPerHourSecond",bt.metersPerSecondSquared="metersPerSecondSquared";var $r,ti=(O(ei,$r=Array),ei.fromPosition=function(t){return 2===t.length?new ei(t[0],t[1]):2<t.length?new ei(t[0],t[1],t[2]):null},ei.areEqual=function(t,e,n){if(void 0===n&&(n=6),t&&2<=t.length&&e&&2<=e.length){var o=Math.pow(10,n),r=Dr(t[1]),n=Dr(e[1]),t=zr(t[0]),e=zr(e[0]);if(0!=Math.round((r-n)*o)/o)return!1;o=Math.round((t-e)*o)/o;return 0!=o&&360!=o?!1:!0}return!1},ei.fromLatLng=function(r,t,e){var i,s,a,l,c,u,n=[];return"number"==typeof r?(n.push(r),"number"==typeof t&&n.push(t),"number"==typeof e&&n.push(e)):Array.isArray(r)?2<=r.length&&"number"==typeof r[0]&&"number"==typeof r[1]&&(3<=r.length&&"number"==typeof r[2]?n.push(r[0],r[1],r[2]):n.push(r[0],r[1])):"object"==typeof r&&(i=["lat","latitude","y"],s=["lng","longitude","lon","x"],a=["elv","elevation","alt","altitude","z"],u=c=l=NaN,Object.keys(r).forEach(function(t,e,n){var o=t.toLowerCase();isNaN(l)&&0<=i.indexOf(o)&&"number"==typeof r[t]?l=r[t]:isNaN(c)&&0<=s.indexOf(o)&&"number"==typeof r[t]?c=r[t]:isNaN(u)&&0<=a.indexOf(o)&&"number"==typeof r[t]&&(u=r[t])}),isNaN(l)||isNaN(c)||(n.push(c,l),isNaN(u)||n.push(u))),2<=n.length?n:null},ei.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var n=0,o=t.length;n<o;n++){var r=ei.fromLatLng(t[n]);r&&e.push(r)}return e},ei._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},ei);function ei(t,e,n){return n?$r.call(this,t,e,n)||this:$r.call(this,t,e)||this}var ni=(oi.TYPE="Polygon",oi);function oi(t,e){this.type="Polygon",this.type=oi.TYPE,1===ti._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var ri,ii=(O(si,ri=$),si.prototype.addProperty=function(t,e){Go(this.data.properties[t],e)||(this.data.properties[t]=Fn(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},si.prototype.getBounds=function(){var e,t,n,o,r,i=this.getCoordinates(),s=this.getType();if("Point"===s)r=this.circlePolygon?(a=this.circlePolygon.geometry.coordinates,li.fromPositions(a[0])):new li(a=i,a);else if("MultiPoint"===s||"LineString"===s){var a=i;r=li.fromPositions(a)}else if("Polygon"===s){a=i;r=li.fromPositions(a[0])}else if("MultiLineString"===s){a=i;try{for(var l=P(a),c=l.next();!c.done;c=l.next()){var u=c.value;r=li.merge(r,li.fromPositions(u))}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}}else if("MultiPolygon"===s){a=i;try{for(var h=P(a),p=h.next();!p.done;p=h.next()){var d=p.value;r=li.merge(r,li.fromPositions(d[0]))}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}return r},si.prototype.getCoordinates=function(){return Fn(this.data.geometry.coordinates)},si.prototype.getCircleCoordinates=function(){return this.circlePolygon?Fn(this.circlePolygon.geometry.coordinates[0]):null},si.prototype.getId=function(){return this.data.id},si.prototype.getProperties=function(){return Fn(this.data.properties)},si.prototype.getType=function(){return this.data.geometry.type},si.prototype.isCircle=function(){return si._isCircle(this.data)},si.prototype.isRectangle=function(){return si._isRectangle(this.data)},si.prototype.setCoordinates=function(t){t="Polygon"===this.getType()&&1===ti._getDimensions(t)?[t]:t;Go(this.data.geometry.coordinates,t)||(this.data.geometry.coordinates=Fn(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},si.prototype.setProperties=function(t){t[si._shapeIdPropName]=this.data.id,Go(this.data.properties,t)||(this.data.properties=Fn(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},si.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},si.prototype._toJson=function(){return this.circlePolygon||this.data},si.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},si.prototype._handleCircle=function(){var t;this.isCircle()?(t=si._getCirclePositions(this.data),this.circlePolygon=new Ko(new ni([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"):delete this.circlePolygon},si._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},si._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},si._getCirclePositions=function(t){return Nr(t.geometry.coordinates,t.properties.radius,72,"meters")},si._shapeIdPropName="_azureMapsShapeId",si);function si(t,e,n){var o,r,i=ri.call(this)||this;return"Feature"===t.type?(r=Fn((o=t).geometry),n=o.properties?Fn(o.properties):{},e=null==o.id||""===o.id?Ho():o.id):(r=Fn(t),e=null==e||""===e?Ho():e,n=n?Fn(n):{}),n[si._shapeIdPropName]=e,i.data=new Ko(r,n,e),i._handleCircle(),i}var ai,li=(O(ci,ai=Array),ci.fromBoundingBox=function(t){var e=ci.getWest(t),n=ci.getSouth(t),o=ci.getEast(t),t=ci.getNorth(t);return new ci([e,n,o,t])},ci.fromDimensions=function(t,e,n){var o=t[0],r=t[1],t=Math.min(Math.max(r+n/2,-85.5),85.5),r=Math.min(Math.max(r-n/2,-85.5),85.5),n=zr(o+e/2);return new ci([zr(o-e/2),r,n,t])},ci.fromEdges=function(t,e,n,o){return new ci([t,e,n,o])},ci.containsPosition=function(t,e){var n=ci.getCenter(t),o=Math.abs(n[1]-e[1]),n=Math.abs(n[0]-e[0]);180<n&&(n=360-n);e=ci.getHeight(t),t=ci.getWidth(t);return o<=e/2+1e-8&&n<=t/2+1e-8},ci.containsBoundingBox=function(t,e){var n=t&&4===t.length,o=e&&4===e.length;return!(!n||!o)&&(ci.getWest(t)<ci.getWest(e)&&ci.getWest(e)<ci.getEast(t)&&ci.getWest(t)<ci.getEast(e)&&ci.getEast(e)<ci.getEast(t)&&ci.getSouth(t)<ci.getSouth(e)&&ci.getSouth(e)<ci.getNorth(t)&&ci.getSouth(t)<ci.getNorth(e)&&ci.getNorth(e)<ci.getNorth(t))},ci.crossesAntimeridian=function(t){return zr(ci.getEast(t))-zr(ci.getWest(t))<0||ci.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)||ci.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)},ci.getCenter=function(t){var e=zr(ci.getEast(t)),n=zr(ci.getWest(t));e<n&&(e+=360);n=zr((n+e)/2),e=Dr(ci.getSouth(t)),t=Dr(ci.getNorth(t));return[n,Dr((e+t)/2)]},ci.getHeight=function(t){t=Dr(ci.getNorth(t))-Dr(ci.getSouth(t));return isNaN(t)?0:t},ci.getWidth=function(t){t=zr(ci.getEast(t))-zr(ci.getWest(t));return isNaN(t)?0:t<0?t+360:t},ci.getSouthWest=function(t){var e=this.getSouth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},ci.getNorthEast=function(t){var e=this.getNorth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},ci.getNorthWest=function(t){var e=this.getNorth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},ci.getSouthEast=function(t){var e=this.getSouth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},ci.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},ci.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},ci.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},ci.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},ci.intersect=function(t,e){var n=ci.getCenter(t),o=ci.getCenter(e),r=Math.abs(n[1]-o[1]),i=Math.abs(n[0]-o[0]);180<i&&(i=360-i);n=ci.getHeight(t),o=ci.getWidth(t),t=ci.getHeight(e),e=ci.getWidth(e);return r<=n/2+t/2&&i<=o/2+e/2},ci.merge=function(t,e){var n=t&&4===t.length,o=e&&4===e.length;if(n&&!o)return t;if(o&&!n)return e;if(!n&&!o)return null;for(var n=Math.max(Dr(ci.getNorth(t)),Dr(ci.getNorth(e))),o=Math.min(Dr(ci.getSouth(t)),Dr(ci.getSouth(e))),r=[t,e],i=[],s=0,s=0;s<r.length;s++){var a=r[s],l=zr(ci.getWest(a)),c=zr(ci.getEast(a));ci.crossesAntimeridian(a)?(i.push([l,180]),i.push([-180,c])):i.push([l,c])}i.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var u=[],h=i[0];for(s=1;s<i.length;){var p=i[s];h[1]>=p[0]?h[1]=Math.max(h[1],p[1]):(u.push(h),h=p),s++}u.push(h);var d=u.length,f=u[0][0]+360-u[d-1][1],m=[u[d-1][1],u[0][0]];for(s=1;s<d;s++){var g=u[s][0]-u[s-1][1];f<g&&(f=g,m=[u[s-1][1],u[s][0]])}return new ci([m[1],o],[m[0],n])},ci.fromPositions=function(t){for(var e,n,o=NaN,r=NaN,i=NaN,s=NaN,a=t.length,l=new Array(a),c=0;a--;)(n=t[a])&&2<=n.length&&(e=Dr(n[1]),o=isNaN(o)?e:Math.max(o,e),r=isNaN(r)?e:Math.min(r,e),l[c++]=zr(n[0]));if(c){l.length=c,l.sort(function(t,e){return t-e});for(var u=l[0]+360-l[c-1],h=0,a=1;a<c;a++){var p=l[a]-l[a-1];u<p&&(u=p,h=a)}i=l[h],s=l[(h||c)-1]}return isNaN(i)||isNaN(r)||isNaN(s)||isNaN(o)?null:new ci([i,r,s,o])},ci.fromLatLngs=function(t){return ci.fromPositions(ti.fromLatLngs(t))},ci.fromData=function(t){var e,n,o=null;if(Array.isArray(t)&&0<t.length){try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s,a=i.value;null!=(s=ci.fromData(a))&&(o=null===o?s:ci.merge(o,s))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o}if(t instanceof ii)return t.getBounds();if(t&&t.type){var l=t;if(l.bbox&&4===l.bbox.length)return l.bbox;switch(l.type){case"FeatureCollection":return ci.fromData(l.features);case"Feature":return ii._isCircle(l)?ci.fromPositions(ii._getCirclePositions(l)):ci.fromData(l.geometry);case"GeometryCollection":return ci.fromData(l.geometries);case"Point":var c=l.coordinates;if(c&&2<=c.length)return[c[0],c[1],c[0],c[1]];break;case"LineString":case"MultiPoint":return ci.fromPositions(l.coordinates);case"Polygon":case"MultiLineString":var u=l.coordinates;if(u&&0<u.length){for(var h=0,p=u.length;h<p;h++)null!=(s=ci.fromPositions(u[h]))&&(o=null===o?s:ci.merge(o,s));if(null!=o)return o}break;case"MultiPolygon":var d=l.coordinates;if(d&&0<d.length){for(h=0,p=d.length;h<p;h++)for(var f=0,m=d[h].length;f<m;f++)null!=(s=ci.fromPositions(d[h][f]))&&(o=null===o?s:ci.merge(o,s));return o}}}return null},ci.splitOnAntimeridian=function(t){var e,n,o,r,i,s,a=[];return ci.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)?[[-180,t[1],t[2],180,t[4],t[5]]]:ci.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)?[[-180,t[1],180,t[3]]]:(ci.crossesAntimeridian(t)?(s=e=void 0,n=zr(ci.getWest(t)),o=zr(ci.getEast(t)),r=Dr(ci.getNorth(t)),i=Dr(ci.getSouth(t)),s=6<=t.length?(e=[n,i,t[2],180,r,t[5]],[-180,i,t[2],o,r,t[5]]):(e=[n,i,180,r],[-180,i,o,r]),a.push(e,s)):a.push(t),a)},ci.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe=function(t){return 6<=t.length&&360<t[3]-t[0]},ci.isBoundingBoxWithLessThanSixElementsLargerThanGlobe=function(t){return t.length<6&&360<t[2]-t[0]},ci);function ci(t,e){var n,o=this;return t&&e?o=(n=t)[2]&&e[2]?ai.call(this,n[0],n[1],n[2]||0,e[0],e[1],e[2]||0)||this:ai.call(this,n[0],n[1],e[0],e[1])||this:!t||(t=t)&&(4===t.length?o=ai.call(this,t[0],t[1],t[2],t[3])||this:6<=t.length&&(o=ai.call(this,t[0],t[1],t[2],t[3],t[4],t[5])||this)),o}var ui=(hi.TYPE="FeatureCollection",hi);function hi(t,e){this.type="FeatureCollection",this.type=hi.TYPE,this.features=t,this.bbox=e}pi.TYPE="GeometryCollection",wt=pi;function pi(t){this.type="GeometryCollection",this.type=pi.TYPE,this.geometries=t}di.TYPE="LineString",Lt=di;function di(t,e){this.type="LineString",this.type=di.TYPE,this.coordinates=t,this.bbox=e}fi.TYPE="MultiLineString",Rt=fi;function fi(t,e){this.type="MultiLineString",this.type=fi.TYPE,this.coordinates=t,this.bbox=e}mi.TYPE="MultiPoint",Et=mi;function mi(t,e){this.type="MultiPoint",this.type=mi.TYPE,this.coordinates=t,this.bbox=e}gi.TYPE="MultiPolygon",kt=gi;function gi(t,e){this.type="MultiPolygon",this.type=gi.TYPE,this.coordinates=t,this.bbox=e}var yi,bt=(O(vi,yi=Array),vi.fromPosition=function(t){return 2<=t.length?new vi((180+t[0])/360,vi._latToMercatorY(t[1]),3<=t.length?vi._altitudeToMercatorZ(t[2],t[1]):0):[0,0,0]},vi.fromPositions=function(t){for(var e=[],n=0,o=t.length;n<o;n++)e.push(this.fromPosition(t[n]));return e},vi.toFloat32Array=function(t){for(var e=new Float32Array(3*t.length),n=0,o=t.length;n<o;n++){var r=3*n,i=t[n];e[r]=(180+i[0])/360,e[1+r]=vi._latToMercatorY(i[1]),e[2+r]=3<=i.length?vi._altitudeToMercatorZ(i[2],i[1]):0}return e},vi.toPosition=function(t){if(2<=t.length){var e=360/Math.PI*Math.atan(Math.exp((180-360*t[1])*Math.PI/180))-90;return new ti(360*t[0]-180,e,3<=t.length?vi._mercatorZToAltitude(t[2],t[1]):0)}return[0,0,0]},vi.toPositions=function(t){for(var e=[],n=0,o=t.length;n<o;n++)e.push(this.toPosition(t[n]));return e},vi.mercatorScale=function(t){return 1/Math.cos(t*Math.PI/180)},vi.meterInMercatorUnits=function(t){return 1/vi.earthCircumference*vi.mercatorScale(vi._latToMercatorY(t))},vi._circumferenceAtLatitude=function(t){return vi.earthCircumference*Math.cos(t*Math.PI/180)},vi._altitudeToMercatorZ=function(t,e){return t/vi._circumferenceAtLatitude(e)},vi._mercatorZToAltitude=function(t,e){return t*vi._circumferenceAtLatitude(vi._latToMercatorY(e))},vi._latToMercatorY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360},vi.earthCircumference=2*Math.PI*Er(),vi);function vi(t,e,n){return yi.call(this,t,e,n||0)||this}var _i,Lt=Object.freeze({__proto__:null,Feature:Ko,FeatureCollection:ui,LineString:Lt,Point:Jo,Polygon:ni,Position:ti,BoundingBox:li,MercatorPoint:bt,MultiLineString:Rt,MultiPoint:Et,MultiPolygon:kt,GeometryCollection:wt}),bi=At(function(t,e){function m(t,e){return t*t+e*e}function i(t,e){for(var n,o,r,i=t[0],s=[i],a=1,l=t.length;a<l;a++)n=t[a],r=i,m((o=n)[0]-r[0],o[1]-r[1])>e&&(s.push(n),i=n);return i!==n&&s.push(n),s}function g(t,e,n,o,r){for(var i,s,a,l,c,u,h,p=o,d=e+1;d<n;d++){var f=(s=t[d],a=t[e],l=t[n],h=u=f=c=void 0,c=a[0],f=a[1],u=l[0]-c,h=l[1]-f,0==u&&0==h||(1<(a=((s[0]-c)*u+(s[1]-f)*h)/m(u,h))?(c=l[0],f=l[1]):0<a&&(c+=u*a,f+=h*a)),m(s[0]-c,s[1]-f));p<f&&(i=d,p=f)}o<p&&(1<i-e&&g(t,e,i,o,r),r.push(t[i]),1<n-i&&g(t,i,n,o,r))}e.__esModule=!0,e.SimplifyAP=function(t,e,n){if(t.length<=2)return t;var o,r=(e=void 0===e?1:e)*e;return t=(n=void 0===n?!1:n)?t:i(t,r),e=(o=t).length-1,n=[o[0]],g(o,0,e,r,n),n.push(o[e]),t=n}});(_i=bi)&&_i.__esModule&&Object.prototype.hasOwnProperty.call(_i,"default")&&_i.default;var wi=bi.SimplifyAP;var Si=(xi.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},xi.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},xi.prototype.transformArray=function(t,e,n){var o,r;if(t&&Array.isArray(t)&&Array.isArray(t[0])){var i=[];try{for(var s=P(t),a=s.next();!a.done;a=s.next()){var l=a.value;i.push(this.transform(l,e,n))}}catch(t){o={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}return null},xi.prototype.transform=function(t,e,n){var o=t[0]*e[0][3]+t[1]*e[1][3]+e[2][3],e=t[0]*e[0][4]+t[1]*e[1][4]+e[2][4];return"number"==typeof n&&0<=n?[Sr(o,n),Sr(e,n)]:[Sr(o,6),Sr(e,6)]},xi._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 n=Math.min(t[0].length,e[0].length),o=n+1;if(t.length<n)throw new Error("Erorr: At least "+n+" reference points required.");for(var r=[],i=[],s=0;s<o;s++){i[s]=[];for(var a=0;a<o;a++){a<n&&(r[a]=0);for(var l=i[s][a]=0;l<t.length;l++)a<n&&(r[a]+=s<n?t[l][s]*e[l][a]:e[l][a]),i[s][a]+=n<=s&&n<=a?1:n<=s?t[l][a]:n<=a?t[l][s]:t[l][s]*t[l][a]}i[s]=i[s].concat(r)}if(!this._gaussJordanElimination(i))throw new Error("Error: Singular matrix. Points are likely coplanar.");return i},xi._gaussJordanElimination=function(t){for(var e,n=t.length,o=2*n-1,r=0;r<n;r++){for(var i=r,s=r+1;s<n;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<n;a++)for(var l=t[a][r]/t[r][r],c=r;c<o;c++)t[a][c]-=t[r][c]*l}for(r=n-1;-1<r;r--){l=t[r][r];for(s=0;s<r;s++)for(var u=o-1;r-1<u;u--)t[s][u]-=t[r][u]*t[s][r]/l;t[r][r]/=l;for(var h=n;h<o;h++)t[r][h]/=l}return!0},xi);function xi(t,e){this.M=xi._calculateAffineTransform(t,e),this.inverseM=xi._calculateAffineTransform(e,t)}var Ti,bt=Object.freeze({__proto__:null,AffineTransform:Si,WEBMERCATOR_MAXLAT:lr,_precision:Sr,get AreaUnits(){return $o},get DistanceUnits(){return tr},get TimeUnits(){return er},get SpeedUnits(){return nr},get AccelerationUnits(){return or},boundingBoxToPolygon:function(t){var e=zr(li.getWest(t)),n=zr(li.getEast(t)),o=Dr(li.getNorth(t)),r=Dr(li.getSouth(t)),t=li.getCenter(t),o=[[e,o],[e,r],[t[0],r],[n,r],[n,o],[t[0],o],[e,o]];return new ni([o])},convertDistance:xr,getCardinalSpline:function(t,e,n,o){if(!t||t.length<=2)return i;"number"!=typeof e&&(e=.5),("number"!=typeof n||n<=0)&&(n=15);var r=t.length,i=t.slice(0);o?(ti.areEqual(i[0],i[r-1])&&(i.pop(),r--),i.unshift(t[r-1]),i.push(t[0]),i.push(t[1]),r++):(i.unshift(t[0]),i.push(t[r-1]));var s,a,l,c=[];c.push([1,0,0,0]);for(var u=1;u<n-1;u++)c.push([2*(l=(s=u/n)*(a=s*s))-3*a+1,-2*l+3*a,l-2*a+s,l-a]);c.push([0,1,0,0]);for(var h,p,d,f,m,g,y=[],u=1;u<r;u++)for(h=e*(i[u+1][0]-i[u-1][0]),p=e*(i[u+1][1]-i[u-1][1]),d=e*(i[u+2][0]-i[u][0]),f=e*(i[u+2][1]-i[u][1]),s=0;s<n;s++)g=(m=c[s])[0]*i[u][0]+m[1]*i[u+1][0]+m[2]*h+m[3]*d,m=hr(m[0]*i[u][1]+m[1]*i[u+1][1]+m[2]*p+m[3]*f,-85,85),y.push([g,m]);return y},getDestination:Tr,getDistanceTo:Cr,getEarthRadius:Er,getPathDenormalizedAtAntimerian:Or,getPathSplitByAntimeridian:Ir,getGeodesicPath:function(t,e){var n;(!e||e<=0)&&(e=15),Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var o=n.length-1,r=[],i=0;i<o;i++)r=r.concat(kr(n[i],n[i+1],e));return Or(r)},getGeodesicPaths:function(t,e){var n;(!e||e<=0)&&(e=15),Array.isArray(t)?n=t:t.type&&"LineString"===t.type&&(n=t.coordinates);for(var o=n.length-1,r=[],i=[],s=0;s<o;s++)for(var a,l,c,u,h,p=kr(n[s],n[s+1],e),d=0;d<p.length;d++)r.push(p[d]),d+1>=p.length||(a=(c=R(p[d],2))[0],l=c[1],h=(u=R(p[d+1],2))[0],c=u[1],180<Math.abs(h-a)&&(u=0<a?180:-180,h=Math.abs((0<a?h+360:h-360)-a),h=l+(c-l)*(Math.abs(u-a)/h),r.push([u,h]),i.push(r),r=[[-u,h]]));return i.push(r),i},getHeading:Lr,getLengthOfPath:Ar,getPositionAlongPath:Pr,getRegularPolygonPath:Nr,getRegularPolygonPaths:function(t,e,n,o,r){return Ir(Rr(t,e,n,o,r))},interpolate:Mr,normalizeLatitude:Dr,normalizeLongitude:zr,rotatePositions:Br,getPixelHeading:function(t,e){var t=(n=R(Fr([t=Qr(t),e=Qr(e)],21),2))[0],n=(e=n[1])[0]-t[0],e=t[1]-e[1];return(2.5*Math.PI-Math.atan2(e,n))*sr%360},mercatorPixelsToPositions:jr,mercatorPositionsToPixels:Fr,convertAcceleration:Ur,convertArea:qr,convertSpeed:Gr,convertTimespan:Zr,getAcceleration:Hr,getAccelerationFromSpeeds:Kr,getAccelerationFromFeatures:function(t,e,n,o,r,i,s){if("string"==typeof n&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var a=Wr(t.properties[n],e.properties[n],er.seconds);if(!isNaN(a)){var l=0;if(o&&"string"==typeof o){n=t.properties[o],o=e.properties[o];if("number"==typeof n&&(l=n,"number"==typeof o))return Kr(n,o,a,r,er.seconds,i,s)}return Hr(l,Cr(t.geometry.coordinates,e.geometry.coordinates,tr.meters),a,r,tr.meters,er.seconds,i,s)}}return NaN},getArea:function t(e,n,o){if(e){var r=0;switch((e=e instanceof ii?e.toJson():e).type){case"Feature":var i=e;if(e.geometry)return t(i.geometry,n,o);break;case"Polygon":(i=e).coordinates&&(r=vr(i.coordinates));break;case"MultiPolygon":var s=e;if(s.coordinates)for(var a=0,l=s.coordinates.length;a<l;a++)r+=vr(s.coordinates[a])}return qr(r,$o.squareMeters,n,o)}return 0},getSpeed:function(t,e,n,o,r,i){if(t=Qr(t),e=Qr(e),t&&e){o=Zr(n,o,er.seconds);return Gr(Cr(t,e,tr.meters)/o,nr.metersPerSecond,r,i)}return 0},getSpeedFromFeatures:function(t,e,n,o,r){if("string"==typeof n&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){n=this.getTimespan(t.properties[n],e.properties[n],er.seconds);if(!isNaN(n)){e=this.getDistanceTo(t.geometry.coordinates,e.geometry.coordinates,tr.meters);return this.convertSpeed(e/n,nr.metersPerSecond,o,r)}}return NaN},getTimespan:Wr,getTravelDistance:function(t,e,n,o,r,i,s,a){return e=this.convertTimespan(e,r,er.seconds),n=(n=this.convertSpeed(n,i,nr.metersPerSecond))*e,"number"==typeof o&&(n+=.5*this.convertAcceleration(o,s,or.metersPerSecondSquared)*e*e),this.convertDistance(n,tr.meters,t,a)},parseTimestamp:Vr,getConvexHull:function(t){var e,n,o=Yr(t).map(function(t){return[zr(t[0]),Dr(t[1])]});o.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var r=[];try{for(var i=P(o),s=i.next();!s.done;s=i.next()){for(var a=s.value;2<=r.length&&br(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&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}for(var l=[],c=o.length-1;0<=c;c--){for(;2<=l.length&&br(l[l.length-2],l[l.length-1],o[c])<=0;)l.pop();l.push(o[c])}return new ni([r.concat(l)])},getPositions:Yr,getPosition:Qr,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var n=[],o=Ar(t,tr.meters)/(e-1),r=0;r<e;r++){var i=Pr(t,o*r,tr.meters);null!=i&&n.push(i)}return n},getPointWithHeadingAlongPath:Jr,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var n=[],o=Ar(t,tr.meters)/(e-1),r=0;r<e;r++){var i=Jr(t,o*r,tr.meters);null!=i&&n.push(i)}return n},getClosestPointOnGeometry:Xr,simplify:function(t,e){return wi(t,e,!0)}}),Ci=(O(Ei,Ti=M),Ei);function Ei(){var t=null!==Ti&&Ti.apply(this,arguments)||this;return t.zoomDelta=1,t.style=u.ControlStyle.light,t}var ki,Rt=(O(Oi,ki=ot),Oi.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=H("Zoom In"),n=H("Zoom Out");return this.container.appendChild(this.zoomInButton),this.container.appendChild(e),this.container.appendChild(this.zoomOutButton),this.container.appendChild(n),K(e,this.zoomInButton),K(n,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},Oi.prototype.onRemove=function(){ki.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)},Oi.prototype.updateZoomButtonsState=function(){var t=this.map.getCamera().zoom>=this.map._getMap().getMaxZoom(),e=li.getSouth(this.map.getCamera().bounds)<=-lr&&li.getNorth(this.map.getCamera().bounds)>=lr,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.zoomInButton.setAttribute("aria-label",t?"Zoom Out disabled":"Zoom Out"))},Oi.prototype.constructZoomInButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("zoom-in"),n.setAttribute("aria-label","Zoom In"),n.setAttribute("alt","Zoom In"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom+e.options.zoomDelta,duration:Oi.ZOOM_DURATION_MS,type:"ease"},!0)}),n},Oi.prototype.constructZoomOutButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("azure-maps-control-button"),n.classList.add("zoom-out"),n.setAttribute("aria-label","Zoom Out"),n.setAttribute("alt","Zoom Out"),n.setAttribute("type","button"),n.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom-e.options.zoomDelta,duration:Oi.ZOOM_DURATION_MS,type:"ease"},!0)}),n},Oi.ZOOM_DURATION_MS=200,Oi);function Oi(t){var e=ki.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 Ci).merge(t),e}Et=Object.freeze({__proto__:null,ControlBase:ot,PitchControl:mt,CompassControl:ct,ZoomControl:Rt,StyleControl:It,TrafficControl:wo,TrafficLegendControl:Ot});var Ii,Li=function(t,e){return jn(t,5,e="function"==typeof e?e:void 0)},Ai=(O(Pi,Ii=M),Pi);function Pi(){var t=null!==Ii&&Ii.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}var Ri,Ni=(O(Mi,Ri=$),Mi.prototype.getId=function(){return this.id},Mi.prototype._setMap=function(t){var e;null==t||void 0===t?(e=this.map,delete this.map,this._invokeEvent("sourceremoved",this),e&&e.events.invoke("sourceremoved",this)):(this.map=t,this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this))},Mi);function Mi(t){var e=Ri.call(this)||this;return e.id=t||Ho(),e}var Di,zi=(O(Bi,Di=Ni),Bi.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},Bi.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},Bi.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},Bi.prototype.getClusterExpansionZoom=function(e){var r=this;return new Promise(function(n,o){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterExpansionZoom(e,function(t,e){t?o(t):"number"==typeof e&&n(e)}):o("The DataSource hasn't been added to a map.")})},Bi.prototype.getClusterChildren=function(e){var r=this;return new Promise(function(n,o){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterChildren(e,function(t,e){t?o(t):e&&n(r.map.sources._mapFeaturesToShapes(e,!1,r))}):o("The DataSource hasn't been added to a map.")})},Bi.prototype.getClusterLeaves=function(e,r,i){var s=this;return new Promise(function(n,o){var t;s.map?(t=s.map._getMap().getSource(s.getId()))&&"geojson"===t.type&&t.getClusterLeaves(e,r,i,function(t,e){t?o(t):e&&n(s.map.sources._mapFeaturesToShapes(e,!1,s))}):o("The DataSource hasn't been added to a map.")})},Bi.prototype.getOptions=function(){return Fn(this.options)},Bi.prototype.getShapes=function(){return Array.from(this.shapes)},Bi.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 "+t.status+": "+t.statusText)}).then(function(t){e.add(t)})},Bi.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},Bi.prototype.remove=function(t){var e,n,t=Array.isArray(t)?t:[t];try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;"number"==typeof i?this._removeByIndex(i):this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this._updateSource()},Bi.prototype.removeById=function(t){var e,n,t=Array.isArray(t)?t:[t];try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this._updateSource()},Bi.prototype.setOptions=function(t){t=(new Ai).merge(this.options,Fn(t));Go(this.options,t)||(this._invokeEvent("datasourceupdated",this),this.options=t,this.map&&this.map._rebuildStyle())},Bi.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},Bi.prototype.toJson=function(){return new ui(this.shapes.map(function(t){return t.toJson()}))},Bi.prototype._toJson=function(){return new ui(this.shapes.map(function(t){return t._toJson()}))},Bi.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};return"number"==typeof this.options.clusterMaxZoom&&(t.clusterMaxZoom=this.options.clusterMaxZoom),t},Bi.prototype._addNoUpdate=function(t,e){var n;t instanceof ii?(this._addToSources(t,e),n=[t]):Array.isArray(t)?(n=t.map(function(t){return t instanceof ii?t:new ii(t)}),this._addToSources(n,e)):"FeatureCollection"===t.type?(n=t.features.map(function(t){return new ii(t)}),this._addToSources(n,e)):"GeometryCollection"===t.type?(n=t.geometries.map(function(t){return new ii(t)}),this._addToSources(n,e)):(t=new ii(t),this._addToSources(t,e),n=[t]),this._invokeEvent("dataadded",n)},Bi.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new X,t&&0<t.length&&this._invokeEvent("dataremoved",t)},Bi.prototype._updateSource=function(){var t=this;void 0!==this.requestId||(this.requestId=requestAnimationFrame(function(){t._updateMboxSource(),t.requestId=void 0}))},Bi.prototype._addToSources=function(t,e){var n,o,r,i;if(t=Array.isArray(t)?t:[t],"number"!=typeof e)try{for(var s=P(t),a=s.next();!a.done;a=s.next()){var l=a.value;this.shapes.push(l),this.shapesMap.set(l.getId(),this.shapes.length-1)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}else for(var c=t.length-1;0<=c;c--)this.shapes.splice(e,0,t[c]),this._updateShapesMap(e);try{for(var u=P(t),h=u.next();!h.done;h=u.next())(l=h.value)._setDataSource(this)}catch(t){r={error:t}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}},Bi.prototype._removeById=function(t){var e=t instanceof ii?t.getId():"string"==typeof t||"number"==typeof t?t:t.id,t=this.shapes[this.shapesMap.get(e)];t&&(t._setDataSource(null),this.shapes.splice(this.shapesMap.get(e),1),this._updateShapesMap(this.shapesMap.get(e)),this.shapesMap.delete(e),this._invokeEvent("dataremoved",[t]))},Bi.prototype._removeByIndex=function(t){var e;if(t>=this.shapes.length)throw new Error("The specified remove index '"+t+"' is greater than the maximum possible index '"+(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])},Bi.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},Bi.prototype._updateMboxSource=function(){var t;this.map&&this.map._getMap()&&((t=this.map._getMap().getSource(this.getId()))&&"geojson"===t.type&&t.setData(this._toJson()))},Bi);function Bi(t,e){t=Di.call(this,t)||this;return t.requestId=void 0,t.options=(new Ai).merge(Fn(e)),t.shapes=[],t.shapesMap=new X,t}var ji,Fi=(O(Ui,ji=M),Ui);function Ui(){var t=null!==ji&&ji.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}var qi,Gi=(O(Zi,qi=Ni),Zi.prototype.getOptions=function(){return Fn(this.options)},Zi.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},Zi.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},Zi);function Zi(t,e){t=qi.call(this,t)||this;return t.options=(new Fi).merge(Fn(e)),t}var Hi,kt=Object.freeze({__proto__:null,Source:Ni,DataSource:zi,VectorTileSource:Gi}),Ki=(O(Wi,Hi=$),Wi.prototype.getId=function(){return this.id},Wi.prototype.getMap=function(){return this.map||null},Wi.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},Wi.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},Wi._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},Wi.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")},Wi.prototype._updateFilter=function(t,e){Go(t,e)||this.map._getMap().setFilter(this.id,t)},Wi.prototype._updatePaintProperty=function(t,e,n,o){Go(e,n)||this.map._getMap().setPaintProperty(this.id,t,o||e)},Wi.prototype._updateLayoutProperty=function(t,e,n,o){Go(e,n)||this.map._getMap().setLayoutProperty(this.id,t,o||e)},Wi.prototype._updateZoomRange=function(t,e,n,o){t===e&&o===n||this.map._getMap().setLayerZoomRange(this.id,t,n)},Wi.LayerEvents={layeradded:void 0,layerremoved:void 0},Wi);function Wi(t){var e=Hi.call(this)||this;return e.id=t||Ho(),e}var Vi,wt=(O(Yi,Vi=M),Yi._cloneCustomizer=function(t){if(t instanceof Ni)return t},Yi);function Yi(){var t=null!==Vi&&Vi.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}var Qi,Ji=(O(Xi,Qi=wt),Xi);function Xi(){var t=null!==Qi&&Qi.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}var $i,ts=(O(es,$i=Ki),es.prototype.getOptions=function(){return Li(this.options,Ji._cloneCustomizer)},es.prototype.getSource=function(){return this.options.source},es.prototype.setOptions=function(t){t=(new Ji).merge(this.options,Li(t,Ji._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},es.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof Ni?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]},es.prototype._getLayerIds=function(){return[this.id]},es.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ni?t.add(this.options.source.getId()):t.add(this.options.source),t},es);function es(t,e,n){e=$i.call(this,e)||this;return e.options=(new Ji).merge(Li(n,Ji._cloneCustomizer)),e.options.source=t||e.options.source,e}var ns,os=(O(rs,ns=wt),rs._cloneCustomizer=function(t){if(t instanceof Ni)return t},rs);function rs(){var t=null!==ns&&ns.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}var is,mt=(O(ss,is=Ki),ss.prototype.getOptions=function(){return Li(this.options,os._cloneCustomizer)},ss.prototype.getSource=function(){return this.options.source},ss.prototype.setOptions=function(t){t=(new os).merge(this.options,Li(t,os._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},ss.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof Ni?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]},ss.prototype._getLayerIds=function(){return[this.id]},ss.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ni?t.add(this.options.source.getId()):t.add(this.options.source),t},ss);function ss(t,e,n){e=is.call(this,e)||this;return e.options=(new os).merge(Li(n,os._cloneCustomizer)),e.options.source=t||e.options.source,e}var as,Rt=(O(ls,as=wt),ls);function ls(){var t=null!==as&&as.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}var cs,us=(O(hs,cs=Rt),hs._cloneCustomizer=function(t){if(t instanceof Ni)return t},hs);function hs(){var t=null!==cs&&cs.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}var ps,ds=(O(fs,ps=Ki),fs.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},fs);function fs(){return null!==ps&&ps.apply(this,arguments)||this}var ms,It=(O(gs,ms=ds),gs.prototype.getOptions=function(){return Li(this.options,us._cloneCustomizer)},gs.prototype.setOptions=function(t){var e=(new us).merge(this.options,Li(t,us._cloneCustomizer)),n="string"==typeof t.url&&t.url!==this.getOptions().url,o=void 0!==t.coordinates&&t.coordinates!==this.getOptions().coordinates;this.map&&(this._updateBaseProperties(e,this.options),this._updatePaintProperty("raster-contrast",e.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",e.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",e.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",e.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",e.saturation,this.options.saturation),(t=this.map._getMap().getSource(this._getSourceId()))&&t.updateImage(e)),this.options=e,n?this.reloadImage():o&&this.updateTransform()},gs.prototype.getPositions=function(e){return this.transform.then(function(t){return t.toTarget(e)})},gs.prototype.getPixels=function(e){return this.transform.then(function(t){return t.toSource(e)})},gs.getCoordinatesFromRefPoints=function(t,e,n,o){return new Si(n,o).toTarget([[0,0],[t,0],[t,e],[0,e]])},gs.getCoordinatesFromEdges=function(t,e,n,o,r){"number"!=typeof r&&(r=0);n=[Math.min(o,n),e,Math.max(o,n),t],t=li.getCenter(n);return Br([li.getNorthWest(n),li.getNorthEast(n),li.getSouthEast(n),li.getSouthWest(n)],t,r)},gs.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]},gs.prototype._getLayerIds=function(){return[this.id]},gs.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},gs.prototype._getSourceId=function(){return this.getId()+"-ImageSource"},gs.prototype.reloadImage=function(){var n=this;this.options.url&&(this.transform=new Promise(function(e,t){n.img.onload=function(){var t=[[0,0],[n.img.width,0],[n.img.width,n.img.height],[0,n.img.height]];e(new Si(t,n.options.coordinates)),n.isLoading=!1},n.img.onerror=n.img.onabort=function(){t("Failed to load image")},n.isLoading=!0,n.img.src=n.options.url}))},gs.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 Si(t,this.options.coordinates)))},gs);function gs(t,e){e=ms.call(this,e)||this;return e.isLoading=!1,e.options=(new us).merge(Li(t,us._cloneCustomizer)),e.img=new Image,e.reloadImage(),e}var ys,vs=(O(_s,ys=wt),_s);function _s(){var t=null!==ys&&ys.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 Yo(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var bs,ws=(O(Ss,bs=Ki),Ss.prototype.getOptions=function(){return Li(this.options,vs._cloneCustomizer)},Ss.prototype.getSource=function(){return this.options.source},Ss.prototype.setOptions=function(t){t=(new vs).merge(this.options,Li(t,vs._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},Ss.prototype._buildLayers=function(){return[I(I(I(I({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Ni?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:I(I(I({"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})]},Ss.prototype._getLayerIds=function(){return[this.id]},Ss.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ni?t.add(this.options.source.getId()):t.add(this.options.source),t},Ss);function Ss(t,e,n){e=bs.call(this,e)||this;return e.options=(new vs).merge(Li(n,vs._cloneCustomizer)),e.options.source=t||e.options.source,e}var xs,Ts=(O(Cs,xs=wt),Cs);function Cs(){var t=null!==xs&&xs.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 Yo(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var Es,Ot=(O(ks,Es=Ki),ks.prototype.getOptions=function(){return Li(this.options,Ts._cloneCustomizer)},ks.prototype.getSource=function(){return this.options.source},ks.prototype.setOptions=function(t){t=(new Ts).merge(this.options,Li(t,Ts._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},ks.prototype._buildLayers=function(){return[I(I(I(I({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Ni?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:I(I({"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})]},ks.prototype._getLayerIds=function(){return[this.id]},ks.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ni?t.add(this.options.source.getId()):t.add(this.options.source),t},ks);function ks(t,e,n){e=Es.call(this,e)||this;return e.options=(new Ts).merge(Li(n,Ts._cloneCustomizer)),e.options.source=t||e.options.source,e}var Os,Is=(O(Ls,Os=wt),Ls.prototype.merge=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=!1,r=!1;try{for(var i=P(e),s=i.next();!s.done;s=i.next()){var a=s.value;a&&(a.hasOwnProperty("fillColor")?r=!(o=!0):a.hasOwnProperty("fillPattern")&&(o=!(r=!0)))}}catch(t){l={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(l)throw l.error}}var l=Os.prototype.merge.apply(this,N(e));return o?l.fillPattern=void 0:r&&(l.fillColor=void 0),l},Ls);function Ls(){var t=null!==Os&&Os.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=void 0,t}var As,Ps=(O(Rs,As=Ki),Rs.prototype.getOptions=function(){return Li(this.options,Is._cloneCustomizer)},Rs.prototype.getSource=function(){return this.options.source},Rs.prototype.setOptions=function(t){t=(new Is).merge(this.options,Li(t,Is._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},Rs.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof Ni?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]},Rs.prototype._getLayerIds=function(){return[this.id]},Rs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ni?t.add(this.options.source.getId()):t.add(this.options.source),t},Rs);function Rs(t,e,n){e=As.call(this,e)||this;return e.options=(new Is).merge(Li(n,Is._cloneCustomizer)),e.options.source=t||e.options.source,e}var Ns,Ms=(O(Ds,Ns=M),Ds);function Ds(){var t=null!==Ns&&Ns.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new Yo(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}var zs,Bs=(O(js,zs=M),js);function js(){var t=null!==zs&&zs.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 Yo(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}var Fs,Us=(O(qs,Fs=wt),qs);function qs(){var t=null!==Fs&&Fs.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new Ms,t.textOptions=new Bs,t.placement="point",t.zOrder="auto",t.lineSpacing=250,t}var Gs,Zs=(O(Hs,Gs=Ki),Hs.prototype.getOptions=function(){return Li(this.options,Us._cloneCustomizer)},Hs.prototype.getSource=function(){return this.options.source},Hs.prototype.setOptions=function(t){var e=(new Us).merge(this.options,Li(t,Us._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);var n=this.options,o=e.iconOptions,r=n.iconOptions,i=e.textOptions,t=n.textOptions;this._updateBaseProperties(e,n),this._updateLayoutProperty("symbol-spacing",e.lineSpacing,n.lineSpacing),this._updateLayoutProperty("symbol-placement",e.placement,n.placement),this._updateLayoutProperty("symbol-sort-key",e.sortKey,n.sortKey),this._updateLayoutProperty("symbol-z-order",e.zOrder,n.zOrder),this._updateLayoutProperty("icon-allow-overlap",o.allowOverlap,r.allowOverlap),this._updateLayoutProperty("icon-anchor",o.anchor,r.anchor),this._updateLayoutProperty("icon-ignore-placement",o.ignorePlacement,r.ignorePlacement),this._updateLayoutProperty("icon-image",o.image,r.image),this._updateLayoutProperty("icon-offset",o.offset,r.offset),this._updatePaintProperty("icon-opacity",o.opacity,r.opacity),this._updateLayoutProperty("icon-optional",o.optional,r.optional),this._updateLayoutProperty("icon-padding",o.padding,r.padding),this._updateLayoutProperty("icon-pitch-alignment",o.pitchAlignment,r.pitchAlignment),this._updateLayoutProperty("icon-rotate",o.rotation,r.rotation),this._updateLayoutProperty("icon-rotation-alignment",o.rotationAlignment,r.rotationAlignment),this._updateLayoutProperty("icon-size",o.size,r.size),this._updateLayoutProperty("text-allow-overlap",i.allowOverlap,t.allowOverlap),this._updateLayoutProperty("text-anchor",i.anchor,t.anchor),this._updatePaintProperty("text-color",i.color,t.color),this._updateLayoutProperty("text-font",i.font,t.font),this._updateLayoutProperty("text-ignore-placement",i.ignorePlacement,t.ignorePlacement),this._updateLayoutProperty("text-justify",i.justify,t.justify),this._updatePaintProperty("text-halo-blur",i.haloBlur,t.haloBlur),this._updatePaintProperty("text-halo-color",i.haloColor,t.haloColor),this._updatePaintProperty("text-halo-width",i.haloWidth,t.haloWidth),this._updateLayoutProperty("text-offset",i.offset,t.offset),this._updatePaintProperty("text-opacity",i.opacity,t.opacity),this._updateLayoutProperty("text-optional",i.optional,t.optional),this._updateLayoutProperty("text-padding",i.padding,t.padding),this._updateLayoutProperty("text-pitch-alignment",i.pitchAlignment,t.pitchAlignment),this._updateLayoutProperty("text-radial-offset",i.radialOffset,t.radialOffset),this._updateLayoutProperty("text-rotate",i.rotation,t.rotation),this._updateLayoutProperty("text-rotation-alignment",i.rotationAlignment,t.rotationAlignment),this._updateLayoutProperty("text-size",i.size,t.size),this._updateLayoutProperty("text-variable-anchor",i.variableAnchor,t.variableAnchor),this._updateLayoutProperty("text-field",i.textField,t.textField)}this.options=e},Hs.prototype._buildLayers=function(){var t=I(I(I(I({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Ni?this.options.source.getId():this.options.source,layout:I(I({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]},Hs.prototype._getLayerIds=function(){return[this.id]},Hs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Ni?t.add(this.options.source.getId()):t.add(this.options.source),t},Hs);function Hs(t,e,n){e=Gs.call(this,e)||this;return e.options=(new Us).merge(Li(n,Us._cloneCustomizer)),e.options.source=t||e.options.source,e}var Ks,Ws=(O(Vs,Ks=Rt),Vs);function Vs(){var t=null!==Ks&&Ks.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 Ys,Qs=(O(Js,Ys=ds),Js.prototype.getOptions=function(){return Li(this.options,Ws._cloneCustomizer)},Js.prototype.setOptions=function(t){t=(new Ws).merge(this.options,Li(t,Ws._cloneCustomizer));if(this.map){if(!Go(t.bounds,this.options.bounds)||t.isTMS!==this.options.isTMS||t.maxSourceZoom!==this.options.maxSourceZoom||t.minSourceZoom!==this.options.minSourceZoom||!Go(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},Js.prototype._setOptionsNoUpdate=function(t){this.options=(new Ws).merge(this.options,Li(t,Ws._cloneCustomizer))},Js.prototype._buildLayers=function(){return[I(I({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})]},Js.prototype._getLayerIds=function(){return[this.id]},Js.prototype._buildSource=function(){var t,e;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 n=[];try{for(var o=P(this.options.subdomains),r=o.next();!r.done;r=o.next()){var i=r.value;n.push(this.options.tileUrl.replace(/{subdomain}/g,i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}e=n}else e=[this.options.tileUrl]}return I({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},e&&{tiles:e})},Js.prototype._getSourceId=function(){return this.getId()+"-RasterSource"},Js);function Js(t,e){e=Ys.call(this,e)||this;return t&&e.setOptions(t),e}var Xs,$s=(O(ta,Xs=wt),ta);function ta(){var t=null!==Xs&&Xs.apply(this,arguments)||this;return t.renderer=void 0,t}var ea,na=(O(oa,ea=Ki),oa.prototype.getOptions=function(){return Li(this.options,$s._cloneCustomizer)},oa.prototype.setOptions=function(t){t=(new $s).merge(this.options,Li(t,$s._cloneCustomizer));this.map&&this.map.triggerRepaint(),this.options=t},oa.prototype.onAdd=function(t){var e,n;ea.prototype.onAdd.call(this,t),this.map.events.add("stylechanged",this._onStyleChange),this.options.renderer&&this.glContext&&null!==(n=(e=this.options.renderer).onAdd)&&void 0!==n&&n.call(e,t,this.glContext)},oa.prototype.onRemove=function(){var t,e;this.options.renderer&&this.glContext&&null!==(e=(t=this.options.renderer).onRemove)&&void 0!==e&&e.call(t,this.map,this.glContext),this.map.events.remove("stylechanged",this._onStyleChange),this.glContext=null,ea.prototype.onRemove.call(this)},oa.prototype._buildLayers=function(){var r=this;if(!this.options.renderer)throw new Error("Cannot build the WebGL layer because renderer was not set.");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 n,o;r._shouldRender()&&null!==(o=(n=r.options.renderer).prerender)&&void 0!==o&&o.call(n,t,e)},render:function(t,e){r._shouldRender()&&r.options.renderer.render(t,e)}}]},oa.prototype._getLayerIds=function(){return[this.id]},oa.prototype._getSourceIds=function(){return(new Set).add(this.source.getId())},oa.prototype._shouldRender=function(){if(this.map){var t=this.map.getCamera().zoom;return this.options.visible&&this.options.minZoom<=t&&this.options.maxZoom>t}return!1},oa);function oa(t,e){var n=ea.call(this,t)||this;return n._onStyleChange=function(){var t,e;n.map._getMap().getLayer(n.id)||(t=n.map,e=null===(e=n.map.layers._getUserLayers().find(function(t){return t.layer.getId()==n.id}))||void 0===e?void 0:e.before,t.layers.remove(n),t.layers.add(n,e))},n.options=(new $s).merge(Li(e,$s._cloneCustomizer)),n.source=new zi,n}var mt=Object.freeze({__proto__:null,BubbleLayer:ts,Layer:Ki,LineLayer:ws,PolygonExtrusionLayer:Ot,PolygonLayer:Ps,SymbolLayer:Zs,TileLayer:Qs,HeatMapLayer:mt,ImageLayer:It,WebGLLayer:na}),ra=(ia.convertHtmlString=function(t){if("string"!=typeof t)return t;var e=document.createElement("div");return e.innerHTML=t,e},ia.parseWithFilter=function(t,e,n,o){var r=this;if(void 0===e&&(e=function(t){return!0}),void 0===n&&(n=function(t){return t}),void 0===o&&(o=function(){return document.createElement("div")}),"string"==typeof t){var i=(new DOMParser).parseFromString(t,"text/html").body;if(0==i.children.length)return n(i.innerHTML);var s,i=1==i.children.length&&1==i.childNodes.length?i.children[0]:(s=o(),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,n)}),e(i)?n(i):(i.parentNode&&i.parentNode.removeChild(i),null)},ia);function ia(){}var sa,aa=function(t){return _e(t)&&1===t.nodeType&&!Wn(t)},la=(O(ca,sa=M),ca._cloneCustomizer=function(t){if(aa(t))return t},ca);function ca(){var t=null!==sa&&sa.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 Yo(0,0),t.position=new ti(0,0),t.showPointer=!0,t}var ua,ha=(O(pa,ua=$),pa.prototype.setPopupOptions=function(t){this.setOptions(t)},pa.prototype.setOptions=function(t){var e=(new la).merge(this.options,Li(t,la._cloneCustomizer));e.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(e),this.contentDiv.prepend(this.htmlContent)):e.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,e.draggable),e.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn),t=H("close"),this.contentDiv.appendChild(t),K(t,this.closeBtn,!0)):!e.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn),e.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!e.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv),e.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=e.fillColor,this.contentDiv.style.backgroundColor=e.fillColor),this.marker&&(e.anchor!==this.options.anchor?"none"===this.options.anchor?(this.autoAnchor!==e.anchor&&this._replaceMarker(this.map,e),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,e),"none"===e.anchor&&this.map.events.add("move",this._onMove)):(Go(e.position,this.options.position)||this.marker.setLngLat(e.position),Go(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset))),this.options=e},pa.prototype.getPopupOptions=function(){return this.getOptions()},pa.prototype.getOptions=function(){return Li(this.options,la._cloneCustomizer)},pa.prototype.getPopupContainer=function(){return this.containerDiv},pa.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=R(this.map.pixelsToPositions([t]),1)[0];this.options.position=t,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},pa.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},pa.prototype._createContainerDiv=function(t){var e=this,n=document.createElement("div");n.classList.add(pa.Css.container),n.classList.add(pa.Css.hidden),n.style.borderColor=t.fillColor,n.setAttribute("role","dialog"),n.setAttribute("aria-label","Map Information Window");var o=!1;return n.addEventListener("keydown",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(o=!0)}),n.addEventListener("keyup",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(o=!1)}),n.addEventListener("focusin",function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement&&t.target.focus())}),n.addEventListener("focusout",function(t){o&&t.relatedTarget instanceof Node&&!n.contains(t.relatedTarget)&&(o=!1,e.isOpen()&&e.close())}),n},pa.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(pa.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},pa.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(pa.Css.arrow),t},pa.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(pa.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("tabindex","0"),t.innerHTML="×",t},pa.prototype._createHtmlContent=function(t){var e=ra.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},pa.prototype._createMarker=function(t,e){var n=this.marker?this.marker.getLngLat():t.position,n="none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new h.Marker({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(n)):(this.containerDiv.classList.add(t.anchor),new h.Marker({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(n));return n},pa.prototype._getAutoAnchor=function(t,e){var n,o,r,i=this.containerDiv.offsetWidth,s=this.containerDiv.offsetHeight,a=[];return(r=this.marker?(o=(n=t._getMap().project(this.marker.getLngLat())).x,n.y):(r=R(t.positionsToPixels([e.position]),1),o=(r=R(r[0],2))[0],r[1]))<s?a.push("top"):r>t.getCanvas().offsetHeight-s&&a.push("bottom"),o<i/2?a.push("left"):o>t.getCanvas().offsetWidth-i/2&&a.push("right"),0<a.length?a.join("-"):"bottom"},pa.prototype._replaceMarker=function(t,e,n){var o=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,n),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,o||null)},pa.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))},pa.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},pa);function pa(t){var n=ua.call(this)||this;return n.attach=function(t){n.map!==t&&(n.map&&n.remove(),n.map=t,n.marker=n._createMarker(n.options),n.marker.addTo(n.map._getMap()),n.map.popups._getCollectionDiv().appendChild(n.containerDiv),n.map.popups.add(n))},n.open=function(t){if(!t&&!n.map)throw new Error("Must specify a map to open on or attach to a map in advance");n.attach(t||n.map),n.containerDiv.classList.remove(pa.Css.hidden),n.map.events.add("move",n._onMove),n._onMove(),n._invokeEvent("open",{target:n,type:"open"})},n.close=function(){n.map&&n.map.events.remove("move",n._onMove),n.containerDiv.classList.add(pa.Css.hidden),n._invokeEvent("close",{target:n,type:"close"})},n.remove=function(){n.map&&(n.marker.remove(),n.containerDiv.classList.remove(n.autoAnchor||n.options.anchor),n.map.events.remove("move",n._onMove),n.map.popups.remove(n),delete n.map,delete n.marker,delete n.autoAnchor)},n.isOpen=function(){return n.map&&!n.containerDiv.classList.contains(pa.Css.hidden)},n._onMove=function(){var t=n._getAutoAnchor(n.map,n.options);t!==n.autoAnchor&&(n._replaceMarker(n.map,n.options,t),n.map.events.add("move",n._onMove))},n._onDown=function(t){n.map.popups._addDraggedPopup(n);var e=R(n.map.positionsToPixels([n.options.position]),1)[0];"mousedown"===t.type?n.dragOffset=[e[0]-t.clientX,e[1]-t.clientY]:"touchstart"===t.type&&(n.dragOffset=[e[0]-t.touches[0].clientX,e[1]-t.touches[0].clientY])},n._onDragStart=function(t){t.preventDefault()},n.options=(new la).merge(Li(t,la._cloneCustomizer)),n.containerDiv=n._createContainerDiv(n.options),n.contentDiv=n._createContentDiv(n.options),n.containerDiv.appendChild(n.contentDiv),n.options.showPointer&&(n.arrowDiv=n._createArrowDiv(),n.containerDiv.appendChild(n.arrowDiv)),n.options.closeButton&&(n.closeBtn=n._createCloseButton(),n.contentDiv.appendChild(n.closeBtn),t=H("close"),n.contentDiv.appendChild(t),K(t,n.closeBtn,!0)),n}var da,fa=(O(ma,da=M),ma._cloneCustomizer=function(t){if(t instanceof ha||aa(t))return t},ma);function ma(){var t=null!==da&&da.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_'+Ho()+'" 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 Yo(0,0),t.position=new ti(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}var ga,ya=(O(va,ga=$),va.prototype.getOptions=function(){return Li(this.options,fa._cloneCustomizer)},va.prototype.getElement=function(){return this.marker.getElement()},va.prototype.setOptions=function(t){t=(new fa).merge(this.options,Li(t,fa._cloneCustomizer));Go(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)),Go(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset),Go(t.position,this.options.position)||this.marker.setLngLat(t.position),t.visible!==this.options.visible&&(t.visible?this.element.classList.remove(va.hiddenClass):this.element.classList.add(va.hiddenClass))):(this.marker.remove(),this._buildMarker(t),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=t},va.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)}},va.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=Fn(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},va.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},va.prototype._getId=function(){if(this.element)return("string"==typeof this.options.htmlContent?this.element.firstChild:this.element).id},va.prototype._buildMarker=function(t){var e;"string"==typeof t.htmlContent?(e=this._getSubbedHtmlString(t)||"",this.element=ra.convertHtmlString(e)):this.element=t.htmlContent,this.element.classList.add(va.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(va.hiddenClass),this.marker=new h.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)},va.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},va.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector("."+va.collectionContainerClass);return t||((t=document.createElement("div")).classList.add(va.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},va.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},va.collectionContainerClass="marker-collection-container",va.hiddenClass="hidden-accessible-element",va.containerClass="marker-container",va);function va(t){var e=ga.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new ti(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 fa).merge(Li(t,fa._cloneCustomizer)),e._buildMarker(e.options),e}var _a=(ba.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}},ba);function ba(){}var wa={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"}},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"}},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-Hant",strings:"zh-tw/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}}}},Sa=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"},xa=(Ta.getCode=function(t){var e=_a.parse(t);return-1===wa.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},Ta.getStrings=function(t){t=this.getLocaleData(t);return wa.locales.defaultLanguage.defaultRegion.code===t.code?new Promise(function(t){t(new Sa)}):new F({domain:e,path:wa.localizationsPath+"/"+t.strings}).get().then(function(t){return t},function(){return new Sa})},Ta.getLocaleData=function(t){if("string"==typeof t&&(t=_a.parse(t)),wa.locales[t.code])return wa.locales[t.code].defaultRegion;var e;if(wa.locales[t.language])e=wa.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=wa.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},Ta);function Ta(){}var Ca=(Ea.getEdgeOrIEVersion=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(0<e)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(0<t.indexOf("Trident/")){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}n=t.indexOf("Edge/");return 0<n?parseInt(t.substring(n+5,t.indexOf(".",n)),10):-1},Ea.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},Ea.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11},Ea);function Ea(){}(It=u.AuthenticationType||(u.AuthenticationType={})).subscriptionKey="subscriptionKey",It.aad="aad",It.anonymous="anonymous",It.sas="sas";var ka,Oa,Ia=(O(La,ka=M),La.prototype.setSubscriptionKey=function(t){this.authType=u.AuthenticationType.subscriptionKey,this.subscriptionKey=t},La.prototype.setAadProperties=function(t,e,n,o,r){this.authType=u.AuthenticationType.aad,this.authContext=r||this.authContext,this.aadInstance=o||this.aadInstance,this.clientId=t,this.aadAppId=e,this.aadTenant=n},La.prototype.setTokenCallbackFunction=function(t){this.authType=u.AuthenticationType.anonymous,this.getToken=t},La.prototype.setSasCallbackFunction=function(t){this.authType=u.AuthenticationType.sas,this.getToken=t},La.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ka.prototype.merge.apply(this,N(t));return n.authType===u.AuthenticationType.subscriptionKey?n.authContext=n.aadAppId=n.getToken=void 0:n.authType===u.AuthenticationType.aad?n.subscriptionKey=n.getToken=void 0:n.authType===u.AuthenticationType.anonymous?n.subscriptionKey=n.authContext=n.aadAppId=void 0:n.authType===u.AuthenticationType.sas&&(n.authContext=n.subscriptionKey=n.aadAppId=void 0),n},La);function La(){var t=null!==ka&&ka.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 Aa="NGT",Pa=Ho(),Ra=t,Na=e,Ma=n,Da=o,za=b,Ba=new Ia,ja=!1,Fa=!1,Ua=!1,qa=!1,Ga=!1,Za=!1,Ha=!1,Ka=!1,Wa=!1;function Va(){return Object.assign({},Ba)}function Ya(){return Na}function Qa(){return Ra}function Ja(){return Ma}function Xa(){return Da}function $a(){return za}function tl(){return h.workerCount}function el(){return h.maxParallelImageRequests}function nl(){return Aa}function ol(){return Pa}function rl(){return Ba.authType===u.AuthenticationType.subscriptionKey?Ba.subscriptionKey:void 0}function il(){return Oa}function sl(t){return!Ca.isIE()&&h.supported({failIfMajorPerformanceCaveat:t})}function al(t){Ba=(new Ia).merge(Ba,t),Wa=!0}function ll(t){Ra=t,Fa=!0}function cl(t){Ma=t,Ua=!0}function ul(t){0<t&&(h.workerCount=t,Ga=!0)}function hl(t){0<t&&(h.maxParallelImageRequests=t,Za=!0)}function pl(t){Aa=xa.getCode(t),Ha=!0}function dl(t){Pa=t,Ka=!0}function fl(t){Ba.setSubscriptionKey(t),Wa=!0}function ml(t){Oa=t,ja=!0}function gl(t,e){if(e=Math.abs(e||1),"string"==typeof t&&Cl[t.toLowerCase()]){for(var n=Cl[t.toLowerCase()],o=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,r=n,i=o.exec(n);i;)r=r.replace(i[0],parseFloat(i[1])*e+""),i=o.exec(n);return r=r.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function yl(){return Wa}function vl(){return Fa}function _l(){return Ua}function bl(){return Ga}function wl(){return Za}function Sl(){return Ha}function xl(){return Ka}function Tl(){return ja}var Cl={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>'},El=(kl.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},kl);function kl(){}var Ol,Il=(O(Ll,Ol=M),Ll);function Ll(){var t=null!==Ol&&Ol.apply(this,arguments)||this;return t.copyrightMessage=void 0,t.copyrightContent=void 0,t.customAttribution=void 0,t.showFeedbackLink=!0,t.showLogo=!0,t}var Al,Pl=(O(Rl,Al=ot),Rl.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},Rl.prototype.onRemove=function(){Al.prototype.onRemove.call(this),delete this.container},Rl.prototype.setOptions=function(t){var e=this,n=(new Il).merge(this.options,t);n.copyrightMessage===this.options.copyrightMessage&&n.customAttribution===this.options.customAttribution||(this.copyrightDiv.innerText=this.textAttribution(n)),n.copyrightContent!==this.options.copyrightContent&&(this.options.copyrightContent&&(t=Array.from(this.copyrightDiv.children).find(function(t){return t===e.options.copyrightContent}),this.copyrightDiv.removeChild(t)),0<this.copyrightDiv.childNodes.length?this.copyrightDiv.insertBefore(n.copyrightContent,this.copyrightDiv.childNodes[0]):this.copyrightDiv.appendChild(n.copyrightContent),this.options.copyrightContent=n.copyrightContent),!n.showLogo&&this.logoAnchor?this.addRemoveLogo(!1):n.showLogo&&!this.logoAnchor&&this.addRemoveLogo(!0),!n.showFeedbackLink&&this.feedbackAnchor?this.addRemoveFeedbackDiv(!1):n.showFeedbackLink&&!this.feedbackAnchor&&this.addRemoveFeedbackDiv(!0),this.options=n},Rl.prototype.getDefaultAttributions=function(){var t=(new Date).getFullYear(),e=["©"+t+" TomTom"];return this.options.showLogo||e.push("©"+t+" Microsoft"),e},Rl.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.textAttribution(this.options)||"",t},Rl.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},Rl.prototype.addRemoveFeedbackDiv=function(t){t?(this.feedbackAnchor=this.buildFeedbackLink(),this.tooltip=H("Give Feedback"),this.container.appendChild(this.feedbackAnchor),this.container.appendChild(this.tooltip),K(this.tooltip,this.feedbackAnchor)):(this.feedbackAnchor.remove(),this.tooltip.remove(),delete this.tooltip,delete this.feedbackAnchor)},Rl.prototype.addRemoveLogo=function(t){t?(this.logoAnchor=document.createElement("a"),this.logoAnchor.className="azure-map-logo",this.logoAnchor.href="https://microsoft.com",this.logoAnchor.setAttribute("aria-label","Microsoft"),this.container.appendChild(this.logoAnchor),this.logoTooltip=H("Visit microsoft.com"),this.container.appendChild(this.logoTooltip),K(this.logoTooltip,this.logoAnchor)):(this.logoAnchor.remove(),this.logoTooltip.remove(),delete this.logoAnchor)},Rl);function Rl(t){var e=Al.call(this)||this;return e.textAttribution=function(t){return[e.options.copyrightMessage,e.options.customAttribution].filter(function(t){return t}).join("")},e.options=(new Il).merge(t),e}var Nl=(Ml.throwOnError=function(t,e){function n(t){throw o.off("error",n),t.error}var o=t instanceof Zu?t._getMap():t;o.on("error",n);e=e();return o.off("error",n),e},Ml.tryCatch=function(t,e,n,o){try{return this.throwOnError(t,e)}catch(t){return n(t)}finally{"function"==typeof o&&o()}},Ml.tryFinally=function(t,e,n){try{return this.throwOnError(t,e)}finally{n()}},Ml);function Ml(){}var Dl=(zl.prototype.request=function(t){var e={domain:this.map.getServiceOptions().domain,path:"search/address/reverse/json",queryParams:I({"api-version":"1.0",language:t.style.language,limit:1,query:Dr(t.position[1])+","+zr(t.position[0])},t.style.view&&{view:t.style.view})};return new F((null===(t=this.map.authentication)||void 0===t?void 0:t.signRequest(e))||e).get()},zl);function zl(t){this.map=t}var Bl=(jl.prototype.cache=function(t,e,n,o){o=t+"_"+n[0]+"_"+n[1]+"_"+o;this._labelIdx[e.labelType]||(this._labelIdx[e.labelType]=[],this._labelCache[e.labelType]=[]),-1===this._labelIdx[e.labelType].indexOf(o)&&(this._labelCache[e.labelType].push({name:t,radius:e.radius,minZoom:e.minZoom,maxZoom:e.maxZoom||24,position:n}),this._labelIdx[e.labelType].push(o))},jl.prototype.getNearestLabel=function(t,e,n){var o=null,r=this._labelCache[t];if(r)for(var i,s=1/0,a=0,l=r.length;a<l;a++)n>=r[a].minZoom&&n<=r[a].maxZoom&&((i=Cr(r[a].position,e))<=r[a].radius&&i<=s&&(s=i,o=r[a]));return o},jl.prototype._preloadCache=function(t){if(!this._preloadedCache.has(t)){this._preloadedCache.add(t);var e={source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},n=t,o=n.indexOf("-");switch(n=-1!==o?n.substr(0,o):n){case"fr":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océan Atlantique",e,[-40,32],t),this.cache("Océan Atlantique",e,[-17,-29],t);break;case"es":this.cache("Océan Pacifique",e,[-170,32],t),this.cache("Océan Pacifique",e,[-138,-27],t),this.cache("Océano Atlántico",e,[-40,32],t),this.cache("Océano Atlántico",e,[-17,-29],t);break;case"pt":this.cache("Oceano Pacífico",e,[-170,32],t),this.cache("Oceano Pacífico",e,[-138,-27],t),this.cache("Oceano Atlântico",e,[-40,32],t),this.cache("Oceano Atlântico",e,[-17,-29],t);break;case"ja":this.cache("太平洋",e,[-170,32],t),this.cache("太平洋",e,[-138,-27],t);break;case"en":this.cache("Pacific Ocean",e,[-170,32],t),this.cache("Pacific Ocean",e,[-138,-27],t),this.cache("Atlantic Ocean",e,[-40,32],t),this.cache("Atlantic Ocean",e,[-17,-29],t),this.cache("Indian Ocean",e,[77,-26],t)}}},jl);function jl(){this._labelCache={},this._labelIdx={},this._preloadedCache=new Set}var Fl=(Ul.prototype.dispose=function(){this._disposed=!0;var t=this._map._getMap();t.off("move",this._onMove),t.off("moveend",this._onMoveEnd),t.off("styledata",this._onStyleData),t.off("rotate",this._onRotate);t=this._map.getCanvas();t.removeEventListener("mousedown",this._onPointerDown),t.removeEventListener("touchstart",this._onPointerDown),this._map.getMapContainer().removeEventListener("keydown",this._shortcutListener)},Ul.prototype._getEventPos=function(t){if("touches"in t){var e=t.touches[0],n=t.target.getBoundingClientRect();return[e.pageX-n.left,e.pageY-n.top]}return[t.offsetX,t.offsetY]},Ul.prototype._checkThresholds=function(t,e){return this._checkZoomThreshold(t.zoom,e.zoom)||this._checkPitchThreshold(t.pitch,e.pitch)||this._checkLocThreshold(t.center,e.center)||this._checkHeadingThreshold(t.bearing,e.bearing)},Ul.prototype._checkZoomThreshold=function(t,e){return this._round(t)!==this._round(e)},Ul.prototype._checkPitchThreshold=function(t,e){return Math.abs(t-e)>=this._pitchThreshold},Ul.prototype._checkLocThreshold=function(t,e){e=R(this._map.positionsToPixels([e,t]),2),t=e[0],e=e[1];return Yo.getDistance(t,e)>=this._moveThreshold},Ul.prototype._checkHeadingThreshold=function(t,e){t<0&&(t+=360),e<0&&(e+=360);e=Math.abs(t-e);return(e=180<e?360-e:e)>=this._headingThreshold},Ul.prototype._getLocDesc=function(h,p,d){return L(this,void 0,void 0,function(){var e,n,o,r,i,s,a,l,c,u=this;return A(this,function(t){switch(t.label){case 0:return"blank"===d?[3,3]:this._map._getMap().loaded()?[3,2]:[4,new Promise(function(t){return u._map._getMap().once("idle",t)})];case 1:t.sent(),t.label=2;case 2:for(e={},n=this._map.positionsToPixels([h.center])[0],Nl.tryCatch(this._map,function(){o=u._map._getMap().queryRenderedFeatures(n,{layers:u._polygonStyleLayer,filter:["==",["geometry-type"],"Polygon"]})},function(){}),r=null,o&&0<o.length&&(r=o[0]),i=null,s=0,a=this._lableConfig.length;s<a;s++)l=this._lableConfig[s],h.zoom>=l.minZoom?l.polygonSources?r&&-1!==l.polygonSources.indexOf(r.layer["source-layer"])?(i=l.labelType,this._getClosestLabel(l,h,p,e,!1)):this._getClosestLabel(l,h,p,e,!0):this._getClosestLabel(l,h,p,e,!1):this._getClosestLabel(l,h,p,e,!0);return 8<=h.zoom&&this._processRoads(e,h,p),this._labelCache.forEach(function(t){e[t]||(c=null,(c="water"!==t&&"majorPoi"!==t||t===i?Ul._labelCache.getNearestLabel(t,h.center,h.zoom):c)&&(e[t]=c.name))}),[2,this._processLocInfo(h,i,e,!0,this._restFallback)];case 3:return[2,this._processLocInfo(h,null,null,!1,!1)]}})})},Ul.prototype._getHeadingDesc=function(t){var e=t.bearing;switch(e<0&&(e+=360),e=this._round(e,this._headingThreshold)){case 0:case 360:return"north";case 45:return"north east";case 90:return"east";case 135:return"south east";case 180:return"south";case 225:return"south west";case 270:return"west";case 315:return"north west";default:return e+" degrees"}},Ul.prototype._getClosestLabel=function(t,e,n,o,r){for(var i=t.radius,s=0,a=t.source.length;s<a;s++){var l={sourceLayer:t.source[s]},c=this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId,l),u=null,h=1/0,p=this._labelCache.has(t.labelType);if(!r||p)for(var d=0,f=c.length;d<f;d++){var m,g="Point"===c[d].geometry.type?c[d]:Xr(e.center,c[d].geometry);r||(m="Point"===c[d].geometry.type?Cr(e.center,g.geometry.coordinates):g.properties.distance)<h&&(h=m,u=c[d]),p&&Ul._labelCache.cache(c[d].properties.name,t,g.geometry.coordinates,n)}r||(l=t.labelType+"Dis",u&&h<=i&&("number"!=typeof o[l]||h<=o[l])&&(o[t.labelType]=u.properties.name,o[l]=h))}},Ul.prototype._processRoads=function(t,e,n,o){var r=this._map._getMap().queryRenderedFeatures(o,{filter:["==",["geometry-type"],"LineString"]});if(r){for(var i,s=void 0,a=void 0,l=void 0,c=void 0,u=0,h=r.length;u<h;u++)this._roadLayers.has(r[u].layer["source-layer"])&&r[u].properties.name&&""!==r[u].properties.name&&(i=Xr(e.center,r[u]),(!l||i.properties.distance<l.properties.distance)&&(s&&r[u].properties.name===s.properties.name?l=i:s&&r[u].properties.name===s.properties.name?(!c||i.properties.distance<c.properties.distance)&&(c=i,a=r[u]):(c=l,a=s,l=i,s=r[u])));s&&(t.country||(t.country=s.properties.country_code,t.countryDis=0,Ul._labelCache.cache(t.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},l.geometry.coordinates,n)),t.state||(t.state=s.properties.country_subdivision,t.stateDis=0,Ul._labelCache.cache(t.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},l.geometry.coordinates,n)),15<=e.zoom&&(o=this._map.positionsToPixels([e.center,l.geometry.coordinates]),(Yo.getDistance(o[0],o[1])<this._roadPixelRadius||l.properties.distance<this._minRoadDistance)&&(t.road=s.properties.name),a&&(n=this._map.positionsToPixels([c.geometry.coordinates]),(Yo.getDistance(o[0],n[0])<this._minIntersectionPixelDistance||c.properties.distance<this._minRoadDistance)&&(t.secondRoad=a.properties.name,t.secondRoadDis=c.properties.distance))))}},Ul.prototype._getActionDesc=function(t){if(this._lastCam){var e,n,o=[];return this._checkLocThreshold(t.center,this._lastCam.center)&&(n=["panned"],0===(e=Math.round(Lr(this._lastCam.center,t.center)))||360===e?n.push("north"):e<90?n.push("north east"):90===e?n.push("east"):e<180?n.push("south east"):180===e?n.push("south"):e<270?n.push("south west"):270===e?n.push("west"):e<360&&n.push("north west"),e=Cr(this._lastCam.center,t.center,tr.meters),n.push(1e3<e?Sr(e/1e3,2)+" kilometers":Sr(e,2)+" meters"),o.push(n.join(" "))),this._checkZoomThreshold(t.zoom,this._lastCam.zoom)&&((n=["zoomed"]).push(this._lastCam.zoom<t.zoom?"in":"out"),1<=(e=Math.abs(this._lastCam.zoom-t.zoom))&&(e=Math.ceil(e),n.push(1<e?e+" levels":e+" level")),this._getCanonicalZoom(this._lastCam.zoom)!==this._getCanonicalZoom(t.zoom)&&n.push("to "+this._getCanonicalZoom(t.zoom)+" level"),t.zoom>=t.maxZoom&&n.push("Zoom In button disabled, maximum zoom level reached"),e=li.getSouth(t.bounds)<=-lr&&li.getNorth(t.bounds)>=lr,(t.zoom<=t.minZoom||e)&&n.push("Zoom Out button disabled, minimum zoom level reached"),o.push(n.join(" "))),this._checkPitchThreshold(t.pitch,this._lastCam.pitch)&&(n=this._round(t.pitch,this._pitchThreshold),o.push("pitched to "+n+" degrees"),60!==t.pitch&&0!==t.pitch||(n=60===t.pitch?"maximum":"minimum",o.push("reached "+n+" of "+t.pitch+" degrees"))),this._checkHeadingThreshold(this._lastCam.bearing,t.bearing)&&o.push("rotated to "+this._getHeadingDesc(t)),o.join(" and ")||null}return null},Ul.prototype._getCanonicalZoom=function(t){return(t=this._round(t))<2?"world":t<5?"country":t<11?"state province":t<15?"city":"street"},Ul.prototype._processLocInfo=function(r,i,s,a,l){var c=this;return new Promise(function(e,t){var n=[];if(a){var o=[];if(s&&(i&&("water"===i&&s.water?o.push(s.water):"majorPoi"===i&&s.majorPoi&&o.push(s.majorPoi)),0===o.length&&(s.majorPoi&&8<=r.zoom?o.push(s.majorPoi):(s.poi&&14<=r.zoom?o.push(s.poi):s.road&&15<=r.zoom&&(s.secondRoad?o.push(s.road+" & "+s.secondRoad):o.push(s.road)),s.neighbourhood&&12<=r.zoom&&o.push(s.neighbourhood),s.city&&6<=r.zoom&&o.push(s.city)),s.state&&4<=r.zoom&&o.push(s.state),0===o.length?s.water?o.push(s.water):s.country&&o.push(s.country):1===o.length&&s.state&&4<=r.zoom&&s.country&&o.push(s.country))),0<o.length)n.push("<p>Location: ",o.join(", "),".</p>");else if(l&&"water"!==i)return void c._reverseGeocodeDescription(r).then(function(t){e(t)},function(){t("<p>Location: unknown</p>")})}c._returnDetailedDescriptions&&(n.push("<p>Zoom: ",Sr(r.zoom,2),".</p>"),n.push("<p>Latitude: ",Sr(r.center[1],5),".</p>"),n.push("<p>Longitude: ",Sr(r.center[0],5),".</p>")),e(n.join(""))})},Ul.prototype._reverseGeocodeDescription=function(r){var i=this;return new Promise(function(n){var o=i._map.getStyle();i._reverseSearch.request({position:r.center,style:o}).then(function(t){var e={};t&&t.addresses&&0<t.addresses.length&&t.addresses[0].address&&((t=t.addresses[0].address).country&&(e.country=t.country,Ul._labelCache.cache(e.country,{source:["Country name"],labelType:"country",radius:5e3,minZoom:0},r.center,o.language)),t.countrySubdivision&&(e.state=t.countrySubdivision,Ul._labelCache.cache(e.state,{source:["State name"],labelType:"state",radius:5e3,minZoom:4},r.center,o.language)),t.municipality&&(e.city=t.municipality,Ul._labelCache.cache(e.state,{source:["Small city"],labelType:"city",radius:1e3,minZoom:10},r.center,o.language)),t.streetNameAndNumber?e.road=t.streetNameAndNumber:t.street&&(e.road=t.street)),i._processLocInfo(r,null,e,!0,!1).then(function(t){n(t)})},function(t){i._processLocInfo(r,null,null,!0,!1).then(function(t){n(t)})}).catch(function(t){i._processLocInfo(r,null,null,!0,!1).then(function(t){n(t)})})})},Ul.prototype._round=function(t,e){return void 0===e&&(e=1),Math.round(t/e)*e},Ul);function Ul(t,e){var i=this;this._disposed=!1,this._lastHeadingTime=0,this._actionQueue=[],this._pointerUpdateDelay=3e3,this._camUpdateDelay=1e3,this._headUpdateLimit=1e3,this._controlEventDelay=500,this._moveThreshold=25,this._headingThreshold=5,this._pitchThreshold=5,this._roadPixelRadius=120,this._minRoadDistance=25,this._minIntersectionPixelDistance=50,this._baseVectorTileSourceId="microsoft.base",this._lableConfig=[{source:["Ocean label","Ocean name"],labelType:"water",minZoom:0,radius:395e4,polygonSources:["Ocean","Ocean or sea"]},{source:["Sea label"],labelType:"water",minZoom:3,radius:1e6,polygonSources:["Sea","Ocean or sea"]},{source:["Country name"],labelType:"country",minZoom:0,maxZoom:5,radius:3e5},{source:["State name","State name short"],labelType:"state",minZoom:4,maxZoom:7,radius:3e5},{source:["Capital city","Large city"],labelType:"city",minZoom:8,radius:4e4},{source:["Medium city"],labelType:"city",minZoom:8,radius:3e4},{source:["Small city"],labelType:"city",minZoom:8,radius:2e4},{source:["Island label"],labelType:"city",minZoom:8,radius:1e4},{source:["Town"],labelType:"city",minZoom:10,radius:1e4},{source:["Village"],labelType:"neighbourhood",minZoom:12,radius:6e3},{source:["Amusement area label"],labelType:"poi",minZoom:14,radius:2e3,polygonSources:["Amusement park"]},{source:["Hospital label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Hospital"]},{source:["Shopping centre label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Shopping"]},{source:["Stadium label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Stadium"]},{source:["University/School label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["University"]},{source:["Zoo label"],labelType:"poi",minZoom:14,radius:1e3,polygonSources:["Zoo"]},{source:["Airport Label","Airport name","Airport POI"],labelType:"majorPoi",minZoom:11,radius:3e3,polygonSources:["Airport","Runway"]},{source:["National park label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["National or state park","National park","Forest"]},{source:["Reservation label"],labelType:"majorPoi",minZoom:7,radius:15e3,polygonSources:["Reservation"]}],this._polygonStyleLayer=["National or state park","National park","Reservation","Airport","Runway","Stadium","University","Zoo","Shopping","Hospital","Amusement park","Ocean","Sea","Ocean or sea"],this._labelCache=new Set(["city","state","country","water","majorPoi"]),this._roadLayers=new Set(["Connecting road","Connecting road tunnel","International road","International road tunnel","Local road","Local road tunnel","Major local road","Major local road tunnel","Major road","Major road tunnel","Minor local road","Minor local road tunnel","Motorway","Motorway tunnel","Secondary road","Secondary road tunnel","Toll connecting road","Toll connecting road tunnel","Toll international road","Toll international road tunnel","Toll local road","Toll local road tunnel","Toll major local road","Toll major local road tunnel","Toll major road","Toll major road tunnel","Toll minor local road","Toll minor local road tunnel","Toll motorway","Toll motorway tunnel","Toll secondary road","Toll secondary road tunnel"]),this._returnDetailedDescriptions=!1,this._shortcutListener=function(r){return L(i,void 0,void 0,function(){var e,n,o;return A(this,function(t){switch(t.label){case 0:return r.altKey&&r.ctrlKey&&68===r.keyCode?(this._returnDetailedDescriptions=!this._returnDetailedDescriptions,e=this._map.getCamera(),o=this._map.getStyle(),n=o.language.toLowerCase(),o=o.style.toLowerCase(),[4,this._getLocDesc(e,n,o)]):[3,2];case 1:o=t.sent(),this._descCallback(o),t.label=2;case 2:return[2]}})})},this._onRotate=function(){i._rotateTimeout||(Date.now()-i._lastHeadingTime>=i._headUpdateLimit?i._rotateTimeout=setTimeout(i._updateHeading,ct.RotationDuration+25):i._rotateTimeout=setTimeout(i._updateHeading,i._headUpdateLimit-(Date.now()-i._lastHeadingTime)))},this._onMove=function(){i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._controlTimeout&&(clearTimeout(i._controlTimeout),delete i._controlTimeout)},this._onMoveEnd=function(t){t.fromControl?i._controlTimeout=setTimeout(i._updateCam,i._controlEventDelay):i._updateCam()},this._onStyleData=function(){setTimeout(i._updateStyle)},this._onPointerDown=function(t){i._lastPointerPos=i._getEventPos(t),i._pointerTimeout=setTimeout(function(){return L(i,void 0,void 0,function(){var e,n,o;return A(this,function(t){switch(t.label){case 0:return n=this._map.getStyle(),e=n.language.toLowerCase(),o=n.style.toLowerCase(),(n=this._map.getCamera()).center=this._map.pixelsToPositions([this._lastPointerPos])[0],[4,this._getLocDesc(n,e,o)];case 1:return o=t.sent(),this._descCallback(o),this._onPointerUp(),[2]}})})},i._pointerUpdateDelay),i._map.getCanvas().addEventListener("mousemove",i._onPointerMove),i._map.getCanvas().addEventListener("touchmove",i._onPointerMove),i._map.getCanvas().addEventListener("mouseup",i._onPointerUp),i._map.getCanvas().addEventListener("touchend",i._onPointerUp)},this._onPointerMove=function(t){var e=i._getEventPos(t),t=i._lastPointerPos[0]-e[0],e=i._lastPointerPos[1]-e[1];Math.sqrt(t*t+e*e)>i._moveThreshold&&i._onPointerUp()},this._onPointerUp=function(){clearTimeout(i._pointerTimeout),delete i._pointerTimeout,i._map.getCanvas().removeEventListener("mousemove",i._onPointerMove),i._map.getCanvas().removeEventListener("touchmove",i._onPointerMove),i._map.getCanvas().removeEventListener("mouseup",i._onPointerUp),i._map.getCanvas().removeEventListener("touchend",i._onPointerUp)},this._updateHeading=function(){var t,e=i._map.getCamera();i._lastHead&&!i._checkHeadingThreshold(e.bearing,i._lastHead)||(t=i._getHeadingDesc(e),i._lastHead=e.bearing,i._descCallback("<p>Map heading "+t+".</p>"),i._lastHeadingTime=Date.now()),delete i._rotateTimeout},this._updateStyle=function(){return L(i,void 0,void 0,function(){var e,n,o,r;return A(this,function(t){switch(t.label){case 0:return(e=this._map.getCamera(),o=this._map.getStyle(),n=o.language.toLowerCase(),o=o.style.toLowerCase(),this._lastLang===n)?[3,2]:(Ul._labelCache._preloadCache(n),[4,this._getLocDesc(e,n,o)]);case 1:return r=t.sent(),[3,4];case 2:return this._lastStyle===o||"blank"!==this._lastStyle?[3,4]:[4,this._getLocDesc(e,n,o)];case 3:r=t.sent(),t.label=4;case 4:return this._lastLang=n,this._lastStyle=o,r&&this._descCallback(r),[2]}})})},this._updateCam=function(t){void 0===t&&(t=!1);var n,o,e,r=i._map.getCamera();(!i._lastCam||0<i._actionQueue.length||i._checkThresholds(r,i._lastCam))&&(e=i._map.getStyle(),n=e.language.toLowerCase(),o=e.style.toLowerCase(),(e=i._getActionDesc(r))&&i._actionQueue.push(e),i._lastCam=r,i._moveTimeout&&(clearTimeout(i._moveTimeout),delete i._moveTimeout),i._moveTimeout=setTimeout(function(){return L(i,void 0,void 0,function(){var e;return A(this,function(t){switch(t.label){case 0:return clearTimeout(this._rotateTimeout),delete this._rotateTimeout,[4,this._getLocDesc(r,n,o)];case 1:return e=t.sent(),0<this._actionQueue.length?(this._descCallback("<p>Map "+this._actionQueue.join(", then ")+".</p>"+e),this._actionQueue=[]):this._descCallback(e),[2]}})})},t?0:i._camUpdateDelay))},this._map=t,this._restFallback=t.getServiceOptions().enableAccessibilityLocationFallback,this._descCallback=e,this._reverseSearch=new Dl(t),Ul._labelCache||(Ul._labelCache=new Bl),this._lastLang=this._map.getStyle().language.toLowerCase(),Ul._labelCache._preloadCache(this._lastLang),this._map.events.addOnce("idle",function(){var t;i._disposed||(i._updateCam(!0),(t=i._map._getMap()).on("move",i._onMove),t.on("moveend",i._onMoveEnd),t.on("styledata",i._onStyleData),t.on("rotate",i._onRotate),(t=i._map.getCanvas()).addEventListener("mousedown",i._onPointerDown),t.addEventListener("touchstart",i._onPointerDown))}),this._map.getMapContainer().addEventListener("keydown",this._shortcutListener)}var ql,Gl,Zl=function(t){var n=this;this.addToMap=function(){n.initializeMapLiveStateInfo(),n.initializeMapStyleInfo(),n.createMapKeyBindingInfo(),n.map.getMapContainer().setAttribute("role","application"),n.map.getMapContainer().setAttribute("aria-label","Map Application"),n.map.getCanvasContainer().setAttribute("aria-live","polite"),n.map.getCanvasContainer().setAttribute("aria-describedby","atlas-map-state atlas-map-style"),n.map.getCanvas().setAttribute("aria-label","Interactive Map"),n.map.getCanvas().setAttribute("aria-describedby","atlas-map-shortcuts"),n.map.getCanvas().setAttribute("alt","Interactive Map")},this.removeFromMap=function(){null!=n.mapViewDesc&&n.mapViewDesc.dispose(),delete n.mapViewDesc,null!=n.atlasMapKeyBindings&&n.map.getCanvasContainer().removeChild(n.atlasMapKeyBindings),delete n.atlasMapKeyBindings,null!=n.atlasMapLiveStateInfo&&n.map.getCanvasContainer().removeChild(n.atlasMapLiveStateInfo),delete n.atlasMapLiveStateInfo,null!=n.atlasMapStyleInfo&&n.map.getCanvasContainer().removeChild(n.atlasMapStyleInfo),delete n.atlasMapStyleInfo,n.map.getMapContainer().removeAttribute("role"),n.map.getMapContainer().removeAttribute("aria-label"),n.map.getCanvasContainer().removeAttribute("aria-live"),n.map.getCanvasContainer().removeAttribute("aria-describedby"),n.map.getCanvas().removeAttribute("aria-label"),n.map.getCanvas().removeAttribute("aria-describedby"),n.map.getCanvas().removeAttribute("alt"),n.map.events.remove("stylechanged",n.updateMapStyle)},this.createMapKeyBindingInfo=function(){n.atlasMapKeyBindings=document.createElement("div"),n.atlasMapKeyBindings.setAttribute("tabindex","-1"),n.atlasMapKeyBindings.setAttribute("aria-hidden","true"),n.atlasMapKeyBindings.id="atlas-map-shortcuts",n.atlasMapKeyBindings.classList.add("hidden-accessible-element"),n.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"),n.map.getCanvasContainer().appendChild(n.atlasMapKeyBindings);var t=[189,187,38,37,39,40],e=n.map._getMap()._canvas;null!=e&&e.addEventListener("keyup",function(e){t.find(function(t){return e.keyCode===t})&&(n.atlasMapKeyBindings.innerHTML="")})},this.initializeMapLiveStateInfo=function(){n.mapViewDesc=new Fl(n.map,n.updateMapState),n.atlasMapLiveStateInfo=document.createElement("div"),n.atlasMapLiveStateInfo.setAttribute("tabindex","-1"),n.atlasMapLiveStateInfo.setAttribute("aria-hidden","true"),n.atlasMapLiveStateInfo.id="atlas-map-state",n.atlasMapLiveStateInfo.classList.add("hidden-accessible-element"),n.map.getCanvasContainer().appendChild(n.atlasMapLiveStateInfo)},this.initializeMapStyleInfo=function(){n.atlasMapStyleInfo=document.createElement("div"),n.atlasMapStyleInfo.setAttribute("tabindex","-1"),n.atlasMapStyleInfo.setAttribute("aria-hidden","true"),n.atlasMapStyleInfo.id="atlas-map-style",n.atlasMapStyleInfo.classList.add("hidden-accessible-element"),n.map.events.add("stylechanged",n.updateMapStyle),n.map.getCanvasContainer().appendChild(n.atlasMapStyleInfo)},this.updateMapStyle=function(){n.atlasMapStyleInfo.innerHTML="<p>Map style: "+n.map.getStyle().style+".</p>"},this.updateMapState=function(t){n.atlasMapLiveStateInfo.innerHTML=t},this.map=t},Hl=function(t){var n=this;this.listenerEnabled=!1,this.lastFlowMode="none",this.addToMap=function(){if(!n.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.");n.listenerEnabled||(n.map.events.add("styledata",n.addToMap),n.listenerEnabled=!0);var t,e=n.map.getTraffic();"none"===e.flow||(t=n.map.layers.getLayerById("traffic_"+e.flow))&&(n.lastFlowMode=e.flow,t._updateLayoutProperty("visibility","visible","none"))},this.removeFromMap=function(){var t;n.map.getTraffic();"none"!=n.lastFlowMode&&((t=n.map.layers.getLayerById("traffic_"+n.lastFlowMode))&&t._updateLayoutProperty("visibility","none","visible"),n.lastFlowMode="none"),n.listenerEnabled&&(n.map.events.remove("styledata",n.addToMap),n.listenerEnabled=!1)},this.map=t},Kl=(O(Wl,ql=Ko),Wl.getIncidentTypeName=function(t,e){switch(t){case 0:return e.Unknown;case 1:return e.Accident;case 2:return e.Fog;case 3:return e.Danger;case 4:return e.Rain;case 5:return e.Ice;case 6:return e.Jam;case 7:return e.LaneClosed;case 8:return e.RoadClosed;case 9:return e.RoadWorks;case 10:return e.Wind;case 11:return e.Flood;case 12:return e.Detour;default:return e.Unknown}},Wl.getIncidentTypeIconName=function(t){switch(t){case 0:return"unknown";case 1:return"accident";case 2:return"fog";case 3:return"danger";case 4:return"rain";case 5:return"ice";case 6:return"jam";case 7:return"lane-closed";case 8:return"road-closed";case 9:return"road-work";case 10:return"wind";case 11:return"flood";case 12:return"detour";default:return"unknown"}},Wl.getSeverityColorName=function(t){switch(t){case 0:return"grey";case 1:return"yellow";case 2:return"orange";case 3:return"red";default:return"grey"}},Wl.getSeverityColorHexCode=function(t){switch(t){case 0:return"#B5B6B7";case 1:return"#F4C951";case 2:return"#F4873F";case 3:return"#F04F4E";default:return"#B5B6B7"}},Wl);function Wl(t,e,n){var o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=null!==(o=null!==(r=t.icon_category_12)&&void 0!==r?r:t.icon_category_11)&&void 0!==o?o:t.icon_category_10)&&void 0!==r?r:t.icon_category_9)&&void 0!==o?o:t.icon_category_8)&&void 0!==r?r:t.icon_category_7)&&void 0!==o?o:t.icon_category_6)&&void 0!==r?r:t.icon_category_5)&&void 0!==o?o:t.icon_category_4)&&void 0!==r?r:t.icon_category_3)&&void 0!==o?o:t.icon_category_2)&&void 0!==r?r:t.icon_category_1)&&void 0!==o?o:t.icon_category_0)&&void 0!==r?r:t.icon_category,r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=null!==(r=t.description_12)&&void 0!==r?r:t.description_11)&&void 0!==r?r:t.description_10)&&void 0!==r?r:t.description_9)&&void 0!==r?r:t.description_8)&&void 0!==r?r:t.description_7)&&void 0!==r?r:t.description_6)&&void 0!==r?r:t.description_5)&&void 0!==r?r:t.description_4)&&void 0!==r?r:t.description_3)&&void 0!==r?r:t.description_2)&&void 0!==r?r:t.description_1)&&void 0!==r?r:t.description_0)&&void 0!==r?r:t.description,t={icon:Wl.getSeverityColorName(t.magnitude)+"-"+Wl.getIncidentTypeIconName(o),incidentType:Wl.getIncidentTypeName(o,n),description:r,delay:t.delay,color:Wl.getSeverityColorHexCode(t.magnitude),id:t.id};return ql.call(this,e,t)||this}(b=Gl=Gl||{}).DELAY="delay",b.LENGTH="length",b.FROM="from",b.TO="to";var Vl=(Yl.build=function(t,e){void 0===e&&(e="en-US");var n=document.createElement("div");n.classList.add("incident-popup-title"),n.classList.add("font-segoeui-b"),n.innerText=t.properties.incidentType,n.setAttribute("aria-label","Incident Type "+t.properties.incidentType);var o=document.createElement("div");o.classList.add("incident-popup-subtitle"),o.classList.add("font-segoeui-b"),o.setAttribute("aria-label","Incident Description "+t.properties.description),o.innerText=t.properties.description;var r=document.createElement("div");r.classList.add("incident-popup-header"),r.style.backgroundColor=t.properties.color,r.appendChild(n),r.appendChild(o);var i,s,a,o=document.createElement("div");o.classList.add("incident-popup-body"),t.properties.delay&&(i=Math.floor(t.properties.delay/60)+" min",i=this.createInfoSection(i,Gl.DELAY),o.appendChild(i)),t.properties.length&&(i=new Intl.NumberFormat([e,"en-US"],{maximumFractionDigits:2}),a=void 0,a="en-US"===e?(s=xr(t.properties.length,"meters","miles"),i.format(s)+" miles"):(s=xr(t.properties.length,"meters","kilometers"),i.format(s)+" km"),a=this.createInfoSection(a,Gl.LENGTH),o.appendChild(a)),t.properties.from&&(a=this.createInfoSection(t.properties.from,Gl.FROM),o.appendChild(a)),t.properties.to&&(l=this.createInfoSection(t.properties.to,Gl.TO),o.appendChild(l));var l=document.createElement("div");return l.classList.add("incident-popup-content"),l.appendChild(r),l.appendChild(o),new ha({content:l,position:t.geometry.coordinates})},Yl.createInfoSection=function(t,e){var n=document.createElement("div");n.classList.add("incident-popup-info");var o=document.createElement("div");o.classList.add("icon"),o.classList.add(e);var r=document.createElement("span");return r.classList.add("message"),r.classList.add("font-segoeui"),r.setAttribute("aria-label","Incident "+e+" "+t),r.innerText=t,n.appendChild(o),n.appendChild(r),n},Yl);function Yl(){}var Ql=(Jl.prototype.getIncidentIconImageExpression=function(){return["concat",["let","magnitude",["get","magnitude"],["case",["==",["var","magnitude"],0],"grey",["==",["var","magnitude"],1],"yellow",["==",["var","magnitude"],2],"orange",["==",["var","magnitude"],3],"red",["==",["var","magnitude"],4],"grey","grey"]],"-",["let","category",["coalesce",["get","icon_category_12"],["get","icon_category_11"],["get","icon_category_10"],["get","icon_category_9"],["get","icon_category_8"],["get","icon_category_7"],["get","icon_category_6"],["get","icon_category_5"],["get","icon_category_4"],["get","icon_category_3"],["get","icon_category_2"],["get","icon_category_0"],["get","icon_category"],0],["case",["==",["var","category"],0],"unknown",["==",["var","category"],1],"accident",["==",["var","category"],2],"fog",["==",["var","category"],3],"danger",["==",["var","category"],4],"rain",["==",["var","category"],5],"ice",["==",["var","category"],6],"jam",["==",["var","category"],7],"lane-closed",["==",["var","category"],8],"road-closed",["==",["var","category"],9],"road-work",["==",["var","category"],10],"wind",["==",["var","category"],11],"flood",["==",["var","category"],12],"detour","unknown"]]]},Jl);function Jl(t){var r=this;this.incidentLayerName="incidents",this.incidentSourceName="mapcontrol_traffic_incident",this.addToMap=function(){r.map.sources.getById(r.incidentSourceName)||r.map.sources.add(r.vectorTileSource),r.map.layers.getLayerById(r.incidentLayerName)||r.map.layers.add(r.incidentLayer,"labels"),r.clickPopup=new ha({position:[0,0],pixelOffset:[0,-18]}),r.map.addEventListener("mouseover",r.incidentLayerName,r.cursorToPointer),r.map.addEventListener("mouseleave",r.incidentLayerName,r.cursorToDefault),r.map.addEventListener("click",r.incidentLayerName,r.openIncidentPopup),r.map.events.addOnce("idle",r.setAccessiblePopups),r.map.events.add("moveend",r.setAccessiblePopups)},this.accessiblePopups=[],this.setAccessiblePopups=function(){return L(r,void 0,void 0,function(){var e,i,s,a,l,c,u=this;return A(this,function(t){switch(t.label){case 0:return this.accessiblePopups.forEach(function(t){return t.remove()}),this.accessiblePopups=[],e=this.map.layers.getRenderedShapes(this.map.getCamera().bounds,this.incidentLayer),[4,this.map._getLocalizedStrings()];case 1:return i=t.sent(),s=function(e,n){var t=e[n],o=t.geometry.coordinates,o=new Jo(new ti(o[0],o[1])),o=new Kl(t.properties,o,i),r=Vl.build(o,u.incidentLanguage),o=r.getPopupContainer();return o.addEventListener("focusin",function(t){u.clickPopup.remove(),u.accessiblePopups.filter(function(t){return t!==r}).forEach(function(t){return t.remove()}),0<=n-1&&a(r,s(e,n-1)),n+1<e.length&&c(s(e,n+1)),2<=n&&n==e.length-1&&l(s(e,0)),0==n&&2<=e.length&&c(s(e,e.length-1))}),n==e.length-1&&o.addEventListener("focusout",function(t){null===t.relatedTarget&&r.close()}),u.accessiblePopups.push(r),r},a=function(t,e){e.open(u.map),e.close();e=e.getPopupContainer(),t=t.getPopupContainer();t.parentElement.insertBefore(e,t)},l=function(t){t.open(u.map),t.close();var e=t.getPopupContainer(),t=e.parentElement;t.insertBefore(e,t.firstElementChild)},c=function(t){t.open(u.map),t.close()},0<e.length&&c(s(e,0)),1<e.length&&c(s(e,e.length-1)),[2]}})})},this.removeFromMap=function(){var t;r.map.removeEventListener("mouseover",r.incidentLayerName,r.cursorToPointer),r.map.removeEventListener("mouseleave",r.incidentLayerName,r.cursorToDefault),r.map.removeEventListener("click",r.incidentLayerName,r.openIncidentPopup),r.map.events.remove("idle",r.setAccessiblePopups),r.map.events.remove("moveend",r.setAccessiblePopups),r.accessiblePopups.forEach(function(t){return t.remove()}),r.accessiblePopups=[],null!==(t=r.clickPopup)&&void 0!==t&&t.remove(),null!=r.map.layers.getLayerById(r.incidentLayerName)&&r.map.layers.remove(r.incidentLayerName),null!=r.map.sources.getById(r.incidentSourceName)&&r.map.sources.remove(r.incidentSourceName)},this.cursorToPointer=function(t){r.map.getCanvas().style.cursor="pointer"},this.cursorToDefault=function(t){r.map.getCanvas().style.cursor=""},this.openIncidentPopup=function(t){r.clickPopup.remove(),r.accessiblePopups.forEach(function(t){return t.close()});var n=t.position,o=t.features[0];r.map._getLocalizedStrings().then(function(t){var e=new Jo(new ti(n[0],n[1])),t=new Kl(o.properties,e,t);r.clickPopup=Vl.build(t,r.incidentLanguage),r.clickPopup.open(r.map),r.clickPopup.getPopupContainer().addEventListener("focusout",function(t){null===t.relatedTarget&&r.clickPopup.close()})})},this.map=t,this.vectorTileSource=new Gi(this.incidentSourceName,{maxZoom:22,tiles:["https://"+c+"/traffic/incident/tile/pbf?api-version=1.0&zoom={z}&x={x}&y={y}"]});t=this.getIncidentIconImageExpression();this.incidentLayer=new Zs(this.incidentSourceName,this.incidentLayerName,{sourceLayer:"Traffic incident POI",iconOptions:{ignorePlacement:!0,allowOverlap:!0,image:t,size:.75}})}var Xl,$l=(O(tc,Xl=M),tc);function tc(){var t=null!==Xl&&Xl.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}var ec=(nc.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},nc.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)},nc);function nc(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}var oc=(rc.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)},rc.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)},rc);function rc(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}var ic=(sc.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},sc.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},sc.prototype.setOptions=function(t){this.options=(new $l).merge(this.options,t),this.added&&this._setInteractions(this.options)},sc.prototype.getOptions=function(){return Object.assign({},this.options)},sc.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())},sc);function sc(t,e){this.added=!1,this.map=t,this.focusShortcut=new ec(t),this.pinchZoom=new oc(t),this.options=(new $l).merge(e)}function ac(t,e,n){var o={type:"Feature"};return 0!==(n=void 0===n?{}:n).id&&!n.id||(o.id=n.id),n.bbox&&(o.bbox=n.bbox),o.properties=e||{},o.geometry=t,o}function lc(t){return"Feature"===t.type?t.geometry:t}var cc=At(function(t,e){t.exports=function(){function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||false;o.configurable=true;if("value"in o)o.writable=true;Object.defineProperty(t,o.key,o)}}function s(t,e,n){if(e)o(t.prototype,e);if(n)o(t,n);return t}var u=function(){function t(t,e){this.next=null;this.key=t;this.data=e;this.left=null;this.right=null}return t}();function e(t,e){return t>e?1:t<e?-1:0}function a(t,e,n){var o=new u(null,null);var r=o;var i=o;while(true){var s=n(t,e.key);if(s<0){if(e.left===null)break;if(n(t,e.left.key)<0){var a=e.left;e.left=a.right;a.right=e;e=a;if(e.left===null)break}i.left=e;i=e;e=e.left}else if(s>0){if(e.right===null)break;if(n(t,e.right.key)>0){var a=e.right;e.right=a.left;a.left=e;e=a;if(e.right===null)break}r.right=e;r=e;e=e.right}else break}r.right=e.left;i.left=e.right;e.left=o.right;e.right=o.left;return e}function l(t,e,n,o){var r=new u(t,e);if(n===null){r.left=r.right=null;return r}n=a(t,n,o);var i=o(t,n.key);if(i<0){r.left=n.left;r.right=n;n.left=null}else if(i>=0){r.right=n.right;r.left=n;n.right=null}return r}function h(t,e,n){var o=null;var r=null;if(e){e=a(t,e,n);var i=n(e.key,t);if(i===0){o=e.left;r=e.right}else if(i<0){r=e.right;e.right=null;o=e}else{o=e.left;e.left=null;r=e}}return{left:o,right:r}}function p(t,e,n){if(e===null)return t;if(t===null)return e;e=a(t.key,e,n);e.left=t;return e}function d(t,e,n,o,r){if(t){o(""+e+(n?"└── ":"├── ")+r(t)+"\n");var i=e+(n?" ":"│ ");if(t.left)d(t.left,i,false,o,r);if(t.right)d(t.right,i,true,o,r)}}var A=function(){function t(t){if(t===void 0)t=e;this._root=null;this._size=0;this._comparator=t}t.prototype.insert=function(t,e){this._size++;return this._root=l(t,e,this._root,this._comparator)};t.prototype.add=function(t,e){var n=new u(t,e);if(this._root===null){n.left=n.right=null;this._size++;this._root=n}var o=this._comparator;var r=a(t,this._root,o);var i=o(t,r.key);if(i===0)this._root=r;else{if(i<0){n.left=r.left;n.right=r;r.left=null}else if(i>0){n.right=r.right;n.left=r;r.right=null}this._size++;this._root=n}return this._root};t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)};t.prototype._remove=function(t,e,n){var o;if(e===null)return null;e=a(t,e,n);var r=n(t,e.key);if(r===0){if(e.left===null)o=e.right;else{o=a(t,e.left,n);o.right=e.right}this._size--;return o}return e};t.prototype.pop=function(){var t=this._root;if(t){while(t.left)t=t.left;this._root=a(t.key,this._root,this._comparator);this._root=this._remove(t.key,this._root,this._comparator);return{key:t.key,data:t.data}}return null};t.prototype.findStatic=function(t){var e=this._root;var n=this._comparator;while(e){var o=n(t,e.key);if(o===0)return e;else if(o<0)e=e.left;else e=e.right}return null};t.prototype.find=function(t){if(this._root){this._root=a(t,this._root,this._comparator);if(this._comparator(t,this._root.key)!==0)return null}return this._root};t.prototype.contains=function(t){var e=this._root;var n=this._comparator;while(e){var o=n(t,e.key);if(o===0)return true;else if(o<0)e=e.left;else e=e.right}return false};t.prototype.forEach=function(t,e){var n=this._root;var o=[];var r=false;while(!r)if(n!==null){o.push(n);n=n.left}else if(o.length!==0){n=o.pop();t.call(e,n);n=n.right}else r=true;return this};t.prototype.range=function(t,e,n,o){var r=[];var i=this._comparator;var s=this._root;var a;while(r.length!==0||s)if(s){r.push(s);s=s.left}else{s=r.pop();a=i(s.key,e);if(a>0)break;else if(i(s.key,t)>=0)if(n.call(o,s))return this;s=s.right}return this};t.prototype.keys=function(){var n=[];this.forEach(function(t){var e=t.key;return n.push(e)});return n};t.prototype.values=function(){var n=[];this.forEach(function(t){var e=t.data;return n.push(e)});return n};t.prototype.min=function(){if(this._root)return this.minNode(this._root).key;return null};t.prototype.max=function(){if(this._root)return this.maxNode(this._root).key;return null};t.prototype.minNode=function(t){if(t===void 0)t=this._root;if(t)while(t.left)t=t.left;return t};t.prototype.maxNode=function(t){if(t===void 0)t=this._root;if(t)while(t.right)t=t.right;return t};t.prototype.at=function(t){var e=this._root;var n=false;var o=0;var r=[];while(!n)if(e){r.push(e);e=e.left}else if(r.length>0){e=r.pop();if(o===t)return e;o++;e=e.right}else n=true;return null};t.prototype.next=function(t){var e=this._root;var n=null;if(t.right){n=t.right;while(n.left)n=n.left;return n}var o=this._comparator;while(e){var r=o(t.key,e.key);if(r===0)break;else if(r<0){n=e;e=e.left}else e=e.right}return n};t.prototype.prev=function(t){var e=this._root;var n=null;if(t.left!==null){n=t.left;while(n.right)n=n.right;return n}var o=this._comparator;while(e){var r=o(t.key,e.key);if(r===0)break;else if(r<0)e=e.left;else{n=e;e=e.right}}return n};t.prototype.clear=function(){this._root=null;this._size=0;return this};t.prototype.toList=function(){return n(this._root)};t.prototype.load=function(t,e,n){if(e===void 0)e=[];if(n===void 0)n=false;var o=t.length;var r=this._comparator;if(n)v(t,e,0,o-1,r);if(this._root===null){this._root=f(t,e,0,o);this._size=o}else{var i=y(this.toList(),m(t,e),r);o=this._size+o;this._root=g({head:i},0,o)}return this};t.prototype.isEmpty=function(){return this._root===null};Object.defineProperty(t.prototype,"size",{get:function t(){return this._size},enumerable:true,configurable:true});Object.defineProperty(t.prototype,"root",{get:function t(){return this._root},enumerable:true,configurable:true});t.prototype.toString=function(t){if(t===void 0)t=function t(e){return String(e.key)};var e=[];d(this._root,"",true,function(t){return e.push(t)},t);return e.join("")};t.prototype.update=function(t,e,n){var o=this._comparator;var r=h(t,this._root,o),i=r.left,s=r.right;if(o(t,e)<0)s=l(e,n,s,o);else i=l(e,n,i,o);this._root=p(i,s,o)};t.prototype.split=function(t){return h(t,this._root,this._comparator)};return t}();function f(t,e,n,o){var r=o-n;if(r>0){var i=n+Math.floor(r/2);var s=t[i];var a=e[i];var l=new u(s,a);l.left=f(t,e,n,i);l.right=f(t,e,i+1,o);return l}return null}function m(t,e){var n=new u(null,null);var o=n;for(var r=0;r<t.length;r++)o=o.next=new u(t[r],e[r]);o.next=null;return n.next}function n(t){var e=t;var n=[];var o=false;var r=new u(null,null);var i=r;while(!o)if(e){n.push(e);e=e.left}else if(n.length>0){e=i=i.next=n.pop();e=e.right}else o=true;i.next=null;return r.next}function g(t,e,n){var o=n-e;if(o>0){var r=e+Math.floor(o/2);var i=g(t,e,r);var s=t.head;s.left=i;t.head=t.head.next;s.right=g(t,r+1,n);return s}return null}function y(t,e,n){var o=new u(null,null);var r=o;var i=t;var s=e;while(i!==null&&s!==null){if(n(i.key,s.key)<0){r.next=i;i=i.next}else{r.next=s;s=s.next}r=r.next}if(i!==null)r.next=i;else if(s!==null)r.next=s;return o.next}function v(t,e,n,o,r){if(n>=o)return;var i=t[n+o>>1];var s=n-1;var a=o+1;while(true){do{s++}while(r(t[s],i)<0);do{a--}while(r(t[a],i)>0);if(s>=a)break;var l=t[s];t[s]=t[a];t[a]=l;l=e[s];e[s]=e[a];e[a]=l}v(t,e,n,a,r);v(t,e,a+1,o,r)}var _=function t(e,n){return e.ll.x<=n.x&&n.x<=e.ur.x&&e.ll.y<=n.y&&n.y<=e.ur.y},P=function t(e,n){if(n.ur.x<e.ll.x||e.ur.x<n.ll.x||n.ur.y<e.ll.y||e.ur.y<n.ll.y)return null;var o=e.ll.x<n.ll.x?n.ll.x:e.ll.x;var r=e.ur.x<n.ur.x?e.ur.x:n.ur.x;var i=e.ll.y<n.ll.y?n.ll.y:e.ll.y;var s=e.ur.y<n.ur.y?e.ur.y:n.ur.y;return{ll:{x:o,y:i},ur:{x:r,y:s}}},r=Number.EPSILON;if(r===undefined)r=Math.pow(2,-52);var i=r*r,b=function t(e,n){if(-r<e&&e<r)if(-r<n&&n<r)return 0;var o=e-n;if(o*o<i*e*n)return 0;return e<n?-1:1},t=function(){function t(){c(this,t);this.reset()}s(t,[{key:"reset",value:function t(){this.xRounder=new w;this.yRounder=new w}},{key:"round",value:function t(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]);return t}(),w=function(){function t(){c(this,t);this.tree=new A;this.round(0)}s(t,[{key:"round",value:function t(e){var n=this.tree.add(e);var o=this.tree.prev(n);if(o!==null&&b(n.key,o.key)===0){this.tree.remove(e);return o.key}var r=this.tree.next(n);if(r!==null&&b(n.key,r.key)===0){this.tree.remove(e);return r.key}return e}}]);return t}(),R=new t,S=function t(e,n){return e.x*n.y-e.y*n.x},x=function t(e,n){return e.x*n.x+e.y*n.y},T=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};var s=S(r,i);return b(s,0)},C=function t(e){return Math.sqrt(x(e,e))},E=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};return S(i,r)/C(i)/C(r)},k=function t(e,n,o){var r={x:n.x-e.x,y:n.y-e.y};var i={x:o.x-e.x,y:o.y-e.y};return x(i,r)/C(i)/C(r)},O=function t(e,n,o){if(n.y===0)return null;return{x:e.x+n.x/n.y*(o-e.y),y:o}},I=function t(e,n,o){if(n.x===0)return null;return{x:o,y:e.y+n.y/n.x*(o-e.x)}},L=function t(e,n,o,r){if(n.x===0)return I(o,r,e.x);if(r.x===0)return I(e,n,o.x);if(n.y===0)return O(o,r,e.y);if(r.y===0)return O(e,n,o.y);var i=S(n,r);if(i==0)return null;var s={x:o.x-e.x,y:o.y-e.y};var a=S(s,n)/i;var l=S(s,r)/i;var c=e.x+l*n.x,u=o.x+a*r.x;var h=e.y+l*n.y,p=o.y+a*r.y;var d=(c+u)/2;var f=(h+p)/2;return{x:d,y:f}},N=function(){s(r,null,[{key:"compare",value:function t(e,n){var o=r.comparePoints(e.point,n.point);if(o!==0)return o;if(e.point!==n.point)e.link(n);if(e.isLeft!==n.isLeft)return e.isLeft?1:-1;return D.compare(e.segment,n.segment)}},{key:"comparePoints",value:function t(e,n){if(e.x<n.x)return-1;if(e.x>n.x)return 1;if(e.y<n.y)return-1;if(e.y>n.y)return 1;return 0}}]);function r(t,e){c(this,r);if(t.events===undefined)t.events=[this];else t.events.push(this);this.point=t;this.isLeft=e}s(r,[{key:"link",value:function t(e){if(e.point===this.point)throw new Error("Tried to link already linked events");var n=e.point.events;for(var o=0,r=n.length;o<r;o++){var i=n[o];this.point.events.push(i);i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function t(){var e=this.point.events.length;for(var n=0;n<e;n++){var o=this.point.events[n];if(o.segment.consumedBy!==undefined)continue;for(var r=n+1;r<e;r++){var i=this.point.events[r];if(i.consumedBy!==undefined)continue;if(o.otherSE.point.events!==i.otherSE.point.events)continue;o.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function t(){var e=[];for(var n=0,o=this.point.events.length;n<o;n++){var r=this.point.events[n];if(r!==this&&!r.segment.ringOut&&r.segment.isInResult())e.push(r)}return e}},{key:"getLeftmostComparator",value:function t(o){var r=this;var l=new Map;var c=function t(e){var n=e.otherSE;l.set(e,{sine:E(r.point,o.point,n.point),cosine:k(r.point,o.point,n.point)})};return function(t,e){if(!l.has(t))c(t);if(!l.has(e))c(e);var n=l.get(t),o=n.sine,r=n.cosine;var i=l.get(e),s=i.sine,a=i.cosine;if(o>=0&&s>=0){if(r<a)return 1;if(r>a)return-1;return 0}if(o<0&&s<0){if(r<a)return-1;if(r>a)return 1;return 0}if(s<o)return-1;if(s>o)return 1;return 0}}}]);return r}(),M=0,D=function(){s(p,null,[{key:"compare",value:function t(e,n){var o=e.leftSE.point.x;var r=n.leftSE.point.x;var i=e.rightSE.point.x;var s=n.rightSE.point.x;if(s<o)return 1;if(i<r)return-1;var a=e.leftSE.point.y;var l=n.leftSE.point.y;var c=e.rightSE.point.y;var u=n.rightSE.point.y;if(o<r){if(l<a&&l<c)return 1;if(l>a&&l>c)return-1;var h=e.comparePoint(n.leftSE.point);if(h<0)return 1;if(h>0)return-1;var p=n.comparePoint(e.rightSE.point);if(p!==0)return p;return-1}if(o>r){if(a<l&&a<u)return-1;if(a>l&&a>u)return 1;var d=n.comparePoint(e.leftSE.point);if(d!==0)return d;var f=e.comparePoint(n.rightSE.point);if(f<0)return 1;if(f>0)return-1;return 1}if(a<l)return-1;if(a>l)return 1;if(i<s){var m=n.comparePoint(e.rightSE.point);if(m!==0)return m}if(i>s){var g=e.comparePoint(n.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==s){var y=c-a;var v=i-o;var _=u-l;var b=s-r;if(y>v&&_<b)return 1;if(y<v&&_>b)return-1}if(i>s)return 1;if(i<s)return-1;if(c<u)return-1;if(c>u)return 1;if(e.id<n.id)return-1;if(e.id>n.id)return 1;return 0}}]);function p(t,e,n,o){c(this,p);this.id=++M;this.leftSE=t;t.segment=this;t.otherSE=e;this.rightSE=e;e.segment=this;e.otherSE=t;this.rings=n;this.windings=o}s(p,[{key:"replaceRightSE",value:function t(e){this.rightSE=e;this.rightSE.segment=this;this.rightSE.otherSE=this.leftSE;this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function t(){var e=this.leftSE.point.y;var n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function t(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function t(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function t(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point;var o=this.rightSE.point;var r=this.vector();if(n.x===o.x){if(e.x===n.x)return 0;return e.x<n.x?1:-1}var i=(e.y-n.y)/r.y;var s=n.x+i*r.x;if(e.x===s)return 0;var a=(e.x-n.x)/r.x;var l=n.y+a*r.y;if(e.y===l)return 0;return e.y<l?-1:1}},{key:"getIntersection",value:function t(e){var n=this.bbox();var o=e.bbox();var r=P(n,o);if(r===null)return null;var i=this.leftSE.point;var s=this.rightSE.point;var a=e.leftSE.point;var l=e.rightSE.point;var c=_(n,a)&&this.comparePoint(a)===0;var u=_(o,i)&&e.comparePoint(i)===0;var h=_(n,l)&&this.comparePoint(l)===0;var p=_(o,s)&&e.comparePoint(s)===0;if(u&&c){if(p&&!h)return s;if(!p&&h)return l;return null}if(u){if(h)if(i.x===l.x&&i.y===l.y)return null;return i}if(c){if(p)if(s.x===a.x&&s.y===a.y)return null;return a}if(p&&h)return null;if(p)return s;if(h)return l;var d=L(i,this.vector(),a,e.vector());if(d===null)return null;if(!_(r,d))return null;return R.round(d.x,d.y)}},{key:"split",value:function t(e){var n=[];var o=e.events!==undefined;var r=new N(e,true);var i=new N(e,false);var s=this.rightSE;this.replaceRightSE(i);n.push(i);n.push(r);var a=new p(r,s,this.rings.slice(),this.windings.slice());if(N.comparePoints(a.leftSE.point,a.rightSE.point)>0)a.swapEvents();if(N.comparePoints(this.leftSE.point,this.rightSE.point)>0)this.swapEvents();if(o){r.checkForConsuming();i.checkForConsuming()}return n}},{key:"swapEvents",value:function t(){var e=this.rightSE;this.rightSE=this.leftSE;this.leftSE=e;this.leftSE.isLeft=true;this.rightSE.isLeft=false;for(var n=0,o=this.windings.length;n<o;n++)this.windings[n]*=-1}},{key:"consume",value:function t(e){var n=this;var o=e;while(n.consumedBy)n=n.consumedBy;while(o.consumedBy)o=o.consumedBy;var r=p.compare(n,o);if(r===0)return;if(r>0){var i=n;n=o;o=i}if(n.prev===o){var s=n;n=o;o=s}for(var a=0,l=o.rings.length;a<l;a++){var c=o.rings[a];var u=o.windings[a];var h=n.rings.indexOf(c);if(h===-1){n.rings.push(c);n.windings.push(u)}else n.windings[h]+=u}o.rings=null;o.windings=null;o.consumedBy=n;o.leftSE.consumedBy=n.leftSE;o.rightSE.consumedBy=n.rightSE}},{key:"prevInResult",value:function t(){if(this._prevInResult!==undefined)return this._prevInResult;if(!this.prev)this._prevInResult=null;else if(this.prev.isInResult())this._prevInResult=this.prev;else this._prevInResult=this.prev.prevInResult();return this._prevInResult}},{key:"beforeState",value:function t(){if(this._beforeState!==undefined)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function t(){if(this._afterState!==undefined)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};var n=this._afterState.rings;var o=this._afterState.windings;var r=this._afterState.multiPolys;for(var i=0,s=this.rings.length;i<s;i++){var a=this.rings[i];var l=this.windings[i];var c=n.indexOf(a);if(c===-1){n.push(a);o.push(l)}else o[c]+=l}var u=[];var h=[];for(var p=0,d=n.length;p<d;p++){if(o[p]===0)continue;var f=n[p];var m=f.poly;if(h.indexOf(m)!==-1)continue;if(f.isExterior)u.push(m);else{if(h.indexOf(m)===-1)h.push(m);var g=u.indexOf(f.poly);if(g!==-1)u.splice(g,1)}}for(var y=0,v=u.length;y<v;y++){var _=u[y].multiPoly;if(r.indexOf(_)===-1)r.push(_)}return this._afterState}},{key:"isInResult",value:function t(){if(this.consumedBy)return false;if(this._isInResult!==undefined)return this._isInResult;var e=this.beforeState().multiPolys;var n=this.afterState().multiPolys;switch(W.type){case"union":{var o=e.length===0;var r=n.length===0;this._isInResult=o!==r;break}case"intersection":{var i;var s;if(e.length<n.length){i=e.length;s=n.length}else{i=n.length;s=e.length}this._isInResult=s===W.numMultiPolys&&i<s;break}case"xor":{var a=Math.abs(e.length-n.length);this._isInResult=a%2===1;break}case"difference":{var l=function t(e){return e.length===1&&e[0].isSubject};this._isInResult=l(e)!==l(n);break}default:throw new Error("Unrecognized operation type found ".concat(W.type))}return this._isInResult}}],[{key:"fromRing",value:function t(e,n,o){var r,i,s;var a=N.comparePoints(e,n);if(a<0){r=e;i=n;s=1}else if(a>0){r=n;i=e;s=-1}else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var l=new N(r,true);var c=new N(i,false);return new p(l,c,[o],[s])}}]);return p}(),z=function(){function l(t,e,n){c(this,l);if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.poly=e;this.isExterior=n;this.segments=[];if(typeof t[0][0]!=="number"||typeof t[0][1]!=="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=R.round(t[0][0],t[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};var r=o;for(var i=1,s=t.length;i<s;i++){if(typeof t[i][0]!=="number"||typeof t[i][1]!=="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var a=R.round(t[i][0],t[i][1]);if(a.x===r.x&&a.y===r.y)continue;this.segments.push(D.fromRing(r,a,this));if(a.x<this.bbox.ll.x)this.bbox.ll.x=a.x;if(a.y<this.bbox.ll.y)this.bbox.ll.y=a.y;if(a.x>this.bbox.ur.x)this.bbox.ur.x=a.x;if(a.y>this.bbox.ur.y)this.bbox.ur.y=a.y;r=a}if(o.x!==r.x||o.y!==r.y)this.segments.push(D.fromRing(r,o,this))}s(l,[{key:"getSweepEvents",value:function t(){var e=[];for(var n=0,o=this.segments.length;n<o;n++){var r=this.segments[n];e.push(r.leftSE);e.push(r.rightSE)}return e}}]);return l}(),B=function(){function i(t,e){c(this,i);if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new z(t[0],this,true);this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}};this.interiorRings=[];for(var n=1,o=t.length;n<o;n++){var r=new z(t[n],this,false);if(r.bbox.ll.x<this.bbox.ll.x)this.bbox.ll.x=r.bbox.ll.x;if(r.bbox.ll.y<this.bbox.ll.y)this.bbox.ll.y=r.bbox.ll.y;if(r.bbox.ur.x>this.bbox.ur.x)this.bbox.ur.x=r.bbox.ur.x;if(r.bbox.ur.y>this.bbox.ur.y)this.bbox.ur.y=r.bbox.ur.y;this.interiorRings.push(r)}this.multiPoly=e}s(i,[{key:"getSweepEvents",value:function t(){var e=this.exteriorRing.getSweepEvents();for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getSweepEvents();for(var i=0,s=r.length;i<s;i++)e.push(r[i])}return e}}]);return i}(),j=function(){function i(t,e){c(this,i);if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{if(typeof t[0][0][0]==="number")t=[t]}catch(t){}this.polys=[];this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,o=t.length;n<o;n++){var r=new B(t[n],this);if(r.bbox.ll.x<this.bbox.ll.x)this.bbox.ll.x=r.bbox.ll.x;if(r.bbox.ll.y<this.bbox.ll.y)this.bbox.ll.y=r.bbox.ll.y;if(r.bbox.ur.x>this.bbox.ur.x)this.bbox.ur.x=r.bbox.ur.x;if(r.bbox.ur.y>this.bbox.ur.y)this.bbox.ur.y=r.bbox.ur.y;this.polys.push(r)}this.isSubject=e}s(i,[{key:"getSweepEvents",value:function t(){var e=[];for(var n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getSweepEvents();for(var i=0,s=r.length;i<s;i++)e.push(r[i])}return e}}]);return i}(),F=function(){s(w,null,[{key:"factory",value:function t(e){var n=[];for(var o=0,r=e.length;o<r;o++){var i=e[o];if(!i.isInResult()||i.ringOut)continue;var s=null;var a=i.leftSE;var l=i.rightSE;var c=[a];var u=a.point;var h=[];while(true){s=a;a=l;c.push(a);if(a.point===u)break;while(true){var p=a.getAvailableLinkedEvents();if(p.length===0){var d=c[0].point;var f=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(d.x,",")+" ".concat(d.y,"]. Last matching segment found ends at")+" [".concat(f.x,", ").concat(f.y,"]."))}if(p.length===1){l=p[0].otherSE;break}var m=null;for(var g=0,y=h.length;g<y;g++)if(h[g].point===a.point){m=g;break}if(m!==null){var v=h.splice(m)[0];var _=c.splice(v.index);_.unshift(_[0].otherSE);n.push(new w(_.reverse()));continue}h.push({index:c.length,point:a.point});var b=a.getLeftmostComparator(s);l=p.sort(b)[0].otherSE;break}}n.push(new w(c))}return n}}]);function w(t){c(this,w);this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}s(w,[{key:"getGeom",value:function t(){var e=this.events[0].point;var n=[e];for(var o=1,r=this.events.length-1;o<r;o++){var i=this.events[o].point;var s=this.events[o+1].point;if(T(i,e,s)===0)continue;n.push(i);e=i}if(n.length===1)return null;var a=n[0];var l=n[1];if(T(a,e,l)===0)n.shift();n.push(n[0]);var c=this.isExteriorRing()?1:-1;var u=this.isExteriorRing()?0:n.length-1;var h=this.isExteriorRing()?n.length:-1;var p=[];for(var d=u;d!=h;d+=c)p.push([n[d].x,n[d].y]);return p}},{key:"isExteriorRing",value:function t(){if(this._isExteriorRing===undefined){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():true}return this._isExteriorRing}},{key:"enclosingRing",value:function t(){if(this._enclosingRing===undefined)this._enclosingRing=this._calcEnclosingRing();return this._enclosingRing}},{key:"_calcEnclosingRing",value:function t(){var e=this.events[0];for(var n=1,o=this.events.length;n<o;n++){var r=this.events[n];if(N.compare(e,r)>0)e=r}var i=e.segment.prevInResult();var s=i?i.prevInResult():null;while(true){if(!i)return null;if(!s)return i.ringOut;if(s.ringOut!==i.ringOut)if(s.ringOut.enclosingRing()!==i.ringOut)return i.ringOut;else return i.ringOut.enclosingRing();i=s.prevInResult();s=i?i.prevInResult():null}}}]);return w}(),U=function(){function e(t){c(this,e);this.exteriorRing=t;t.poly=this;this.interiorRings=[]}s(e,[{key:"addInterior",value:function t(e){this.interiorRings.push(e);e.poly=this}},{key:"getGeom",value:function t(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getGeom();if(r===null)continue;e.push(r)}return e}}]);return e}(),q=function(){function e(t){c(this,e);this.rings=t;this.polys=this._composePolys(t)}s(e,[{key:"getGeom",value:function t(){var e=[];for(var n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getGeom();if(r===null)continue;e.push(r)}return e}},{key:"_composePolys",value:function t(e){var n=[];for(var o=0,r=e.length;o<r;o++){var i=e[o];if(i.poly)continue;if(i.isExteriorRing())n.push(new U(i));else{var s=i.enclosingRing();if(!s.poly)n.push(new U(s));s.poly.addInterior(i)}}return n}}]);return e}(),G=function(){function n(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:D.compare;c(this,n);this.queue=t;this.tree=new A(e);this.segments=[]}s(n,[{key:"process",value:function t(e){var n=e.segment;var o=[];if(e.consumedBy){if(e.isLeft)this.queue.remove(e.otherSE);else this.tree.remove(n);return o}var r=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!r)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");var i=r;var s=r;var a=undefined;var l=undefined;while(a===undefined){i=this.tree.prev(i);if(i===null)a=null;else if(i.key.consumedBy===undefined)a=i.key}while(l===undefined){s=this.tree.next(s);if(s===null)l=null;else if(s.key.consumedBy===undefined)l=s.key}if(e.isLeft){var c=null;if(a){var u=a.getIntersection(n);if(u!==null){if(!n.isAnEndpoint(u))c=u;if(!a.isAnEndpoint(u)){var h=this._splitSafely(a,u);for(var p=0,d=h.length;p<d;p++)o.push(h[p])}}}var f=null;if(l){var m=l.getIntersection(n);if(m!==null){if(!n.isAnEndpoint(m))f=m;if(!l.isAnEndpoint(m)){var g=this._splitSafely(l,m);for(var y=0,v=g.length;y<v;y++)o.push(g[y])}}}if(c!==null||f!==null){var _=null;if(c===null)_=f;else if(f===null)_=c;else{var b=N.comparePoints(c,f);_=b<=0?c:f}this.queue.remove(n.rightSE);o.push(n.rightSE);var w=n.split(_);for(var S=0,x=w.length;S<x;S++)o.push(w[S])}if(o.length>0){this.tree.remove(n);o.push(e)}else{this.segments.push(n);n.prev=a}}else{if(a&&l){var T=a.getIntersection(l);if(T!==null){if(!a.isAnEndpoint(T)){var C=this._splitSafely(a,T);for(var E=0,k=C.length;E<k;E++)o.push(C[E])}if(!l.isAnEndpoint(T)){var O=this._splitSafely(l,T);for(var I=0,L=O.length;I<L;I++)o.push(O[I])}}}this.tree.remove(n)}return o}},{key:"_splitSafely",value:function t(e,n){this.tree.remove(e);var o=e.rightSE;this.queue.remove(o);var r=e.split(n);r.push(o);if(e.consumedBy===undefined)this.tree.insert(e);return r}}]);return n}(),Z=typeof process!=="undefined"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,H=typeof process!=="undefined"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,K,W=new(function(){function t(){c(this,t)}s(t,[{key:"run",value:function t(e,n,o){W.type=e;R.reset();var r=[new j(n,true)];for(var i=0,s=o.length;i<s;i++)r.push(new j(o[i],false));W.numMultiPolys=r.length;if(W.type==="difference"){var a=r[0];var l=1;while(l<r.length)if(P(r[l].bbox,a.bbox)!==null)l++;else r.splice(l,1)}if(W.type==="intersection")for(var c=0,u=r.length;c<u;c++){var h=r[c];for(var p=c+1,d=r.length;p<d;p++)if(P(h.bbox,r[p].bbox)===null)return[]}var f=new A(N.compare);for(var m=0,g=r.length;m<g;m++){var y=r[m].getSweepEvents();for(var v=0,_=y.length;v<_;v++){f.insert(y[v]);if(f.size>Z)throw new Error("Infinite loop when putting segment endpoints in a priority queue "+"(queue size too big). Please file a bug report.")}}var b=new G(f);var w=f.size;var S=f.pop();while(S){var x=S.key;if(f.size===w){var T=x.segment;throw new Error("Unable to pop() ".concat(x.isLeft?"left":"right"," SweepEvent ")+"[".concat(x.point.x,", ").concat(x.point.y,"] from segment #").concat(T.id," ")+"[".concat(T.leftSE.point.x,", ").concat(T.leftSE.point.y,"] -> ")+"[".concat(T.rightSE.point.x,", ").concat(T.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(f.size>Z)throw new Error("Infinite loop when passing sweep line over endpoints "+"(queue size too big). Please file a bug report.");if(b.segments.length>H)throw new Error("Infinite loop when passing sweep line over endpoints "+"(too many sweep line segments). Please file a bug report.");var C=b.process(x);for(var E=0,k=C.length;E<k;E++){var O=C[E];if(O.consumedBy===undefined)f.insert(O)}w=f.size;S=f.pop()}R.reset();var I=F.factory(b.segments);var L=new q(I);return L.getGeom()}}]);return t}()),V,Y,Q,J,X;return{union:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("union",e,o)},intersection:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("intersection",e,o)},xor:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("xor",e,o)},difference:function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W.run("difference",e,o)}}}()});function uc(t,e,n){void 0===n&&(n={});var o,t=lc(t),e=lc(e),e=cc.intersection(t.coordinates,e.coordinates);return 0===e.length?null:1===e.length?function(t,e,n){void 0===n&&(n={});for(var o=0,r=t;o<r.length;o++){var i=r[o];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<i[i.length-1].length;s++)if(i[i.length-1][s]!==i[0][s])throw new Error("First and last Position are not equivalent.")}return ac({type:"Polygon",coordinates:t},e,n)}(e[0],n.properties):(n=n.properties,ac({type:"MultiPolygon",coordinates:e},n,o=void 0===o?{}:o))}var hc,pc=["DIV","SPAN","A"],dc=["data-azure-maps-attribution-minzoom","data-azure-maps-attribution-maxzoom","data-azure-maps-attribution-geometry","data-azure-maps-attribution-tileset","data-azure-maps-attribution-order","data-azure-maps-attribution-dynamic"],fc=N(["href"],dc),mc=(gc.prototype.equals=function(t){return this.stringRepresentation===t.stringRepresentation},Object.defineProperty(gc.prototype,"stringRepresentation",{get:function(){return[void 0!==this.minZoom?"minzoom="+this.minZoom:"",void 0!==this.maxZoom?"maxzoom="+this.maxZoom:"",void 0!==this.geometry?this.element.attributes.getNamedItem("data-azure-maps-attribution-geometry").value:"",void 0!==this.tilesetId?"tilesetId="+this.tilesetId:"",this.dynamic?"dynamic":""].filter(function(t){return 0<t.length}).join(";")},enumerable:!1,configurable:!0}),gc.applicable=function(t){return Array.from(t.attributes).map(function(t){return dc.includes(t.name)}).reduce(function(t,e){return t||e},!1)},Object.defineProperty(gc.prototype,"minZoom",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-minzoom");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(gc.prototype,"maxZoom",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-maxzoom");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(gc.prototype,"geometry",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-geometry");if(t&&t.value)try{return JSON.parse(t.value)}catch(t){return}},enumerable:!1,configurable:!0}),Object.defineProperty(gc.prototype,"tilesetId",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-tileset");return t&&t.value?t.value:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(gc.prototype,"order",{get:function(){var t=this.element.attributes.getNamedItem("data-azure-maps-attribution-order");return t&&!isNaN(t.value)?parseInt(t.value):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(gc.prototype,"dynamic",{get:function(){return null!==this.element.attributes.getNamedItem("data-azure-maps-attribution-dynamic")},enumerable:!1,configurable:!0}),Object.defineProperty(gc.prototype,"hidesElement",{get:function(){return"none"==this.element.style.display},enumerable:!1,configurable:!0}),gc.prototype.forceHide=function(){this.element.style.display="none"},gc.prototype.satisfied=function(t){var e=!this.minZoom||!t.zoom||t.zoom>=this.minZoom,n=!this.maxZoom||!t.zoom||t.zoom<=this.maxZoom,o=!0;return this.geometry&&t.bounds&&(o=null!==uc({type:"Feature",geometry:this.geometry,properties:{}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[li.getNorthWest(t.bounds),li.getNorthEast(t.bounds),li.getSouthEast(t.bounds),li.getSouthWest(t.bounds),li.getNorthWest(t.bounds)]]},properties:{}})),e&&n&&o},gc.prototype.apply=function(e,t){var n=this;void 0===t&&(t=null);var o=this.satisfied(e.getCamera()),r=this.dynamic&&this.tilesetId,i=this.hidesElement,t=t&&["dragend","zoomend","pitchend"].includes(t.type);return o||i?o&&(i||r)&&(o&&i&&this.element.style.removeProperty("display"),r&&(t?e.events.addOnce("idle",function(t){return n.fetchAndApplyDynamicAttribution(e)}):this.fetchAndApplyDynamicAttribution(e))):this.element.style.display="none",o===i},gc.prototype.fetchAndApplyDynamicAttribution=function(o){var e,n,t,r=this,i=o.getCamera();this.lastFetchState&&li.containsBoundingBox(this.lastFetchState.bounds,i.bounds)&&Math.floor(this.lastFetchState.zoom)==Math.floor(i.zoom)||(e=Mr(i.center,li.getSouthWest(i.bounds),gc.viewportBufferExpansionRatio),t=((n=Mr(i.center,li.getNorthEast(i.bounds),gc.viewportBufferExpansionRatio))[0]<e[0]?[[e[0],e[1],180,n[1]],[-180,e[1],n[0],n[1]]]:[[e[0],e[1],n[0],n[1]]]).map(function(t){var e=new URLSearchParams({"api-version":"2.1",tilesetId:r.tilesetId,zoom:void 0!==i.zoom?""+Math.floor(i.zoom):void 0,bounds:t.join(",")}),n="https://{{azMapsDomain}}/map/attribution",t={url:n,headers:{}};o._substituteDomainLanguageViewAndSignInRequest(n,t);e=t.url+(t.url.includes("?")?"&":"?")+e.toString();return o._sendRequest(e,"Attribution",t.headers).then(function(t){return t.json()})}),Promise.all(t).then(function(t){r.applyAttributionResponse(t),r.lastFetchState={bounds:new li([e[0],e[1],n[0],n[1]]),zoom:i.zoom}}).catch(function(t){return console.error(t)}))},gc.prototype.applyAttributionResponse=function(t){var e,n,o=this,r=t.map(function(t){return t.copyrights||[]}).reduce(function(t,e){return N(t,e)},[]);0!=r.length&&(null!==(t=ra.parseWithFilter(r.join(""),function(t){return!0},function(t){return t},function(){return o.element.innerHTML="",o.element}))?(t="string"==typeof t?((r=document.createElement("span")).innerHTML=t,r):t,n=t===this.element?(e=document.createElement("span"),Array.from(this.element.childNodes).forEach(function(t){return e.appendChild(t)}),e):t,Array.from(this.element.attributes).filter(function(t){return dc.includes(t.name)}).forEach(function(t){return n.attributes.setNamedItem(t.cloneNode())}),n.style.display=this.element.style.display,t=this.element.parentElement,this.element.remove(),t.append(n),this.element=n,this.attributionChangeCallback(this)):console.warn("Dynamic attribution is empty after filtering"))},gc.viewportBufferExpansionRatio=2,function(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(i<3?r(s):3<i?r(e,n,s):r(e,n))||s);3<i&&s&&Object.defineProperty(e,n,s)}([(hc=1e3,function(t,e,n){var o=n.value,r=new Map;return n.value=function(){var t=this,e=arguments;r.get(t)||!1||(o.apply(t,e),r.set(t,!0),setTimeout(function(){return r.delete(t)},hc))},n})],gc.prototype,"fetchAndApplyDynamicAttribution",null),gc);function gc(t,e){var n=this;this.lastFetchState={bounds:null,zoom:null},this.getElement=function(){return n.element},this.element=t,this.attributionChangeCallback=e}var yc=[/all rights reserved/gi],vc=(_c.prototype.addToMap=function(){this.map.events.add("stylechanged",this.loadAttributionOnceSourcesLoaded),this.map.events.add("dragend",this.applyRules),this.map.events.add("zoomend",this.applyRules),this.map.events.add("pitchend",this.applyRules)},_c.prototype.removeFromMap=function(){this.map.events.remove("stylechanged",this.loadAttributionOnceSourcesLoaded),this.map.events.remove("dragend",this.applyRules),this.map.events.remove("zoomend",this.applyRules),this.map.events.remove("pitchend",this.applyRules)},_c.prototype.getDefaultAttribution=function(){return this.copyrightControl.getDefaultAttributions().map(function(t){return e=t,(t=document.createElement("a")).textContent=e,t;var e})},_c);function _c(t,e,n){var o,a=this;this.rules=[],this.virtualContext=((o=document.createElement("span")).className="azure-map-copyright-context",o),this.renderContext=this.virtualContext.cloneNode(!1),this.addAttributionFromSource=function(t){},this.removeAttributionFromSource=function(t){},this.getMapStyleVisibleSources=function(){var e=a.map._getMap(),n=e.getStyle();return Object.entries(n.sources).filter(function(t){var e=R(t,1)[0];return n.layers.filter(function(t){return t&&t.source==e}).reduce(function(t,e){return!(e.layout&&"none"===e.layout.visibility||e.paint&&0===e.paint["icon-opacity"]&&0===e.paint["text-opacity"])||t},!1)}).map(function(t){t=R(t,1)[0];return e.getSource(t)})},this.loadAttributionOnceSourcesLoaded=function(){var t=a.getMapStyleVisibleSources();Promise.all(t.map(function(r){return new Promise(function(n,o){"tiles"in r?n(r):(r.load(),r.on("data",function t(e){"metadata"==e.sourceDataType&&(r.off("data",t),n(r))}),r.on("error",function t(e){r.off("error",t),o(e)}))}).then(function(t){return{status:"fulfilled",value:t}}).catch(function(t){return{status:"rejected",reason:t}})})).then(function(t){a.reloadAttribution()})},this.reloadAttribution=function(){var t=a.getMapStyleVisibleSources(),o=new Set,r={},e=Object.values(t).filter(function(t){return"attribution"in t&&t.attribution&&"tiles"in t&&0<t.tiles.length}).map(function(t){return t}).map(function(t){t=t.attribution;return ra.parseWithFilter(t,function(t){return pc.includes(t.tagName)&&Array.from(t.attributes).map(function(t){return fc.includes(t.name)}).reduce(function(t,e){return t&&e},!0)},function(t){var e,n=null;return t instanceof HTMLElement&&mc.applicable(t)&&(n=new mc(t,function(){return a.renderAttribution()}),o.add(n),void 0!==n.order&&(t.style.order=""+n.order)),n&&t instanceof HTMLElement&&((!((e=n.stringRepresentation)in r)||void 0!==n.order&&void 0!==r[e].order&&n.order<r[e].order||void 0!==n.order&&void 0===r[e].order)&&(r[e]=n)),t},function(){return document.createElement("span")})}),n=new Set(Object.values(r)),t=new Set(N(o).filter(function(t){return!n.has(t)})),i=new Set(N(t).map(function(t){return t.getElement()}));N(i).filter(function(t){return null!==t.parentElement}).forEach(function(t){return t.parentElement.removeChild(t)}),a.rules=Object.values(r);var e=e.filter(function(t){return"string"==typeof t||!i.has(t)}).map(function(t){return"string"==typeof t?new Text(t):t}),s=document.createElement("span");0<e.length?e.forEach(function(t){return s.appendChild(t)}):a.getDefaultAttribution().forEach(function(t){return s.appendChild(t)}),a.virtualContext=s,a.copyrightControl.setOptions({copyrightContent:a.renderContext}),a.applyRules(),a.renderAttribution()},this.applyRules=function(n){void 0===n&&(n=null),a.rules.reduce(function(t,e){e=e.apply(a.map,n);return t||e},!1)&&a.renderAttribution()},this.renderAttribution=function(){var e=function(t){return Array.from("none"!=t.style.display?t.children:[]).map(function(t){return e(t)}).reduce(function(t,e){return N(t,e)},Array.from("none"!=t.style.display?t.childNodes:[]).filter(function(t){return t.nodeType==t.TEXT_NODE}))},t=a.virtualContext.cloneNode(!0),n=e(t);n.forEach(function(t){return t.textContent=N(yc).reduce(function(t,e){return t.replace(e,"").trim()},t.textContent)}),n.reduce(function(t,e){return t.has(e.textContent)?(e.textContent="",e.parentElement&&e.parentElement.removeChild(e)):t.add(e.textContent),t},new Set),a.renderContext.innerHTML="",Array.from(t.childNodes).forEach(function(t){return a.renderContext.appendChild(t)})},this.map=t,this.copyrightControl=e,this.options=n}var bc=At(function(t){var e=(e=function(t){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},e.prototype._singletonInstance)return e.prototype._singletonInstance;if((e.prototype._singletonInstance=this).instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,t.displayCall&&"function"!=typeof t.displayCall)throw new Error("displayCall is not a function");if(!t.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(t),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(t){}}),e.prototype.login=function(){var t,e;this._loginInProgress?this.info("Login in progress"):(this._loginInProgress=!0,t=this._guid(),this.config.state=t,this._idTokenNonce=this._guid(),(e=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST))&&""!==e?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):e=window.location.href,this.verbose("Expected state: "+t+" startPage:"+e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,t,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),e=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce),this.config.displayCall?this.config.displayCall(e):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(t),this.registerCallback(t,this.config.clientId,this.callback),this._loginPopup(e)):this.promptUser(e))},e.prototype._openPopup=function(t,e,n,o){try{var r=window.screenLeft||window.screenX,i=window.screenTop||window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=s/2-n/2+r,c=a/2-o/2+i,u=window.open(t,e,"width="+n+", height="+o+", top="+c+", left="+l);return u.focus&&u.focus(),u}catch(t){return this.warn("Error opening popup, "+t.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},e.prototype._handlePopupError=function(t,e,n,o,r){this.warn(o),this._saveItem(this.CONSTANTS.STORAGE.ERROR,n),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,o),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,r),e&&this._activeRenewals[e]&&(this._activeRenewals[e]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,t&&t(o,null,n)},e.prototype._loginPopup=function(t,o,e){var r,i,s,a=this._openPopup(t,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),l=e||this.callback;null!=a?(this._openedWindows.push(a),r=-1!=this.config.redirectUri.indexOf("#")?this.config.redirectUri.split("#")[0]:this.config.redirectUri,i=this,s=window.setInterval(function(){if(!a||a.closed||void 0===a.closed){var t="Popup Window closed",e="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return i.isAngular&&i._broadcast("adal:popUpClosed",e+i.CONSTANTS.RESOURCE_DELIMETER+t),i._handlePopupError(l,o,t,e,e),void window.clearInterval(s)}try{var n=a.location;if(-1!=encodeURI(n.href).indexOf(encodeURI(r)))return i.isAngular?i._broadcast("adal:popUpHashChanged",n.hash):i.handleWindowCallback(n.hash),window.clearInterval(s),i._loginInProgress=!1,i._acquireTokenInProgress=!1,i.info("Closing popup window"),i._openedWindows=[],void a.close()}catch(t){}},1)):this._handlePopupError(l,o,"Error opening popup",e="Popup Window is null. This can happen if you are using IE",e)},e.prototype._broadcast=function(t,e){function n(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}"function"!=typeof window.CustomEvent&&(n.prototype=window.Event.prototype,window.CustomEvent=n);e=new CustomEvent(t,{detail:e});window.dispatchEvent(e)},e.prototype.loginInProgress=function(){return this._loginInProgress},e.prototype._hasResource=function(t){var e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return e&&!this._isEmpty(e)&&-1<e.indexOf(t+this.CONSTANTS.RESOURCE_DELIMETER)},e.prototype.getCachedToken=function(t){if(!this._hasResource(t))return null;var e=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t),n=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t),o=this.config.expireOffsetSeconds||300;return n&&n>this._now()+o?e:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0),null)},e.prototype.getCachedUser=function(){if(this._user)return this._user;var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(t),this._user},e.prototype.registerCallback=function(i,s,t){this._activeRenewals[s]=i,this._callBacksMappedToRenewStates[i]||(this._callBacksMappedToRenewStates[i]=[]);var a=this;this._callBacksMappedToRenewStates[i].push(t),this._callBackMappedToRenewStates[i]||(this._callBackMappedToRenewStates[i]=function(t,e,n,o){a._activeRenewals[s]=null;for(var r=0;r<a._callBacksMappedToRenewStates[i].length;++r)try{a._callBacksMappedToRenewStates[i][r](t,e,n,o)}catch(n){a.warn(n)}a._callBacksMappedToRenewStates[i]=null,a._callBackMappedToRenewStates[i]=null})},e.prototype._renewToken=function(t,e,n){this.info("renewToken is called for resource:"+t);var o=this._addAdalFrame("adalRenewFrame"+t),r=this._guid()+"|"+t;this.config.state=r,this._renewStates.push(r),this.verbose("Renew token Expected state: "+r);var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl(n=n||"token",t),"prompt");n===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),i+="&nonce="+encodeURIComponent(this._idTokenNonce)),i=this._addHintParameters(i+="&prompt=none"),this.registerCallback(r,t,e),this.verbosePii("Navigate to:"+i),o.src="about:blank",this._loadFrameTimeout(i,"adalRenewFrame"+t,t)},e.prototype._renewIdToken=function(t,e){this.info("renewIdToken is called");var n=this._addAdalFrame("adalIdTokenFrame"),o=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this.config.state=o,this._renewStates.push(o),this.verbose("Renew Idtoken Expected state: "+o);var r=null==e?null:this.config.clientId,e=e||"id_token",r=this._urlRemoveQueryStringParameter(this._getNavigateUrl(e,r),"prompt"),r=this._addHintParameters(r+="&prompt=none");r+="&nonce="+encodeURIComponent(this._idTokenNonce),this.registerCallback(o,this.config.clientId,t),this.verbosePii("Navigate to:"+r),n.src="about:blank",this._loadFrameTimeout(r,"adalIdTokenFrame",this.config.clientId)},e.prototype._urlContainsQueryStringParameter=function(t,e){return new RegExp("[\\?&]"+t+"=").test(e)},e.prototype._urlRemoveQueryStringParameter=function(t,e){var n=new RegExp("(\\&"+e+"=)[^&]+");return t=t.replace(n,""),n=new RegExp("("+e+"=)[^&]+&"),t=t.replace(n,""),n=new RegExp("("+e+"=)[^&]+"),t=t.replace(n,"")},e.prototype._loadFrameTimeout=function(t,e,n){this.verbose("Set loading state to pending for: "+n),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+n,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),this._loadFrame(t,e);var o=this;setTimeout(function(){var t;o._getItem(o.CONSTANTS.STORAGE.RENEW_STATUS+n)===o.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS&&(o.verbose("Loading frame has timed out after: "+o.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+n),(t=o._activeRenewals[n])&&o._callBackMappedToRenewStates[t]&&o._callBackMappedToRenewStates[t]("Token renewal operation failed due to timeout",null,"Token Renewal Failed"),o._saveItem(o.CONSTANTS.STORAGE.RENEW_STATUS+n,o.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED))},o.CONSTANTS.LOADFRAME_TIMEOUT)},e.prototype._loadFrame=function(e,t){var n=this;n.info("LoadFrame: "+t);var o=t;setTimeout(function(){var t=n._addAdalFrame(o);""!==t.src&&"about:blank"!==t.src||(t.src=e,n._loadFrame(e,o))},500)},e.prototype.acquireToken=function(t,e){if(this._isEmpty(t))return this.warn("resource is required"),void e("resource is required",null,"resource is required");var n=this.getCachedToken(t);return n?(this.info("Token is already in cache for resource:"+t),void e(null,n,null)):this._user||this.config.extraQueryParameter&&-1!==this.config.extraQueryParameter.indexOf("login_hint")?void(this._activeRenewals[t]?this.registerCallback(this._activeRenewals[t],t,e):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,t===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(e)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(t,e)):(this.verbose("renewing idtoken and access_token"),this._renewToken(t,e,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))):(this.warn("User login is required"),void e("User login is required",null,"login required"))},e.prototype.acquireTokenPopup=function(t,e,n,o){if(this._isEmpty(t))return this.warn("resource is required"),void o("resource is required",null,"resource is required");if(!this._user)return this.warn("User login is required"),void o("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void o("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+t;this.config.state=r,this._renewStates.push(r),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+r);var i=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(i+="&prompt=select_account",e&&(i+=e),n&&-1===i.indexOf("&claims"))i+="&claims="+encodeURIComponent(n);else if(n&&-1!==i.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");i=this._addHintParameters(i),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this.registerCallback(r,t,o),this._loginPopup(i,t,o)},e.prototype.acquireTokenRedirect=function(t,e,n){if(this._isEmpty(t))return this.warn("resource is required"),void o("resource is required",null,"resource is required");var o=this.callback;if(!this._user)return this.warn("User login is required"),void o("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void o("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+t;this.config.state=r,this.verbose("Renew token Expected state: "+r);o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",t),"prompt");if(o+="&prompt=select_account",e&&(o+=e),n&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(n);else if(n&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,r,!0),this.promptUser(o)},e.prototype.promptUser=function(t){t?(this.infoPii("Navigate to:"+t),window.location.replace(t)):this.info("Navigate url is empty")},e.prototype.clearCache=function(){this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);if(!this._isEmpty(t))for(var t=t.split(this.CONSTANTS.RESOURCE_DELIMETER),e=0;e<t.length&&""!==t[e];e++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t[e],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t[e],0);this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},e.prototype.clearCacheForResource=function(t){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._hasResource(t)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,0))},e.prototype.logOut=function(){var t,e;this.clearCache(),this._user=null,e=this.config.logOutUri||(t="common",e="",this.config.tenant&&(t=this.config.tenant),this.config.postLogoutRedirectUri&&(e="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),this.instance+t+"/oauth2/logout?"+e),this.infoPii("Logout navigate to: "+e),this.promptUser(e)},e.prototype._isEmpty=function(t){return void 0===t||!t||0===t.length},e.prototype.getUser=function(t){if("function"!=typeof t)throw new Error("callback is not a function");var e;this._user?t(null,this._user):(e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN),this._isEmpty(e)?(this.warn("User information is not available"),t("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(e),t(null,this._user)))},e.prototype._addHintParameters=function(t){var e;return this._user&&this._user.profile&&(this._user.profile.sid&&-1!==t.indexOf("&prompt=none")?this._urlContainsQueryStringParameter("sid",t)||(t+="&sid="+encodeURIComponent(this._user.profile.sid)):this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",t)||(t+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",t)&&-1<this._user.profile.upn.indexOf("@")&&(e=this._user.profile.upn.split("@"),t+="&domain_hint="+encodeURIComponent(e[e.length-1])))),t},e.prototype._createUser=function(t){var e=null,t=this._extractIdToken(t);return t&&t.hasOwnProperty("aud")&&(t.aud.toLowerCase()===this.config.clientId.toLowerCase()?(e={userName:"",profile:t},t.hasOwnProperty("upn")?e.userName=t.upn:t.hasOwnProperty("email")&&(e.userName=t.email)):this.warn("IdToken has invalid aud field")),e},e.prototype._getHash=function(t){return-1<t.indexOf("#/")?t=t.substring(t.indexOf("#/")+2):-1<t.indexOf("#")&&(t=t.substring(1)),t},e.prototype.isCallback=function(t){t=this._getHash(t);t=this._deserialize(t);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},e.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},e.prototype.getRequestInfo=function(t){t=this._getHash(t);var e=this._deserialize(t),n={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(e&&((n.parameters=e).hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||e.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||e.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){n.valid=!0;t="";if(!e.hasOwnProperty("state"))return this.warn("No state returned"),n;if(this.verbose("State: "+e.state),t=e.state,n.stateResponse=t,this._matchState(n))return n;if(!n.stateMatch&&window.parent){n.requestType=this._requestType;for(var o=this._renewStates,r=0;r<o.length;r++)if(o[r]===n.stateResponse){n.stateMatch=!0;break}}}return n},e.prototype._matchNonce=function(t){if(e=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN))for(var e=e.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<e.length;n++)if(e[n]&&e[n]===t.profile.nonce)return!0;return!1},e.prototype._matchState=function(t){if(e=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN))for(var e=e.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<e.length;n++)if(e[n]&&e[n]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.LOGIN,t.stateMatch=!0;if(o=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW))for(var o=o.split(this.CONSTANTS.CACHE_DELIMETER),n=0;n<o.length;n++)if(o[n]&&o[n]===t.stateResponse)return t.requestType=this.REQUEST_TYPE.RENEW_TOKEN,t.stateMatch=!0;return!1},e.prototype._getResourceFromState=function(t){if(t){var e=t.indexOf("|");if(-1<e&&e+1<t.length)return t.substring(e+1)}return""},e.prototype.saveTokenFromHash=function(t){this.info("State status:"+t.stateMatch+"; Request type:"+t.requestType),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var e,n=this._getResourceFromState(t.stateResponse);t.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)?(this.infoPii("Error :"+t.parameters.error+"; Error description:"+t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,t.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,t.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),t.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,t.parameters.error_description))):t.stateMatch?(this.info("State is right"),t.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,t.parameters[this.CONSTANTS.SESSION_STATE]),t.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(n)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+n+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n,t.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n,this._expiresIn(t.parameters[this.CONSTANTS.EXPIRES_IN]))),t.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(t.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,t.parameters[this.CONSTANTS.ID_TOKEN]),n=this.config.loginResource||this.config.clientId,this._hasResource(n)||(e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,e+n+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+n,t.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+n,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(t.parameters.error="invalid id_token",t.parameters.error_description="Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+t.parameters[this.CONSTANTS.ID_TOKEN])))):(t.parameters.error="Invalid_state",t.parameters.error_description="Invalid_state. state: "+t.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+t.stateResponse)),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+n,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},e.prototype.getResourceForEndpoint=function(t){if(this.config&&this.config.anonymousEndpoints)for(var e=0;e<this.config.anonymousEndpoints.length;e++)if(-1<t.indexOf(this.config.anonymousEndpoints[e]))return null;if(this.config&&this.config.endpoints)for(var n in this.config.endpoints)if(-1<t.indexOf(n))return this.config.endpoints[n];return!(-1<t.indexOf("http://")||-1<t.indexOf("https://"))||this._getHostFromUri(t)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null},e.prototype._getHostFromUri=function(t){return String(t).replace(/^(https?:)\/\//,"").split("/")[0]},e.prototype.handleWindowCallback=function(t){if(null==t&&(t=window.location.hash),this.isCallback(t)){var e=null,n=!1;0<this._openedWindows.length&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(e=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,n=!0):window.parent&&window.parent._adalInstance&&(e=window.parent._adalInstance);var o,r=e.getRequestInfo(t),i=null,s=n||window.parent!==window?e._callBackMappedToRenewStates[r.stateResponse]:e.callback;e.info("Returned from redirect url"),e.saveTokenFromHash(r),r.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?e.verbose("Window is in iframe, acquiring token silently"):e.verbose("acquiring token interactive in progress"),o=r.parameters[e.CONSTANTS.ACCESS_TOKEN]||r.parameters[e.CONSTANTS.ID_TOKEN],i=e.CONSTANTS.ACCESS_TOKEN):r.requestType===this.REQUEST_TYPE.LOGIN&&(o=r.parameters[e.CONSTANTS.ID_TOKEN],i=e.CONSTANTS.ID_TOKEN);t=r.parameters[e.CONSTANTS.ERROR_DESCRIPTION],r=r.parameters[e.CONSTANTS.ERROR];try{s&&s(t,o,r,i)}catch(t){e.error("Error occurred in user defined callback function: "+t)}window.parent!==window||n||(e.config.navigateToLoginRequestUrl?window.location.href=e._getItem(e.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},e.prototype._getNavigateUrl=function(t,e){var n="common";this.config.tenant&&(n=this.config.tenant);e=this.instance+n+"/oauth2/authorize"+this._serialize(t,this.config,e)+this._addLibMetadata();return this.info("Navigate url:"+e),e},e.prototype._extractIdToken=function(t){t=this._decodeJwt(t);if(!t)return null;try{var e=t.JWSPayload,n=this._base64DecodeStringUrlSafe(e);return n?JSON.parse(n):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(t){this.error("The returned id_token could not be decoded",t)}return null},e.prototype._base64DecodeStringUrlSafe=function(t){return t=t.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(t))):decodeURIComponent(escape(this._decode(t)))},e.prototype._decode=function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=(t=String(t).replace(/=+$/,"")).length;if(n%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var o,r,i,s,a,l,c,u="",h=0;h<n;h+=4){if(o=e.indexOf(t.charAt(h)),r=e.indexOf(t.charAt(h+1)),i=e.indexOf(t.charAt(h+2)),s=e.indexOf(t.charAt(h+3)),h+2===n-1){l=(a=o<<18|r<<12|i<<6)>>16&255,c=a>>8&255,u+=String.fromCharCode(l,c);break}if(h+1===n-1){l=(a=o<<18|r<<12)>>16&255,u+=String.fromCharCode(l);break}l=(a=o<<18|r<<12|i<<6|s)>>16&255,c=a>>8&255,u+=String.fromCharCode(l,c,255&a)}return u},e.prototype._decodeJwt=function(t){if(this._isEmpty(t))return null;t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);return!t||t.length<4?(this.warn("The returned id_token is not parseable."),null):{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},e.prototype._convertUrlSafeToRegularBase64EncodedString=function(t){return t.replace("-","+").replace("_","/")},e.prototype._serialize=function(t,e,n){var o=[];return null!==e&&(o.push("?response_type="+t),o.push("client_id="+encodeURIComponent(e.clientId)),n&&o.push("resource="+encodeURIComponent(n)),o.push("redirect_uri="+encodeURIComponent(e.redirectUri)),o.push("state="+encodeURIComponent(e.state)),e.hasOwnProperty("slice")&&o.push("slice="+encodeURIComponent(e.slice)),e.hasOwnProperty("extraQueryParameter")&&o.push(e.extraQueryParameter),e=e.correlationId||this._guid(),o.push("client-request-id="+encodeURIComponent(e))),o.join("&")},e.prototype._deserialize=function(t){for(var e=/\+/g,n=/([^&=]+)=([^&]*)/g,o=function(t){return decodeURIComponent(t.replace(e," "))},r={},i=n.exec(t);i;)r[o(i[1])]=o(i[2]),i=n.exec(t);return r},e.prototype._decimalToHex=function(t){for(var e=t.toString(16);e.length<2;)e="0"+e;return e},e.prototype._guid=function(){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues){var e=new Uint8Array(16);return t.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,this._decimalToHex(e[0])+this._decimalToHex(e[1])+this._decimalToHex(e[2])+this._decimalToHex(e[3])+"-"+this._decimalToHex(e[4])+this._decimalToHex(e[5])+"-"+this._decimalToHex(e[6])+this._decimalToHex(e[7])+"-"+this._decimalToHex(e[8])+this._decimalToHex(e[9])+"-"+this._decimalToHex(e[10])+this._decimalToHex(e[11])+this._decimalToHex(e[12])+this._decimalToHex(e[13])+this._decimalToHex(e[14])+this._decimalToHex(e[15])}for(var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",o="0123456789abcdef",r=0,i="",s=0;s<36;s++)"-"!==n[s]&&"4"!==n[s]&&(r=16*Math.random()|0),"x"===n[s]?i+=o[r]:"y"===n[s]?(r&=3,i+=o[r|=8]):i+=n[s];return i},e.prototype._expiresIn=function(t){return t=t||3599,this._now()+parseInt(t,10)},e.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},e.prototype._addAdalFrame=function(t){if(void 0!==t){this.info("Add adal frame to document:"+t);var e,n=document.getElementById(t);return n||(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))?((e=document.createElement("iframe")).setAttribute("id",t),e.setAttribute("aria-hidden","true"),e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height=e.borderWidth="0px",n=document.getElementsByTagName("body")[0].appendChild(e)):document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+t+'" id="'+t+'" style="display:none"></iframe>'),window.frames&&window.frames[t]&&(n=window.frames[t])),n}},e.prototype._saveItem=function(t,e,n){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?(n?(n=this._getItem(t)||"",localStorage.setItem(t,n+e+this.CONSTANTS.CACHE_DELIMETER)):localStorage.setItem(t,e),!0):(this.info("Local storage is not supported"),!1):this._supportsSessionStorage()?(sessionStorage.setItem(t,e),!0):(this.info("Session storage is not supported"),!1)},e.prototype._getItem=function(t){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(t):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(t):(this.info("Session storage is not supported"),null)},e.prototype._supportsLocalStorage=function(){try{return window.localStorage?(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest"))):!1}catch(t){return!1}},e.prototype._supportsSessionStorage=function(){try{return window.sessionStorage?(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest"))):!1}catch(t){return!1}},e.prototype._cloneConfig=function(t){if(null===t||"object"!=typeof t)return t;var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},e.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},e.prototype.log=function(t,e,n,o){var r;t<=Logging.level&&(!Logging.piiLoggingEnabled&&o||(r=(new Date).toUTCString(),o="",o=this.config.correlationId?r+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e:r+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[t]+" "+e,n&&(o+="\nstack:\n"+n.stack),Logging.log(o)))},e.prototype.error=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e)},e.prototype.warn=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null)},e.prototype.info=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null)},e.prototype.verbose=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null)},e.prototype.errorPii=function(t,e){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,t,e,!0)},e.prototype.warnPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,t,null,!0)},e.prototype.infoPii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,t,null,!0)},e.prototype.verbosePii=function(t){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,t,null,!0)},e.prototype._libVersion=function(){return"1.0.18"},t.exports&&(t.exports=e,t.exports.inject=function(t){return new e(t)}),e)});bc.inject;function wc(t){this.message=t}(wc.prototype=new Error).name="InvalidCharacterError";var Sc="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new wc("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,r=0,i=0,s="";o=e.charAt(i++);~o&&(n=r%4?64*n+o:o,r++%4)&&(s+=String.fromCharCode(255&n>>(-2*r&6))))o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return s};function xc(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(Sc(e).replace(/(.)/g,function(t,e){e=e.charCodeAt(0).toString(16).toUpperCase();return"%"+(e=e.length<2?"0"+e:e)}))}catch(t){return Sc(e)}}function Tc(t){this.message=t}(Tc.prototype=new Error).name="InvalidTokenError";function Cc(t,e){if("string"!=typeof t)throw new Tc("Invalid token specified");e=!0===(e=e||{}).header?0:1;try{return JSON.parse(xc(t.split(".")[e]))}catch(t){throw new Tc("Invalid token specified: "+t.message)}}Cc.InvalidTokenError=Tc;var Ec=(kc.prototype.initialize=function(){var o=this;return this.initPromise||(this.initPromise=new Promise(function(t,e){if(o.options.authType===u.AuthenticationType.subscriptionKey)t();else if(o.options.authType===u.AuthenticationType.aad)o.options.authContext=o.options.authContext||kc.getDefaultAuthContext(o.options),o.options.authContext.handleWindowCallback(),o.options.authContext.getLoginError()?e(new Error("Error logging in the AAD users: "+o.options.authContext.getLoginError())):o.options.authContext.isCallback(window.location.hash)?o.map.dispose():setTimeout(function(){return o._loginAndAcquire(t,e)});else if(o.options.authType===u.AuthenticationType.anonymous)t(o._triggerTokenFetch(!0));else if(o.options.authType===u.AuthenticationType.sas){if(o.options.sasToken){var n=-1;try{n=o._getTokenExpiry(o.options.sasToken)}catch(t){return void e(new Error("An invalid sasToken was provided."))}if(n>kc.constants.tokenRefreshClockSkew)return o._storeToken(o.options.sasToken),o._setTimeoutTokenFetch(n-kc.constants.tokenRefreshClockSkew),void t()}t(o._triggerTokenFetch())}else e(new Error("An invalid authentication type was specified."))})),this.initPromise},kc.getDefaultAuthContext=function(t){if(!t.aadAppId)throw new Error("No AAD app ID was specified.");if(!t.aadTenant)throw new Error("No AAD tenant was specified.");return this.defaultAuthContext||(this.defaultAuthContext=new bc({instance:t.aadInstance||r,tenant:t.aadTenant,clientId:t.aadAppId,cacheLocation:this.constants.preferredCacheLocation})),this.defaultAuthContext},kc.prototype._loginAndAcquire=function(e,n){function t(){r.options.authContext.acquireToken(C,function(t){t?n(new Error(t)):(t={map:r.map,type:kc.constants.events.tokenAcquired},r.map.events.invoke(kc.constants.events.tokenAcquired,t),e())})}var o,r=this,i=this.options.authContext.getCachedToken(this.options.aadAppId),s=this.options.authContext.getCachedUser();i&&s?t():(this.options.authContext.loginInProgress()||this.options.authContext.login(),o=setInterval(function(){r.options.authContext.loginInProgress()||(clearInterval(o),r.options.authContext.getCachedToken(r.options.aadAppId)?t():n(new Error(r.options.authContext.getLoginError()||"The AAD authentication context is not logged-in for the specified app ID: "+r.options.aadAppId)))},25))},kc.prototype.getAuthType=function(){return this.options.authType},kc.prototype.getClientId=function(){return this.options.clientId},kc.prototype.getToken=function(){var n=this;if(this.options.authType===u.AuthenticationType.aad){var o=this.options.authContext.getCachedToken(C);return o||(this.options.authContext.getCachedUser()||this.options.authContext.login(),this.options.authContext.acquireToken(C,function(t,e){t||(o=e,e={map:n.map,type:kc.constants.events.tokenAcquired},n.map.events.invoke(kc.constants.events.tokenAcquired,e))})),o}if(this.options.authType===u.AuthenticationType.anonymous||this.options.authType===u.AuthenticationType.sas){var t=this._getItem(kc.constants.storage.tokenKey);if(t){var e=this._getTokenExpiry(t);if(e<300&&0<e)this._triggerTokenFetch();else if(e<=0)throw this._saveItem(kc.constants.storage.tokenKey,""),new Error(kc.constants.errors.tokenExpired)}else this._triggerTokenFetch();return t}if(this.options.authType===u.AuthenticationType.subscriptionKey)return this.options.subscriptionKey},kc.prototype._getTokenExpiry=function(t){var e=Cc(t).exp,t=this._getCurrentTime();return 0<e-t?e-t:-1},kc.prototype._storeToken=function(t){this._saveItem(kc.constants.storage.tokenKey,t);t={map:this.map,type:kc.constants.events.tokenAcquired};this.map.events.invoke(kc.constants.events.tokenAcquired,t)},kc.prototype._saveItem=function(t,e){return this._supportsLocalStorage()?localStorage.setItem(t,e):this._supportsSessionStorage()?sessionStorage.setItem(t,e):this.fallbackStorage[t]=e,!0},kc.prototype._getItem=function(t){return this._supportsLocalStorage()?localStorage.getItem(t):this._supportsSessionStorage()?sessionStorage.getItem(t):t in this.fallbackStorage?this.fallbackStorage[t]:null},kc.prototype._supportsLocalStorage=function(){try{return window.localStorage?(window.localStorage.setItem(kc.constants.storage.testStorageKey,"A"),"A"===window.localStorage.getItem(kc.constants.storage.testStorageKey)&&(window.localStorage.removeItem(kc.constants.storage.testStorageKey),!window.localStorage.getItem(kc.constants.storage.testStorageKey))):!1}catch(t){return!1}},kc.prototype._supportsSessionStorage=function(){try{return window.sessionStorage?(window.sessionStorage.setItem(kc.constants.storage.testStorageKey,"A"),"A"===window.sessionStorage.getItem(kc.constants.storage.testStorageKey)&&(window.sessionStorage.removeItem(kc.constants.storage.testStorageKey),!window.sessionStorage.getItem(kc.constants.storage.testStorageKey))):!1}catch(t){return!1}},kc.prototype._getCurrentTime=function(){return Math.round((new Date).getTime()/1e3)},kc.prototype.signRequest=function(t){t.headers=t.headers||{},t.headers[E]=this.sessionId,t.headers[x]=T,t.headers[w]="MapControl/"+q+" (Web)";var e=this.getToken();switch(this.options.authType){case u.AuthenticationType.aad:case u.AuthenticationType.anonymous:t.headers[S]=this.options.clientId,t.headers[i]=s+e;break;case u.AuthenticationType.sas:t.headers[i]=a+e;break;case u.AuthenticationType.subscriptionKey:t.headers["subscription-key"]=e;break;default:throw new Error("An invalid authentication type was specified")}return t},kc.constants={preferredCacheLocation:"localStorage",storage:{tokenKey:"access.token.key",testStorageKey:"testStorage"},events:{tokenAcquired:"tokenacquired"},tokenExpiresIn:3599,tokenRefreshClockSkew:300,errors:{tokenExpired:"Token Expired, Try again"}},kc);function kc(t){var r=this;this.fallbackStorage={},this._triggerTokenFetch=function(t){return void 0===t&&(t=!1),new Promise(function(n,o){"function"==typeof r.options.getToken?r.options.getToken(function(t){try{var e=r._getTokenExpiry(t)-kc.constants.tokenRefreshClockSkew;r._storeToken(t),r._setTimeoutTokenFetch(e),n()}catch(t){o(new Error("Invalid token returned by getToken function"))}},function(t){o(t)},r.map):o(new Error("Token cannot be "+(t?"fetched":"renewed")+" because getToken was not set or is not a function."))})},this._setTimeoutTokenFetch=function(t){clearTimeout(r.tokenTimeOutHandle),r.tokenTimeOutHandle=setTimeout(r._triggerTokenFetch,Math.min(1e3*t,2147483647))};var e=t.getServiceOptions();this.options=e.authOptions,this.sessionId=e.sessionId,this.map=t}var Oc=(Ic.prototype.add=function(t,e){var n,o;if(Array.isArray(t))try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._add(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._add(t,e)},Ic.prototype.getControls=function(){return Array.from(this.controls)},Ic.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._remove(t)},Ic.prototype._add=function(t,e){this.controls.add(t);var n=(new V).merge(e),t=t.onAdd(this.map,e),e=this.controlContainer.getElementsByClassName(n.position);if(!(0<e.length))throw new Error("Control position "+n.position+" does not exist.");e.item(0).appendChild(t)},Ic.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},Ic);function Ic(t){for(var e in this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),u.ControlPosition){var n;u.ControlPosition.hasOwnProperty(e)&&((n=document.createElement("div")).classList.add(u.ControlPosition[e]),n.classList.add("subcontrol-container"),this.controlContainer.appendChild(n))}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}var Lc=(Ac.prototype.addCallback=function(s,a,l,t,c){var e,u,h=this;if(t)e=function(t){var e=t.lngLat?new ti(t.lngLat.lng,t.lngLat.lat):void 0,n=t.point?[t.point.x,t.point.y]:void 0,o=t.features?t.features.map(function(t){return new Ko(t.geometry,t.properties,t.id)}):[],o={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:n,features:o};l(o)};else switch(s){case"data":case"sourcedata":case"styledata":e=function(t){t=I(I({dataType:t.dataType},"source"===t.dataType&&I(I(I({isSourceLoaded:t.isSourceLoaded},t.sourceDataType&&{sourceDataType:t.sourceDataType}),{source:h.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:h.map,type:t.type});c&&h.map.events._removeListener(s,a,l),l(t)};break;case"error":e=function(t){t={error:t.error,map:h.map,type:t.type};c&&h.map.events._removeListener(s,a,l),l(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 Yo(t.point.x,t.point.y):void 0,n=t.points?t.points.map(function(t){return new Yo(t.x,t.y)}):[],o=t.lngLat?new ti(t.lngLat.lng,t.lngLat.lat):void 0,r=t.lngLats?t.lngLats.map(function(t){return new ti(t.lng,t.lat)}):[],i=o?h.map.layers.getRenderedShapes(new Jo(o),a?[a]:void 0):[],i={map:h.map,originalEvent:t.originalEvent,pixel:e,pixels:n,position:o,positions:r,shapes:i,layerId:a||void 0,preventDefault:function(){return t.preventDefault()},type:t.type};c&&h.map.events._removeListener(s,a,l),l(i)};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 ti(t.lngLat.lng,t.lngLat.lat):void 0,n=t.point?new Yo(t.point.x,t.point.y):void 0,o=e?h.map.layers.getRenderedShapes(new Jo(e),a?[a]:void 0):[],o={map:h.map,originalEvent:t.originalEvent,position:e,pixel:n,preventDefault:function(){return t.preventDefault()},shapes:o,layerId:a||void 0,type:t.type};c&&h.map.events._removeListener(s,a,l),l(o)};break;case"styleimagemissing":e=function(t){c&&h.map.events._removeListener(s,a,l),l(t.id)};break;case"wheel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e={map:h.map,originalEvent:t.originalEvent,preventDefault:function(){return t.preventDefault()},type:t.type};c&&h.map.events._removeListener(s,a,l),l(e)};break;case"resize":e=function(t){var e,n={map:h.map,type:t.type};for(e in t)"type"!==e&&"target"!==e&&(n[e]=t[e]);c&&h.map.events._removeListener(s,a,l),l(n)};break;default:e=function(t){var e={map:h.map,type:t.type};t.originalEvent&&(e.originalEvent=t.originalEvent),c&&h.map.events._removeListener(s,a,l),l(e)}}this.callbacks.has(a)||this.callbacks.set(a,new X),this.callbacks.get(a).has(s)||this.callbacks.get(a).set(s,new Map),this.callbacks.get(a).get(s).set(l,[e,c])},Ac.prototype.removeCallback=function(t,e,n){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(n)&&this.callbacks.get(e).get(t).delete(n)},Ac.prototype.getModifiedCallback=function(t,e,n){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(n))return this.callbacks.get(e).get(t).get(n)[0]},Ac.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},Ac.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){e=this.callbacks.get(e);if(e.has(t))return e.get(t)}},Ac);function Ac(t){this.callbacks=new X,this.map=t}var Pc=["maxzoomchanged","minzoomchanged","mapconfigurationchanged"],Rc=(Nc.prototype.add=function(t,e,n){var o,r;if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else{e=Array.isArray(e)?e:[e];try{for(var i=P(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof Ki&&Ki._isMBoxEvent(t)?this._addLayerListener(t,a,n,!1,!1):a._addEventListener(t,n,!1)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}}},Nc.prototype.addOnce=function(t,e,n){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof Ki&&Ki._isMBoxEvent(t)?this._addLayerListener(t,e,n,!1,!0):e._addEventListener(t,n,!0)},Nc.prototype._addLegacy=function(t,e,n){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,n,!0,!1)},Nc.prototype._addLayerListener=function(t,e,n,o,r){var i,s,a,l,c=e instanceof Ki?e.getId():e,e=this.map.layers.getLayerById(c),u=this.mapCallbackHandler.getModifiedCallback(t,c,n);if(u&&e)try{for(var h=P(e._getLayerIds()),p=h.next();!p.done;p=h.next()){var d=p.value;this.map._getMap().off(t,d,u)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}if(this.mapCallbackHandler.addCallback(t,c,n,o,r),e){u=this.mapCallbackHandler.getModifiedCallback(t,c,n);try{for(var f=P(e._getLayerIds()),m=f.next();!m.done;m=f.next()){d=m.value;this.map._getMap().on(t,d,u)}}catch(t){a={error:t}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}}},Nc.prototype._addGlobalListener=function(t,e,n,o){var r,i,s,a;Pc.includes(t)?this.map._addEventListener(t,e,o):(r=this.mapCallbackHandler.getModifiedCallback(t,"",e),this.mapCallbackHandler.addCallback(t,"",e,n,o),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)))},Nc.prototype.invoke=function(t,e,n){if(void 0===n)this._invokeListeners(t,"",e);else if(e instanceof Ki&&Ki._isMBoxEvent(t))this._invokeListeners(t,e.getId(),n);else{if(!(e instanceof $))throw new Error("The invoke target is invalid.");e._invokeEvent(t,n)}},Nc.prototype._invokeListeners=function(n,o,r){var i=this,t=new X(this.mapCallbackHandler.getEventCallbacks(n,o));t?t.forEach(function(t,e){t=R(t,2),t[0];t[1]&&i._removeListener(n,o,e),e(r)}):"error"===n&&console.error("error"in r?r.error:r)},Nc.prototype.remove=function(t,e,n){var o,r;if("function"==typeof e)this._removeListener(t,"",e);else{e=Array.isArray(e)?e:[e];try{for(var i=P(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof Ki&&Ki._isMBoxEvent(t)?this._removeListener(t,a,n):a._removeEventListener(t,n)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}}},Nc.prototype._removeLegacy=function(t,e,n){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,n)},Nc.prototype._removeListener=function(t,e,n){var o,r;if(Pc.includes(t))this.map._removeEventListener(t,n);else{var i=e instanceof Ki?e.getId():e,s=this.mapCallbackHandler.getModifiedCallback(t,i,n);if(s)if(i){e=this.map.layers.getLayerById(i);if(e)try{for(var a=P(e._getLayerIds()),l=a.next();!l.done;l=a.next()){var c=l.value;this.map._getMap().off(t,c,s)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}}else this.map._getMap().off(t,s);this.mapCallbackHandler.removeCallback(t,i,n)}},Nc.prototype._enableLayerEvents=function(l){var c=this,t=this.mapCallbackHandler.getLayerCallbacks(l.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,n,o=R(t,1)[0];try{for(var r=P(l._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;c.map._getMap().on(a,s,o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}})})},Nc.prototype._disableLayerEvents=function(l){var c=this,t=this.mapCallbackHandler.getLayerCallbacks(l.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,n,o=R(t,1)[0];try{for(var r=P(l._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;c.map._getMap().off(a,s,o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}})})},Nc);function Nc(t){this.map=t,this.mapCallbackHandler=new Lc(this.map)}var Mc=(Dc.prototype.add=function(t,e){var n,o;if(Array.isArray(t))try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addMarker(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._addMarker(t,e)},Dc.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},Dc.prototype.getMarkers=function(){return Array.from(this.markers)},Dc.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeMarker(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._removeMarker(t)},Dc.prototype._removeMarker=function(e){var n=this;e instanceof ya?(e._removeFromMap(),this.markers.delete(e)):this.markers.forEach(function(t){t._getId()===e&&(t._removeFromMap(),n.markers.delete(t))})},Dc.prototype.clear=function(){var e=this;this.markers.forEach(function(t){t._removeFromMap(),e.markers.delete(t)})},Dc);function Dc(t){this.markers=new Set,this.map=t}var zc=(Bc.prototype.add=function(s,e,a){var l=this;return new Promise(function(n,o){var r,t,i;l.userImages.has(s)?n():e instanceof HTMLImageElement||e instanceof ImageData?(l.map._getMap().addImage(s,e,a),l.userImages.set(s,{image:e,meta:a}),n()):"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,l.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(){l.map._getMap().addImage(s,e,a),l.userImages.set(s,{image:e,meta:a}),n()},e.onerror=e.onabort=function(){o("Failed to load image into HTML element.")},e.src=URL.createObjectURL(t))}).catch(function(){i||(clearTimeout(r),o("Failed to load image into HTML element."))}),r=setTimeout(function(){i=!0,o("Failed to load image within specified timeout: "+l.imageLoadTimeout+" ms.")},l.imageLoadTimeout))})},Bc.prototype.clear=function(){var n=this;this.userImages.forEach(function(t,e){n.map._getMap().removeImage(e)}),this.userImages.clear()},Bc.prototype.getImageIds=function(){var n=[];return this.userImages.forEach(function(t,e){n.push(e)}),n},Bc.prototype.createFromTemplate=function(t,e,n,o,r){n=n||"#1A73AA",o=o||"#fff";r=(r=gl(e,r)).replace(/{color}/g,n).replace(/{secondaryColor}/g,o).replace(/{text}/g,"");return this.add(t,r)},Bc.prototype.hasImage=function(t){return this.userImages.has(t)},Bc.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},Bc.prototype._restoreImages=function(){var n=this;this.userImages.forEach(function(t,e){n.map._getMap().hasImage(e)||n.map._getMap().addImage(e,t.image,t.meta)})},Bc);function Bc(t){this.userImages=new X,this.imageLoadTimeout=5e3,this.map=t}var jc,Fc=(O(Uc,jc=Ki),Uc.prototype._buildLayers=function(){return this.layers},Uc.prototype._getLayerIds=function(){return this.layers.map(function(t){return t.id})},Uc.prototype._getSourceIds=function(){var e,t,n=new Set;try{for(var o=P(this.layers),r=o.next();!r.done;r=o.next()){var i=r.value;"string"==typeof i.source?n.add(i.source):i.source&&n.add(i.id)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},Uc.prototype._updateLayoutProperty=function(e,n,o,r){var i=this;this.layers.forEach(function(t){Go(n,o)||i.map._getMap().setLayoutProperty(t.id,e,r||n)})},Uc);function Uc(t,e){e=jc.call(this,e)||this;return e.layers=t,e}var qc=(Gc.prototype.add=function(t,e){var n,o,r=e instanceof Ki?e.getId():e;if(Array.isArray(t))try{for(var i=P(t),s=i.next();!s.done;s=i.next()){var a=s.value;this._addLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}else this._addLayer(t,r)},Gc.prototype._addLayer=function(e,n){if(!(this.map._isReady()||e instanceof Fc))throw new Error("The layer '"+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,o,r,i;n!==e.getId()&&this.layerIndex.find(function(t){return n===t.getId()})?this._getMapboxLayerExists(e)?(o=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),i=this.layerIndex[o],this._removeMapboxLayers(e),this._addMapboxLayers(e,n),this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),this.layerIndex.splice(o,1),t=this.layerIndex.findIndex(function(t){return t.getId()===n}),this.layerIndex.splice(t,0,e),e instanceof Fc||(this.userLayers[r]={layer:e,before:n}),i.onRemove()):(this._addMapboxLayers(e,n),this.map.events._enableLayerEvents(e),t=this.layerIndex.findIndex(function(t){return t.getId()===n}),this.layerIndex.splice(t,0,e),e instanceof Fc||this.userLayers.push({layer:e,before:n})):(o=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),0<=o&&0<=r?(i=this.layerIndex[o],this._removeMapboxLayers(i),this._addMapboxLayers(e,o+1),this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),(this.layerIndex[o]=e)instanceof Fc||(this.userLayers[r]={layer:e,before:void 0}),i.onRemove()):(this._addMapboxLayers(e),this.map.events._enableLayerEvents(e),this.layerIndex.push(e),e instanceof Fc||this.userLayers.push({layer:e,before:n}))),e.onAdd(this.map)},Gc.prototype._addMapboxLayers=function(t,e){var n,o;if(!(t instanceof Qs)||t.getOptions().tileUrl)if(t instanceof Fc)this.map.events._enableLayerEvents(t);else{t instanceof ds&&this.map._getMap().addSource(t._getSourceId(),t._buildSource());var r=this._getMapboxBefore(e);try{for(var i=P(t._buildLayers()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().addLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}this.map.events._enableLayerEvents(t)}},Gc.prototype._removeMapboxLayers=function(t,e){var n,o;if(t instanceof Fc&&!e)this.map.events._disableLayerEvents(t);else{try{for(var r=P(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){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}this.map.events._disableLayerEvents(t),t instanceof ds&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())}},Gc.prototype._getMapboxLayerExists=function(e){var n=this,o=!1;return"string"==typeof e?!!(e=this.layerIndex.find(function(t){return t.getId()===e})):(e._getLayerIds().forEach(function(t){n.map._getMap().getLayer(t)&&(o=!0)}),o)},Gc.prototype._getMapboxBefore=function(e){var n,t,o,r;if("string"==typeof e){var i=this.layerIndex.find(function(t){return t.getId()===e});if(!i)return;try{for(var s=P(i._getLayerIds()),a=s.next();!a.done;a=s.next()){var l=a.value;if(this.map._getMap().getLayer(l))return l}}catch(t){n={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(n)throw n.error}}e=this.layerIndex.findIndex(function(t){return t.getId()===e})+1}for(var c=e;c<this.layerIndex.length;c++)try{for(var u=(o=void 0,P(this.layerIndex[c]._getLayerIds())),h=u.next();!h.done;h=u.next()){l=h.value;if(this.map._getMap().getLayer(l))return l}}catch(t){o={error:t}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}},Gc.prototype.clear=function(){for(var t=this.layerIndex.length-1;0<=t;t--){var e=this.layerIndex[t];this._removeMapboxLayers(e,!0),this.layerIndex.splice(t,1),e.onRemove()}this.userLayers=[]},Gc.prototype.getLayerById=function(e){var t=this.layerIndex.find(function(t){return t.getId()===e});if(t)return t},Gc.prototype.getLayers=function(){return this.layerIndex.slice(0)},Gc.prototype._getSourceIds=function(){var e,t,n=new Set;try{for(var o=P(this.layerIndex),r=o.next();!r.done;r=o.next())r.value._getSourceIds().forEach(function(t){return n.add(t)})}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},Gc.prototype._getUserLayers=function(){return Array.from(this.userLayers)},Gc.prototype.move=function(t,e){var n=t instanceof Ki?t.getId():t,o=e instanceof Ki?e.getId():e;if(!this.layerIndex.find(function(t){return t.getId()===n}))throw new Error("The layer '"+n+"' has not been added to the map and cannot be moved.");e=this.layerIndex.findIndex(function(t){return t.getId()===n});this._moveMapboxLayers(this.layerIndex[e],o),t=this.layerIndex[e],this.layerIndex.splice(e,1);e=this.layerIndex.findIndex(function(t){return t.getId()===o});-1<e?this.layerIndex.splice(e,0,t):this.layerIndex.push(t);t=this.userLayers.find(function(t){return t.layer.getId()===n});t&&(t.before=o)},Gc.prototype._moveMapboxLayers=function(t,e){var n,o,r=this._getMapboxBefore(e);try{for(var i=P(t._getLayerIds()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().moveLayer(a,r)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},Gc.prototype.getRenderedShapes=function(t,e,n){var o,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([li.getSouthWest(t),li.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=[],l=this;try{for(var c=P(e),u=c.next();!u.done;u=c.next())!function(t){var e=t instanceof Ki?t.getId():t,t=l.layerIndex.findIndex(function(t){return t.getId()===e});if(!(-1<t))throw new Error("The layer '"+e+"' has not been added to the map and its rendered features cannot be retrieved.");a.push.apply(a,N(l.layerIndex[t]._getLayerIds().filter(function(t){return!!s.map._getMap().getLayer(t)})))}(u.value)}catch(t){o={error:t}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(o)throw o.error}}}n=this.map._getMap().queryRenderedFeatures(i,{layers:a,filter:n});return this.map.sources._mapFeaturesToShapes(n)},Gc.prototype.remove=function(t){var e,n;if(Array.isArray(t))try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i=r.value;this._removeLayer(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else this._removeLayer(t)},Gc.prototype._removeLayer=function(t){var e=t instanceof Ki?t.getId():t,n=this.layerIndex.findIndex(function(t){return t.getId()===e});if(-1==n)throw new Error("The layer '"+e+"' has not been added to the map and cannot be removed.");t=this.layerIndex[n];this._removeMapboxLayers(t),this.layerIndex.splice(n,1);n=this.userLayers.findIndex(function(t){return t.layer.getId()===e});-1!=n&&this.userLayers.splice(n,1),t.onRemove()},Gc);function Gc(t){this.layerIndex=[],this.userLayers=[],this.map=t}var Zc=(Hc.prototype.add=function(t){var e,n;t=Array.isArray(t)?t:[t];try{for(var o=P(t),r=o.next();!r.done;r=o.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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},Hc.prototype.clear=function(){var e=this;this.popups.forEach(function(t){e.popups.delete(t),t.remove()})},Hc.prototype.remove=function(t){var e,n;t=Array.isArray(t)?t:[t];try{for(var o=P(t),r=o.next();!r.done;r=o.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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},Hc.prototype.getPopups=function(){return Array.from(this.popups)},Hc.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector("."+Hc.Css.collection);return t||((t=document.createElement("div")).classList.add(Hc.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},Hc.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)},Hc.Css={collection:"popup-collection-container"},Hc);function Hc(t){var o=this;this._onDrag=function(t){var e,n;"mousemove"===t.type?(e=t.clientX,n=t.clientY):"touchmove"===t.type&&(e=t.touches[0].clientX,n=t.touches[0].clientY),o.draggedPopups.forEach(function(t){t._dragToPixel([e,n])})},this._onUp=function(){o.map.getMapContainer().removeEventListener("mousemove",o._onDrag),o.map.getMapContainer().removeEventListener("touchmove",o._onDrag),o.map.getMapContainer().removeEventListener("mouseup",o._onUp),o.map.getMapContainer().removeEventListener("touchend",o._onUp),o.draggedPopups.forEach(function(t){o.draggedPopups.delete(t),t._onUp()})},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var Kc,Wc=(O(Vc,Kc=Ni),Vc.prototype._buildSource=function(){return this.source},Vc.prototype._modifySource=function(t,e){if(t.tiles){var n=t.tiles.map(function(t){return"string"==typeof t?t:new F({domain:c,path:t.path,queryParams:I(I({},e),t.queryParams)}).toString()});t.tiles=n}else{if(!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 F({domain:c,path:t.url.path,queryParams:I(I({},e),t.url.queryParams)}).toString()}return t},Vc);function Vc(t,e,n){t=Kc.call(this,t)||this;return t.source=t._modifySource(e,n),t}var Yc=(Qc.prototype.add=function(t,e){var n,o;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addSource(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._addSource(t,e)},Qc.prototype.getRenderedShapes=function(t,e,n){t="string"==typeof t?t:t.getId(),e=this.map._getMap().querySourceFeatures(t,{sourceLayer:n,filter:e});return this.map.sources._mapFeaturesToShapes(e,!0,this.sources.get(t))},Qc.prototype._buildSources=function(){var e={};return this.sources.forEach(function(t){e[t.getId()]=t._buildSource()}),e},Qc.prototype.clear=function(){var e=this;this.sources.forEach(function(t){e.remove(t)})},Qc.prototype.getById=function(t){return this.sources.get(t)},Qc.prototype.getSources=function(){return Array.from(this.sources.values())},Qc.prototype.isSourceLoaded=function(t){t=t instanceof Ni?t.getId():t;return this.map._getMap().isSourceLoaded(t)},Qc.prototype.remove=function(t,e){var n,o;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._removeSource(s,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}else this._removeSource(t,e)},Qc.prototype._removeSource=function(t,e){t=t instanceof Ni?t.getId():t;if(this.sources.has(t)){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 '"+t+"'");return this.sources.get(t)._setMap(null),void this.sources.delete(t)}throw new Error("'"+t+"' is not added to the map")},Qc.prototype._addSource=function(t,e){if(this.sources.has(t.getId())){if(e)throw new Error("'"+t.getId()+"' is already added to the map");this.sources.get(t.getId())._setMap(null),this.sources.delete(t.getId())}if(e){if(!this.map._isReady())throw new Error("The source '"+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.sources.set(t.getId(),t),t._setMap(this.map)},Qc.prototype._mapFeaturesToShapes=function(t,e,n){var o,r,i=[];try{for(var s=P(t),a=s.next();!a.done;a=s.next()){var l=a.value;if((n||"string"==typeof l.source)&&"string"==typeof l.properties[ii._shapeIdPropName]){var c=n||this.sources.get(l.source);if(c instanceof zi){var u=c.getShapeById(l.properties[ii._shapeIdPropName]);if(u instanceof ii){i.push(u);continue}}}e||i.push(l)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i},Qc.prototype._syncSources=function(o){var r=this;o&&(Object.keys(o).forEach(function(t){if(!r.sources.has(t)){var e=o[t];if("vector"===e.type){var n=new Wc(t,{name:t,tiles:e.tiles,type:"vector",url:e.url});r.sources.set(t,n),n._setMap(r.map)}else{if("raster"!==e.type)throw new Error("Unable to construct source with ID "+t+".");n=new Wc(t,{name:t,tiles:e.tiles,type:"raster",url:e.url});r.sources.set(t,n),n._setMap(r.map)}}}),Object.keys(this.sources).forEach(function(t){o.hasOwnProperty(t)||(r.sources.get(t)._setMap(null),r.sources.delete(t))}))},Qc);function Qc(t){this.map=t,this.sources=new X}var Jc,Xc=(O($c,Jc=M),$c);function $c(){var t=null!==Jc&&Jc.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}var tu,eu=(O(nu,tu=M),nu);function nu(){var t=null!==tu&&tu.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var ou,ru=(O(iu,ou=M),iu.prototype.merge=function(){for(var e,t,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];try{for(var r=P(n),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 ou.prototype.merge.apply(this,N(n))},iu);function iu(){var t=null!==ou&&ou.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new Yo(0,0),t.padding=new eu,t}var su,au=(O(lu,su=M),lu);function lu(){var t=null!==su&&su.apply(this,arguments)||this;return t.zoom=1,t.center=new ti(0,0),t.centerOffset=new Yo(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.maxBounds=void 0,t}var cu,b=(O(uu,cu=M),uu);function uu(){var t=null!==cu&&cu.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}var hu,pu=(O(du,hu=b),du);function du(){var t=null!==hu&&hu.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}var fu,mu=(O(gu,fu=b),gu);function gu(){var t=null!==fu&&fu.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}var yu,vu=(O(_u,yu=b),_u);function _u(){var t=null!==yu&&yu.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}var bu,wu=(O(Su,bu=b),Su);function Su(){var t=null!==bu&&bu.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}var xu,Tu=(O(Cu,xu=b),Cu);function Cu(){var t=null!==xu&&xu.apply(this,arguments)||this;return t.name="default-raster",t}var Eu,ku=(O(Ou,Eu=M),Ou);function Ou(){var t=null!==Eu&&Eu.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var Iu,Lu=(O(Au,Iu=M),Au.prototype.merge=function(){for(var e,t,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];try{for(var r=P(n),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=xa.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 Iu.prototype.merge.apply(this,N(n))},Au);function Au(){var t=null!==Iu&&Iu.apply(this,arguments)||this;return t.antialias=void 0,t.autoResize=!0,t.language=Aa,t.light=new ku,t.preserveDrawingBuffer=!1,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=Oa,t.userRegion=t.view,t}function Pu(t){return 0==t.length?void 0:t.slice(1).reduce(function(n,o){return function(t,e){t=n(t,e);return I(I({},t),o(t.url,e))}},t[0])}var Ru,Nu=(O(Mu,Ru=M),Mu.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{for(var n=P(t),o=n.next();!o.done;o=n.next()){var r=o.value;r&&(r.authOptions?"string"==typeof r.authOptions.subscriptionKey&&(r.subscriptionKey=r["subscription-key"]=r.authOptions.subscriptionKey):"string"==typeof r.subscriptionKey?(r["subscription-key"]=r.subscriptionKey,r.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:r.subscriptionKey}):"string"==typeof r["subscription-key"]&&(r.subscriptionKey=r["subscription-key"],r.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:r["subscription-key"]}),"string"==typeof r.sessionId?r["session-id"]=r.sessionId:"string"==typeof r["session-id"]&&(r.sessionId=r["session-id"]),"boolean"==typeof r.disableTelemetry?r["disable-telemetry"]=r.disableTelemetry:"boolean"==typeof r["disable-telemetry"]&&(r.disableTelemetry=r["disable-telemetry"]),"boolean"==typeof r.enableAccessibility?r["enable-accessibility"]=r.enableAccessibility:"boolean"==typeof r["enable-accessibility"]&&(r.enableAccessibility=r["enable-accessibility"]))}}catch(t){a={error:t}}finally{try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}var i=this._transformers,s=t?t.filter(function(t){return void 0!==t}).reduce(function(t,e){return N(t,e._transformers||[])},[]):[],a=Ru.prototype.merge.apply(this,N(t));return a.authOptions.authType!==u.AuthenticationType.subscriptionKey&&(a["subscription-key"]=a.subscriptionKey=void 0),void 0!==a.styleSet&&void 0===a.mapConfiguration&&(a.mapConfiguration=a.styleSet),a.mapConfiguration&&"string"!=typeof a.mapConfiguration&&(a.mapConfiguration=I(I({},a.mapConfiguration),{defaultConfiguration:a.mapConfiguration.defaultConfiguration||a.mapConfiguration.defaultStyle,configurations:a.mapConfiguration.configurations||a.mapConfiguration.styles})),this._transformers=N(i||[],s.filter(function(t){return!i.includes(t)})),this.transformRequest&&!this._transformers.includes(this.transformRequest)&&this._transformers.push(this.transformRequest),this.transformRequest=Pu(this._transformers),a},Mu.prototype.addTransformer=function(t){this._transformers||(this._transformers=[]),this._transformers.push(t),this.transformRequest=Pu(this._transformers)},Mu.prototype.removeTransformer=function(e){this._transformers&&(this._transformers=this._transformers.filter(function(t){return e!==t}),this.transformRequest=Pu(this._transformers))},Mu._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},Mu);function Mu(){var t=null!==Ru&&Ru.apply(this,arguments)||this;return t.authOptions=Va(),t.disableTelemetry=!1,t["disable-telemetry"]=t.disableTelemetry,t.domain=Ra,t.staticAssetsDomain=Na,t.styleDefinitionsPath=Ma,t.styleDefinitionsVersion=Da,t.styleAPIVersion=za,t.mapConfiguration=void 0,t.styleSet=void 0,t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.enableAccessibilityLocationFallback=!0,t.maxParallelImageRequests=el(),t.refreshExpiredTiles=!0,t.subscriptionKey=rl(),t["subscription-key"]=t.subscriptionKey,t.sessionId=Pa,t["session-id"]=t.sessionId,t._transformers=[],t.transformRequest=void 0,t.workerCount=tl(),t.fadeDuration=300,t.localIdeographFontFamily="sans-serif",t.validateStyle=!0,t}var Du=(zu.getLayerGroup=function(t){var e=t;if(null!=e&&e.metadata&&e.metadata["microsoft.maps:layerGroup"])return e.metadata["microsoft.maps:layerGroup"];t=null!==(e=null==e?void 0:e.id)&&void 0!==e?e:t;if(t.startsWith("microsoft.")){t=t.split(".");return 4<=t.length?t[3]:void 0}},zu);function zu(){}var Bu=(ju.resolve=function(t){return new ju(Promise.resolve(t))},ju.reject=function(t){return new ju(Promise.reject(t))},ju.prototype.then=function(t,e){var n=this;return new Promise(function(t,e){n._resolve=t,n._reject=e,n._thenResolver(t,e)}).then(t,e)},ju.prototype.catch=function(t){var n=this;return new Promise(function(t,e){n._resolve=t,n._reject=e,n._thenResolver(t,e)}).catch(t)},ju.prototype.finally=function(t){var n=this;return new Promise(function(t,e){n._resolve=t,n._reject=e,n._thenResolver(t,e)}).finally(t)},ju.prototype.hijackAndResolve=function(t){this._hijackedToResolve=t,this._resolve&&this._resolve(t)},ju.prototype.hijackAndReject=function(t){this._hijackedToReject=t,this._reject&&this._reject(t)},ju.prototype.switchWith=function(t){this.origin=t,this._toResolve=void 0,this._toReject=void 0},ju);function ju(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,n){var o;r._hijackedToResolve?e(r._hijackedToResolve):r._hijackedToReject?n(r._hijackedToReject):(o=r.origin,r.origin.then(function(t){r.isHijacked()||(o!==r.origin?r._thenResolver(e,n):(r._toResolve=t,e(t)))}).catch(function(t){r.isHijacked()||(o!==r.origin?r._thenResolver(e,n):(r._toReject=t,n(t)))}))},this.origin=t,this[Symbol.toStringTag]=this.origin[Symbol.toStringTag]}var Fu={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)"},Uu=(qu.prototype.updateIndoorState=function(t,e){var n,o,r=this,i=this.map.styles.getMapConfiguration();i?(this.preservedPreindoorMapConfiguration=i,n=this.map.getStyle().style?this.map.getStyle().style+"_indoor"+("dark"===t?"_dark":"")+"_tileset_"+e:void 0,this.map.styles.setMapConfiguration("defaultIndoor_"+e,"microsoft-maps:default"===i?n:void 0)):(o=(null===(n=this.indoorState)||void 0===n?void 0:n.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","")+"_indoor",t=t.configurations.find(function(t){return t.name.startsWith(e)});t&&r.map.setStyle({style:t.name},!o)}))},qu.prototype.unsetIndoorState=function(){var n=this,t=this.preservedPreindoorMapConfiguration;t?this.map.styles.setMapConfiguration(t):(this.indoorState=void 0,this.initStyleset(),this.definitions().then(function(t){var e=n.map.getStyle().style;e.includes("_indoor")&&e.split("_indoor")[0]?n.map.setStyle({style:e.split("_indoor")[0]}):n.map.setStyle({style:void 0})}))},qu.prototype.initStyleset=function(){var e=this,t=this.serviceOptions.mapConfiguration?"string"==typeof this.serviceOptions.mapConfiguration?new Bu(this._request(this.serviceOptions.domain,_+"/mapconfigurations/metadata/"+this.serviceOptions.mapConfiguration,"StyleDefinitions").then(function(t){return I(I({},t),{defaultConfiguration:t.defaultConfiguration||t.defaultStyle,configurations:t.configurations||t.styles})})):Bu.resolve(this.serviceOptions.mapConfiguration):new Bu(this._request(this.serviceOptions.staticAssetsDomain,v+"/"+_,"StyleDefinitions",{version:this.serviceOptions.styleDefinitionsVersion}).then(function(t){return{version:isNaN(t.version)?0:parseFloat(t.version),defaultConfiguration:t.defaultStyle,configurations:t.styles.filter(function(t){return e.indoorState?"auto"===e.indoorState.theme?t.name.endsWith("dark"===t.theme?"_indoor_dark":"_indoor"):t.name.endsWith("dark"===e.indoorState.theme?"_indoor_dark":"_indoor"):!t.name.includes("indoor")}).map(function(t){return{copyright:t.copyright.join(" "),name:t.name,displayName:function(t){t=e.indoorState&&t.includes("_indoor")?t.split("_indoor")[0]:t;return t in Fu?Fu[t]:t}(t.name),theme:t.theme,thumbnail:new F({domain:e.serviceOptions.staticAssetsDomain,path:t.thumbnail,protocol:"https"}).toString(),url:new F({domain:e.serviceOptions.staticAssetsDomain,path:v+"/"+_+"/"+t.name,queryParams:{styleVersion:e.serviceOptions.styleDefinitionsVersion},protocol:"https"}).toString()}})}}));return this.initPromise&&this.initPromise.switchWith(t),this.initPromise=t,this.initPromise.then(function(t){return e.map._invokeEvent("mapconfigurationchanged",t)}),this.initPromise},qu.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 does not contain neither URL nor style object.")},qu.prototype.deriveNewStyle=function(t,e){var i=this.map.getStyle(),s=this.map.getTraffic();return I(I({},e),{sources:Object.entries(e.sources).reduce(function(t,e){var n=R(e,2),e=n[0],n=n[1],n=I({},n);return"url"in n&&"string"==typeof n.url&&n.url.includes(m)&&(n.url=n.url.replace(m,i.language)),t[e]=n,t},{}),layers:e.layers.map(function(t){var e,n,o=I({},t),r=Du.getLayerGroup(o);return r&&(i.showBuildingModels||"fill-extrusion"!==o.type?"fill-extrusion"===o.type&&(o.layout=null!==(t=o.layout)&&void 0!==t?t:{},o.layout.visibility="visible"):(o.layout=null!==(e=o.layout)&&void 0!==e?e:{},o.layout.visibility="none"),"none"!==s.flow&&r&&r==="traffic_"+s.flow&&"line"==o.type&&(o.layout=null!==(e=o.layout)&&void 0!==e?e:{},o.layout.visibility="visible"),"labels"!==r&&"labels_places"!==r&&"labels_indoor"!==r||"symbol"!==o.type||(i.showLabels?(o.layout=null!==(n=o.layout)&&void 0!==n?n:{},o.layout.visibility="visible"):(o.layout=null!==(n=o.layout)&&void 0!==n?n:{},o.layout.visibility="none"))),o})})},qu.prototype.injectUserLayersIntoStyle=function(s,a,l){return s?this.map.layers._getUserLayers().reduce(function(n,e){if(e.layer instanceof na)return n;var t,o=l[e.before]&&0<l[e.before].length?l[e.before][0]:void 0,r=s.layers.find(function(t){return t.id===e.layer.getId()}),i=a.layers.findIndex(function(t){return t.id===e.layer.getId()});return-1<i&&a.layers.splice(i,1),r&&(t=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=o?n.layers.findIndex(function(t){return t.id===o.id}):-1)?n.layers.splice(i,0,r):n.layers.push(r),t.forEach(function(t){var e=t.source,t=t.id;n.sources[t]=e})),n},I({},a)):a},qu.prototype.setStyle=function(t,e){var o=this;void 0===e&&(e=!0);try{this.map._getMap().setStyle(this.getStyle(t),{diff:e,validate:this.serviceOptions.validateStyle,transformStyle:function(t,e){var n=o.deriveNewStyle(t,e).layers.map(function(t){return{nextLayer:t,layerGroup:Du.getLayerGroup(t)}}).filter(function(t){t.nextLayer;return void 0!==t.layerGroup}).reduce(function(t,e){var n=e.nextLayer,o=e.layerGroup;return I(I({},t),((e={})[o]=o in t?N(t[o],[n]):[n],e))},{}),e=o.injectUserLayersIntoStyle(t,e,n),n=Object.entries(n).map(function(t){var e=R(t,2),t=e[0],e=e[1];return o._buildFundamentalLayerFrom(e,t)}),n=o.map.layers._getUserLayers().reduce(function(t,e){var n=e.before?t.findIndex(function(t){return t.getId()===e.before}):-1;return-1<n?t.splice(n,0,e.layer):t.push(e.layer),t},n);return o.map.layers.layerIndex=n,o.map.sources._syncSources(e.sources),o.map.events.remove("styledata",o._onStyleData),o.map.events.addOnce("styledata",o._onStyleData),e}})}catch(t){throw t}},qu.prototype.getTheme=function(t){t=this._lookUp(t);if(t)return t.theme.toLowerCase()},qu.prototype.getThemeAsync=function(e){return L(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return[4,this._lookUpAsync(e)];case 1:return[2,t.sent().theme]}})})},qu.prototype.setMapConfiguration=function(t,n){var o=this;"string"==typeof(this.serviceOptions.mapConfiguration=t)?this.initStyleset():this.initPromise?this.initPromise.hijackAndResolve(t):this.initPromise=Bu.resolve(t),this.definitions().then(function(t){var e=t.defaultConfiguration;t.configurations.find(function(t){return t.name===n})&&(e=n),o.map.setStyle({style:e})})},qu.prototype.getMapConfiguration=function(){return this.serviceOptions.mapConfiguration},qu.prototype.setStyleSet=function(t){this.updateIndoorState("indoor_dark"===t?"dark":"light",null)},qu.prototype.getStyleSet=function(){return void 0!==this.indoorState?"dark"===this.indoorState.theme?"indoor_dark":"indoor":"base"},qu.prototype.clearStyleSet=function(){this.unsetIndoorState()},qu.prototype._buildFundamentalLayerFrom=function(t,e){if(t&&0<t.length){t=new Fc(t,e);return t.onAdd(this.map),t}throw new Error("Unable to construct fundamental map layer for ID: "+e+".")},qu.prototype._transformStyleRequest=function(t,e){t.includes(c)&&(e.url=e.url.replace(c,this.serviceOptions.domain)),t.includes(g)&&(e.url=e.url.replace(g,v)),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(l)||(t.searchParams.set(l,this.serviceOptions.styleAPIVersion),e.url=t.href),null!==(t=this.map.authentication)&&void 0!==t&&t.signRequest(e))},qu.prototype._request=function(o,r,i,s){var a;return void 0===s&&(s={}),L(this,void 0,void 0,function(){var e,n;return A(this,function(t){switch(t.label){case 0:return e={url:new F({protocol:"https",domain:o,path:r,queryParams:I(((n={})[l]=this.serviceOptions.styleAPIVersion,n),s)}).toString()},"function"==typeof this.serviceOptions.transformRequest&&i&&(e=this.serviceOptions.transformRequest(e.url,i)),null!==(a=this.map.authentication)&&void 0!==a&&a.signRequest(e),n={method:"GET",mode:"cors"},e.credentials&&(n.credentials=e.credentials),e.headers&&(n.headers=e.headers),[4,fetch(e.url,n).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText+" ")})];case 1:return[2,t.sent()]}})})},qu);function qu(t,e){var o=this;this.definitions=function(){return o.initPromise||o.initStyleset()},this.indoorState=void 0,this.preservedPreindoorMapConfiguration=void 0,this._onStyleData=function(){o._lookUpAsync(o.map.getStyle()).then(function(t){o.map.events.invoke("stylechanged",{style:t.name,map:o.map,type:"stylechanged"})})},this._lookUp=function(e){var t=o.definitions().errorIfRejected(),n=o.definitions().resultIfResolved();return t||void 0===n?null:n.configurations.find(function(t){return t.name===(e.style||n.defaultConfiguration)})||n.configurations.find(function(t){return t.name===n.defaultConfiguration})||n.configurations[0]},this._lookUpAsync=function(n){return L(o,void 0,void 0,function(){var e;return A(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===(n.style||e.defaultConfiguration)})||e.configurations.find(function(t){return t.name===e.defaultConfiguration})||e.configurations[0]]}})})},this.map=t,this.serviceOptions=e}var Gu,Zu=(O(Hu,Gu=$),Hu.prototype.getCanvas=function(){return this.map.getCanvas()},Hu.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},Hu.prototype.getMapContainer=function(){return this.map.getContainer()},Hu.prototype.getServiceOptions=function(){return Li(this.serviceOptions,Nu._cloneCustomizer)},Hu.prototype.setServiceOptions=function(t){this.serviceOptions=(new Nu).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap()},Hu.prototype.addRequestTransformer=function(t){this.serviceOptions.addTransformer(t)},Hu.prototype.removeRequestTransformer=function(t){this.serviceOptions.removeTransformer(t)},Hu.prototype.setCamera=function(t,e){if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var n,o=(new ru).merge({maxZoom:this.getCamera().maxZoom},t),r=this._generateSafeBounds(o.bounds),i={padding:o.padding,offset:o.offset,maxZoom:o.maxZoom};if(!(n=this.map.cameraForBounds(r,i))){var s=null===(s=this.map)||void 0===s?void 0:s.getContainer(),s={message:"The map cannot be fit to the current canvas with the given CameraBoundsOptions.",containerWidth:null==s?void 0:s.clientWidth,containerHeight:null==s?void 0:s.clientHeight,safeBounds:r,cameraForBoundsOptions:i};throw new Error(JSON.stringify(s))}this.map.setMaxZoom(o.maxZoom),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(o.maxBounds)}else{i=(new au).merge(this.getCamera(),t);i.centerOffset&&2<=i.centerOffset.length&&(s=i.centerOffset,(o=Fr([i.center],i.zoom))[0][0]+=s[0],o[0][1]+=s[1],i.center=jr(o,i.zoom)[0]),n={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),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);r=(new Xc).merge(t),t={duration:r.duration,easing:function(t){return t},offset:[0,0],animate:!0},e={fromControl:e};"jump"===r.type?this.map.jumpTo(n,e):"ease"===r.type?this.map.easeTo(I(I({},n),t),e):"fly"===r.type&&this.map.flyTo(I(I({},n),t),e)},Hu.prototype.setCameraBounds=function(t){this.setCamera(t)},Hu.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 li(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},Hu.prototype.setStyle=function(t,e){void 0===e&&(e=!0),delete t.preserveDrawingBuffer;t=(new Lu).merge(this.styleOptions,t);t.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(t.autoResize),t.language!==this.styleOptions.language&&(this.localizedStringsPromise=xa.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),this.styleOptions=t,this._setStyleComponents(t,e)},Hu.prototype.getStyle=function(){return Fn(this.styleOptions)},Hu.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},Hu.prototype.addPins=function(t,e){var n,o=(new vu).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new Zs(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,iconOptions:{anchor:"center",size:o.iconSize,image:["case",["has","icon"],["get","icon"],o.icon],ignorePlacement:!o.cluster,opacity:o.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],o.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[o.textFont]]],size:["case",["has","point_count"],20,o.fontSize],ignorePlacement:!o.cluster,opacity:o.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[o.textOffset[0]/16,o.textOffset[1]/16]]],color:o.fontColor}})),!(r instanceof Zs))throw new Error("A layer with name '"+o.name+"' already exists but it is not a SymbolLayer.A SymbolLayer should be used for rendering pins.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new zi(n,{cluster:o.cluster})),!(s instanceof zi))throw new Error("The source with name '"+n+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,o.before);t=new ui(t);o.overwrite?s.setShapes(t):s.add(t)},Hu.prototype.addCircles=function(t,e){var n,o=(new pu).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new ts(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,opacity:o.opacity,radius:["case",["has","radius"],["get","radius"],o.radius],color:["case",["has","color"],["get","color"],o.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],o.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],o.outlineWidth]})),!(r instanceof ts))throw new Error("A layer with name '"+o.name+"' already exists but it is not a BubbleLayer.A BubbleLayer should be used for rendering circles.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new zi(n)),!(s instanceof zi))throw new Error("The source with name '"+n+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,o.before);t=new ui(t);o.overwrite?s.setShapes(t):s.add(t)},Hu.prototype.addLinestrings=function(t,e){var n,o=(new mu).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new ws(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,lineCap:o.cap,lineJoin:o.join,strokeOpacity:o.opacity,strokeColor:["case",["has","color"],["get","color"],o.color],strokeWidth:["case",["has","width"],["get","width"],o.width]})),!(r instanceof ws))throw new Error("A layer with name '"+o.name+"' already exists but it is not a LineLayer.A LineLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new zi(n)),!(s instanceof zi))throw new Error("The source with name '"+n+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,o.before);t=new ui(t);o.overwrite?s.setShapes(t):s.add(t)},Hu.prototype.addPolygons=function(t,e){var n,o=(new wu).merge(e),r=this.layers.getLayerById(o.name),i=!1;if(r||(i=!0,r=new Ps(o.name+"-source",o.name,{source:o.name+"-source",minZoom:o.minZoom,maxZoom:o.maxZoom,fillOpacity:o.opacity,fillColor:["case",["has","color"],["get","color"],o.color]})),!(r instanceof Ps))throw new Error("A layer with name '"+o.name+"' already exists but it is not a PolygonLayer.A PolygonLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(n=s,s=this.sources.getById(n)):n=s.getId();e=!1;if(s||(e=!0,s=new zi(n)),!(s instanceof zi))throw new Error("The source with name '"+n+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,o.before);t=new ui(t);o.overwrite?s.setShapes(t):s.add(t)},Hu.prototype.addRaster=function(t,e){var n=(new Tu).merge(e),o=this.layers.getLayerById(n.name);if(!((o=o||new Qs({maxZoom:n.maxZoom,minZoom:n.minZoom,opacity:n.opacity,tileSize:256,tileUrl:"{subdomain}"},n.name))instanceof Qs))throw new Error("A layer with name '"+n.name+"' already exists but it is not a TileLayer.A TileLayer should be used for rendering raster images.");if("{subdomain}"!==o.getOptions().tileUrl)throw new Error("A TileLayer with name '"+n.name+"' already exists but was configured for a single tile url [default for new TileLayer(...)].");(e=!n.overwrite&&o.getOptions().subdomains||[]).push.apply(e,N(t)),o._setOptionsNoUpdate({subdomains:e}),this.layers.add(o,n.before)},Hu.prototype.getLayers=function(){return this.layers.getLayers().map(function(t){return t.getId()})},Hu.prototype.removeLayers=function(t){var e,n;try{for(var o=P(t),r=o.next();!r.done;r=o.next()){var i,s=r.value;this.layers.getLayerById(s)&&(this.layers.remove(s),i=s+"-source",this.sources.getById(i)&&this.sources.remove(i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},Hu.prototype.addHtml=function(t,e){t.id||(t.id="marker_"+Ho());var n=new ya({htmlContent:t});return this.markers.add(n,e),t.id},Hu.prototype.removeHtml=function(t){this.markers.remove(t)},Hu.prototype.addEventListener=function(t,e,n){this.events._addLegacy(t,e,n)},Hu.prototype.removeEventListener=function(t,e,n){this.events._removeLegacy(t,e,n)},Hu.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},Hu.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},Hu.prototype.addControl=function(t,e){this.controls.add(t,e)},Hu.prototype.removeControl=function(t){this.controls.remove(t)},Hu.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,n=this.trafficOptions.flow;if(this.trafficOptions=(new mo).merge(this.trafficOptions,t),this.controls.getControls().filter(function(t){return t instanceof wo}).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)try{this.trafficOptions.flow!==n&&this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=n,t}else this.flowDelegate.removeFromMap()},Hu.prototype.getTraffic=function(){return Fn(this.trafficOptions)},Hu.prototype.remove=function(){this.dispose()},Hu.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear()},Hu.prototype.dispose=function(){for(this.clear(),this.map.remove(),this.removed=!0;this.getMapContainer().firstChild;){var t=this.getMapContainer().firstChild;this.getMapContainer().removeChild(t)}},Hu.prototype.resize=function(t,e,n){"number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e?n=t:(t=t,this.getMapContainer().style.height="number"==typeof t?t+"px":t,this.getMapContainer().style.width="number"==typeof e?e+"px":e);e=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden",this.map.resize(n),this.getMapContainer().style.overflow=e},Hu.prototype.pixelsToPositions=function(t){var e,n,o=[];try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.unproject(s);o.push(new ti(a.lng,a.lat))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o},Hu.prototype.positionsToPixels=function(t){var e,n,o=[];try{for(var r=P(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.project(s);o.push(new Yo(a.x,a.y))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return o},Hu.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},Hu.prototype.stop=function(){this.map.stop()},Hu.prototype.triggerRepaint=function(){this.map.triggerRepaint()},Hu.prototype._getMap=function(){return this.map},Hu.prototype._rebuildStyle=function(e){return void 0===e&&(e=!0),L(this,void 0,void 0,function(){return A(this,function(t){return this.styles.setStyle(this.styleOptions,e),this.imageSprite._restoreImages(),[2]})})},Hu.prototype._isLoaded=function(){return this.loaded},Hu.prototype._isReady=function(){return this.ready},Hu.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise},Hu.prototype._sendRequest=function(t,e,n){var o;return(o="function"==typeof this.serviceOptions.transformRequest?this.serviceOptions.transformRequest(t,e):o)?fetch(o.url||t,{credentials:o.credentials,headers:I(I({},n),o.headers),method:"GET",mode:"cors"}):fetch(t,{headers:n,method:"GET",mode:"cors"})},Hu.prototype._substituteDomainLanguageViewAndSignInRequest=function(t,e){var n,o;(t.includes(p)||t.includes(c))&&(o=new RegExp("[^{]"+p+"[^}]"),t.match(o)&&(e.url=e.url.replace(p,c)),F.protoRegEx.test(this.serviceOptions.domain)?(o=e.url.indexOf(c),e.url=this.serviceOptions.domain+e.url.substring(o+c.length)):e.url=e.url.replace(c,this.serviceOptions.domain)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&null!==(n=this.authentication)&&void 0!==n&&n.signRequest(e),t.includes(m)&&(e.url=e.url.replace(m,this.styleOptions.language)),t.includes(d)&&(e.url=this.styleOptions.view?e.url.replace(d,this.styleOptions.view):e.url.replace(d,"").replace("&"+f+"=",""))},Hu.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},Hu.prototype._setStyleComponents=function(e,n){var o=this;void 0===n&&(n=!0),this.removed||this.styles.definitions().then(function(t){o.styleOptions.style&&t.configurations.map(function(t){return t.name}).includes(o.styleOptions.style)||(o.styleOptions.style=t.defaultConfiguration),o.styleOptions=e,o._rebuildStyle(n)})},Hu.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!Wa&&al(t.authOptions),t.domain&&!Fa&&ll(t.domain),t.styleDefinitionsPath&&!Ua&&cl(t.styleDefinitionsPath),t.workerCount&&!Ga&&ul(t.workerCount),t.maxParallelImageRequests&&!Za&&hl(t.maxParallelImageRequests),!t.subscriptionKey&&!t["subscription-key"]||Wa||fl(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||Ka||dl(t.sessionId||t["session-id"]),t.language&&!Ha&&pl(t.language),!t.userRegion&&!t.view||ja||ml(t.userRegion||t.view))},Hu.prototype._generateSafeBounds=function(t){if(t){var e=li.getSouth(t),n=li.getWest(t),o=li.getNorth(t),r=li.getEast(t);if(!(isFinite(e)&&isFinite(n)&&isFinite(o)&&isFinite(r)))throw new Error("The bounds specified are invalid: ["+t+"]");for(;r<n;)r+=360;return new li([n,e,r,o])}return t},Hu.prototype._detectHighContrast=function(){var t,e;switch(El.getHighContrastMode()){case"invert":case"light":t=Hu.Css.hcLight,e="high_contrast_light";break;case"dark":t=Hu.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},Hu.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},Hu);function Hu(t,e){var o=Gu.call(this)||this;o.removed=!1,o.loaded=!1,o.ready=!1,o._windowResizeCallback=function(){return o.resize()};var n,r,i=!0;o._updateGlobalDefaults(e),o.serviceOptions=(new Nu).merge(e),o.styleOptions=(new Lu).merge(e),o.trafficOptions=new mo,o.styles=new Uu(o,o.serviceOptions),o.serviceOptions.authOptions.subscriptionKey&&(o.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(o.serviceOptions.authOptions.subscriptionKey)),n=o.serviceOptions.authOptions.clientId||(o.serviceOptions.authOptions.subscriptionKey?o.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting"),o.insights&&o.insights.setAuthenticatedUserContext(o.serviceOptions.sessionId,n),arguments[2]&&"ENVIRONMENT"in window&&window.ENVIRONMENT.hmr?(r=arguments[2],o.ready=!0,o.loaded=!0):(t={antialias:o.styleOptions.antialias,attributionControl:!1,container:t,fadeDuration:o.serviceOptions.fadeDuration,localIdeographFontFamily:o.serviceOptions.localIdeographFontFamily,preserveDrawingBuffer:o.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:o.serviceOptions.refreshExpiredTiles,renderWorldCopies:o.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var n={url:t};return"Tile"===e||"Source"===e?(t.includes(p)&&o.insights&&o.insights.trackEvent({name:"TileLoad"}),o._substituteDomainLanguageViewAndSignInRequest(t,n)):"Style"!==e&&"SpriteJSON"!==e&&"SpriteImage"!==e&&"Glyphs"!==e||o.styles._transformStyleRequest(t,n),o.serviceOptions.transformRequest&&lo(n,o.serviceOptions.transformRequest(n.url,e)),n}},r=new h.Map(t));try{o.map=r,o.authentication=new Ec(o),o.controls=new Oc(o),o.events=new Rc(o),o.imageSprite=new zc(o),o.layers=new qc(o),o.markers=new Mc(o),o.sources=new Yc(o),o.popups=new Zc(o),o.map.getContainer().classList.add(Hu.Css.container),o.map.getCanvasContainer().classList.add(Hu.Css.canvasContainer),o.map.getCanvas().classList.add(Hu.Css.canvas),o._detectHighContrast(),o.copyrightControl=new Pl({showFeedbackLink:o.styleOptions.showFeedbackLink,showLogo:o.styleOptions.showLogo,customAttribution:o.styleOptions.customAttribution}),o.controls.add(o.copyrightControl,{position:u.ControlPosition.NonFixed});var s=o.authentication?o.authentication.initialize():Promise.resolve();if(o.removed)return o;var a=function(){o.loaded=!0,o.map.off("load",a)};o.map.on("load",a);var l=function(){o.ready=!0,o.map.off("styledata",l),o.events.invoke("ready",{map:o,type:"ready"})};o.map.on("styledata",l),o._setAutoResize(o.styleOptions.autoResize),o.map.showTileBoundaries=o.styleOptions.showTileBoundaries,o.localizedStringsPromise=xa.getStrings(o.styleOptions.language);var c=o.styles.initStyleset();Promise.all([s,c]).then(function(t){t=R(t,2),t[0],t[1];if(!o.removed){if(o.authentication&&!o.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");o.serviceOptions["enable-accessibility"]&&o.accessibleMapDelegate.addToMap(),o._setStyleComponents(o.styleOptions),o.copyrightDelegate&&o.copyrightDelegate.addToMap()}}).catch(function(t){t=t instanceof Error?t:new Error(t);o.insights&&o.insights.trackException({error:t}),o.events.invoke("error",{map:o,type:"error",error:t})}),o.setCamera(I(I({},e),{type:"jump",duration:0})),o.incidentDelegate=new Ql(o),o.flowDelegate=new Hl(o),o.accessibleMapDelegate=new Zl(o),o.userInteractionDelegate=new ic(o,e),o.userInteractionDelegate.addToMap(),o.copyrightDelegate=new vc(o,o.copyrightControl,o.styleOptions)}catch(t){throw i=!1,o.insights&&o.insights.trackException({error:t instanceof Error?t:new Error(t)}),t}finally{o.insights&&(o.insights.trackEvent({name:"MapLoad"},{success:i,supported:sl(!1),supportedWithPerformance:sl(!0)}),o.insights.flush())}return o}Ku.applyTemplate=function(e,n){var o,r,t,i=this,s=document.createElement("div");return s.classList.add(Ku.Css.template),e&&("boolean"!=typeof(n=n||{}).singleDescription&&(n.singleDescription=!0),n.sandboxContent="boolean"!=typeof n.sandboxContent||n.sandboxContent,n.title&&"string"==typeof n.content&&(n.content.includes("{title}")||n.content.includes("{name}"))||(e.title?n.title="{title}":e.name&&(n.title="{name}")),"boolean"!=typeof n.detectHyperlinks&&(n.detectHyperlinks=!0),"boolean"!=typeof n.parsePropertyPaths&&(n.parsePropertyPaths=!0),n.textColor&&(s.style.color=n.textColor),n.fillColor&&(s.style.backgroundColor=n.fillColor),n.title&&((t=this._applyStringTemplate(e,n.title,n)).innerText=t.textContent||t.innerText||"",this._appendChild(s,t,Ku.Css.title)),(o=document.createElement("div")).classList.add(Ku.Css.content),Array.isArray(n.content)?0<n.content.length&&n.content[0].propertyPath?this._appendChild(o,this._generateContent(e,n.content,n),Ku.Css.item):n.content.forEach(function(t){i._appendChild(o,i._generateContent(e,t,n),Ku.Css.item)}):(r=0,e.description&&Object.keys(e).forEach(function(t){i._ignoreProperty(t,e[t])||r++}),t=void 0,1===r||n.singleDescription&&e.description||2===r&&e.Snippet?(t=document.createElement("div")).innerHTML=e.description:t=this._generateContent(e,n.content,n),this._appendChild(o,t,Ku.Css.item)),""!==o.innerHTML&&(n.sandboxContent?s.appendChild(Ku._createSandboxedIframe(o,n)):s.appendChild(o))),s},Ku._createSandboxedIframe=function(t,e){var n=document.createElement("iframe");n.sandbox.add("allow-popups");var o=t.innerHTML,r=!1,i=100,s=550,a=10,l=0;document.body.scrollWidth<=340&&(s=300,i=50);var c=o.split(/<(tr|div|br|li|h[0-9]|p>)/),l=Math.max.apply(Math,N(c.map(function(t){return t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length})))-1,t=Math.ceil(3.5*l);t<s&&(s=t,i=l),o.includes("<img")||o.includes("<video")?(r=!0,n.width="550px"):(l=-1<o.indexOf(Ku.Css.table)?25:20,a+=Math.max(.5*c.length*l,Math.ceil(o.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/i)*l)),n.width=s+"px",n.height=r||280<a?"280px":a+"px";a=e.textColor?"color:"+e.textColor+";":"",e=e.fillColor?"background-color:"+e.fillColor+";":"",o='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" /><link rel="stylesheet" href="'+Ku._cssUrl+'" type="text/css"/><style>html, body{margin:0;padding:0;'+a+e+'}</style></head><body><div class="'+Ku.Css.template+'" style="padding:0;width:'+(s-20)+'px">'+o+"</div></body></html>";return void 0===n.srcdoc?n.src="data:text/html;charset=utf-8,"+encodeURI(o):n.srcdoc=o,n},Ku._appendChild=function(t,e,n){e&&(n&&(e.className=(e.className?e.className+" ":"")+n),t.appendChild(e))},Ku._generateContent=function(t,e,n){if(e)return Array.isArray(e)?this._generatePropertyInfoTable(t,e,n):this._applyStringTemplate(t,e,n);t=this._generateDynamicTableHtml(t,null,n);if(t){n=document.createElement("div");return n.innerHTML=t,n}return null},Ku._applyStringTemplate=function(t,e,n){if(e){for(var o,r=e,i=this._placeholderRx.exec(e);i;)2<=i.length&&(o=this._getPropertyValue(t,i[1],n),r=r.replace(i[0],o)),i=this._placeholderRx.exec(e);if(r){(r=r.trim()).includes("<")&&(r=r.replace(/[\r\n]+/g,"<br/>"));var s=document.createElement("div");return s.innerHTML=r,s}}return null},Ku._getPropertyValue=function(t,e,n,o){var r=n.parsePropertyPaths?e.split("/"):[e],i=r.length;if(0<i&&t){var s=r[0],a=t[s];if(n.detectHyperlinks&&"link"===e&&(!o||o.hyperlinkFormat)){var l,c=[];if(Array.isArray(a)?a.forEach(function(t){t.href?c.push(t):"string"==typeof t&&c.push({href:t})}):a.href&&c.push(a),0<c.length){o&&o.hyperlinkFormat?l=o.hyperlinkFormat:n&&n.hyperlinkFormat&&(l=n.hyperlinkFormat);var u=l&&l.target?l.target:"_blank",h=[];return c.forEach(function(t){t.title||l&&l.label||!t.rel||h.push(t.rel," - "),h.push('<a href="',t.href,'" target="',u,'">'),t.title?h.push(t.title):l&&l.label?h.push(l.label):h.push(t.href),h.push("</a>","<br/>")}),h.pop(),h.join("")}}if(null!=a){for(var p=void 0,p=1;p<i&&(a=a[r[p]],s=r[p],null!=a);p++);if(p===i&&null!=a){var d=void 0;if((d=void 0!==a.value?a.value:a)instanceof Date)return o&&o.dateFormat?d.toLocaleString(void 0,o.dateFormat):n.dateFormat?d.toLocaleString(void 0,n.dateFormat):d.toISOString();if("object"==typeof d)return(m=this._generateDynamicTableHtml(d,r.slice(1),n))||"";if("number"==typeof d){if(o){if(o.dateFormat)return new Date(d).toLocaleString(void 0,o.dateFormat);if(o.numberFormat)return d.toLocaleString(void 0,o.numberFormat)}else if(/(timestamp|date)/gi.test(s))return new Date(d).toISOString();return d.toLocaleString(void 0,n.numberFormat)}if("string"==typeof d&&""!==d&&!/[\n\r<>\s]/g.test(d)&&(n.detectHyperlinks||o&&o.hyperlinkFormat)){var d=d.trim(),f=this._isUrlRx.test(d)||o&&o.hyperlinkFormat,t=this._isImageUrlRx.test(d)&&(f||d.startsWith("data:image")),e=this._emailRx.test(d);if(f||t||e){f=void 0;o&&o.hyperlinkFormat?f=o.hyperlinkFormat:n&&n.hyperlinkFormat&&(f=n.hyperlinkFormat);var m=void 0;m=f&&f.target?' target="'+f.target+'"':' target="_blank"';n=""+(f&&f.label?f.label:d);f&&f.scheme?d=f.scheme+d:e&&(d="mailto:"+d);e=f&&f.label?' alt="'+f.label+'"':"";return'<a href="'+d+'"'+m+">"+(n=f&&f.isImage||t?'<img src="'+d+'" style="max-width:100%"'+e+'"/>':n)+"</a>"}}return d.toString()}}}return""},Ku._generatePropertyInfoTable=function(n,t,o){if(n&&t&&0<t.length){var r=[],i=this;r.push('<table class="'+i.Css.table+'">'),t.forEach(function(t){var e=i._getPropertyValue(n,t.propertyPath,o,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");return t.innerHTML=r.join(""),t}return null},Ku._generateDynamicTableHtml=function(e,t,n){var o=this;if(e){var r=[],i=this;r.push('<table class="'+i.Css.table+'">');var s=t&&0<t.length?t.join("/")+"/":"",a=0;return(Object.keys(e).forEach(function(t){o._ignoreProperty(t,e[t])||(r.push("<tr><th>",t,"</th><td>",i._getPropertyValue(e,s+t,n),"</td></tr>"),a++)}),0===a)?null:(r.push("</table>"),r.join(""))}return null},Ku._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},Ku._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,Ku._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,Ku._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,Ku._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,Ku._cssUrl=new F({domain:e,path:"sdk/javascript/mapcontrol/"+G.getEndpointVersion()+"/atlas.min.css"}).toString(),Ku.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"},b=Ku;function Ku(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}M=new F({domain:e,path:"sdk/javascript/mapcontrol/"+G.getEndpointVersion()+"/mapbox-gl-rtl-text.min.js"});h.setRTLTextPlugin(M.toString(),function(t){t&&console.warn(t)},!0),u.HtmlMarker=ya,u.Map=Zu,u.Pixel=Yo,u.Popup=ha,u.PopupTemplate=b,u.Shape=ii,u._getAssetDomain=function(){return t},u._getDomain=function(){return Ra},u._hasMaxParallelImageRequests=wl,u._hasSetAuthenticationOptions=yl,u._hasSetDomain=vl,u._hasSetLanguage=Sl,u._hasSetSessionId=xl,u._hasSetStyleDefinitionsPath=_l,u._hasSetStyleDefinitionsVersion=function(){return qa},u._hasSetView=Tl,u._hasWorkerCount=bl,u.addImageTemplate=function(t,e,n){!n&&Cl[t.toLowerCase()]||(Cl[t.toLowerCase()]=e)},u.clearPrewarmedResources=function(){h.clearPrewarmedResources()},u.control=Et,u.data=Lt,u.getAllImageTemplateNames=function(){return Object.keys(Cl)},u.getAuthenticationOptions=Va,u.getDomain=Qa,u.getImageTemplate=gl,u.getLanguage=nl,u.getMaxParallelImageRequests=el,u.getSessionId=ol,u.getStaticAssetsDomain=Ya,u.getStyleAPIVersion=$a,u.getStyleDefinitionsPath=Ja,u.getStyleDefinitionsVersion=Xa,u.getSubscriptionKey=rl,u.getUserRegion=function(){return Oa},u.getVersion=function(){return G.getFullVersion()},u.getView=il,u.getWorkerCount=tl,u.internal=nt,u.isSupported=sl,u.layer=mt,u.math=bt,u.prewarm=function(){h.prewarm()},u.setAuthenticationOptions=al,u.setDomain=ll,u.setLanguage=pl,u.setMaxParallelImageRequests=hl,u.setSessionId=dl,u.setStyleAPIVersion=function(t){za=t},u.setStyleDefinitionsPath=cl,u.setStyleDefinitionsVersion=function(t){Da=t,qa=!0},u.setSubscriptionKey=fl,u.setUserRegion=ml,u.setView=function(t){Oa=t,ja=!0},u.setWorkerCount=ul,u.source=kt,Object.defineProperty(u,"__esModule",{value:!0})});
|