ctucx.git: mobile-coverage-map

a map that allows comparison of various mobile networks

commit dc33920e96e33f0282315c84e4edd984325af0ba
parent fdfca203271c84d678dd4774023eaa1f4e2dc4dd
Author: Isabelle <hi@f2k1.de>
Date: Tue, 31 May 2022 13:28:52 +0200

move ORM layer above all others
2 files changed, 14 insertions(+), 11 deletions(-)
M
bundle.js
|
4
++--
M
main.js
|
21
++++++++++++---------
diff --git a/bundle.js b/bundle.js
@@ -1 +1 @@
-(()=>{var t={779:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(645),r=n.n(i)()((function(t){return t[1]}));r.push([t.id,".layer-switcher {\n  position: absolute;\n  top: 3.5em;\n  right: 0.5em;\n  text-align: left;\n}\n\n.layer-switcher .panel {\n  margin: 0;\n  border: 4px solid #eee;\n  border-radius: 4px;\n  background-color: white;\n  display: none;\n  max-height: inherit;\n  height: 100%;\n  box-sizing: border-box;\n  overflow-y: auto;\n}\n\n.layer-switcher button {\n  float: right;\n  z-index: 1;\n  width: 38px;\n  height: 38px;\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdEhV2JqytQeVmMhVmNoydUfVGUgVGQfVGQfVmVqy9hqy9dWw9AfVWRpydVry9YhVmMgVGNUw9BrytchVWRexdGw294gVWQgVmUhVWPd4N6HoaZsy9cfVmQgVGRrytZsy9cgVWQgVWMgVWRsy9YfVWNsy9YgVWVty9YgVWVry9UgVWRsy9Zsy9UfVWRsy9YgVWVty9YgVWRty9Vsy9aM09sgVWRTws/AzM0gVWRtzNYgVWRuy9Zsy9cgVWRGcHxty9bb5ORbxdEgVWRty9bn6OZTws9mydRfxtLX3Nva5eRix9NFcXxOd4JPeINQeIMiVmVUws9Vws9Vw9BXw9BYxNBaxNBbxNBcxdJexdElWWgmWmhjyNRlx9IqXGtoipNpytVqytVryNNrytZsjZUuX210k5t1y9R2zNR3y9V4lp57zth9zdaAnKOGoaeK0NiNpquV09mesrag1tuitbmj1tuj19uktrqr2d2svcCu2d2xwMO63N+7x8nA3uDC3uDFz9DK4eHL4eLN4eIyYnDX5OM5Z3Tb397e4uDf4uHf5uXi5ePi5+Xj5+Xk5+Xm5+Xm6OY6aHXQ19fT4+NfhI1Ww89gx9Nhx9Nsy9ZWw9Dpj2abAAAAWnRSTlMAAQICAwQEBgcIDQ0ODhQZGiAiIyYpKywvNTs+QklPUlNUWWJjaGt0dnd+hIWFh4mNjZCSm6CpsbW2t7nDzNDT1dje5efr7PHy9PT29/j4+Pn5+vr8/f39/f6DPtKwAAABTklEQVR4Xr3QVWPbMBSAUTVFZmZmhhSXMjNvkhwqMzMzMzPDeD+xASvObKePPa+ffHVl8PlsnE0+qPpBuQjVJjno6pZpSKXYl7/bZyFaQxhf98hHDKEppwdWIW1frFnrxSOWHFfWesSEWC6R/P4zOFrix3TzDFLlXRTR8c0fEEJ1/itpo7SVO9Jdr1DVxZ0USyjZsEY5vZfiiAC0UoTGOrm9PZLuRl8X+Dq1HQtoFbJZbv61i+Poblh/97TC7n0neCcK0ETNUrz1/xPHf+DNAW9Ac6t8O8WH3Vp98f5lCaYKAOFZMLyHL4Y0fe319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==')\n    /*logo.png*/;\n  background-repeat: no-repeat;\n  background-position: 2px;\n  background-color: white;\n  color: black;\n  border: none;\n}\n\n.layer-switcher button:focus,\n.layer-switcher button:hover {\n  background-color: white;\n}\n.layer-switcher.shown {\n  overflow-y: hidden;\n}\n.layer-switcher.shown.ol-control {\n  background-color: transparent;\n}\n\n.layer-switcher.shown.ol-control:hover {\n  background-color: transparent;\n}\n.layer-switcher.shown .panel {\n  display: block;\n}\n\n.layer-switcher.shown button {\n  display: none;\n}\n\n.layer-switcher.shown.layer-switcher-activation-mode-click > button {\n  display: block;\n  background-image: unset;\n  right: 2px;\n  position: absolute;\n  background-color: #eee;\n  margin: 0 1px;\n}\n\n.layer-switcher.shown button:focus,\n.layer-switcher.shown button:hover {\n  background-color: #fafafa;\n}\n\n.layer-switcher ul {\n  list-style: none;\n  margin: 1.6em 0.4em;\n  padding-left: 0;\n}\n.layer-switcher ul ul {\n  padding-left: 1.2em;\n  margin: 0.1em 0 0 0;\n}\n.layer-switcher li.group + li.group {\n  margin-top: 0.4em;\n}\n.layer-switcher li.group + li.layer-switcher-base-group {\n}\n\n.layer-switcher li.group > label {\n  font-weight: bold;\n}\n\n.layer-switcher.layer-switcher-group-select-style-none li.group > label {\n  padding-left: 1.2em;\n}\n\n.layer-switcher li {\n  position: relative;\n  margin-top: 0.3em;\n}\n\n.layer-switcher li input {\n  position: absolute;\n  left: 1.2em;\n  height: 1em;\n  width: 1em;\n  font-size: 1em;\n}\n.layer-switcher li label {\n  padding-left: 2.7em;\n  padding-right: 1.2em;\n  display: inline-block;\n  margin-top: 1px;\n}\n\n.layer-switcher label.disabled {\n  opacity: 0.4;\n}\n\n.layer-switcher input {\n  margin: 0px;\n}\n\n.layer-switcher.touch ::-webkit-scrollbar {\n  width: 4px;\n}\n\n.layer-switcher.touch ::-webkit-scrollbar-track {\n  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);\n  border-radius: 10px;\n}\n\n.layer-switcher.touch ::-webkit-scrollbar-thumb {\n  border-radius: 10px;\n  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);\n}\n\nli.layer-switcher-base-group > label {\n  padding-left: 1.2em;\n}\n\n.layer-switcher .group button {\n  position: absolute;\n  left: 0;\n  display: inline-block;\n  vertical-align: top;\n  float: none;\n  font-size: 1em;\n  width: 1em;\n  height: 1em;\n  margin: 0;\n  background-position: center 2px;\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAW0lEQVR4nGNgGAWMyBwXFxcGBgaGeii3EU0tXHzPnj1wQRYsihqQ+I0ExDEMQAYNONgoAN0AmMkNaDSyQSheY8JiaCMOGzE04zIAmyFYNTMw4A+DRhzsUUBtAADw4BCeIZkGdwAAAABJRU5ErkJggg==');\n  -webkit-transition: -webkit-transform 0.2s ease-in-out;\n  -ms-transition: -ms-transform 0.2s ease-in-out;\n  transition: transform 0.2s ease-in-out;\n}\n\n.layer-switcher .group.layer-switcher-close button {\n  transform: rotate(-90deg);\n  -webkit-transform: rotate(-90deg);\n}\n\n.layer-switcher .group.layer-switcher-fold.layer-switcher-close > ul {\n  overflow: hidden;\n  height: 0;\n}\n\n/*layerswitcher on the right*/\n.layer-switcher.shown.layer-switcher-activation-mode-click {\n  padding-left: 34px;\n}\n.layer-switcher.shown.layer-switcher-activation-mode-click > button {\n  left: 0;\n  border-right: 0;\n}\n\n/*layerswitcher on the left*/\n/*\n.layer-switcher.shown.layer-switcher-activation-mode-click {\n  padding-right: 34px;\n}\n.layer-switcher.shown.layer-switcher-activation-mode-click > button {\n  right: 0;\n  border-left: 0;\n}\n*/\n",""]);const o=r},788:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(645),r=n.n(i)()((function(t){return t[1]}));r.push([t.id,'.ol-box {\n  box-sizing: border-box;\n  border-radius: 2px;\n  border: 1.5px solid rgb(179,197,219);\n  background-color: rgba(255,255,255,0.4);\n}\n\n.ol-mouse-position {\n  top: 8px;\n  right: 8px;\n  position: absolute;\n}\n\n.ol-scale-line {\n  background: rgba(0,60,136,0.3);\n  border-radius: 4px;\n  bottom: 8px;\n  left: 8px;\n  padding: 2px;\n  position: absolute;\n}\n.ol-scale-line-inner {\n  border: 1px solid #eee;\n  border-top: none;\n  color: #eee;\n  font-size: 10px;\n  text-align: center;\n  margin: 1px;\n  will-change: contents, width;\n  transition: all 0.25s;\n}\n.ol-scale-bar {\n  position: absolute;\n  bottom: 8px;\n  left: 8px;\n}\n.ol-scale-step-marker {\n  width: 1px;\n  height: 15px;\n  background-color: #000000;\n  float: right;\n  z-index: 10;\n}\n.ol-scale-step-text {\n  position: absolute;\n  bottom: -5px;\n  font-size: 12px;\n  z-index: 11;\n  color: #000000;\n  text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-text {\n  position: absolute;\n  font-size: 14px;\n  text-align: center;\n  bottom: 25px;\n  color: #000000;\n  text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-singlebar {\n  position: relative;\n  height: 10px;\n  z-index: 9;\n  box-sizing: border-box;\n  border: 1px solid black;\n}\n\n.ol-unsupported {\n  display: none;\n}\n.ol-viewport, .ol-unselectable {\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n.ol-viewport canvas {\n  all: unset;\n}\n.ol-selectable {\n  -webkit-touch-callout: default;\n  -webkit-user-select: text;\n  -moz-user-select: text;\n  -ms-user-select: text;\n  user-select: text;\n}\n.ol-grabbing {\n  cursor: -webkit-grabbing;\n  cursor: -moz-grabbing;\n  cursor: grabbing;\n}\n.ol-grab {\n  cursor: move;\n  cursor: -webkit-grab;\n  cursor: -moz-grab;\n  cursor: grab;\n}\n.ol-control {\n  position: absolute;\n  background-color: rgba(255,255,255,0.4);\n  border-radius: 4px;\n  padding: 2px;\n}\n.ol-control:hover {\n  background-color: rgba(255,255,255,0.6);\n}\n.ol-zoom {\n  top: .5em;\n  left: .5em;\n}\n.ol-rotate {\n  top: .5em;\n  right: .5em;\n  transition: opacity .25s linear, visibility 0s linear;\n}\n.ol-rotate.ol-hidden {\n  opacity: 0;\n  visibility: hidden;\n  transition: opacity .25s linear, visibility 0s linear .25s;\n}\n.ol-zoom-extent {\n  top: 4.643em;\n  left: .5em;\n}\n.ol-full-screen {\n  right: .5em;\n  top: .5em;\n}\n\n.ol-control button {\n  display: block;\n  margin: 1px;\n  padding: 0;\n  color: white;\n  font-weight: bold;\n  text-decoration: none;\n  font-size: inherit;\n  text-align: center;\n  height: 1.375em;\n  width: 1.375em;\n  line-height: .4em;\n  background-color: rgba(0,60,136,0.5);\n  border: none;\n  border-radius: 2px;\n}\n.ol-control button::-moz-focus-inner {\n  border: none;\n  padding: 0;\n}\n.ol-zoom-extent button {\n  line-height: 1.4em;\n}\n.ol-compass {\n  display: block;\n  font-weight: normal;\n  font-size: 1.2em;\n  will-change: transform;\n}\n.ol-touch .ol-control button {\n  font-size: 1.5em;\n}\n.ol-touch .ol-zoom-extent {\n  top: 5.5em;\n}\n.ol-control button:hover,\n.ol-control button:focus {\n  text-decoration: none;\n  background-color: rgba(0,60,136,0.7);\n}\n.ol-zoom .ol-zoom-in {\n  border-radius: 2px 2px 0 0;\n}\n.ol-zoom .ol-zoom-out {\n  border-radius: 0 0 2px 2px;\n}\n\n\n.ol-attribution {\n  text-align: right;\n  bottom: .5em;\n  right: .5em;\n  max-width: calc(100% - 1.3em);\n  display: flex;\n  flex-flow: row-reverse;\n  align-items: center;\n}\n.ol-attribution a {\n  color: rgba(0,60,136,0.7);\n  text-decoration: none;\n}\n.ol-attribution ul {\n  margin: 0;\n  padding: 1px .5em;\n  color: #000;\n  text-shadow: 0 0 2px #fff;\n  font-size: 12px;\n}\n.ol-attribution li {\n  display: inline;\n  list-style: none;\n}\n.ol-attribution li:not(:last-child):after {\n  content: " ";\n}\n.ol-attribution img {\n  max-height: 2em;\n  max-width: inherit;\n  vertical-align: middle;\n}\n.ol-attribution button {\n  flex-shrink: 0;\n}\n.ol-attribution.ol-collapsed ul {\n  display: none;\n}\n.ol-attribution:not(.ol-collapsed) {\n  background: rgba(255,255,255,0.8);\n}\n.ol-attribution.ol-uncollapsible {\n  bottom: 0;\n  right: 0;\n  border-radius: 4px 0 0;\n}\n.ol-attribution.ol-uncollapsible img {\n  margin-top: -.2em;\n  max-height: 1.6em;\n}\n.ol-attribution.ol-uncollapsible button {\n  display: none;\n}\n\n.ol-zoomslider {\n  top: 4.5em;\n  left: .5em;\n  height: 200px;\n}\n.ol-zoomslider button {\n  position: relative;\n  height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n  top: 5.5em;\n}\n\n.ol-overviewmap {\n  left: 0.5em;\n  bottom: 0.5em;\n}\n.ol-overviewmap.ol-uncollapsible {\n  bottom: 0;\n  left: 0;\n  border-radius: 0 4px 0 0;\n}\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n  display: block;\n}\n.ol-overviewmap .ol-overviewmap-map {\n  border: 1px solid #7b98bc;\n  height: 150px;\n  margin: 2px;\n  width: 150px;\n}\n.ol-overviewmap:not(.ol-collapsed) button {\n  bottom: 2px;\n  left: 2px;\n  position: absolute;\n}\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n  display: none;\n}\n.ol-overviewmap:not(.ol-collapsed) {\n  background: rgba(255,255,255,0.8);\n}\n.ol-overviewmap-box {\n  border: 2px dotted rgba(0,60,136,0.7);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n  cursor: move;\n}\n',""]);const o=r},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);i&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},421:function(t,e,n){t.exports=function(t,e,n){"use strict";t="default"in t?t.default:t,n="default"in n?n.default:n;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o="layer-switcher-",s=function(t){function s(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var e=Object.assign({},t),n=e.tipLabel?e.tipLabel:"Legend",i=e.collapseTipLabel?e.collapseTipLabel:"Collapse legend",r=document.createElement("div"),a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,{element:r,target:e.target}));a.activationMode=e.activationMode||"mouseover",a.startActive=!0===e.startActive;var l=void 0!==e.label?e.label:"",u=void 0!==e.collapseLabel?e.collapseLabel:"»";a.groupSelectStyle=s.getGroupSelectStyle(e.groupSelectStyle),a.reverse=!1!==e.reverse,a.mapListeners=[],a.hiddenClassName="ol-unselectable ol-control layer-switcher",s.isTouchDevice_()&&(a.hiddenClassName+=" touch"),a.shownClassName="shown",r.className=a.hiddenClassName;var h=document.createElement("button");return h.setAttribute("title",n),h.setAttribute("aria-label",n),r.appendChild(h),a.panel=document.createElement("div"),a.panel.className="panel",r.appendChild(a.panel),s.enableTouchScroll_(a.panel),h.textContent=l,r.classList.add(o+"group-select-style-"+a.groupSelectStyle),r.classList.add(o+"activation-mode-"+a.activationMode),"click"===a.activationMode?(r.classList.add("activationModeClick"),a.startActive&&(h.textContent=u,h.setAttribute("title",i),h.setAttribute("aria-label",i)),h.onclick=function(t){var e=t||window.event;a.element.classList.contains(a.shownClassName)?(a.hidePanel(),h.textContent=l,h.setAttribute("title",n),h.setAttribute("aria-label",n)):(a.showPanel(),h.textContent=u,h.setAttribute("title",i),h.setAttribute("aria-label",i)),e.preventDefault()}):(h.onmouseover=function(){a.showPanel()},h.onclick=function(t){var e=t||window.event;a.showPanel(),e.preventDefault()},a.panel.onmouseout=function(t){a.panel.contains(t.relatedTarget)||a.hidePanel()}),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(s,t),i(s,[{key:"setMap",value:function(t){for(var n=this,i=0;i<this.mapListeners.length;i++)e.unByKey(this.mapListeners[i]);this.mapListeners.length=0,r(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"setMap",this).call(this,t),t&&(this.startActive?this.showPanel():this.renderPanel(),"click"!==this.activationMode&&this.mapListeners.push(t.on("pointerdown",(function(){n.hidePanel()}))))}},{key:"showPanel",value:function(){this.element.classList.contains(this.shownClassName)||(this.element.classList.add(this.shownClassName),this.renderPanel())}},{key:"hidePanel",value:function(){this.element.classList.contains(this.shownClassName)&&this.element.classList.remove(this.shownClassName)}},{key:"renderPanel",value:function(){this.dispatchEvent("render"),s.renderPanel(this.getMap(),this.panel,{groupSelectStyle:this.groupSelectStyle,reverse:this.reverse}),this.dispatchEvent("rendercomplete")}}],[{key:"renderPanel",value:function(t,e,n){var i=new Event("render");for(e.dispatchEvent(i),(n=n||{}).groupSelectStyle=s.getGroupSelectStyle(n.groupSelectStyle),s.ensureTopVisibleBaseLayerShown(t,n.groupSelectStyle);e.firstChild;)e.removeChild(e.firstChild);s.forEachRecursive(t,(function(t,e,n){t.set("indeterminate",!1)})),"children"===n.groupSelectStyle||"none"===n.groupSelectStyle?s.setGroupVisibility(t):"group"===n.groupSelectStyle&&s.setChildVisibility(t);var r=document.createElement("ul");e.appendChild(r),s.renderLayers_(t,t,r,n,(function(i){s.renderPanel(t,e,n)}));var o=new Event("rendercomplete");e.dispatchEvent(o)}},{key:"isBaseGroup",value:function(t){if(t instanceof n){var e=t.getLayers().getArray();return e.length&&"base"===e[0].get("type")}return!1}},{key:"setGroupVisibility",value:function(t){s.getGroupsAndLayers(t,(function(t){return t instanceof n&&!t.get("combine")&&!s.isBaseGroup(t)})).reverse().forEach((function(t){var e=t.getLayersArray().map((function(t){return t.getVisible()}));e.every((function(t){return!0===t}))?(t.setVisible(!0),t.set("indeterminate",!1)):e.every((function(t){return!1===t}))?(t.setVisible(!1),t.set("indeterminate",!1)):(t.setVisible(!0),t.set("indeterminate",!0))}))}},{key:"setChildVisibility",value:function(t){s.getGroupsAndLayers(t,(function(t){return t instanceof n&&!t.get("combine")&&!s.isBaseGroup(t)})).forEach((function(t){var e=t,n=e.getVisible(),i=e.get("indeterminate");e.getLayers().getArray().forEach((function(t){t.set("indeterminate",!1),n&&!i||!t.getVisible()||t.set("indeterminate",!0)}))}))}},{key:"ensureTopVisibleBaseLayerShown",value:function(t,e){var n=void 0;s.forEachRecursive(t,(function(t,e,i){"base"===t.get("type")&&t.getVisible()&&(n=t)})),n&&s.setVisible_(t,n,!0,e)}},{key:"getGroupsAndLayers",value:function(t,e){var n=[];return e=e||function(t,e,n){return!0},s.forEachRecursive(t,(function(t,i,r){t.get("title")&&e(t,i,r)&&n.push(t)})),n}},{key:"setVisible_",value:function(t,e,i,r){e.setVisible(i),i&&"base"===e.get("type")&&s.forEachRecursive(t,(function(t,n,i){t!=e&&"base"===t.get("type")&&t.setVisible(!1)})),e instanceof n&&!e.get("combine")&&"children"===r&&e.getLayers().forEach((function(n){s.setVisible_(t,n,e.getVisible(),r)}))}},{key:"renderLayer_",value:function(t,e,i,r,a){var l=document.createElement("li"),u=e.get("title"),h=s.uuid(),c=document.createElement("label");if(e instanceof n&&!e.get("combine")){var p=s.isBaseGroup(e);if(l.classList.add("group"),p&&l.classList.add(o+"base-group"),e.get("fold")){l.classList.add(o+"fold"),l.classList.add(o+e.get("fold"));var f=document.createElement("button");f.onclick=function(t){var n=t||window.event;s.toggleFold_(e,l),n.preventDefault()},l.appendChild(f)}if(!p&&"none"!=r.groupSelectStyle){var d=document.createElement("input");d.type="checkbox",d.id=h,d.checked=e.getVisible(),d.indeterminate=e.get("indeterminate"),d.onchange=function(n){var i=n.target;s.setVisible_(t,e,i.checked,r.groupSelectStyle),a(e)},l.appendChild(d),c.htmlFor=h}c.innerHTML=u,l.appendChild(c);var g=document.createElement("ul");l.appendChild(g),s.renderLayers_(t,e,g,r,a)}else{l.className="layer";var _=document.createElement("input");"base"===e.get("type")?(_.type="radio",_.name="base"):_.type="checkbox",_.id=h,_.checked=e.get("visible"),_.indeterminate=e.get("indeterminate"),_.onchange=function(n){var i=n.target;s.setVisible_(t,e,i.checked,r.groupSelectStyle),a(e)},l.appendChild(_),c.htmlFor=h,c.innerHTML=u;var y=t.getView().getResolution();(y>e.getMaxResolution()||y<e.getMinResolution())&&(c.className+=" disabled"),l.appendChild(c)}return l}},{key:"renderLayers_",value:function(t,e,n,i,r){var o=e.getLayers().getArray().slice();i.reverse&&(o=o.reverse());for(var a,l=0;l<o.length;l++)(a=o[l]).get("title")&&n.appendChild(s.renderLayer_(t,a,l,i,r))}},{key:"forEachRecursive",value:function(t,e){t.getLayers().forEach((function(t,i,r){e(t,i,r),t instanceof n&&s.forEachRecursive(t,e)}))}},{key:"uuid",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}},{key:"enableTouchScroll_",value:function(t){if(s.isTouchDevice_()){var e=0;t.addEventListener("touchstart",(function(t){e=this.scrollTop+t.touches[0].pageY}),!1),t.addEventListener("touchmove",(function(t){this.scrollTop=e-t.touches[0].pageY}),!1)}}},{key:"isTouchDevice_",value:function(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}},{key:"toggleFold_",value:function(t,e){e.classList.remove(o+t.get("fold")),t.set("fold","open"===t.get("fold")?"close":"open"),e.classList.add(o+t.get("fold"))}},{key:"getGroupSelectStyle",value:function(t){return["none","children","group"].indexOf(t)>=0?t:"children"}}]),s}(t);return window.ol&&window.ol.control&&(window.ol.control.LayerSwitcher=s),s}(n(775),n(706),n(734))},582:function(t){t.exports=function(){"use strict";function t(t,i,r,o,s){!function t(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,u=Math.log(a),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(a-h)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(r,Math.floor(i-l*h/a+c)),Math.min(o,Math.floor(i+(a-l)*h/a+c)),s)}var p=n[i],f=r,d=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[r],p)?e(n,r,d):e(n,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}(t,i,r||0,o||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=d(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(r,t.leaf?i(s):s)}return r}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,i,r,o){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=r)){var a=n+Math.ceil((i-n)/r/2)*r;t(e,a,n,i,o),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var i=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?i(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):r.push(s))}e=r.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var i=0;i<e.children.length;i++){var r=e.children[i],o=e.leaf?this.toBBox(r):r;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(r)}}e=n.pop()}return!1},i.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=d([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,i,o,s=this.data,a=this.toBBox(t),l=[],u=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=u.pop(),o=!0),s.leaf){var h=r(t,s.children,e);if(-1!==h)return s.children.splice(h,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?i?(n++,s=i.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,i){var r,s=n-e+1,a=this._maxEntries;if(s<=a)return o(r=d(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(r=d([])).leaf=!1,r.height=i;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));g(t,e,n,u,this.compareMinX);for(var h=e;h<=n;h+=u){var c=Math.min(h+u-1,n);g(t,h,c,l,this.compareMinY);for(var p=h;p<=c;p+=l){var f=Math.min(p+l-1,c);r.children.push(this._build(t,p,f,i-1))}}return o(r,this.toBBox),r},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],u=h(l),c=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-u);c<o?(o=c,r=u<r?u:r,s=l):c===o&&u<r&&(r=u,s=l)}e=s||e.children[0]}var p,f;return e},i.prototype._insert=function(t,e,n){var i=n?t:this.toBBox(t),r=[],o=this._chooseSubtree(i,this.data,e,r);for(o.children.push(t),a(o,i);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var s=this._chooseSplitIndex(n,r,i),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,a,l,u,c,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),_=s(t,d,n,this.toBBox),y=(r=g,o=_,void 0,void 0,void 0,void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),u=Math.min(r.maxX,o.maxX),c=Math.min(r.maxY,o.maxY),Math.max(0,u-a)*Math.max(0,c-l)),v=h(g)+h(_);y<p?(p=y,i=d,f=v<f?v:f):y===p&&v<f&&(f=v,i=d)}return i||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var i=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,n-e,n,r),u=c(o)+c(l),h=e;h<n-e;h++){var p=t.children[h];a(o,t.leaf?r(p):p),u+=c(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?r(d):d),u+=c(l)}return u},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i}()},379:(t,e,n)=>{"use strict";var i,r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function s(t){for(var e=-1,n=0;n<o.length;n++)if(o[n].identifier===t){e=n;break}return e}function a(t,e){for(var n={},i=[],r=0;r<t.length;r++){var a=t[r],l=e.base?a[0]+e.base:a[0],u=n[l]||0,h="".concat(l," ").concat(u);n[l]=u+1;var c=s(h),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==c?(o[c].references++,o[c].updater(p)):o.push({identifier:h,updater:g(p,e),references:1}),i.push(h)}return i}function l(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var s=r(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var u,h=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function c(t,e,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=h(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function p(t,e,n){var i=n.css,r=n.media,o=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var f=null,d=0;function g(t,e){var n,i,r;if(e.singleton){var o=d++;n=f||(f=l(e)),i=c.bind(null,n,o,!1),r=c.bind(null,n,o,!0)}else n=l(e),i=p.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i));var n=a(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var r=s(n[i]);o[r].references--}for(var l=a(t,e),u=0;u<n.length;u++){var h=s(n[u]);0===o[h].references&&(o[h].updater(),o.splice(h,1))}n=l}}}},813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i,r=n(187),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e){var n=this,i="Assertion failed. See https://openlayers.org/en/"+("latest"===r.q4?r.q4:"v"+r.q4.split("-")[0])+"/doc/errors/#"+e+" for details.";return(n=t.call(this,i)||this).code=e,n.name="AssertionError",n.message=i,n}return o(e,t),e}(Error)},714:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i,r=n(813),o=n(971),s=n(71),a=n(291),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u="length",h=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.element=n,r.index=i,r}return l(e,t),e}(a.ZP);const c=function(t){function e(e,n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};if(i.unique_=!!r.unique,i.array_=e||[],i.unique_)for(var o=0,s=i.array_.length;o<s;++o)i.assertUnique_(i.array_[o],o);return i.updateLength_(),i}return l(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e<n;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)t(e[n],n,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(u)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new h(s.Z.ADD,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)if(e[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new h(s.Z.REMOVE,e,t)),e},e.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new h(s.Z.REMOVE,i,t)),this.dispatchEvent(new h(s.Z.ADD,e,t))}else{for(var r=n;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(u,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===t&&n!==e)throw new r.Z(58)},e}(o.Z)},71:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={ADD:"add",REMOVE:"remove"}},431:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}()},126:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i,r=n(291),o=n(990),s=n(706),a=n(374),l=n(187),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.key=n,r.oldValue=i,r}return u(e,t),e}(r.ZP);const c=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,(0,l.sq)(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return u(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&(0,a.f0)({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:".concat(t),this.hasListener(n)&&this.dispatchEvent(new h(n,t,e)),n=o.Z.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new h(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:".concat(t),e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:".concat(t),e)},e.prototype.set=function(t,e,n){var i=this.values_||(this.values_={});if(n)i[t]=e;else{var r=i[t];i[t]=e,r!==e&&this.notify(t,r)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&(0,a.f0)(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],(0,a.xb)(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(s.default)},990:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={PROPERTYCHANGE:"propertychange"}},706:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>h,unByKey:()=>u});var i,r=n(208),o=n(487),s=n(818),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return a(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.Z.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,i=new Array(n),r=0;r<n;++r)i[r]=(0,s.oL)(this,t[r],e);return i}return(0,s.oL)(this,t,e)},e.prototype.onceInternal=function(t,e){var n;if(Array.isArray(t)){var i=t.length;n=new Array(i);for(var r=0;r<i;++r)n[r]=(0,s.Vx)(this,t[r],e)}else n=(0,s.Vx)(this,t,e);return e.ol_key=n,n},e.prototype.unInternal=function(t,e){var n=e.ol_key;if(n)u(n);else if(Array.isArray(t))for(var i=0,r=t.length;i<r;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(r.Z);function u(t){if(Array.isArray(t))for(var e=0,n=t.length;e<n;++e)(0,s.bN)(t[e]);else(0,s.bN)(t)}l.prototype.on,l.prototype.once,l.prototype.un;const h=l},537:(t,e,n)=>{"use strict";function i(t,e){return t>e?1:t<e?-1:0}function r(t,e,n){var i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;var r=void 0;if(n>0){for(r=1;r<i;++r)if(t[r]<e)return r-1}else if(n<0){for(r=1;r<i;++r)if(t[r]<=e)return r}else for(r=1;r<i;++r){if(t[r]==e)return r;if(t[r]<e)return"function"==typeof n?n(e,t[r-1],t[r])>0?r-1:r:t[r-1]-e<e-t[r]?r-1:r}return i-1}function o(t,e,n){for(;e<n;){var i=t[e];t[e]=t[n],t[n]=i,++e,--n}}function s(t,e){for(var n=Array.isArray(e)?e:[e],i=n.length,r=0;r<i;r++)t[t.length]=n[r]}function a(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function l(t,e,n){var r=e||i;return t.every((function(e,i){if(0===i)return!0;var o=r(t[i-1],e);return!(o>0||n&&0===o)}))}n.d(e,{FZ:()=>o,fS:()=>a,h7:()=>r,kK:()=>i,l7:()=>s,pT:()=>l})},515:(t,e,n)=>{"use strict";n.d(e,{h:()=>r});var i=n(813);function r(t,e){if(!t)throw new i.Z(e)}},775:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>h});var i,r=n(971),o=n(126),s=n(885),a=n(818),l=n(326),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const h=function(t){function e(e){var n=t.call(this)||this,i=e.element;return!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),n.element=i||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return u(e,t),e.prototype.disposeInternal=function(){(0,l.ZF)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&(0,l.ZF)(this.element);for(var e=0,n=this.listenerKeys.length;e<n;++e)(0,a.bN)(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==s.Zn&&this.listenerKeys.push((0,a.oL)(t,o.Z.POSTRENDER,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(r.Z)},326:(t,e,n)=>{"use strict";n.d(e,{$H:()=>o,E4:()=>r,ZF:()=>s,ep:()=>a,hF:()=>l});var i=n(177);function r(t,e,n,r){var o;return o=n&&n.length?n.shift():i.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",r)}function o(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function s(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function a(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function l(t,e){for(var n=t.childNodes,i=0;;++i){var r=n[i],o=e[i];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--i):t.appendChild(o))}}},818:(t,e,n)=>{"use strict";n.d(e,{Vx:()=>o,bN:()=>s,oL:()=>r});var i=n(374);function r(t,e,n,i,r){if(i&&i!==t&&(n=n.bind(i)),r){var o=n;n=function(){t.removeEventListener(e,n),o.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function o(t,e,n,i){return r(t,e,n,i,!0)}function s(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,i.ZH)(t))}},291:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>i});const i=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}()},487:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},208:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i,r=n(431),o=n(291),s=n(885),a=n(374),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const u=function(t){function e(e){var n=t.call(this)||this;return n.eventTarget_=e,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return l(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var n=this.listeners_||(this.listeners_={}),i=n[t]||(n[t]=[]);-1===i.indexOf(e)&&i.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t,n=e?t:t.type,i=this.listeners_&&this.listeners_[n];if(i){var r=e?new o.ZP(t):t;r.target||(r.target=this.eventTarget_||this);var a,l=this.dispatching_||(this.dispatching_={}),u=this.pendingRemovals_||(this.pendingRemovals_={});n in l||(l[n]=0,u[n]=0),++l[n];for(var h=0,c=i.length;h<c;++h)if(!1===(a="handleEvent"in i[h]?i[h].handleEvent(r):i[h].call(this,r))||r.propagationStopped){a=!1;break}if(0==--l[n]){var p=u[n];for(delete u[n];p--;)this.removeEventListener(n,s.Zn);delete l[n]}return a}},e.prototype.disposeInternal=function(){this.listeners_&&(0,a.ZH)(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var i=n.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=s.Zn,++this.pendingRemovals_[t]):(n.splice(i,1),0===n.length&&delete this.listeners_[t]))}},e}(r.Z)},641:(t,e,n)=>{"use strict";n.d(e,{Cf:()=>z,Cr:()=>L,EO:()=>Z,Ed:()=>A,GN:()=>v,H6:()=>S,HK:()=>y,I7:()=>N,Ne:()=>G,T9:()=>g,Wj:()=>w,Xv:()=>F,YN:()=>_,b8:()=>h,bg:()=>C,d9:()=>l,dz:()=>k,f3:()=>a,fS:()=>m,g0:()=>I,hC:()=>T,hI:()=>s,jE:()=>p,kK:()=>D,l7:()=>x,lJ:()=>d,p8:()=>P,pX:()=>f,qP:()=>b,qf:()=>u,qg:()=>R,r4:()=>c,rL:()=>M,w$:()=>O,xb:()=>j});var i=n(600),r=n(716),o=n(515);function s(t){for(var e=[1/0,1/0,-1/0,-1/0],n=0,i=t.length;n<i;++n)w(e,t[n]);return e}function a(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function l(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function u(t,e,n){var i,r;return(i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*i+(r=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0)*r}function h(t,e){return p(t,e[0],e[1])}function c(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function p(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function f(t,e){var n=t[0],i=t[1],o=t[2],s=t[3],a=e[0],l=e[1],u=r.Z.UNKNOWN;return a<n?u|=r.Z.LEFT:a>o&&(u|=r.Z.RIGHT),l<i?u|=r.Z.BELOW:l>s&&(u|=r.Z.ABOVE),u===r.Z.UNKNOWN&&(u=r.Z.INTERSECTING),u}function d(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,n,i,r){return r?(r[0]=t,r[1]=e,r[2]=n,r[3]=i,r):[t,e,n,i]}function _(t){return g(1/0,1/0,-1/0,-1/0,t)}function y(t,e){var n=t[0],i=t[1];return g(n,i,n,i,e)}function v(t,e,n,i,r){return b(_(r),t,e,n,i)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function x(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function w(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function b(t,e,n,i,r){for(;n<i;n+=r)E(t,e[n],e[n+1]);return t}function E(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function S(t,e){var n;return(n=e(T(t)))||(n=e(O(t)))||(n=e(F(t)))?n:(n=e(M(t)))||!1}function C(t){var e=0;return j(t)||(e=k(t)*L(t)),e}function T(t){return[t[0],t[1]]}function O(t){return[t[2],t[1]]}function R(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function I(t,e){var n;return e===i.Z.BOTTOM_LEFT?n=T(t):e===i.Z.BOTTOM_RIGHT?n=O(t):e===i.Z.TOP_LEFT?n=M(t):e===i.Z.TOP_RIGHT?n=F(t):(0,o.h)(!1,13),n}function P(t,e,n,i,r){var o=e*i[0]/2,s=e*i[1]/2,a=Math.cos(n),l=Math.sin(n),u=o*a,h=o*l,c=s*a,p=s*l,f=t[0],d=t[1],_=f-u+p,y=f-u-p,v=f+u-p,m=f+u+p,x=d-h-c,w=d-h+c,b=d+h+c,E=d+h-c;return g(Math.min(_,y,v,m),Math.min(x,w,b,E),Math.max(_,y,v,m),Math.max(x,w,b,E),r)}function L(t){return t[3]-t[1]}function A(t,e,n){var i=n||[1/0,1/0,-1/0,-1/0];return D(t,e)?(t[0]>e[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]<e[2]?i[2]=t[2]:i[2]=e[2],t[3]<e[3]?i[3]=t[3]:i[3]=e[3]):_(i),i}function M(t){return[t[0],t[3]]}function F(t){return[t[2],t[3]]}function k(t){return t[2]-t[0]}function D(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function j(t){return t[2]<t[0]||t[3]<t[1]}function Z(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function N(t,e,n){var i=!1,o=f(t,e),s=f(t,n);if(o===r.Z.INTERSECTING||s===r.Z.INTERSECTING)i=!0;else{var a=t[0],l=t[1],u=t[2],h=t[3],c=e[0],p=e[1],d=n[0],g=n[1],_=(g-p)/(d-c),y=void 0,v=void 0;s&r.Z.ABOVE&&!(o&r.Z.ABOVE)&&(i=(y=d-(g-h)/_)>=a&&y<=u),i||!(s&r.Z.RIGHT)||o&r.Z.RIGHT||(i=(v=g-(d-u)*_)>=l&&v<=h),i||!(s&r.Z.BELOW)||o&r.Z.BELOW||(i=(y=d-(g-l)/_)>=a&&y<=u),i||!(s&r.Z.LEFT)||o&r.Z.LEFT||(i=(v=g-(d-a)*_)>=l&&v<=h)}return i}function G(t,e,n,i){var r=[];if(i>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<i;++a)r.push(t[0]+o*a/i,t[1],t[2],t[1]+s*a/i,t[2]-o*a/i,t[3],t[0],t[3]-s*a/i);else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);for(var l=[],u=[],h=(a=0,r.length);a<h;a+=2)l.push(r[a]),u.push(r[a+1]);return function(t,e,n){return g(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),n)}(l,u,n)}function z(t,e){var n=e.getExtent(),i=R(t);if(e.canWrapX()&&(i[0]<n[0]||i[0]>=n[2])){var r=k(n),o=Math.floor((i[0]-n[0])/r)*r;t[0]-=o,t[2]-=o}return t}},600:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},716:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},885:(t,e,n)=>{"use strict";n.d(e,{Dv:()=>o,Zn:()=>s,qe:()=>a,uX:()=>r});var i=n(537);function r(){return!0}function o(){return!1}function s(){}function a(t){var e,n,r,o=!1;return function(){var s=Array.prototype.slice.call(arguments);return o&&this===r&&(0,i.fS)(s,n)||(o=!0,r=this,n=s,e=t.apply(this,arguments)),e}}},177:(t,e,n)=>{"use strict";n.d(e,{G$:()=>o,Id:()=>l,MP:()=>a,Tp:()=>u,V:()=>r,bM:()=>h,tK:()=>s});var i="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",r=-1!==i.indexOf("firefox"),o=(-1!==i.indexOf("safari")&&-1==i.indexOf("chrom")&&(i.indexOf("version/15.4")>=0||i.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==i.indexOf("webkit")&&-1==i.indexOf("edge")),s=-1!==i.indexOf("macintosh"),a="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,u="undefined"!=typeof Image&&Image.prototype.decode,h=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},947:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i,r=n(971),o=n(912),s=n(187),a=n(515),l=n(374),u=n(983),h=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const c=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var i=(0,l.f0)({},e);return"object"==typeof e.properties&&(delete i.properties,(0,l.f0)(i,e.properties)),i[o.Z.OPACITY]=void 0!==e.opacity?e.opacity:1,(0,a.h)("number"==typeof i[o.Z.OPACITY],64),i[o.Z.VISIBLE]=void 0===e.visible||e.visible,i[o.Z.Z_INDEX]=e.zIndex,i[o.Z.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,i[o.Z.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,i[o.Z.MIN_ZOOM]=void 0!==e.minZoom?e.minZoom:-1/0,i[o.Z.MAX_ZOOM]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==i.className?i.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return h(e,t),e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},n=this.getZIndex();return e.opacity=(0,u.uZ)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==n||e.managed?n:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return(0,s.O3)()},e.prototype.getLayerStatesArray=function(t){return(0,s.O3)()},e.prototype.getExtent=function(){return this.get(o.Z.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(o.Z.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(o.Z.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(o.Z.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(o.Z.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(o.Z.OPACITY)},e.prototype.getSourceState=function(){return(0,s.O3)()},e.prototype.getVisible=function(){return this.get(o.Z.VISIBLE)},e.prototype.getZIndex=function(){return this.get(o.Z.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(o.Z.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(o.Z.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(o.Z.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(o.Z.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(o.Z.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){(0,a.h)("number"==typeof t,64),this.set(o.Z.OPACITY,t)},e.prototype.setVisible=function(t){this.set(o.Z.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(o.Z.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(r.Z)},734:(t,e,n)=>{"use strict";n.r(e),n.d(e,{GroupEvent:()=>y,default:()=>m});var i,r=n(947),o=n(714),s=n(71),a=n(291),l=n(487),u=n(990),h=n(562),c=n(515),p=n(374),f=n(641),d=n(187),g=n(818),_=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),y=function(t){function e(e,n){var i=t.call(this,e)||this;return i.layer=n,i}return _(e,t),e}(a.ZP),v="layers";const m=function(t){function e(e){var n=this,i=e||{},r=(0,p.f0)({},i);delete r.layers;var s=i.layers;return(n=t.call(this,r)||this).on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(v,n.handleLayersChanged_),s?Array.isArray(s)?s=new o.Z(s.slice(),{unique:!0}):(0,c.h)("function"==typeof s.getArray,43):s=new o.Z(void 0,{unique:!0}),n.setLayers(s),n}return _(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(g.bN),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push((0,g.oL)(t,s.Z.ADD,this.handleLayersAdd_,this),(0,g.oL)(t,s.Z.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(g.bN);(0,p.ZH)(this.listenerKeys_);for(var n=t.getArray(),i=0,r=n.length;i<r;i++){var o=n[i];this.registerLayerListeners_(o),this.dispatchEvent(new y("addlayer",o))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[(0,g.oL)(t,u.Z.PROPERTYCHANGE,this.handleLayerChange_,this),(0,g.oL)(t,l.Z.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push((0,g.oL)(t,"addlayer",this.handleLayerGroupAdd_,this),(0,g.oL)(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,d.sq)(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new y("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new y("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new y("addlayer",e)),this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,n=(0,d.sq)(e);this.listenerKeys_[n].forEach(g.bN),delete this.listenerKeys_[n],this.dispatchEvent(new y("removelayer",e)),this.changed()},e.prototype.getLayers=function(){return this.get(v)},e.prototype.setLayers=function(t){var e=this.getLayers();if(e)for(var n=e.getArray(),i=0,r=n.length;i<r;++i)this.dispatchEvent(new y("removelayer",n[i]));this.set(v,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],n=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var i=this.getLayerState(),r=i.zIndex;t||void 0!==i.zIndex||(r=0);for(var o=n,s=e.length;o<s;o++){var a=e[o];a.opacity*=i.opacity,a.visible=a.visible&&i.visible,a.maxResolution=Math.min(a.maxResolution,i.maxResolution),a.minResolution=Math.max(a.minResolution,i.minResolution),a.minZoom=Math.max(a.minZoom,i.minZoom),a.maxZoom=Math.min(a.maxZoom,i.maxZoom),void 0!==i.extent&&(void 0!==a.extent?a.extent=(0,f.Ed)(a.extent,i.extent):a.extent=i.extent),void 0===a.zIndex&&(a.zIndex=r)}return e},e.prototype.getSourceState=function(){return h.Z.READY},e}(r.Z)},912:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},983:(t,e,n)=>{"use strict";function i(t,e,n){return Math.min(Math.max(t,e),n)}n.d(e,{$W:()=>c,GW:()=>d,SV:()=>l,Ux:()=>u,Yr:()=>h,bI:()=>a,f9:()=>r,k3:()=>o,mD:()=>g,rU:()=>s,t7:()=>p,uZ:()=>i});var r="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},o="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function s(t,e,n,i,r,o){var s=r-n,l=o-i;if(0!==s||0!==l){var u=((t-n)*s+(e-i)*l)/(s*s+l*l);u>1?(n=r,i=o):u>0&&(n+=s*u,i+=l*u)}return a(t,e,n,i)}function a(t,e,n,i){var r=n-t,o=i-e;return r*r+o*o}function l(t){for(var e=t.length,n=0;n<e;n++){for(var i=n,r=Math.abs(t[n][n]),o=n+1;o<e;o++){var s=Math.abs(t[o][n]);s>r&&(r=s,i=o)}if(0===r)return null;var a=t[i];t[i]=t[n],t[n]=a;for(var l=n+1;l<e;l++)for(var u=-t[l][n]/t[n][n],h=n;h<e+1;h++)n==h?t[l][h]=0:t[l][h]+=u*t[n][h]}for(var c=new Array(e),p=e-1;p>=0;p--){c[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*c[p]}return c}function u(t){return 180*t/Math.PI}function h(t){return t*Math.PI/180}function c(t,e){var n=t%e;return n*e<0?n+e:n}function p(t,e,n){return t+n*(e-t)}function f(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function d(t,e){return Math.floor(f(t,e))}function g(t,e){return Math.ceil(f(t,e))}},374:(t,e,n)=>{"use strict";n.d(e,{KX:()=>o,ZH:()=>r,f0:()=>i,xb:()=>s});var i="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),i=1,r=arguments.length;i<r;++i){var o=arguments[i];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(n[s]=o[s])}return n};function r(t){for(var e in t)delete t[e]}var o="function"==typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e};function s(t){var e;for(e in t)return!1;return!e}},562:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},187:(t,e,n)=>{"use strict";function i(){return function(){throw new Error("Unimplemented abstract method.")}()}n.d(e,{O3:()=>i,q4:()=>s,sq:()=>o});var r=0;function o(t){return t.ol_uid||(t.ol_uid=String(++r))}var s="6.14.1"}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={id:i,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0,(()=>{"use strict";var t=n(379),e=n.n(t),i=n(788);e()(i.Z,{insert:"head",singleton:!1}),i.Z.locals;var r=n(779);e()(r.Z,{insert:"head",singleton:!1}),r.Z.locals;var o,s=n(431),a=n(885),l=n(187),u=n(177),h=n(515);function c(t,e){var n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e}function p(t,e,n,i,r,o,s,a){var l=Math.sin(o),u=Math.cos(o);return t[0]=i*u,t[1]=r*l,t[2]=-i*l,t[3]=r*u,t[4]=s*i*u-a*i*l+e,t[5]=s*r*l+a*r*u+n,t}function f(t,e){var n,i=(n=e)[0]*n[3]-n[1]*n[2];(0,h.h)(0!==i,32);var r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];return t[0]=a/i,t[1]=-o/i,t[2]=-s/i,t[3]=r/i,t[4]=(s*u-a*l)/i,t[5]=-(r*u-o*l)/i,t}function d(t){var e="matrix("+t.join(", ")+")";if(u.Id)return e;var n=o||(o=document.createElement("div"));return n.style.transform=e,n.style.transform}new Array(6);var g=n(641),_=n(983),y=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,v=/^([a-z]*)$|^hsla?\(.*\)$/i;function m(t){return"string"==typeof t?t:E(t)}var x=function(){var t={},e=0;return function(n){var i;if(t.hasOwnProperty(n))i=t[n];else{if(e>=1024){var r=0;for(var o in t)0==(3&r++)&&(delete t[o],--e)}i=function(t){var e,n,i,r,o;if(v.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}(t)),y.exec(t)){var s,a=t.length-1;s=a<=4?1:2;var l=4===a||8===a;e=parseInt(t.substr(1+0*s,s),16),n=parseInt(t.substr(1+1*s,s),16),i=parseInt(t.substr(1+2*s,s),16),r=l?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,l&&(r=(r<<4)+r)),o=[e,n,i,r/255]}else 0==t.indexOf("rgba(")?b(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),b(o)):(0,h.h)(!1,14);return o}(n),t[n]=i,++e}return i}}();function w(t){return Array.isArray(t)?t:x(t)}function b(t){return t[0]=(0,_.uZ)(t[0]+.5|0,0,255),t[1]=(0,_.uZ)(t[1]+.5|0,0,255),t[2]=(0,_.uZ)(t[2]+.5|0,0,255),t[3]=(0,_.uZ)(t[3],0,1),t}function E(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var i=t[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+e+","+n+","+i+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function S(t,e,n){return e+":"+t+":"+(n?m(n):"null")}var C=new(function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var i=S(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var r=S(t,e,n);this.cache_[r]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}()),T=n(947),O=n(487),R=n(912);const I="precompose",P="rendercomplete";var L,A=n(562),M=n(374),F=n(818),k=(L=function(t,e){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},L(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}L(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),D=function(t){function e(e){var n=this,i=(0,M.f0)({},e);delete i.source,(n=t.call(this,i)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(R.Z.SOURCE,n.handleSourcePropertyChange_);var r=e.source?e.source:null;return n.setSource(r),n}return k(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(R.Z.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():A.Z.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,F.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=(0,F.oL)(t,O.Z.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(R.Z.MAP,t)},e.prototype.getMapInternal=function(){return this.get(R.Z.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&((0,F.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,F.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,F.oL)(t,I,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);(0,h.h)(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=(0,F.oL)(this,O.Z.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(R.Z.SOURCE,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(T.Z);function j(t,e){if(!t.visible)return!1;var n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}const Z=D;function N(t,e){for(var n=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function G(t,e){var n=Math.cos(e),i=Math.sin(e),r=t[0]*n-t[1]*i,o=t[1]*n+t[0]*i;return t[0]=r,t[1]=o,t}function z(t,e){if(e.canWrapX()){var n=(0,g.dz)(e.getExtent()),i=function(t,e,n){var i=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){var o=n||(0,g.dz)(i);r=Math.floor((t[0]-i[0])/o)}return r}(t,e,n);i&&(t[0]-=i*n)}return t}var W=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),X=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return W(e,t),e.prototype.dispatchRenderEvent=function(t,e){(0,l.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;p(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),f(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r,o,s,a){var l,u=e.viewState;function h(t,e,n,i){return r.call(o,e,t?n:null,i)}var c=u.projection,p=z(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&i){var d=c.getExtent(),_=(0,g.dz)(d);f.push([-_,0],[_,0])}for(var y=e.layerStatesArray,v=y.length,m=[],x=[],w=0;w<f.length;w++)for(var b=v-1;b>=0;--b){var E=y[b],S=E.layer;if(S.hasRenderer()&&j(E,u)&&s.call(a,S)){var C=S.getRenderer(),T=S.getSource();if(C&&T){var O=T.getWrapX()?p:t,R=h.bind(null,E.managed);x[0]=O[0]+f[w][0],x[1]=O[1]+f[w][1],l=C.forEachFeatureAtCoordinate(x,e,n,R,m)}if(l)return l}}if(0!==m.length){var I=1/m.length;return m.forEach((function(t,e){return t.distanceSq+=e*I})),m.sort((function(t,e){return t.distanceSq-e.distanceSq})),m.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,n,i,r){return(0,l.O3)()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,i,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,i,a.uX,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,l.O3)()},e.prototype.scheduleExpireIconCache=function(t){C.canExpireCache()&&t.postRenderFunctions.push(V)},e}(s.Z);function V(t,e){C.expire()}const Y=X;var K=n(990),B=n(291),U=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const H=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.inversePixelTransform=n,o.frameState=i,o.context=r,o}return U(e,t),e}(B.ZP);var q="ol-hidden",J="ol-unsupported",Q="ol-control",$=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),tt=["style","variant","weight","size","lineHeight","family"],et=function(t){var e=t.match($);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,r=tt.length;i<r;++i){var o=e[i+1];void 0!==o&&(n[tt[i]]=o)}return n.families=n.family.split(/,\s?/),n};function nt(t){return 1===t?"":String(Math.round(100*t)/100)}var it=n(971),rt=n(208),ot=n(326),st="10px sans-serif",at="#000",lt="round",ut=[],ht="round",ct="#000",pt="center",ft="middle",dt=[0,0,0,0],gt=new it.Z;(new rt.Z).setSize=function(){console.warn("labelCache is deprecated.")};var _t,yt,vt=null,mt={},xt=function(){var t,e,n="32px ",i=["monospace","serif"],r=i.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,u=0;u<r;++u){var h=i[u];if(e=Et(t+" "+s+" "+n+h,o),a!=h){var c=Et(t+" "+s+" "+n+a+","+h,o);l=l&&c!=e}}return!!l}function a(){for(var e=!0,n=gt.getKeys(),i=0,r=n.length;i<r;++i){var o=n[i];gt.get(o)<100&&(s.apply(this,o.split("\n"))?((0,M.ZH)(mt),vt=null,_t=void 0,gt.set(o,100)):(gt.set(o,gt.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var n=et(e);if(n)for(var i=n.families,r=0,o=i.length;r<o;++r){var l=i[r],u=n.style+"\n"+n.weight+"\n"+l;void 0===gt.get(u)&&(gt.set(u,100,!0),s(n.style,n.weight,l)||(gt.set(u,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),wt=function(t){var e=mt[t];if(null==e){if(u.Id){var n=et(t),i=bt(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else yt||((yt=document.createElement("div")).innerHTML="M",yt.style.minHeight="0",yt.style.maxHeight="none",yt.style.height="auto",yt.style.padding="0",yt.style.border="none",yt.style.position="absolute",yt.style.display="block",yt.style.left="-99999px"),yt.style.font=t,document.body.appendChild(yt),e=yt.offsetHeight,document.body.removeChild(yt);mt[t]=e}return e};function bt(t,e){return vt||(vt=(0,ot.E4)(1,1)),t!=_t&&(vt.font=t,_t=vt.font),vt.measureText(e)}function Et(t,e){return bt(t,e).width}function St(t,e,n){if(e in n)return n[e];var i=Et(t,e);return n[e]=i,i}var Ct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tt=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=(0,F.oL)(gt,K.Z.PROPERTYCHANGE,e.redrawText.bind(e)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className="ol-unselectable ol-layers";var r=e.getViewport();return r.insertBefore(n.element_,r.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return Ct(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var i=new H(t,void 0,e);n.dispatchEvent(i)}},e.prototype.disposeInternal=function(){(0,F.bN)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(I,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var i=[],r=null,o=0,s=e.length;o<s;++o){var a=e[o];t.layerIndex=o;var l=a.layer,u=l.getSourceState();if(!j(a,n)||u!=A.Z.READY&&u!=A.Z.UNDEFINED)l.unrender();else{var h=l.render(t,r);h&&(h!==r&&(this.children_.push(h),r=h),"getDeclutter"in l&&i.push(l))}}for(o=i.length-1;o>=0;--o)i[o].renderDeclutter(t);(0,ot.hF)(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,n,i,r){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],u=l.layer;if(u.hasRenderer()&&j(l,o)&&r(u)){var h=u.getRenderer().getDataAtPixel(t,e,n);if(h){var c=i(u,h);if(c)return c}}}},e}(Y);const Ot=Tt;var Rt=n(714),It=n(71),Pt=n(734),Lt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),At=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.map=n,r.frameState=void 0!==i?i:null,r}return Lt(e,t),e}(B.ZP);const Mt=At;var Ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kt=function(t){function e(e,n,i,r,o){var s=t.call(this,e,n,o)||this;return s.originalEvent=i,s.pixel_=null,s.coordinate_=null,s.dragging=void 0!==r&&r,s}return Ft(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(Mt);const Dt=kt,jt={SINGLECLICK:"singleclick",CLICK:O.Z.CLICK,DBLCLICK:O.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Zt="pointerdown";var Nt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gt=function(t){function e(e,n){var i=t.call(this,e)||this;i.map_=e,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=void 0===n?1:n,i.down_=null;var r=i.map_.getViewport();return i.activePointers_=0,i.trackedTouches_={},i.element_=r,i.pointerdownListenerKey_=(0,F.oL)(r,Zt,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=(0,F.oL)(r,"pointermove",i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(O.Z.TOUCHMOVE,i.boundHandleTouchMove_,!!u.bM&&{passive:!1}),i}return Nt(e,t),e.prototype.emulateClick_=function(t){var e=new Dt(jt.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Dt(jt.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new Dt(jt.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==jt.POINTERUP||e.type==jt.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==jt.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new Dt(jt.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(F.bN),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new Dt(jt.POINTERDOWN,this.map_,t);for(var n in this.dispatchEvent(e),this.down_={},t){var i=t[n];this.down_[n]="function"==typeof i?a.Zn:i}if(0===this.dragListenerKeys_.length){var r=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,F.oL)(r,jt.POINTERMOVE,this.handlePointerMove_,this),(0,F.oL)(r,jt.POINTERUP,this.handlePointerUp_,this),(0,F.oL)(this.element_,jt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==r&&this.dragListenerKeys_.push((0,F.oL)(this.element_.getRootNode(),jt.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new Dt(jt.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Dt(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&((0,F.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(O.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,F.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(F.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(rt.Z);const zt=Gt;var Wt=n(126);const Xt="layergroup",Vt="size",Yt="target",Kt="view";var Bt=1/0;const Ut=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,(0,M.ZH)(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},t.prototype.enqueue=function(t){(0,h.h)(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Bt&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,i=e.length,r=e[t],o=n[t],s=t;t<i>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=l<i&&n[l]<n[a]?l:a;e[t]=e[u],n[t]=n[u],t=u}e[t]=r,n[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var n=this.elements_,i=this.priorities_,r=n[e],o=i[e];e>t;){var s=this.getParentIndex_(e);if(!(i[s]>o))break;n[e]=n[s],i[e]=i[s],e=s}n[e]=r,i[e]=o},t.prototype.reprioritize=function(){var t,e,n,i=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e<a;++e)(n=i(t=r[e]))==Bt?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=n,r[s++]=t);r.length=s,o.length=s,this.heapify_()},t}();var Ht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const qt=function(t){function e(e,n){var i=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=n,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return Ht(e,t),e.prototype.enqueue=function(e){var n=t.prototype.enqueue.call(this,e);return n&&e[0].addEventListener(O.Z.CHANGE,this.boundHandleTileChange_),n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,n=e.getState();if(2===n||3===n||4===n){e.removeEventListener(O.Z.CHANGE,this.boundHandleTileChange_);var i=e.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var n,i,r=0;this.tilesLoading_<t&&r<e&&this.getCount()>0;)i=(n=this.dequeue()[0]).getKey(),0!==n.getState()||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++r,n.load())},e}(Ut),Jt="Point",Qt="LineString",$t="Polygon",te="MultiPoint",ee="MultiLineString",ne="MultiPolygon",ie="GeometryCollection",re="Circle";var oe={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},se={};se[oe.RADIANS]=6370997/(2*Math.PI),se[oe.DEGREES]=2*Math.PI*6370997/360,se[oe.FEET]=.3048,se[oe.METERS]=1,se[oe.USFEET]=1200/3937;const ae=oe,le={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var ue=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||se[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();const he=ue;var ce=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pe=6378137,fe=Math.PI*pe,de=[-fe,-fe,fe,fe],ge=[-180,-85,180,85],_e=pe*Math.log(Math.tan(Math.PI/2)),ye=function(t){function e(e){return t.call(this,{code:e,units:ae.METERS,extent:de,global:!0,worldExtent:ge,getPointResolution:function(t,e){return t/(0,_.f9)(e[1]/pe)}})||this}return ce(e,t),e}(he),ve=[new ye("EPSG:3857"),new ye("EPSG:102100"),new ye("EPSG:102113"),new ye("EPSG:900913"),new ye("http://www.opengis.net/def/crs/EPSG/0/3857"),new ye("http://www.opengis.net/gml/srs/epsg.xml#3857")];var me=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xe=[-180,-90,180,90],we=6378137*Math.PI/180,be=function(t){function e(e,n){return t.call(this,{code:e,units:ae.DEGREES,extent:xe,axisOrientation:n,global:!0,metersPerUnit:we,worldExtent:xe})||this}return me(e,t),e}(he),Ee=[new be("CRS:84"),new be("EPSG:4326","neu"),new be("urn:ogc:def:crs:OGC:1.3:CRS84"),new be("urn:ogc:def:crs:OGC:2:84"),new be("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new be("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new be("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],Se={},Ce={};function Te(t,e,n){var i=t.getCode(),r=e.getCode();i in Ce||(Ce[i]={}),Ce[i][r]=n}var Oe=6371008.8;function Re(t,e,n){var i=n||Oe,r=(0,_.Yr)(t[1]),o=(0,_.Yr)(e[1]),s=(o-r)/2,a=(0,_.Yr)(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function Ie(t,e,n,i){var r=i||Oe,o=(0,_.Yr)(t[1]),s=(0,_.Yr)(t[0]),a=e/r,l=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(n)),u=s+Math.atan2(Math.sin(n)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(l));return[(0,_.Ux)(u),(0,_.Ux)(l)]}var Pe=!0;function Le(t){Pe=!(void 0===t||t)}function Ae(t,e,n){var i;if(void 0!==e){for(var r=0,o=t.length;r<o;++r)e[r]=t[r];i=e}else i=t.slice();return i}function Me(t,e,n){if(void 0!==e&&t!==e){for(var i=0,r=t.length;i<r;++i)e[i]=t[i];t=e}return t}function Fe(t){!function(t,e){Se[t]=e}(t.getCode(),t),Te(t,t,Ae)}function ke(t){return"string"==typeof t?Se[e=t]||Se[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function De(t,e,n,i){var r,o=(t=ke(t)).getPointResolutionFunc();if(o)r=o(e,n),i&&i!==t.getUnits()&&(a=t.getMetersPerUnit())&&(r=r*a/se[i]);else{var s=t.getUnits();if(s==ae.DEGREES&&!i||i==ae.DEGREES)r=e;else{var a,l=Ge(t,ke("EPSG:4326"));if(l===Me&&s!==ae.DEGREES)r=e*t.getMetersPerUnit();else{var u=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];r=(Re((u=l(u,u,2)).slice(0,2),u.slice(2,4))+Re(u.slice(4,6),u.slice(6,8)))/2}void 0!==(a=i?se[i]:t.getMetersPerUnit())&&(r/=a)}}return r}function je(t){!function(t){t.forEach(Fe)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Te(e,t,Ae)}))}))}function Ze(t,e){return t?"string"==typeof t?ke(t):t:ke(e)}function Ne(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Ge(t,e)===Ae)&&n}function Ge(t,e){var n=function(t,e){var n;return t in Ce&&e in Ce[t]&&(n=Ce[t][e]),n}(t.getCode(),e.getCode());return n||(n=Me),n}function ze(t,e){return Ge(ke(t),ke(e))}function We(t,e,n){return ze(e,n)(t,void 0,t.length)}function Xe(t,e,n,i){var r=ze(e,n);return(0,g.Ne)(t,r,void 0,i)}var Ve,Ye,Ke,Be=null;function Ue(){return Be}function He(t,e){return t}function qe(t,e){return Pe&&!N(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Pe=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function Je(t,e){return t}function Qe(t,e){return t}function $e(t,e){return t}function tn(t,e,n){return function(i,r,o,s,a){if(i){if(!r&&!e)return i;var l=e?0:o[0]*r,u=e?0:o[1]*r,h=a?a[0]:0,c=a?a[1]:0,p=t[0]+l/2+h,f=t[2]-l/2+h,d=t[1]+u/2+c,g=t[3]-u/2+c;p>f&&(f=p=(f+p)/2),d>g&&(g=d=(g+d)/2);var y=(0,_.uZ)(i[0],p,f),v=(0,_.uZ)(i[1],d,g);if(s&&n&&r){var m=30*r;y+=-m*Math.log(1+Math.max(0,p-i[0])/m)+m*Math.log(1+Math.max(0,i[0]-f)/m),v+=-m*Math.log(1+Math.max(0,d-i[1])/m)+m*Math.log(1+Math.max(0,i[1]-g)/m)}return[y,v]}}}function en(t){return t}je(ve),je(Ee),Ve=ve,Ye=function(t,e,n){var i=t.length,r=n>1?n:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(i));for(var s=0;s<i;s+=r){o[s]=fe*t[s]/180;var a=pe*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>_e?a=_e:a<-_e&&(a=-_e),o[s+1]=a}return o},Ke=function(t,e,n){var i=t.length,r=n>1?n:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(i));for(var s=0;s<i;s+=r)o[s]=180*t[s]/fe,o[s+1]=360*Math.atan(Math.exp(t[s+1]/pe))/Math.PI-90;return o},Ee.forEach((function(t){Ve.forEach((function(e){Te(t,e,Ye),Te(e,t,Ke)}))}));var nn=n(537);function rn(t,e,n,i){var r=(0,g.dz)(e)/n[0],o=(0,g.Cr)(e)/n[1];return i?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function on(t,e,n){var i=Math.min(t,e);return i*=Math.log(1+50*Math.max(0,t/e-1))/50+1,n&&(i=Math.max(i,n),i/=Math.log(1+50*Math.max(0,n/t-1))/50+1),(0,_.uZ)(i,n/2,2*e)}function sn(t,e,n,i,r){return function(o,s,a,l){if(void 0!==o){var u=i?rn(t,i,a,r):t;return(void 0===n||n)&&l?on(o,u,e):(0,_.uZ)(o,e,u)}}}function an(t){return void 0!==t?0:void 0}function ln(t){return void 0!==t?t:void 0}function un(t){return Math.pow(t,3)}function hn(t){return 1-un(1-t)}function cn(t){return 3*t*t-2*t*t*t}function pn(t){return t}const fn="XY",dn="XYZM";function gn(t,e,n,i,r,o){for(var s=o||[],a=0,l=e;l<n;l+=i){var u=t[l],h=t[l+1];s[a++]=r[0]*u+r[2]*h+r[4],s[a++]=r[1]*u+r[3]*h+r[5]}return o&&s.length!=a&&(s.length=a),s}function _n(t,e,n,i,r,o,s){for(var a=s||[],l=Math.cos(r),u=Math.sin(r),h=o[0],c=o[1],p=0,f=e;f<n;f+=i){var d=t[f]-h,g=t[f+1]-c;a[p++]=h+d*l-g*u,a[p++]=c+d*u+g*l;for(var _=f+2;_<f+i;++_)a[p++]=t[_]}return s&&a.length!=p&&(a.length=p),a}var yn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vn=[1,0,0,1,0,0],mn=function(t){function e(){var e=t.call(this)||this;return e.extent_=(0,g.lJ)(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=(0,a.qe)((function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(e)})),e}return yn(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return(0,l.O3)()},e.prototype.closestPointXY=function(t,e,n,i){return(0,l.O3)()},e.prototype.containsXY=function(t,e){var n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e},e.prototype.getClosestPoint=function(t,e){var n=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],n,1/0),n},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return(0,l.O3)()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&(0,g.YN)(e),this.extentRevision_=this.getRevision()}return(0,g.EO)(this.extent_,t)},e.prototype.rotate=function(t,e){(0,l.O3)()},e.prototype.scale=function(t,e,n){(0,l.O3)()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return(0,l.O3)()},e.prototype.getType=function(){return(0,l.O3)()},e.prototype.applyTransform=function(t){(0,l.O3)()},e.prototype.intersectsExtent=function(t){return(0,l.O3)()},e.prototype.translate=function(t,e){(0,l.O3)()},e.prototype.transform=function(t,e){var n=ke(t),i=n.getUnits()==ae.TILE_PIXELS?function(t,i,r){var o=n.getExtent(),s=n.getWorldExtent(),a=(0,g.Cr)(s)/(0,g.Cr)(o);return p(vn,s[0],s[3],a,-a,0,0,0),gn(t,0,t.length,r,vn,i),ze(n,e)(t,i,r)}:ze(n,e);return this.applyTransform(i),this},e}(it.Z);const xn=mn;var wn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),bn=function(t){function e(){var e=t.call(this)||this;return e.layout=fn,e.stride=2,e.flatCoordinates=null,e}return wn(e,t),e.prototype.computeExtent=function(t){return(0,g.GN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return(0,l.O3)()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=En(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){(0,l.O3)()},e.prototype.setLayout=function(t,e,n){var i;if(t)i=En(t);else{for(var r=0;r<n;++r){if(0===e.length)return this.layout=fn,void(this.stride=2);e=e[0]}t=function(t){var e;return 2==t?e=fn:3==t?e="XYZ":4==t&&(e=dn),e}(i=e.length)}this.layout=t,this.stride=i},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();_n(n,0,n.length,i,t,e,n),this.changed()}},e.prototype.scale=function(t,e,n){var i=e;void 0===i&&(i=t);var r=n;r||(r=(0,g.qg)(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,n,i,r,o,s,a){for(var l=a||[],u=s[0],h=s[1],c=0,p=0;p<n;p+=i){var f=t[p]-u,d=t[p+1]-h;l[c++]=u+r*f,l[c++]=h+o*d;for(var g=p+2;g<p+i;++g)l[c++]=t[g]}a&&l.length!=c&&(l.length=c)}(o,0,o.length,s,t,i,r,o),this.changed()}},e.prototype.translate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();!function(t,e,n,i,r,o,s){for(var a=s||[],l=0,u=0;u<n;u+=i){a[l++]=t[u]+r,a[l++]=t[u+1]+o;for(var h=u+2;h<u+i;++h)a[l++]=t[h]}s&&a.length!=l&&(a.length=l)}(n,0,n.length,i,t,e,n),this.changed()}},e}(xn);function En(t){var e;return t==fn?e=2:"XYZ"==t||"XYM"==t?e=3:t==dn&&(e=4),e}const Sn=bn;function Cn(t,e,n,i,r,o,s){var a,l=t[e],u=t[e+1],h=t[n]-l,c=t[n+1]-u;if(0===h&&0===c)a=e;else{var p=((r-l)*h+(o-u)*c)/(h*h+c*c);if(p>1)a=n;else{if(p>0){for(var f=0;f<i;++f)s[f]=(0,_.t7)(t[e+f],t[n+f],p);return void(s.length=i)}a=e}}for(f=0;f<i;++f)s[f]=t[a+f];s.length=i}function Tn(t,e,n,i,r){var o=t[e],s=t[e+1];for(e+=i;e<n;e+=i){var a=t[e],l=t[e+1],u=(0,_.bI)(o,s,a,l);u>r&&(r=u),o=a,s=l}return r}function On(t,e,n,i,r,o,s,a,l,u,h){if(e==n)return u;var c,p;if(0===r){if((p=(0,_.bI)(s,a,t[e],t[e+1]))<u){for(c=0;c<i;++c)l[c]=t[e+c];return l.length=i,p}return u}for(var f=h||[NaN,NaN],d=e+i;d<n;)if(Cn(t,d-i,d,i,s,a,f),(p=(0,_.bI)(s,a,f[0],f[1]))<u){for(u=p,c=0;c<i;++c)l[c]=f[c];l.length=i,d+=i}else d+=i*Math.max((Math.sqrt(p)-Math.sqrt(u))/r|0,1);if(o&&(Cn(t,n-i,e,i,s,a,f),(p=(0,_.bI)(s,a,f[0],f[1]))<u)){for(u=p,c=0;c<i;++c)l[c]=f[c];l.length=i}return u}function Rn(t,e,n,i){for(var r=0,o=n.length;r<o;++r)for(var s=n[r],a=0;a<i;++a)t[e++]=s[a];return e}function In(t,e){return e*Math.round(t/e)}function Pn(t,e,n,i,r,o,s){if(e==n)return s;var a,l,u=In(t[e],r),h=In(t[e+1],r);e+=i,o[s++]=u,o[s++]=h;do{if(a=In(t[e],r),l=In(t[e+1],r),(e+=i)==n)return o[s++]=a,o[s++]=l,s}while(a==u&&l==h);for(;e<n;){var c=In(t[e],r),p=In(t[e+1],r);if(e+=i,c!=a||p!=l){var f=a-u,d=l-h,g=c-u,_=p-h;f*_==d*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(d<0&&_<d||d==_||d>0&&_>d)?(a=c,l=p):(o[s++]=a,o[s++]=l,u=a,h=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function Ln(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=e;a<n;a+=i)o[s++]=t.slice(a,a+i);return o.length=s,o}function An(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=0,l=n.length;a<l;++a){var u=n[a];o[s++]=Ln(t,e,u,i,o[s]),e=u}return o.length=s,o}function Mn(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=0,l=n.length;a<l;++a){var u=n[a];o[s++]=An(t,e,u,i,o[s]),e=u[u.length-1]}return o.length=s,o}function Fn(t,e,n,i){for(var r=0,o=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];r+=s*a-o*l,o=a,s=l}return r/2}var kn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Dn=function(t){function e(e,n){var i=t.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?i.setCoordinates(e,n):i.setFlatCoordinates(n,e),i}return kn(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,n,i){return i<(0,g.qf)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),On(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.getArea=function(){return Fn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return Ln(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=function(t,e,n,i,r,o,s){var a=(n-e)/i;if(a<3){for(;e<n;e+=i)o[s++]=t[e],o[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var u=[e,n-i],h=0;u.length>0;){for(var c=u.pop(),p=u.pop(),f=0,d=t[p],g=t[p+1],y=t[c],v=t[c+1],m=p+i;m<c;m+=i){var x=t[m],w=t[m+1],b=(0,_.rU)(x,w,d,g,y,v);b>f&&(h=m,f=b)}f>r&&(l[(h-e)/i]=1,p+i<h&&u.push(p,h),h+i<c&&u.push(h,c))}for(m=0;m<a;++m)l[m]&&(o[s++]=t[e+m*i],o[s++]=t[e+m*i+1]);return s}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,fn)},e.prototype.getType=function(){return"LinearRing"},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Rn(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Sn);const jn=Dn;var Zn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Nn=function(t){function e(e,n){var i=t.call(this)||this;return i.setCoordinates(e,n),i}return Zn(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){var r=this.flatCoordinates,o=(0,_.bI)(t,e,r[0],r[1]);if(o<i){for(var s=this.stride,a=0;a<s;++a)n[a]=r[a];return n.length=s,o}return i},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return(0,g.HK)(this.flatCoordinates,t)},e.prototype.getType=function(){return Jt},e.prototype.intersectsExtent=function(t){return(0,g.jE)(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,n,i){for(var r=0,o=n.length;r<o;++r)t[e++]=n[r];return e}(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Sn);const Gn=Nn;function zn(t,e,n,i,r){return!(0,g.H6)(r,(function(r){return!Wn(t,e,n,i,r[0],r[1])}))}function Wn(t,e,n,i,r,o){for(var s=0,a=t[n-i],l=t[n-i+1];e<n;e+=i){var u=t[e],h=t[e+1];l<=o?h>o&&(u-a)*(o-l)-(r-a)*(h-l)>0&&s++:h<=o&&(u-a)*(o-l)-(r-a)*(h-l)<0&&s--,a=u,l=h}return 0!==s}function Xn(t,e,n,i,r,o){if(0===n.length)return!1;if(!Wn(t,e,n[0],i,r,o))return!1;for(var s=1,a=n.length;s<a;++s)if(Wn(t,n[s-1],n[s],i,r,o))return!1;return!0}function Vn(t,e,n,i,r){var o=(0,g.qP)((0,g.lJ)(),t,e,n,i);return!!(0,g.kK)(r,o)&&(!!(0,g.r4)(r,o)||o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]||function(t,e,n,i,o){var s,a,l;for(e+=i;e<n;e+=i)if(a=t.slice(e-i,e),l=t.slice(e,e+i),s=(0,g.I7)(r,a,l))return s;return!1}(t,e,n,i))}function Yn(t,e,n,i){for(;e<n-i;){for(var r=0;r<i;++r){var o=t[e+r];t[e+r]=t[n-i+r],t[n-i+r]=o}e+=i,n-=i}}function Kn(t,e,n,i){for(var r=0,o=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];r+=(a-o)*(l+s),o=a,s=l}return 0===r?void 0:r>0}function Bn(t,e,n,i,r){for(var o=void 0!==r&&r,s=0,a=n.length;s<a;++s){var l=n[s],u=Kn(t,e,l,i);(0===s?o&&u||!o&&!u:o&&!u||!o&&u)&&Yn(t,e,l,i),e=l}return e}var Un=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hn=function(t){function e(e,n,i){var r=t.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==n&&i?(r.setFlatCoordinates(n,e),r.ends_=i):r.setCoordinates(e,n),r}return Un(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,nn.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){return i<(0,g.qf)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,n,i,r){for(var o=0,s=n.length;o<s;++o){var a=n[o];r=Tn(t,e,a,i,r),e=a}return r}(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,n,i,r,o,s,a,l,u,h){for(var c=h||[NaN,NaN],p=0,f=n.length;p<f;++p){var d=n[p];u=On(t,e,d,i,r,o,s,a,l,u,c),e=d}return u}(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.containsXY=function(t,e){return Xn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,n,i){for(var r=0,o=0,s=n.length;o<s;++o){var a=n[o];r+=Fn(t,e,a,i),e=a}return r}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Bn(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,An(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=(0,g.qg)(this.getExtent());this.flatInteriorPoint_=function(t,e,n,i,r,o,s){for(var a,l,u,h,c,p,f,d=r[o+1],g=[],_=0,y=n.length;_<y;++_){var v=n[_];for(h=t[v-i],p=t[v-i+1],a=e;a<v;a+=i)c=t[a],f=t[a+1],(d<=p&&f<=d||p<=d&&d<=f)&&(u=(d-p)/(f-p)*(c-h)+h,g.push(u)),h=c,p=f}var m=NaN,x=-1/0;for(g.sort(nn.kK),h=g[0],a=1,l=g.length;a<l;++a){c=g[a];var w=Math.abs(c-h);w>x&&Xn(t,e,n,i,u=(h+c)/2,d)&&(m=u,x=w),h=c}return isNaN(m)&&(m=r[o]),s?(s.push(m,d,x),s):[m,d,x]}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new Gn(this.getFlatInteriorPoint(),"XYM")},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new jn(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.ends_,i=[],r=0,o=0,s=n.length;o<s;++o){var a=n[o],l=new jn(e.slice(r,a),t);i.push(l),r=a}return i},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,n,i,r){for(var o=void 0!==r&&r,s=0,a=n.length;s<a;++s){var l=n[s],u=Kn(t,e,l,i);if(0===s){if(o&&u||!o&&!u)return!1}else if(o&&!u||!o&&u)return!1;e=l}return!0}(t,0,this.ends_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Bn(this.orientedFlatCoordinates_,0,this.ends_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=function(t,e,n,i,r,o,s,a){for(var l=0,u=n.length;l<u;++l){var h=n[l];s=Pn(t,e,h,i,r,o,s),a.push(s),e=h}return s}(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,i),new e(n,fn,i)},e.prototype.getType=function(){return $t},e.prototype.intersectsExtent=function(t){return function(t,e,n,i,r){if(!function(t,e,n,i,r){return!!(Vn(t,e,n,i,r)||Wn(t,e,n,i,r[0],r[1])||Wn(t,e,n,i,r[0],r[3])||Wn(t,e,n,i,r[2],r[1])||Wn(t,e,n,i,r[2],r[3]))}(t,e,n[0],i,r))return!1;if(1===n.length)return!0;for(var o=1,s=n.length;o<s;++o)if(zn(t,n[o-1],n[o],i,r)&&!Vn(t,n[o-1],n[o],i,r))return!1;return!0}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=function(t,e,n,i,r){for(var o=r||[],s=0,a=0,l=n.length;a<l;++a){var u=Rn(t,e,n[a],i);o[s++]=u,e=u}return o.length=s,o}(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},e}(Sn);const qn=Hn;function Jn(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=[e,n,e,r,i,r,i,n,e,n];return new Hn(o,fn,[o.length])}var Qn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$n=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=(0,M.f0)({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=Ze(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,i.projection&&Le(),i.center&&(i.center=qe(i.center,n.projection_)),i.extent&&(i.extent=Qe(i.extent,n.projection_)),n.applyOptions_(i),n}return Qn(e,t),e.prototype.applyOptions_=function(t){var e=(0,M.f0)({},t);for(var n in le)delete e[n];this.setProperties(e,!0);var i=function(t){var e,n,i,r=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,l=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,h=Ze(t.projection,"EPSG:3857"),c=h.getExtent(),p=t.constrainOnlyCenter,f=t.extent;if(a||f||!h.isGlobal()||(p=!1,f=c),void 0!==t.resolutions){var d=t.resolutions;n=d[r],i=void 0!==d[o]?d[o]:d[d.length-1],e=t.constrainResolution?function(t,e,n,i){return function(r,o,s,a){if(void 0!==r){var l=t[0],u=t[t.length-1],h=n?rn(l,n,s,i):l;if(a)return void 0===e||e?on(r,h,u):(0,_.uZ)(r,u,h);var c=Math.min(h,r),p=Math.floor((0,nn.h7)(t,c,o));return t[p]>h&&p<t.length-1?t[p+1]:t[p]}}}(d,l,!p&&f,u):sn(n,i,l,!p&&f,u)}else{var y=(c?Math.max((0,g.dz)(c),(0,g.Cr)(c)):360*se[ae.DEGREES]/h.getMetersPerUnit())/256/Math.pow(2,0),v=y/Math.pow(2,28);void 0!==(n=t.maxResolution)?r=0:n=y/Math.pow(s,r),void 0===(i=t.minResolution)&&(i=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(s,o):y/Math.pow(s,o):v),o=r+Math.floor(Math.log(n/i)/Math.log(s)),i=n/Math.pow(s,o-r),e=t.constrainResolution?function(t,e,n,i,r,o){return function(s,a,l,u){if(void 0!==s){var h=r?rn(e,r,l,o):e,c=void 0!==n?n:0;if(u)return void 0===i||i?on(s,h,c):(0,_.uZ)(s,c,h);var p=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),f=-a*(.5-1e-9)+.5,d=Math.min(h,s),g=Math.floor(Math.log(e/d)/Math.log(t)+f),y=Math.max(p,g),v=e/Math.pow(t,y);return(0,_.uZ)(v,c,h)}}}(s,n,i,l,!p&&f,u):sn(n,i,l,!p&&f,u)}return{constraint:e,maxResolution:n,minResolution:i,minZoom:r,zoomFactor:s}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;var r=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return tn(t.extent,t.constrainOnlyCenter,e)}var n=Ze(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&n.isGlobal()){var i=n.getExtent().slice();return i[0]=-1/0,i[2]=1/0,tn(i,!1,!1)}return en}(t),o=i.constraint,s=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(r=(0,_.Yr)(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=r?0:t:void 0}):!1===e?ln:"number"==typeof e?(n=e,i=2*Math.PI/n,function(t,e){return e?t:void 0!==t?t=Math.floor(t/i+.5)*i:void 0}):ln}return an;var n,i,r}(t);this.constraints_={center:r,resolution:o,rotation:s},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var n=this.getCenter();if(n){var i=t||[0,0,0,0];e=e||[0,0,0,0];var r=this.getResolution(),o=r/2*(i[3]-e[3]+e[1]-i[1]),s=r/2*(i[0]-e[0]+e[2]-i[2]);this.setCenterInternal([n[0]+o,n[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),(0,M.f0)({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),n=0;n<e.length;++n){var i=arguments[n];i.center&&((i=(0,M.f0)({},i)).center=qe(i.center,this.getProjection())),i.anchor&&((i=(0,M.f0)({},i)).anchor=qe(i.anchor,this.getProjection())),e[n]=i}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var i=0;i<n&&!this.isDef();++i){var r=arguments[i];r.center&&this.setCenterInternal(r.center),void 0!==r.zoom?this.setZoom(r.zoom):r.resolution&&this.setResolution(r.resolution),void 0!==r.rotation&&this.setRotation(r.rotation)}if(i!==n){for(var o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,u=[];i<n;++i){var h=arguments[i],c={start:o,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||cn,callback:e};if(h.center&&(c.sourceCenter=s,c.targetCenter=h.center.slice(),s=c.targetCenter),void 0!==h.zoom?(c.sourceResolution=a,c.targetResolution=this.getResolutionForZoom(h.zoom),a=c.targetResolution):h.resolution&&(c.sourceResolution=a,c.targetResolution=h.resolution,a=c.targetResolution),void 0!==h.rotation){c.sourceRotation=l;var p=(0,_.$W)(h.rotation-l+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=l+p,l=c.targetRotation}ei(c)?c.complete=!0:o+=c.duration,u.push(c)}this.animations_.push(u),this.setHint(0,1),this.updateAnimations_()}else e&&ti(e,!0)},e.prototype.getAnimating=function(){return this.hints_[0]>0},e.prototype.getInteracting=function(){return this.hints_[1]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(0,-this.hints_[0]);for(var e=0,n=this.animations_.length;e<n;++e){var i=this.animations_[e];if(i[0].callback&&ti(i[0].callback,!1),!t)for(var r=0,o=i.length;r<o;++r){var s=i[r];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,n=this.animations_.length-1;n>=0;--n){for(var i=this.animations_[n],r=!0,o=0,s=i.length;o<s;++o){var a=i[o];if(!a.complete){var l=t-a.start,u=a.duration>0?l/a.duration:1;u>=1?(a.complete=!0,u=1):r=!1;var h=a.easing(u);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],f=a.targetCenter[0],d=a.targetCenter[1];this.nextCenter_=a.targetCenter;var g=c+h*(f-c),y=p+h*(d-p);this.targetCenter_=[g,y]}if(a.sourceResolution&&a.targetResolution){var v=1===h?a.targetResolution:a.sourceResolution+h*(a.targetResolution-a.sourceResolution);if(a.anchor){var m=this.getViewportSize_(this.getRotation()),x=this.constraints_.resolution(v,0,m,!0);this.targetCenter_=this.calculateCenterZoom(x,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=v,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var w=1===h?(0,_.$W)(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+h*(a.targetRotation-a.sourceRotation);if(a.anchor){var b=this.constraints_.rotation(w,!0);this.targetCenter_=this.calculateCenterRotate(b,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=w}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[n]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var E=i[0].callback;E&&ti(E,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var n,i,r,o=this.getCenterInternal();return void 0!==o&&(G(n=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(i=n)[0]+=+r[0],i[1]+=+r[1]),n},e.prototype.calculateCenterZoom=function(t,e){var n,i=this.getCenterInternal(),r=this.getResolution();return void 0!==i&&void 0!==r&&(n=[e[0]-t*(e[0]-i[0])/r,e[1]-t*(e[1]-i[1])/r]),n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],i=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(i*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?He(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(le.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return Je(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();(0,h.h)(n,1);var i=this.getResolution();(0,h.h)(void 0!==i,2);var r=this.getRotation();return(0,h.h)(void 0!==r,3),(0,g.p8)(n,i,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(le.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Qe(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),i=(0,g.dz)(t)/n[0],r=(0,g.Cr)(t)/n[1];return Math.max(i,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/Math.log(e);return function(t){return n/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(le.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/e;return function(t){return Math.log(n/t)/e/r}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),i=this.getCenterInternal(),r=this.padding_;if(r){var o=this.getViewportSizeMinusPadding_();i=ni(i,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,n)}return{center:i.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,n,i=this.minZoom_||0;if(this.resolutions_){var r=(0,nn.h7)(this.resolutions_,t,1);i=r,e=this.resolutions_[r],n=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,n=this.zoomFactor_;return i+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=(0,_.uZ)(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,(0,_.uZ)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if((0,h.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))(0,h.h)(!(0,g.xb)(t),25),n=Jn(i=Qe(t,this.getProjection()));else if(t.getType()===re){var i;(n=Jn(i=Qe(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),(0,g.qg)(i))}else{var r=Ue();n=r?t.clone().transform(r,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),i=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,l=-1/0,u=-1/0,h=0,c=r.length;h<c;h+=o){var p=r[h]*n-r[h+1]*i,f=r[h]*i+r[h+1]*n;s=Math.min(s,p),a=Math.min(a,f),l=Math.max(l,p),u=Math.max(u,f)}return[s,a,l,u]},e.prototype.fitInternal=function(t,e){var n=e||{},i=n.size;i||(i=this.getViewportSizeMinusPadding_());var r,o=void 0!==n.padding?n.padding:[0,0,0,0],s=void 0!==n.nearest&&n.nearest;r=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.getResolutionForZoom(n.maxZoom):0;var l=this.rotatedExtentForGeometry(t),u=this.getResolutionForExtentInternal(l,[i[0]-o[1]-o[3],i[1]-o[0]-o[2]]);u=isNaN(u)?r:Math.max(u,r),u=this.getConstrainedResolution(u,s?0:1);var h=this.getRotation(),c=Math.sin(h),p=Math.cos(h),f=(0,g.qg)(l);f[0]+=(o[1]-o[3])/2*u,f[1]+=(o[0]-o[2])/2*u;var d=f[0]*p-f[1]*c,_=f[1]*p+f[0]*c,y=this.getConstrainedCenter([d,_],u),v=n.callback?n.callback:a.Zn;void 0!==n.duration?this.animateInternal({resolution:u,center:y,duration:n.duration,easing:n.easing},v):(this.targetResolution_=u,this.targetCenter_=y,this.applyTargetState_(!1,!0),ti(v,!0))},e.prototype.centerOn=function(t,e,n){this.centerOnInternal(qe(t,this.getProjection()),e,n)},e.prototype.centerOnInternal=function(t,e,n){this.setCenterInternal(ni(t,e,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,n,i){var r,o=this.padding_;if(o&&t){var s=this.getViewportSizeMinusPadding_(-n),a=ni(t,i,[s[0]/2+o[3],s[1]/2+o[0]],e,n);r=[t[0]-a[0],t[1]-a[1]]}return r},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=He(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var n=e&&qe(e,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,i,n);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=qe(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(i,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t?qe(t,this.getProjection()):t)},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var n=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,n),r=this.getViewportSize_(i),o=this.constraints_.resolution(this.targetResolution_,0,r,n),s=this.constraints_.center(this.targetCenter_,o,r,n,this.calculateCenterShift(this.targetCenter_,o,i,r));this.get(le.ROTATION)!==i&&this.set(le.ROTATION,i),this.get(le.RESOLUTION)!==o&&(this.set(le.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(le.CENTER)&&N(this.get(le.CENTER),s)||this.set(le.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,n){var i=void 0!==t?t:200,r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(0===i&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var u=n||(0===i?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&N(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:i,easing:hn,anchor:u}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(1,1)},e.prototype.endInteraction=function(t,e,n){var i=n&&qe(n,this.getProjection());this.endInteractionInternal(t,e,i)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(1,-1),this.resolveConstraints(t,e,n)},e.prototype.getConstrainedCenter=function(t,e){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)},e.prototype.getConstrainedZoom=function(t,e){var n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))},e.prototype.getConstrainedResolution=function(t,e){var n=e||0,i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,n,i)},e}(it.Z);function ti(t,e){setTimeout((function(){t(e)}),0)}function ei(t){return!(t.sourceCenter&&t.targetCenter&&!N(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function ni(t,e,n,i,r){var o=Math.cos(-r),s=Math.sin(-r),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;return[(a+=(e[0]/2-n[0])*i)*o-(l+=(n[1]-e[1]/2)*i)*(s=-s),l*o+a*s]}const ii=$n;function ri(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]+2*e,n[1]=t[1]+2*e,n}function oi(t){return t[0]>0&&t[1]>0}function si(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function ai(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var li=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function ui(t){t instanceof Z?t.setMapInternal(null):t instanceof Pt.default&&t.getLayers().forEach(ui)}function hi(t,e){if(t instanceof Z)t.setMapInternal(e);else if(t instanceof Pt.default)for(var n=t.getLayers().getArray(),i=0,r=n.length;i<r;++i)hi(n[i],e)}var ci=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var n,i,r,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Pt.default({layers:t.layers});return o.layergroup=s,o.target=t.target,o.view=t.view instanceof ii?t.view:new ii,void 0!==t.controls&&(Array.isArray(t.controls)?n=new Rt.Z(t.controls.slice()):((0,h.h)("function"==typeof t.controls.getArray,47),n=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?i=new Rt.Z(t.interactions.slice()):((0,h.h)("function"==typeof t.interactions.getArray,48),i=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?r=new Rt.Z(t.overlays.slice()):((0,h.h)("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new Rt.Z,{controls:n,interactions:i,keyboardEventTarget:e,overlays:r,values:o}}(e);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,n.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:u.MP,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=[1,0,0,1,0,0],n.pixelToCoordinateTransform_=[1,0,0,1,0,0],n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=e.moveTolerance,n.keyboardEventTarget_=i.keyboardEventTarget,n.targetChangeHandlerKeys_=null,n.controls=i.controls||new Rt.Z,n.interactions=i.interactions||new Rt.Z,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new qt(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(Xt,n.handleLayerGroupChanged_),n.addChangeListener(Kt,n.handleViewChanged_),n.addChangeListener(Vt,n.handleSizeChanged_),n.addChangeListener(Yt,n.handleTargetChanged_),n.setProperties(i.values);var r=n;return!e.view||e.view instanceof ii||e.view.then((function(t){r.setView(new ii(t))})),n.controls.addEventListener(It.Z.ADD,function(t){t.element.setMap(this)}.bind(n)),n.controls.addEventListener(It.Z.REMOVE,function(t){t.element.setMap(null)}.bind(n)),n.interactions.addEventListener(It.Z.ADD,function(t){t.element.setMap(this)}.bind(n)),n.interactions.addEventListener(It.Z.REMOVE,function(t){t.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(It.Z.ADD,function(t){this.addOverlayInternal_(t.element)}.bind(n)),n.overlays_.addEventListener(It.Z.REMOVE,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(n)),n.controls.forEach(function(t){t.setMap(this)}.bind(n)),n.interactions.forEach(function(t){t.setMap(this)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return li(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.handleLayerAdd_=function(t){hi(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var i=this.getCoordinateFromPixelInternal(t),r=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,o=void 0!==n.layerFilter?n.layerFilter:a.uX,s=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,r,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var n=[];return this.forEachFeatureAtPixel(t,(function(t){n.push(t)}),e),n},e.prototype.getAllLayers=function(){var t=[];return function e(n){n.forEach((function(n){n instanceof Pt.default?e(n.getLayers()):t.push(n)}))}(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var i=n||{},r=void 0!==i.hitTolerance?i.hitTolerance:0,o=i.layerFilter||a.uX;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,r,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_||!this.renderer_)return!1;var n=this.getCoordinateFromPixelInternal(t),i=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:a.uX,r=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,o,i,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]},e.prototype.getTarget=function(){return this.get(Yt)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return He(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?c(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(Xt)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof Rt.Z)e.setLayers(t);else{var n=e.getLayers();n.clear(),n.extend(t)}},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e];if(i.visible){var r=i.layer.getRenderer();if(r&&!r.ready)return!0;var o=i.layer.getSource();if(o&&o.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=qe(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?c(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Vt)},e.prototype.getView=function(){return this.get(Kt)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,n,i){return function(t,e,n,i,r){if(!t||!(n in t.wantedTiles))return Bt;if(!t.wantedTiles[n][e.getKey()])return Bt;var o=t.viewState.center,s=i[0]-o[0],a=i[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}(this.frameState_,t,e,n,i)},e.prototype.handleBrowserEvent=function(t,e){var n=e||t.type,i=new Dt(n,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,n=e.type;if(n===Zt||n===O.Z.WHEEL||n===O.Z.KEYDOWN){var i=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():i,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(r===i?i.documentElement:r).contains(o))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement()&&(!l.handleEvent(t)||t.propagationStopped))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,i=n;if(t){var r=t.viewHints;if(r[0]||r[1]){var o=Date.now()-t.time>8;n=o?0:8,i=o?0:2}}e.getTilesLoading()<n&&(e.reprioritize(),e.loadMoreTiles(n,i))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(P)&&this.renderer_.dispatchRenderEvent(P,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new Mt(Wt.Z.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new Mt(Wt.Z.LOADSTART,this,t))));for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,F.bN)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(O.Z.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(O.Z.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,ot.ZF)(this.viewport_)}var n=this.getTargetElement();if(n){for(var i in n.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new zt(this,this.moveTolerance_),jt)this.mapBrowserEventHandler_.addEventListener(jt[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(O.Z.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(O.Z.WHEEL,this.boundHandleBrowserEvent_,!!u.bM&&{passive:!1});var r=this.getOwnerDocument().defaultView,o=this.keyboardEventTarget_?this.keyboardEventTarget_:n;this.targetChangeHandlerKeys_=[(0,F.oL)(o,O.Z.KEYDOWN,this.handleBrowserEvent,this),(0,F.oL)(o,O.Z.KEYPRESS,this.handleBrowserEvent,this),(0,F.oL)(r,O.Z.RESIZE,this.updateSize,this)]}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&((0,F.bN)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,F.bN)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,F.oL)(t,K.Z.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,F.oL)(t,O.Z.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(F.bN),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Pt.GroupEvent("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,F.oL)(t,K.Z.PROPERTYCHANGE,this.render,this),(0,F.oL)(t,O.Z.CHANGE,this.render,this),(0,F.oL)(t,"addlayer",this.handleLayerAdd_,this),(0,F.oL)(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.handleLayerRemove_=function(t){ui(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,n=this.getSize(),i=this.getView(),r=this.frameState_,o=null;if(void 0!==n&&oi(n)&&i&&i.isDef()){var s=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=i.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:(0,g.p8)(a.center,a.resolution,a.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:(0,l.sq)(this),renderTargets:{}},a.nextCenter&&a.nextResolution){var u=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=(0,g.p8)(a.nextCenter,a.nextResolution,u,n)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r&&(!this.previousExtent_||!(0,g.xb)(this.previousExtent_)&&!(0,g.fS)(o.extent,this.previousExtent_))&&(this.dispatchEvent(new Mt(Wt.Z.MOVESTART,this,r)),this.previousExtent_=(0,g.YN)(this.previousExtent_)),this.previousExtent_&&!o.viewHints[0]&&!o.viewHints[1]&&!(0,g.fS)(o.extent,this.previousExtent_)&&(this.dispatchEvent(new Mt(Wt.Z.MOVEEND,this,o)),(0,g.d9)(o.extent,this.previousExtent_))),this.dispatchEvent(new Mt(Wt.Z.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(Wt.Z.LOADSTART)||this.hasListener(Wt.Z.LOADEND)||this.hasListener(P)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){var e=this.getLayerGroup();e&&this.handleLayerRemove_(new Pt.GroupEvent("removelayer",e)),this.set(Xt,t)},e.prototype.setSize=function(t){this.set(Vt,t)},e.prototype.setTarget=function(t){this.set(Yt,t)},e.prototype.setView=function(t){if(!t||t instanceof ii)this.set(Kt,t);else{this.set(Kt,new ii);var e=this;t.then((function(t){e.setView(new ii(t))}))}},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var n=getComputedStyle(t),i=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),r=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(i)||isNaN(r)||!oi(e=[i,r])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}},e}(it.Z);const pi=ci;var fi=n(775),di=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gi=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).ulElement_=document.createElement("ul"),n.collapsed_=void 0===i.collapsed||i.collapsed,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=void 0!==i.collapsible,n.collapsible_=void 0===i.collapsible||i.collapsible,n.collapsible_||(n.collapsed_=!1);var r=void 0!==i.className?i.className:"ol-attribution",o=void 0!==i.tipLabel?i.tipLabel:"Attributions",s=void 0!==i.expandClassName?i.expandClassName:r+"-expand",a=void 0!==i.collapseLabel?i.collapseLabel:"›",l=void 0!==i.collapseClassName?i.collapseClassName:r+"-collapse";"string"==typeof a?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=a,n.collapseLabel_.className=l):n.collapseLabel_=a;var u=void 0!==i.label?i.label:"i";"string"==typeof u?(n.label_=document.createElement("span"),n.label_.textContent=u,n.label_.className=s):n.label_=u;var h=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=o,n.toggleButton_.appendChild(h),n.toggleButton_.addEventListener(O.Z.CLICK,n.handleClick_.bind(n),!1);var c=r+" ol-unselectable "+Q+(n.collapsed_&&n.collapsible_?" ol-collapsed":"")+(n.collapsible_?"":" ol-uncollapsible"),p=n.element;return p.className=c,p.appendChild(n.toggleButton_),p.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return di(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],i=!0,r=t.layerStatesArray,o=0,s=r.length;o<s;++o){var a=r[o];if(j(a,t.viewState)){var l=a.layer.getSource();if(l){var u=l.getAttributions();if(u){var h=u(t);if(h)if(i=i&&!1!==l.getAttributionsCollapsible(),Array.isArray(h))for(var c=0,p=h.length;c<p;++c)h[c]in e||(n.push(h[c]),e[h[c]]=!0);else h in e||(n.push(h),e[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(i),n},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!(0,nn.fS)(e,this.renderedAttributions_)){(0,ot.ep)(this.ulElement_);for(var i=0,r=e.length;i<r;++i){var o=document.createElement("li");o.innerHTML=e[i],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?(0,ot.$H)(this.collapseLabel_,this.label_):(0,ot.$H)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(fi.default);const _i=gi;var yi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vi=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var r=void 0!==i.className?i.className:"ol-rotate",o=void 0!==i.label?i.label:"⇧",s=void 0!==i.compassClassName?i.compassClassName:"ol-compass";n.label_=null,"string"==typeof o?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=o):(n.label_=o,n.label_.classList.add(s));var a=i.tipLabel?i.tipLabel:"Reset rotation",l=document.createElement("button");l.className=r+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(n.label_),l.addEventListener(O.Z.CLICK,n.handleClick_.bind(n),!1);var u=r+" ol-unselectable "+Q,h=n.element;return h.className=u,h.appendChild(l),n.callResetNorth_=i.resetNorth?i.resetNorth:void 0,n.duration_=void 0!==i.duration?i.duration:250,n.autoHide_=void 0===i.autoHide||i.autoHide,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(q),n}return yi(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:hn}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var i="rotate("+n+"rad)";if(this.autoHide_){var r=this.element.classList.contains(q);r||0!==n?r&&0!==n&&this.element.classList.remove(q):this.element.classList.add(q)}this.label_.style.transform=i}this.rotation_=n}},e}(fi.default);const mi=vi;var xi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wi=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),target:i.target})||this;var r=void 0!==i.className?i.className:"ol-zoom",o=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInClassName?i.zoomInClassName:r+"-in",a=void 0!==i.zoomOutClassName?i.zoomOutClassName:r+"-out",l=void 0!==i.zoomInLabel?i.zoomInLabel:"+",u=void 0!==i.zoomOutLabel?i.zoomOutLabel:"–",h=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",c=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=h,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(O.Z.CLICK,n.handleClick_.bind(n,o),!1);var f=document.createElement("button");f.className=a,f.setAttribute("type","button"),f.title=c,f.appendChild("string"==typeof u?document.createTextNode(u):u),f.addEventListener(O.Z.CLICK,n.handleClick_.bind(n,-o),!1);var d=r+" ol-unselectable "+Q,g=n.element;return g.className=d,g.appendChild(p),g.appendChild(f),n.duration_=void 0!==i.duration?i.duration:250,n}return xi(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var n=e.getZoom();if(void 0!==n){var i=e.getConstrainedZoom(n+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:i,duration:this.duration_,easing:hn})):e.setZoom(i)}}},e}(fi.default);const bi=wi;function Ei(t){var e=t||{},n=new Rt.Z;return(void 0===e.zoom||e.zoom)&&n.push(new bi(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new mi(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new _i(e.attributionOptions)),n}const Si="active";var Ci=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ti=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return Ci(e,t),e.prototype.getActive=function(){return this.get(Si)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Si,t)},e.prototype.setMap=function(t){this.map_=t},e}(it.Z);function Oi(t,e,n,i){var r=t.getZoom();if(void 0!==r){var o=t.getConstrainedZoom(r+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:n,duration:void 0!==i?i:250,easing:hn})}}const Ri=Ti;var Ii=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pi=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:250,n}return Ii(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==jt.DBLCLICK){var n=t.originalEvent,i=t.map,r=t.coordinate,o=n.shiftKey?-this.delta_:this.delta_;Oi(i.getView(),o,r,this.duration_),n.preventDefault(),e=!0}return!e},e}(Ri);const Li=Pi;var Ai=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Mi=function(t){function e(e){var n=this,i=e||{};return n=t.call(this,i)||this,i.handleDownEvent&&(n.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(n.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(n.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(n.handleUpEvent=i.handleUpEvent),i.stopDown&&(n.stopDown=i.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return Ai(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==jt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==jt.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==jt.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==jt.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===jt.POINTERDOWN||e===jt.POINTERDRAG||e===jt.POINTERUP}(t)){var e=t.originalEvent,n=e.pointerId.toString();t.type==jt.POINTERUP?delete this.trackedPointers_[n]:(t.type==jt.POINTERDOWN||n in this.trackedPointers_)&&(this.trackedPointers_[n]=e),this.targetPointers=(0,M.KX)(this.trackedPointers_)}},e}(Ri);function Fi(t){for(var e=t.length,n=0,i=0,r=0;r<e;r++)n+=t[r].clientX,i+=t[r].clientY;return[n/e,i/e]}const ki=Mi;function Di(t){var e=arguments;return function(t){for(var n=!0,i=0,r=e.length;i<r&&(n=n&&e[i](t));++i);return n}}var ji=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Zi=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){var e=t.map.getTargetElement(),n=t.map.getOwnerDocument().activeElement;return e.contains(n)}(t)},Ni=a.uX,Gi=function(t){var e=t.originalEvent;return 0==e.button&&!(u.G$&&u.tK&&e.ctrlKey)},zi=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Wi=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Xi=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},Vi=function(t){var e=t.originalEvent;return(0,h.h)(void 0!==e,56),"mouse"==e.pointerType},Yi=function(t){var e=t.originalEvent;return(0,h.h)(void 0!==e,56),e.isPrimary&&0===e.button},Ki=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Bi=function(t){function e(e){var n=t.call(this,{stopDown:a.Dv})||this,i=e||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var r=i.condition?i.condition:Di(zi,Yi);return n.condition_=i.onFocusOnly?Di(Zi,r):r,n.noKinetic_=!1,n}return Ki(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,n,i=this.targetPointers,r=Fi(i);if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var o=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],s=t.map.getView();e=o,n=s.getResolution(),e[0]*=n,e[1]*=n,G(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var i=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=n.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-i*Math.cos(r),s[1]-i*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(a),duration:500,easing:hn})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(ki);const Ui=Bi;var Hi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qi=function(t){function e(e){var n=this,i=e||{};return(n=t.call(this,{stopDown:a.Dv})||this).condition_=i.condition?i.condition:ji,n.lastAngle_=void 0,n.duration_=void 0!==i.duration?i.duration:250,n}return Hi(e,t),e.prototype.handleDragEvent=function(t){if(Vi(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==an){var i=e.getSize(),r=t.pixel,o=Math.atan2(i[1]/2-r[1],r[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!Vi(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!Vi(t)||!Gi(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(ki);const Ji=qi;var Qi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$i=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return Qi(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+n,i.top=Math.min(t[1],e[1])+n,i.width=Math.abs(e[0]-t[0])+n,i.height=Math.abs(e[1]-t[1])+n},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new qn([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(s.Z);const tr=$i;var er=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),nr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.coordinate=n,r.mapBrowserEvent=i,r}return er(e,t),e}(B.ZP),ir=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new tr(i.className||"ol-dragbox"),n.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:Gi,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return er(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var i=n[0]-e[0],r=n[1]-e[1];return i*i+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new nr("boxdrag",t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new nr(e?"boxend":"boxcancel",t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new nr("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(ki);const rr=ir;var or=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),sr=function(t){function e(e){var n=this,i=e||{},r=i.condition?i.condition:Wi;return(n=t.call(this,{condition:r,className:i.className||"ol-dragzoom",minArea:i.minArea})||this).duration_=void 0!==i.duration?i.duration:200,n.out_=void 0!==i.out&&i.out,n}return or(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var i=e.rotatedExtentForGeometry(n),r=e.getResolutionForExtentInternal(i),o=e.getResolution()/r;(n=n.clone()).scale(o*o)}e.fitInternal(n,{duration:this.duration_,easing:hn})},e}(rr);const ar=sr;var lr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ur=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.defaultCondition_=function(t){return zi(t)&&Xi(t)},n.condition_=void 0!==i.condition?i.condition:n.defaultCondition_,n.duration_=void 0!==i.duration?i.duration:100,n.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128,n}return lr(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==O.Z.KEYDOWN){var n=t.originalEvent,i=n.keyCode;if(this.condition_(t)&&(40==i||37==i||39==i||38==i)){var r=t.map.getView(),o=r.getResolution()*this.pixelDelta_,s=0,a=0;40==i?a=-o:37==i?s=-o:39==i?s=o:a=o;var l=[s,a];G(l,r.getRotation()),function(t,e,n){var i=t.getCenterInternal();if(i){var r=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:pn,center:t.getConstrainedCenter(r)})}}(r,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Ri);const hr=ur;var cr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pr=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:Xi,n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:100,n}return cr(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==O.Z.KEYDOWN||t.type==O.Z.KEYPRESS){var n=t.originalEvent,i=n.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var r=t.map,o=i=="+".charCodeAt(0)?this.delta_:-this.delta_;Oi(r.getView(),o,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Ri);const fr=pr,dr=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var n=e-3;n>0&&this.points_[n+2]>t;)n-=3;var i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;var r=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();var gr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_r="trackpad",yr=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,i)||this).totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==i.maxDelta?i.maxDelta:1,n.duration_=void 0!==i.duration?i.duration:250,n.timeout_=void 0!==i.timeout?i.timeout:80,n.useAnchor_=void 0===i.useAnchor||i.useAnchor,n.constrainResolution_=void 0!==i.constrainResolution&&i.constrainResolution;var r=i.condition?i.condition:Ni;return n.condition_=i.onFocusOnly?Di(Zi,r):r,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return gr(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==O.Z.WHEEL)return!0;var e,n=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==O.Z.WHEEL&&(e=i.deltaY,u.V&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=u.MP),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?_r:"wheel");var o=n.getView();if(this.mode_===_r&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-(0,_.uZ)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Oi(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Ri);const vr=yr;var mr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xr=function(t){function e(e){var n=this,i=e||{},r=i;return r.stopDown||(r.stopDown=a.Dv),(n=t.call(this,r)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==i.threshold?i.threshold:.3,n.duration_=void 0!==i.duration?i.duration:250,n}return mr(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],i=this.targetPointers[1],r=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==an){var l=s.getViewport().getBoundingClientRect(),u=Fi(this.targetPointers);u[0]-=l.left,u[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(u),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2&&(t.map.getView().endInteraction(this.duration_),1))},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(ki);const wr=xr;var br=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Er=function(t){function e(e){var n=this,i=e||{},r=i;return r.stopDown||(r.stopDown=a.Dv),(n=t.call(this,r)||this).anchor_=null,n.duration_=void 0!==i.duration?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return br(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],i=this.targetPointers[1],r=n.clientX-i.clientX,o=n.clientY-i.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var u=a.getViewport().getBoundingClientRect(),h=Fi(this.targetPointers);h[0]-=u.left,h[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(h),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(ki);const Sr=Er;var Cr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tr=function(t){function e(e){return(e=(0,M.f0)({},e)).controls||(e.controls=Ei()),e.interactions||(e.interactions=function(t){var e={onFocusOnly:!0}||{},n=new Rt.Z,i=new dr(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new Ji),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new Li({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new Ui({onFocusOnly:e.onFocusOnly,kinetic:i})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new wr),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new Sr({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new hr),n.push(new fr({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new vr({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new ar({duration:e.zoomDuration})),n}()),t.call(this,e)||this}return Cr(e,t),e.prototype.createRenderer=function(){return new Ot(this)},e}(pi);const Or=Tr;var Rr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ir=function(t){function e(e){var n=e||{};return t.call(this,n)||this}return Rr(e,t),e}(Z);const Pr=Ir;var Lr=n(706),Ar=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Mr=function(t){function e(e){var n=t.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return Ar(e,t),e.prototype.getFeatures=function(t){return(0,l.O3)()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return(0,l.O3)()},e.prototype.renderFrame=function(t,e){return(0,l.O3)()},e.prototype.loadedTileCallback=function(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n},e.prototype.createLoadedTileFinder=function(t,e,n){return function(i,r){var o=this.loadedTileCallback.bind(this,n,i);return t.forEachLoadedTile(e,i,r,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r){},e.prototype.getDataAtPixel=function(t,e,n){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){2===t.target.getState()&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return 2!=e&&3!=e&&t.addEventListener(O.Z.CHANGE,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==A.Z.READY&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(Lr.default);const Fr=Mr;var kr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Dr=null,jr=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=[1,0,0,1,0,0],n.pixelTransform=[1,0,0,1,0,0],n.inversePixelTransform=[1,0,0,1,0,0],n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return kr(e,t),e.prototype.getImageData=function(t,e,n){var i,r;Dr||((i=document.createElement("canvas")).width=1,i.height=1,Dr=i.getContext("2d")),Dr.clearRect(0,0,1,1);try{Dr.drawImage(t,e,n,1,1,0,0,1,1),r=Dr.getImageData(0,0,1,1).data}catch(t){return null}return r},e.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},e.prototype.useContainer=function(t,e,n,i){var r,o,s=this.getLayer().getClassName();if(t&&t.className===s&&""===t.style.opacity&&1===n&&(!i||t.style.backgroundColor&&(0,nn.fS)(w(t.style.backgroundColor),w(i)))&&(l=t.firstElementChild)instanceof HTMLCanvasElement&&(o=l.getContext("2d")),o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(r=document.createElement("div")).className=s;var a=r.style;a.position="absolute",a.width="100%",a.height="100%",i&&(a.backgroundColor=i);var l=(o=(0,ot.E4)()).canvas;r.appendChild(l),(a=l.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=o}},e.prototype.clipUnrotated=function(t,e,n){var i=(0,g.rL)(n),r=(0,g.Xv)(n),o=(0,g.w$)(n),s=(0,g.hC)(n);c(e.coordinateToPixelTransform,i),c(e.coordinateToPixelTransform,r),c(e.coordinateToPixelTransform,o),c(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;c(a,i),c(a,r),c(a,o),c(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var i=this.getLayer();if(i.hasListener(t)){var r=new H(t,this.inversePixelTransform,n,e);i.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_("prerender",t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_("postrender",t,e)},e.prototype.getRenderTransform=function(t,e,n,i,r,o,s){var a=r/2,l=o/2,u=i/e,h=-u,c=-t[0]+s,f=-t[1];return p(this.tempTransform,a,l,u,h,-n,c,f)},e.prototype.getDataAtPixel=function(t,e,n){var i=c(this.inversePixelTransform,t.slice()),r=this.context,o=this.getLayer().getExtent();if(o){var s=c(e.pixelToCoordinateTransform,t.slice());if(!(0,g.b8)(o,s))return null}var a,l=Math.round(i[0]),u=Math.round(i[1]),h=this.pixelContext_;if(!h){var p=document.createElement("canvas");p.width=1,p.height=1,h=p.getContext("2d"),this.pixelContext_=h}h.clearRect(0,0,1,1);try{h.drawImage(r.canvas,l,u,1,1,0,0,1,1),a=h.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.pixelContext_=null,new Uint8Array):a}return 0===a[3]?null:a},e.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},e}(Fr);const Zr=jr;var Nr={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Gr={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},zr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wr=function(t){function e(e){var n=t.call(this,e)||this;return n.image_=null,n}return zr(e,t),e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],n=t.pixelRatio,i=t.viewState,r=i.resolution,o=this.getLayer().getSource(),s=t.viewHints,a=t.extent;if(void 0!==e.extent&&(a=(0,g.Ed)(a,Qe(e.extent,i.projection))),!s[0]&&!s[1]&&!(0,g.xb)(a))if(o){var l=i.projection,u=o.getImage(a,r,n,l);u&&(this.loadImage(u)?this.image_=u:4===u.getState()&&(this.image_=null))}else this.image_=null;return!!this.image_},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),i=c(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!(0,g.b8)(r,i))return null;var o=this.image_.getExtent(),s=this.image_.getImage(),a=(0,g.dz)(o),l=Math.floor(s.width*((i[0]-o[0])/a));if(l<0||l>=s.width)return null;var u=(0,g.Cr)(o),h=Math.floor(s.height*((o[3]-i[1])/u));return h<0||h>=s.height?null:this.getImageData(s,l,h)},e.prototype.renderFrame=function(t,e){var n=this.image_,i=n.getExtent(),r=n.getResolution(),o=n.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,u=l.center,h=l.resolution,c=t.size,_=a*r/(h*o),y=Math.round(c[0]*a),v=Math.round(c[1]*a),m=l.rotation;if(m){var x=Math.round(Math.sqrt(y*y+v*v));y=x,v=x}p(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,m,-y/2,-v/2),f(this.inversePixelTransform,this.pixelTransform);var w=d(this.pixelTransform);this.useContainer(e,w,s.opacity,this.getBackground(t));var b=this.context,E=b.canvas;E.width!=y||E.height!=v?(E.width=y,E.height=v):this.containerReused||b.clearRect(0,0,y,v);var S=!1,C=!0;if(s.extent){var T=Qe(s.extent,l.projection);(S=(C=(0,g.kK)(T,t.extent))&&!(0,g.r4)(T,t.extent))&&this.clipUnrotated(b,t,T)}var O=n.getImage(),R=p(this.tempTransform,y/2,v/2,_,_,0,o*(i[0]-u[0])/r,o*(u[1]-i[3])/r);this.renderedResolution=r*a/o;var I=O.width*R[0],P=O.height*R[3];if(this.getLayer().getSource().getInterpolate()||(0,M.f0)(b,Nr),this.preRender(b,t),C&&I>=.5&&P>=.5){var L=R[4],A=R[5],F=s.opacity,k=void 0;1!==F&&(k=b.globalAlpha,b.globalAlpha=F),b.drawImage(O,0,0,+O.width,+O.height,Math.round(L),Math.round(A),Math.round(I),Math.round(P)),1!==F&&(b.globalAlpha=k)}return this.postRender(b,t),S&&b.restore(),(0,M.f0)(b,Gr),w!==E.style.transform&&(E.style.transform=w),this.container},e}(Zr);const Xr=Wr;var Vr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Yr=function(t){function e(e){return t.call(this,e)||this}return Vr(e,t),e.prototype.createRenderer=function(){return new Xr(this)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(Pr),Kr="preload",Br="useInterimTilesOnError";var Ur=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hr=function(t){function e(e){var n=this,i=e||{},r=(0,M.f0)({},i);return delete r.preload,delete r.useInterimTilesOnError,(n=t.call(this,r)||this).on,n.once,n.un,n.setPreload(void 0!==i.preload?i.preload:0),n.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),n}return Ur(e,t),e.prototype.getPreload=function(){return this.get(Kr)},e.prototype.setPreload=function(t){this.set(Kr,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Br)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Br,t)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(Z);const qr=Hr;var Jr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Qr=function(t){function e(e,n,i){var r=t.call(this)||this,o=i||{};return r.tileCoord=e,r.state=n,r.interimTile=null,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r.interpolate=!!o.interpolate,r}return Jr(e,t),e.prototype.changed=function(){this.dispatchEvent(O.Z.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(2==t.getState())return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(2==t.getState()){t.interimTile=null;break}1==t.getState()?e=t:0==t.getState()?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(3!==this.state&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){(0,l.O3)()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var i=e-n+1e3/60;return i>=this.transition_?1:un(i/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(rt.Z);const $r=Qr;var to=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const eo=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=i,o.resolution=n,o.state=r,o}return to(e,t),e.prototype.changed=function(){this.dispatchEvent(O.Z.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return(0,l.O3)()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){(0,l.O3)()},e}(rt.Z);var no=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function io(t,e,n){var i=t,r=!0,o=!1,s=!1,a=[(0,F.Vx)(i,O.Z.LOAD,(function(){s=!0,o||e()}))];return i.src&&u.Tp?(o=!0,i.decode().then((function(){r&&e()})).catch((function(t){r&&(s?e():n())}))):a.push((0,F.Vx)(i,O.Z.ERROR,n)),function(){r=!1,a.forEach(F.bN)}}const ro=function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,i,0)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=0,a.imageLoadFunction_=s,a}return no(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=3,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=(0,g.Cr)(this.extent)/this.image_.height),this.state=2,this.unlistenImage_(),this.changed()},e.prototype.load=function(){0!=this.state&&3!=this.state||(this.state=1,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=io(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=(0,g.Cr)(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(eo);var oo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const so=function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,s)||this;return a.crossOrigin_=r,a.src_=i,a.key=i,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return oo(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=2,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=3,this.unlistenImage_(),this.image_=((t=(0,ot.E4)(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=2:this.state=4,this.unlistenImage_(),this.changed()},e.prototype.load=function(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=io(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}($r),ao=function(){function t(t,e,n,i,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=ze(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=i,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&(0,g.dz)(i)==(0,g.dz)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,g.dz)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,g.dz)(this.targetProj_.getExtent()):null;var l=(0,g.rL)(n),u=(0,g.Xv)(n),h=(0,g.w$)(n),c=(0,g.hC)(n),p=this.transformInv_(l),f=this.transformInv_(u),d=this.transformInv_(h),y=this.transformInv_(c),v=10+(o?Math.max(0,Math.ceil((0,_.k3)((0,g.bg)(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,h,c,p,f,d,y,v),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,n){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,n,i,r,o){this.triangles_.push({source:[i,r,o],target:[t,e,n]})},t.prototype.addQuad_=function(t,e,n,i,r,o,s,a,l){var u=(0,g.hI)([r,o,s,a]),h=this.sourceWorldWidth_?(0,g.dz)(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&h>.5&&h<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var d=(0,g.hI)([t,e,n,i]);f=(0,g.dz)(d)/this.targetWorldWidth_>.25||f}!p&&this.sourceProj_.isGlobal()&&h&&(f=h>.25||f)}if(!(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3]))||(0,g.kK)(u,this.maxSourceExtent_)){var y=0;if(!(f||isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)f=!0;else if(1!=(y=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=y&&4!=y&&8!=y)return;if(l>0){if(!f){var v=[(t[0]+n[0])/2,(t[1]+n[1])/2],m=this.transformInv_(v),x=void 0;x=p?((0,_.$W)(r[0],c)+(0,_.$W)(s[0],c))/2-(0,_.$W)(m[0],c):(r[0]+s[0])/2-m[0];var w=(r[1]+s[1])/2-m[1];f=x*x+w*w>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var b=[(e[0]+n[0])/2,(e[1]+n[1])/2],E=this.transformInv_(b),S=[(i[0]+t[0])/2,(i[1]+t[1])/2],C=this.transformInv_(S);this.addQuad_(t,e,b,S,r,o,E,C,l-1),this.addQuad_(S,b,n,i,C,E,s,a,l-1)}else{var T=[(t[0]+e[0])/2,(t[1]+e[1])/2],O=this.transformInv_(T),R=[(n[0]+i[0])/2,(n[1]+i[1])/2],I=this.transformInv_(R);this.addQuad_(t,T,R,i,r,O,I,a,l-1),this.addQuad_(T,e,n,R,O,o,s,I,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&y)&&this.addTriangle_(t,n,i,r,s,a),0==(14&y)&&this.addTriangle_(t,n,e,r,s,o),y&&(0==(13&y)&&this.addTriangle_(e,i,t,o,a,r),0==(7&y)&&this.addTriangle_(e,i,n,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=(0,g.lJ)();return this.triangles_.forEach((function(e,n,i){var r=e.source;(0,g.Wj)(t,r[0]),(0,g.Wj)(t,r[1]),(0,g.Wj)(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();var lo;function uo(t,e,n,i,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,r)),t.restore()}function ho(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function co(t,e,n,i){var r=We(n,e,t),o=De(e,i,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||(0,g.b8)(l,r)){var u=De(t,o,r)/o;isFinite(u)&&u>0&&(o/=u)}return o}function po(t,e,n,i,r,o,s,a,l,u,h,c){var p=(0,ot.E4)(Math.round(n*t),Math.round(n*e));if(c||(0,M.f0)(p,Nr),0===l.length)return p.canvas;function f(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var d=(0,g.lJ)();l.forEach((function(t,e,n){(0,g.l7)(d,t.extent)}));var y=(0,g.dz)(d),v=(0,g.Cr)(d),m=(0,ot.E4)(Math.round(n*y/i),Math.round(n*v/i));c||(0,M.f0)(m,Nr);var x=n/i;l.forEach((function(t,e,n){var i=t.extent[0]-d[0],r=-(t.extent[3]-d[3]),o=(0,g.dz)(t.extent),s=(0,g.Cr)(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,i*x,r*x,o*x,s*x)}));var w=(0,g.rL)(s);return a.getTriangles().forEach((function(t,e,r){var s=t.source,a=t.target,l=s[0][0],u=s[0][1],h=s[1][0],g=s[1][1],y=s[2][0],v=s[2][1],x=f((a[0][0]-w[0])/o),b=f(-(a[0][1]-w[1])/o),E=f((a[1][0]-w[0])/o),S=f(-(a[1][1]-w[1])/o),C=f((a[2][0]-w[0])/o),T=f(-(a[2][1]-w[1])/o),O=l,R=u;l=0,u=0;var I=[[h-=O,g-=R,0,0,E-x],[y-=O,v-=R,0,0,C-x],[0,0,h,g,S-b],[0,0,y,v,T-b]],P=(0,_.SV)(I);if(P){if(p.save(),p.beginPath(),function(){if(void 0===lo){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",uo(t,4,5,4,0),uo(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;lo=ho(e,0)||ho(e,4)||ho(e,8)}return lo}()||!c){p.moveTo(E,S);for(var L=x-E,A=b-S,M=0;M<4;M++)p.lineTo(E+f((M+1)*L/4),S+f(M*A/3)),3!=M&&p.lineTo(E+f((M+1)*L/4),S+f((M+1)*A/3));p.lineTo(C,T)}else p.moveTo(E,S),p.lineTo(x,b),p.lineTo(C,T);p.clip(),p.transform(P[0],P[2],P[1],P[3],x,b),p.translate(d[0]-O,d[3]-R),p.scale(i/n,-i/n),p.drawImage(m.canvas,0,0),p.restore()}})),h&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,n){var i=t.target,r=(i[0][0]-w[0])/o,s=-(i[0][1]-w[1])/o,a=(i[1][0]-w[0])/o,l=-(i[1][1]-w[1])/o,u=(i[2][0]-w[0])/o,h=-(i[2][1]-w[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(r,s),p.lineTo(u,h),p.closePath(),p.stroke()})),p.restore()),p.canvas}var fo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const go=function(t){function e(e,n,i,r,o,s,a,l,u,h,c,p){var f=t.call(this,o,0,{interpolate:!!p})||this;f.renderEdges_=void 0!==c&&c,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=n,f.targetTileGrid_=r,f.wrappedTileCoord_=s||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=r.getTileCoordExtent(f.wrappedTileCoord_),y=f.targetTileGrid_.getExtent(),v=f.sourceTileGrid_.getExtent(),m=y?(0,g.Ed)(d,y):d;if(0===(0,g.bg)(m))return f.state=4,f;var x=e.getExtent();x&&(v=v?(0,g.Ed)(v,x):x);var w=r.getResolution(f.wrappedTileCoord_[0]),b=function(t,e,n,i){var r=(0,g.qg)(n),o=co(t,e,r,i);return(!isFinite(o)||o<=0)&&(0,g.H6)(n,(function(n){return o=co(t,e,n,i),isFinite(o)&&o>0})),o}(e,i,m,w);if(!isFinite(b)||b<=0)return f.state=4,f;var E=void 0!==h?h:.5;if(f.triangulation_=new ao(e,i,m,v,b*E,w),0===f.triangulation_.getTriangles().length)return f.state=4,f;f.sourceZ_=n.getZForResolution(b);var S=f.triangulation_.calculateSourceExtent();if(v&&(e.canWrapX()?(S[1]=(0,_.uZ)(S[1],v[1],v[3]),S[3]=(0,_.uZ)(S[3],v[1],v[3])):S=(0,g.Ed)(S,v)),(0,g.bg)(S)){for(var C=n.getTileRangeForExtentAndZ(S,f.sourceZ_),T=C.minX;T<=C.maxX;T++)for(var O=C.minY;O<=C.maxY;O++){var R=u(f.sourceZ_,T,O,a);R&&f.sourceTiles_.push(R)}0===f.sourceTiles_.length&&(f.state=4)}else f.state=4;return f}return fo(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,i){e&&2==e.getState()&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=3;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),i="number"==typeof n?n:n[0],r="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=po(i,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()},e.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,i){var r=e.getState();if(0==r||1==r){t++;var o=(0,F.oL)(e,O.Z.CHANGE,(function(n){var i=e.getState();2!=i&&3!=i&&4!=i||((0,F.bN)(o),0==--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,n){0==t.getState()&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(F.bN),this.sourcesListenerKeys_=null},e}($r);var _o=function(){function t(t,e,n,i){this.minX=t,this.maxX=e,this.minY=n,this.maxY=i}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function yo(t,e,n,i,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=n,r.maxY=i,r):new _o(t,e,n,i)}const vo=_o;var mo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xo=function(t){function e(e){var n=t.call(this,e)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=(0,g.lJ)(),n.tmpTileRange_=new vo(0,0,0,0),n}return mo(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),i=e.getUseInterimTilesOnError();return 2==n||4==n||3==n&&!i},e.prototype.getTile=function(t,e,n,i){var r=i.pixelRatio,o=i.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,n,r,o);return 3==a.getState()&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(2)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),i=c(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!(0,g.b8)(r,i))return null;for(var o=e.pixelRatio,s=e.viewState.projection,a=e.viewState,l=n.getRenderSource(),u=l.getTileGridForProjection(a.projection),h=l.getTilePixelRatio(e.pixelRatio),p=u.getZForResolution(a.resolution);p>=u.getMinZoom();--p){var f=u.getTileCoordForCoordAndZ(i,p),d=l.getTile(p,f[1],f[2],o,s);if(!(d instanceof so||d instanceof go))return null;if(2===d.getState()){var _=u.getOrigin(p),y=ai(u.getTileSize(p)),v=u.getResolution(p),m=Math.floor(h*((i[0]-_[0])/v-f[1]*y[0])),x=Math.floor(h*((_[1]-i[1])/v-f[2]*y[1]));return this.getImageData(d.getImage(),m,x)}}return null},e.prototype.loadedTileCallback=function(e,n,i){return!!this.isDrawableTile(i)&&t.prototype.loadedTileCallback.call(this,e,n,i)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],i=t.viewState,r=i.projection,o=i.resolution,s=i.center,a=i.rotation,u=t.pixelRatio,h=this.getLayer(),_=h.getSource(),y=_.getRevision(),v=_.getTileGridForProjection(r),m=v.getZForResolution(o,_.zDirection),x=v.getResolution(m),w=t.extent,b=n.extent&&Qe(n.extent);b&&(w=(0,g.Ed)(w,Qe(n.extent)));var E=_.getTilePixelRatio(u),S=Math.round(t.size[0]*E),C=Math.round(t.size[1]*E);if(a){var T=Math.round(Math.sqrt(S*S+C*C));S=T,C=T}var O=x*S/2/E,R=x*C/2/E,I=[s[0]-O,s[1]-R,s[0]+O,s[1]+R],P=v.getTileRangeForExtentAndZ(w,m),L={};L[m]={};var A=this.createLoadedTileFinder(_,r,L),F=this.tmpExtent,k=this.tmpTileRange_;this.newTiles_=!1;for(var D=P.minX;D<=P.maxX;++D)for(var j=P.minY;j<=P.maxY;++j){var Z=this.getTile(m,D,j,t);if(this.isDrawableTile(Z)){var N=(0,l.sq)(this);if(2==Z.getState()){L[m][Z.tileCoord.toString()]=Z;var G=Z.inTransition(N);this.newTiles_||!G&&-1!==this.renderedTiles.indexOf(Z)||(this.newTiles_=!0)}if(1===Z.getAlpha(N,t.time))continue}var z=v.getTileCoordChildTileRange(Z.tileCoord,k,F),W=!1;z&&(W=A(m+1,z)),W||v.forEachTileCoordParentTileRange(Z.tileCoord,A,k,F)}var X=x/o;p(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/E,1/E,a,-S/2,-C/2);var V=d(this.pixelTransform);this.useContainer(e,V,n.opacity,this.getBackground(t));var Y=this.context,K=Y.canvas;f(this.inversePixelTransform,this.pixelTransform),p(this.tempTransform,S/2,C/2,X,X,0,-S/2,-C/2),K.width!=S||K.height!=C?(K.width=S,K.height=C):this.containerReused||Y.clearRect(0,0,S,C),b&&this.clipUnrotated(Y,t,b),_.getInterpolate()||(0,M.f0)(Y,Nr),this.preRender(Y,t),this.renderedTiles.length=0;var B,U,H,q=Object.keys(L).map(Number);q.sort(nn.kK),1!==n.opacity||this.containerReused&&!_.getOpaque(t.viewState.projection)?(B=[],U=[]):q=q.reverse();for(var J=q.length-1;J>=0;--J){var Q=q[J],$=_.getTilePixelSize(Q,u,r),tt=v.getResolution(Q)/x,et=$[0]*tt*X,it=$[1]*tt*X,rt=v.getTileCoordForCoordAndZ((0,g.rL)(I),Q),ot=v.getTileCoordExtent(rt),st=c(this.tempTransform,[E*(ot[0]-I[0])/x,E*(I[3]-ot[3])/x]),at=E*_.getGutterForProjection(r),lt=L[Q];for(var ut in lt){var ht=(Z=lt[ut]).tileCoord,ct=rt[1]-ht[1],pt=Math.round(st[0]-(ct-1)*et),ft=rt[2]-ht[2],dt=Math.round(st[1]-(ft-1)*it),gt=pt-(D=Math.round(st[0]-ct*et)),_t=dt-(j=Math.round(st[1]-ft*it)),yt=m===Q,vt=!1;if(!(G=yt&&1!==Z.getAlpha((0,l.sq)(this),t.time)))if(B){H=[D,j,D+gt,j,D+gt,j+_t,D,j+_t];for(var mt=0,xt=B.length;mt<xt;++mt)if(m!==Q&&Q<U[mt]){var wt=B[mt];(0,g.kK)([D,j,D+gt,j+_t],[wt[0],wt[3],wt[4],wt[7]])&&(vt||(Y.save(),vt=!0),Y.beginPath(),Y.moveTo(H[0],H[1]),Y.lineTo(H[2],H[3]),Y.lineTo(H[4],H[5]),Y.lineTo(H[6],H[7]),Y.moveTo(wt[6],wt[7]),Y.lineTo(wt[4],wt[5]),Y.lineTo(wt[2],wt[3]),Y.lineTo(wt[0],wt[1]),Y.clip())}B.push(H),U.push(Q)}else Y.clearRect(D,j,gt,_t);this.drawTileImage(Z,t,D,j,gt,_t,at,yt),B&&!G?(vt&&Y.restore(),this.renderedTiles.unshift(Z)):this.renderedTiles.push(Z),this.updateUsedTiles(t.usedTiles,_,Z)}}this.renderedRevision=y,this.renderedResolution=x,this.extentChanged=!this.renderedExtent_||!(0,g.fS)(this.renderedExtent_,I),this.renderedExtent_=I,this.renderedPixelRatio=u,this.renderedProjection=r,this.manageTilePyramid(t,_,v,u,r,w,m,h.getPreload()),this.scheduleExpireCache(t,_),this.postRender(Y,t),n.extent&&Y.restore(),(0,M.f0)(Y,Gr),V!==K.style.transform&&(K.style.transform=V);var bt=nt(n.opacity),Et=this.container;return bt!==Et.style.opacity&&(Et.style.opacity=bt),this.container},e.prototype.drawTileImage=function(t,e,n,i,r,o,s,a){var u=this.getTileImage(t);if(u){var h=(0,l.sq)(this),c=a?t.getAlpha(h,e.time):1,p=c!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(u,s,s,u.width-2*s,u.height-2*s,n,i,r,o),p&&this.context.restore(),1!==c?e.animate=!0:a&&t.endTransition(h)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var n=function(t,e,n){var i=(0,l.sq)(t);i in n.usedTiles&&t.expireCache(n.viewState.projection,n.usedTiles[i])}.bind(null,e);t.postRenderFunctions.push(n)}},e.prototype.updateUsedTiles=function(t,e,n){var i=(0,l.sq)(e);i in t||(t[i]={}),t[i][n.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,n,i,r,o,s,a,u){var h=(0,l.sq)(e);h in t.wantedTiles||(t.wantedTiles[h]={});var c,p,f,d,g,_,y=t.wantedTiles[h],v=t.tileQueue,m=0;for(_=n.getMinZoom();_<=s;++_)for(p=n.getTileRangeForExtentAndZ(o,_,p),f=n.getResolution(_),d=p.minX;d<=p.maxX;++d)for(g=p.minY;g<=p.maxY;++g)s-_<=a?(++m,0==(c=e.getTile(_,d,g,i,r)).getState()&&(y[c.getKey()]=!0,v.isKeyQueued(c.getKey())||v.enqueue([c,h,n.getTileCoordCenter(c.tileCoord),f])),void 0!==u&&u(c)):e.useTile(_,d,g,r);e.updateCacheSize(m,r)},e}(Zr);const wo=xo;var bo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Eo=function(t){function e(e){return t.call(this,e)||this}return bo(e,t),e.prototype.createRenderer=function(){return new wo(this)},e}(qr);var So=n(582),Co=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=ai(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return(0,l.O3)()},t.prototype.getImage=function(t){return(0,l.O3)()},t.prototype.getHitDetectionImage=function(){return(0,l.O3)()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return(0,l.O3)()},t.prototype.getImageSize=function(){return(0,l.O3)()},t.prototype.getOrigin=function(){return(0,l.O3)()},t.prototype.getSize=function(){return(0,l.O3)()},t.prototype.setDisplacement=function(t){this.displacement_=t},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=ai(t)},t.prototype.listenImageChange=function(t){(0,l.O3)()},t.prototype.load=function(){(0,l.O3)()},t.prototype.unlistenImageChange=function(t){(0,l.O3)()},t}();const To=Co;function Oo(t){return Array.isArray(t)?E(t):t}var Ro=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Io=function(t){function e(e){var n=this,i=void 0!==e.rotateWithView&&e.rotateWithView;return(n=t.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=void 0!==e.fill?e.fill:null,n.origin_=[0,0],n.points_=e.points,n.radius_=void 0!==e.radius?e.radius:e.radius1,n.radius2_=e.radius2,n.angle_=void 0!==e.angle?e.angle:0,n.stroke_=void 0!==e.stroke?e.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return Ro(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var n=this.renderOptions_,i=(0,ot.E4)(n.size*t,n.size*t);this.draw_(n,i,t),e=i.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return 2},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,n){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var i=this.radius_,r=void 0===this.radius2_?i:this.radius2_;if(i<r){var o=i;i=r,r=o}var s=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/s,l=r*Math.sin(a),u=i-Math.sqrt(r*r-l*l),h=Math.sqrt(l*l+u*u),c=h/l;if("miter"===t&&c<=n)return c*e;var p=e/2/c,f=e/2*(u/h),d=Math.sqrt((i+p)*(i+p)+f*f)-i;if(void 0===this.radius2_||"bevel"===t)return 2*d;var g=i*Math.sin(a),_=r-Math.sqrt(i*i-g*g),y=Math.sqrt(g*g+_*_)/g;if(y<=n){var v=y*e/2-r-i;return 2*Math.max(d,v)}return 2*d},e.prototype.createRenderOptions=function(){var t,e=ht,n=0,i=null,r=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=ct),t=Oo(t),void 0===(o=this.stroke_.getWidth())&&(o=1),i=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=ht),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var s=this.calculateLineJoinSize_(e,o,n),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:i,lineDashOffset:r,lineJoin:e,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var i=this.fill_.getColor();null===i&&(i=at),e.fillStyle=Oo(i),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),n=0;if("string"==typeof e&&(e=w(e)),null===e?n=1:Array.isArray(e)&&(n=4===e.length?e[3]:1),0===n){var i=(0,ot.E4)(t.size,t.size);this.hitDetectionCanvas_=i.canvas,this.drawHitDetectionCanvas_(t,i)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{var i=void 0===this.radius2_?n:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var r=this.angle_-Math.PI/2,o=2*Math.PI/e,s=0;s<e;s++){var a=r+s*o,l=s%2==0?n:i;t.lineTo(l*Math.cos(a),l*Math.sin(a))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=at,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e}(To);const Po=Io;var Lo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ao=function(t){function e(e){var n=e||{};return t.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:void 0!==n.scale?n.scale:1,rotation:void 0!==n.rotation?n.rotation:0,rotateWithView:void 0!==n.rotateWithView&&n.rotateWithView,displacement:void 0!==n.displacement?n.displacement:[0,0]})||this}return Lo(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Po);const Mo=Ao;var Fo=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}();const ko=Fo;var Do=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();const jo=Do;var Zo=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=zo,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=zo,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}(),No=null;function Go(t,e){if(!No){var n=new ko({color:"rgba(255,255,255,0.4)"}),i=new jo({color:"#3399CC",width:1.25});No=[new Zo({image:new Mo({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return No}function zo(t){return t.getGeometry()}var Wo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Xo="renderOrder",Vo=function(t){function e(e){var n=this,i=e||{},r=(0,M.f0)({},i);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(n=t.call(this,r)||this).declutter_=void 0!==i.declutter&&i.declutter,n.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,n.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,n}return Wo(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(Xo)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new So(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(Xo,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:Go,this.styleFunction_=null===t?void 0:function(t){var e,n;"function"==typeof t?e=t:(Array.isArray(t)?n=t:((0,h.h)("function"==typeof t.getZIndex,41),n=[t]),e=function(){return n});return e}(this.style_),this.changed()},e}(Z);const Yo=Vo;var Ko={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Bo=[Ko.FILL],Uo=[Ko.STROKE],Ho=[Ko.BEGIN_PATH],qo=[Ko.CLOSE_PATH];const Jo=Ko;var Qo=n(716);const $o=function(){function t(){}return t.prototype.drawCustom=function(t,e,n,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();var ts=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),es=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=n,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return ts(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var n=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,r=this.coordinates,o=r.length,s=0,a=t.length;s<a;s+=e)i[0]=t[s],i[1]=t[s+1],(0,g.b8)(n,i)&&(r[o++]=i[0],r[o++]=i[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,n,i,r,o){var s=this.coordinates,a=s.length,l=this.getBufferedMaxExtent();o&&(e+=i);var u,h,c,p=t[e],f=t[e+1],d=this.tmpCoordinate_,_=!0;for(u=e+i;u<n;u+=i)d[0]=t[u],d[1]=t[u+1],(c=(0,g.pX)(l,d))!==h?(_&&(s[a++]=p,s[a++]=f,_=!1),s[a++]=d[0],s[a++]=d[1]):c===Qo.Z.INTERSECTING?(s[a++]=d[0],s[a++]=d[1],_=!1):_=!0,p=d[0],f=d[1],h=c;return(r&&_||u===e+i)&&(s[a++]=p,s[a++]=f),a},e.prototype.drawCustomCoordinates_=function(t,e,n,i,r){for(var o=0,s=n.length;o<s;++o){var a=n[o],l=this.appendFlatLineCoordinates(t,e,a,i,!1,!1);r.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,n,i){this.beginGeometry(t,e);var r,o,s,a,l,u=t.getType(),h=t.getStride(),c=this.coordinates.length;switch(u){case ne:r=t.getOrientedFlatCoordinates(),a=[];var p=t.getEndss();l=0;for(var f=0,d=p.length;f<d;++f){var g=[];l=this.drawCustomCoordinates_(r,l,p[f],h,g),a.push(g)}this.instructions.push([Jo.CUSTOM,c,a,t,n,Mn]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,a,t,i||n,Mn]);break;case $t:case ee:s=[],r=u==$t?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),l=this.drawCustomCoordinates_(r,0,t.getEnds(),h,s),this.instructions.push([Jo.CUSTOM,c,s,t,n,An]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,s,t,i||n,An]);break;case Qt:case re:r=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(r,0,r.length,h,!1,!1),this.instructions.push([Jo.CUSTOM,c,o,t,n,Ln]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,o,t,i||n,Ln]);break;case te:r=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(r,h))>c&&(this.instructions.push([Jo.CUSTOM,c,o,t,n,Ln]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,o,t,i||n,Ln]));break;case Jt:r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),o=this.coordinates.length,this.instructions.push([Jo.CUSTOM,c,o,t,n]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,o,t,i||n])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[Jo.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Jo.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var n,i,r=e.length,o=-1;for(t=0;t<r;++t)(i=(n=e[t])[0])==Jo.END_GEOMETRY?o=t:i==Jo.BEGIN_GEOMETRY&&(n[2]=t,(0,nn.FZ)(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var n=this.state;if(t){var i=t.getColor();n.fillStyle=Oo(i||at)}else n.fillStyle=void 0;if(e){var r=e.getColor();n.strokeStyle=Oo(r||ct);var o=e.getLineCap();n.lineCap=void 0!==o?o:lt;var s=e.getLineDash();n.lineDash=s?s.slice():ut;var a=e.getLineDashOffset();n.lineDashOffset=a||0;var l=e.getLineJoin();n.lineJoin=void 0!==l?l:ht;var u=e.getWidth();n.lineWidth=void 0!==u?u:1;var h=e.getMiterLimit();n.miterLimit=void 0!==h?h:10,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[Jo.SET_FILL_STYLE,e];return"string"!=typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Jo.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,i=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=i||r!=t.currentLineDash&&!(0,nn.fS)(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[Jo.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,g.d9)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,g.f3)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}($o);const ns=es;var is=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const rs=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return is(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,i);this.instructions.push([Jo.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([Jo.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,i);this.instructions.push([Jo.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([Jo.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var n=t.getAnchor(),i=t.getSize(),r=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=r,this.image_=o,this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0]*this.imagePixelRatio_,this.originY_=s[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterImageWithText_=e},e}(ns);var os=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ss=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return os(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,i){var r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,i,!1,!1),s=[Jo.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ut,0],Ho);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(Uo),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Ho);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinates_(s,l,o[u],a);this.hitDetectionInstructions.push(Uo),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Uo),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Uo),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(Ho)},e}(ns);const as=ss;var ls=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),us=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return ls(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,n,i){var r=this.state,o=void 0!==r.fillStyle,s=void 0!==r.strokeStyle,a=n.length;this.instructions.push(Ho),this.hitDetectionInstructions.push(Ho);for(var l=0;l<a;++l){var u=n[l],h=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,i,!0,!s),p=[Jo.MOVE_TO_LINE_TO,h,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(qo),this.hitDetectionInstructions.push(qo)),e=u}return o&&(this.instructions.push(Bo),this.hitDetectionInstructions.push(Bo)),s&&(this.instructions.push(Uo),this.hitDetectionInstructions.push(Uo)),e},e.prototype.drawCircle=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Jo.SET_FILL_STYLE,at]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var l=[Jo.CIRCLE,a];this.instructions.push(Ho,l),this.hitDetectionInstructions.push(Ho,l),void 0!==n.fillStyle&&(this.instructions.push(Bo),this.hitDetectionInstructions.push(Bo)),void 0!==n.strokeStyle&&(this.instructions.push(Uo),this.hitDetectionInstructions.push(Uo)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Jo.SET_FILL_STYLE,at]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Jo.SET_FILL_STYLE,at]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinatess_(s,l,o[u],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var n=this.coordinates,i=0,r=n.length;i<r;++i)n[i]=In(n[i],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(ns);const hs=us;function cs(t,e,n,i,r){var o,s,a,l,u,h,c,p,f,d=n,g=n,_=0,y=0,v=n;for(o=n;o<i;o+=r){var m=e[o],x=e[o+1];void 0!==l&&(p=m-l,f=x-u,a=Math.sqrt(p*p+f*f),void 0!==h&&(y+=s,Math.acos((h*p+c*f)/(s*a))>t&&(y>_&&(_=y,d=v,g=o),y=0,v=o-r)),s=a,h=p,c=f),l=m,u=x}return(y+=a)>_?[v,o]:[d,g]}var ps=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fs={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},ds=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return ps(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var n=this.textFillState_,i=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(n||i)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,u=t.getStride();if("line"!==r.placement||a!=Qt&&a!=ee&&a!=$t&&a!=ne){var h=r.overflow?null:[];switch(a){case Jt:case te:l=t.getFlatCoordinates();break;case Qt:l=t.getFlatMidpoint();break;case re:l=t.getCenter();break;case ee:l=t.getFlatMidpoints(),u=2;break;case $t:l=t.getFlatInteriorPoint(),r.overflow||h.push(l[2]/this.resolution),u=3;break;case ne:var c=t.getFlatInteriorPoints();for(l=[],E=0,S=c.length;E<S;E+=3)r.overflow||h.push(c[E+2]/this.resolution),l.push(c[E],c[E+1]);if(0===l.length)return;u=2}if((L=this.appendFlatPointCoordinates(l,u))===s)return;if(h&&(L-s)/2!=l.length/u){var p=s/2;h=h.filter((function(t,e){var n=o[2*(p+e)]===l[e*u]&&o[2*(p+e)+1]===l[e*u+1];return n||--p,n}))}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var f=r.padding;if(f!=dt&&(r.scale[0]<0||r.scale[1]<0)){var d=r.padding[0],_=r.padding[1],y=r.padding[2],v=r.padding[3];r.scale[0]<0&&(_=-_,v=-v),r.scale[1]<0&&(d=-d,y=-y),f=[d,_,y,v]}var m=this.pixelRatio;this.instructions.push([Jo.DRAW_IMAGE,s,L,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,f==dt?dt:f.map((function(t){return t*m})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);var x=1/m;this.hitDetectionInstructions.push([Jo.DRAW_IMAGE,s,L,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[x,x],NaN,this.declutterImageWithText_,f,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),this.endGeometry(e)}else{if(!(0,g.kK)(this.getBufferedMaxExtent(),t.getExtent()))return;var w=void 0;if(l=t.getFlatCoordinates(),a==Qt)w=[l.length];else if(a==ee)w=t.getEnds();else if(a==$t)w=t.getEnds().slice(0,1);else if(a==ne){var b=t.getEndss();w=[];for(var E=0,S=b.length;E<S;++E)w.push(b[E][0])}this.beginGeometry(t,e);for(var C=r.textAlign,T=0,O=void 0,R=0,I=w.length;R<I;++R){if(null==C){var P=cs(r.maxAngle,l,T,w[R],u);T=P[0],O=P[1]}else O=w[R];for(E=T;E<O;E+=u)o.push(l[E],l[E+1]);var L=o.length;T=w[R],this.drawChars_(s,L),s=L}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,i=this.strokeKey_;t&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||pt,textBaseline:e.textBaseline||ft,scale:e.scale});var o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))},e.prototype.drawChars_=function(t,e){var n=this.textStrokeState_,i=this.textState_,r=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=fs[i.textBaseline],u=this.textOffsetY_*a,h=this.text_,c=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([Jo.DRAW_CHARS,t,e,l,i.overflow,s,i.maxAngle,a,u,r,c*a,h,o,1]),this.hitDetectionInstructions.push([Jo.DRAW_CHARS,t,e,l,i.overflow,s,i.maxAngle,1,u,r,c,h,o,1/a])},e.prototype.setTextStyle=function(t,e){var n,i,r;if(t){var o=t.getFill();o?((i=this.textFillState_)||(i={},this.textFillState_=i),i.fillStyle=Oo(o.getColor()||at)):(i=null,this.textFillState_=i);var s=t.getStroke();if(s){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);var a=s.getLineDash(),u=s.getLineDashOffset(),h=s.getWidth(),c=s.getMiterLimit();r.lineCap=s.getLineCap()||lt,r.lineDash=a?a.slice():ut,r.lineDashOffset=void 0===u?0:u,r.lineJoin=s.getLineJoin()||ht,r.lineWidth=void 0===h?1:h,r.miterLimit=void 0===c?10:c,r.strokeStyle=Oo(s.getColor()||ct)}else r=null,this.textStrokeState_=r;n=this.textState_;var p=t.getFont()||st;xt(p);var f=t.getScaleArray();n.overflow=t.getOverflow(),n.font=p,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.textBaseline=t.getTextBaseline()||ft,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||dt,n.scale=void 0===f?[1,1]:f;var d=t.getOffsetX(),g=t.getOffsetY(),_=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===g?0:g,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===y?0:y,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:(0,l.sq)(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.textBaseline||"?"),this.fillKey_=i?"string"==typeof i.fillStyle?i.fillStyle:"|"+(0,l.sq)(i.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(ns),gs={Circle:hs,Default:ns,Image:rs,LineString:as,Polygon:hs,Text:ds};const _s=function(){function t(t,e,n,i){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=n,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var n=this.buildersByZIndex_[e];for(var i in n){var r=n[i].finish();t[e][i]=r}}return t},t.prototype.getBuilder=function(t,e){var n=void 0!==t?t.toString():"0",i=this.buildersByZIndex_[n];void 0===i&&(i={},this.buildersByZIndex_[n]=i);var r=i[e];return void 0===r&&(r=new(0,gs[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=r),r},t}(),ys="Circle",vs="Default",ms="Image",xs="LineString",ws="Polygon",bs="Text";function Es(t,e,n,i,r,o,s,a,l,u,h,c){var p=t[e],f=t[e+1],d=0,g=0,y=0,v=0;function m(){d=p,g=f,p=t[e+=i],f=t[e+1],v+=y,y=Math.sqrt((p-d)*(p-d)+(f-g)*(f-g))}do{m()}while(e<n-i&&v+y<o);for(var x=0===y?0:(o-v)/y,w=(0,_.t7)(d,p,x),b=(0,_.t7)(g,f,x),E=e-i,S=v,C=o+a*l(u,r,h);e<n-i&&v+y<C;)m();x=0===y?0:(C-v)/y;var T,O=(0,_.t7)(d,p,x),R=(0,_.t7)(g,f,x);if(c){var I=[w,b,O,R];_n(I,0,4,2,c,I,I),T=I[0]>I[2]}else T=w>O;var P,L=Math.PI,A=[],M=E+i===e;if(y=0,v=S,p=t[e=E],f=t[e+1],M){m(),P=Math.atan2(f-g,p-d),T&&(P+=P>0?-L:L);var F=(O+w)/2,k=(R+b)/2;return A[0]=[F,k,(C-o)/2,P,r],A}for(var D=0,j=r.length;D<j;){m();var Z=Math.atan2(f-g,p-d);if(T&&(Z+=Z>0?-L:L),void 0!==P){var N=Z-P;if(N+=N>L?-2*L:N<-L?2*L:0,Math.abs(N)>s)return null}P=Z;for(var G=D,z=0;D<j;++D){var W=a*l(u,r[T?j-D-1:D],h);if(e+i<n&&v+y<o+z+W/2)break;z+=W}if(D!==G){var X=T?r.substring(j-G,j-D):r.substring(G,D);x=0===y?0:(o+z/2-v)/y,F=(0,_.t7)(d,p,x),k=(0,_.t7)(g,f,x),A.push([F,k,z/2,Z,X]),o+=z}}return A}function Ss(t,e,n,i){for(var r=t[e],o=t[e+1],s=0,a=e+i;a<n;a+=i){var l=t[a],u=t[a+1];s+=Math.sqrt((l-r)*(l-r)+(u-o)*(u-o)),r=l,o=u}return s}var Cs=(0,g.lJ)(),Ts=[],Os=[],Rs=[],Is=[];function Ps(t){return t[3].declutterBox}var Ls=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function As(t,e){return"start"!==e&&"end"!==e||Ls.test(t)||(e="start"===e?"left":"right"),fs[e]}function Ms(t,e,n){return n>0&&t.push("\n",""),t.push(e,""),t}var Fs=function(){function t(t,e,n,i){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,i){var r=t+e+n+i;if(this.labels_[r])return this.labels_[r];var o=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],c=Array.isArray(t),p=As(c?t[0]:t,a.textAlign||pt),f=i&&o.lineWidth?o.lineWidth:0,d=c?t:t.split("\n").reduce(Ms,[]),g=function(t,e){for(var n=[],i=[],r=[],o=0,s=0,a=0,l=0,u=0,h=e.length;u<=h;u+=2){var c=e[u];if("\n"!==c&&u!==h){var p=e[u+1]||t.font,f=Et(p,c);n.push(f),s+=f;var d=wt(p);i.push(d),l=Math.max(l,d)}else o=Math.max(o,s),r.push(s),s=0,a+=l}return{width:o,height:a,widths:n,heights:i,lineWidths:r}}(a,d),_=g.width,y=g.height,v=g.widths,m=g.heights,x=g.lineWidths,w=_+f,b=[],E=(w+2)*h[0],S=(y+f)*h[1],C={width:E<0?Math.floor(E):Math.ceil(E),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:b};1==h[0]&&1==h[1]||b.push("scale",h),i&&(b.push("strokeStyle",o.strokeStyle),b.push("lineWidth",f),b.push("lineCap",o.lineCap),b.push("lineJoin",o.lineJoin),b.push("miterLimit",o.miterLimit),(u.Id?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(b.push("setLineDash",[o.lineDash]),b.push("lineDashOffset",o.lineDashOffset))),n&&b.push("fillStyle",s.fillStyle),b.push("textBaseline","middle"),b.push("textAlign","center");for(var T,O=.5-p,R=p*w+O*f,I=[],P=[],L=0,A=0,M=0,F=0,k=0,D=d.length;k<D;k+=2){var j=d[k];if("\n"!==j){var Z=d[k+1]||a.font;Z!==T&&(i&&I.push("font",Z),n&&P.push("font",Z),T=Z),L=Math.max(L,m[M]);var N=[j,R+O*v[M]+p*(v[M]-x[F]),.5*(f+L)+A];R+=v[M],i&&I.push("strokeText",N),n&&P.push("fillText",N),++M}else A+=L,L=0,R=p*w+O*f,++F}return Array.prototype.push.apply(b,I),Array.prototype.push.apply(b,P),this.labels_[r]=C,C},t.prototype.replayTextBackground_=function(t,e,n,i,r,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,n,i,r,o,s,a,l,u,h,f,d,_,y,v){var m,x=n-(s*=f[0]),w=i-(a*=f[1]),b=r+l>t?t-l:r,E=o+u>e?e-u:o,S=_[3]+b*f[0]+_[1],C=_[0]+E*f[1]+_[2],T=x-_[3],O=w-_[0];return(y||0!==h)&&(Ts[0]=T,Is[0]=T,Ts[1]=O,Os[1]=O,Os[0]=T+S,Rs[0]=Os[0],Rs[1]=O+C,Is[1]=Rs[1]),0!==h?(c(m=p([1,0,0,1,0,0],n,i,1,1,h,-n,-i),Ts),c(m,Os),c(m,Rs),c(m,Is),(0,g.T9)(Math.min(Ts[0],Os[0],Rs[0],Is[0]),Math.min(Ts[1],Os[1],Rs[1],Is[1]),Math.max(Ts[0],Os[0],Rs[0],Is[0]),Math.max(Ts[1],Os[1],Rs[1],Is[1]),Cs)):(0,g.T9)(Math.min(T,T+S),Math.min(O,O+C),Math.max(T,T+S),Math.max(O,O+C),Cs),d&&(x=Math.round(x),w=Math.round(w)),{drawImageX:x,drawImageY:w,drawImageW:b,drawImageH:E,originX:l,originY:u,declutterBox:{minX:Cs[0],minY:Cs[1],maxX:Cs[2],maxY:Cs[3],value:v},canvasTransform:m,scale:f}},t.prototype.replayImageOrLabel_=function(t,e,n,i,r,o,s){var a=!(!o&&!s),l=i.declutterBox,u=t.canvas,h=s?s[2]*i.scale[0]/2:0;return l.minX-h<=u.width/e&&l.maxX+h>=0&&l.minY-h<=u.height/e&&l.maxY+h>=0&&(a&&this.replayTextBackground_(t,Ts,Os,Rs,Is,o,s),function(t,e,n,i,r,o,s,a,l,u,h){t.save(),1!==n&&(t.globalAlpha*=n),e&&t.setTransform.apply(t,e),i.contextInstructions?(t.translate(l,u),t.scale(h[0],h[1]),function(t,e){for(var n=t.contextInstructions,i=0,r=n.length;i<r;i+=2)Array.isArray(n[i+1])?e[n[i]].apply(e,n[i+1]):e[n[i]]=n[i+1]}(i,t)):h[0]<0||h[1]<0?(t.translate(l,u),t.scale(h[0],h[1]),t.drawImage(i,r,o,s,a,0,0,s,a)):t.drawImage(i,r,o,s,a,l,u,s*h[0],a*h[1]),t.restore()}(t,i.canvasTransform,r,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=c(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,n,i){var r=this.textStates[e],o=this.createLabel(t,e,i,n),s=this.strokeStates[n],a=this.pixelRatio,l=As(Array.isArray(t)?t[0]:t,r.textAlign||pt),u=fs[r.textBaseline||ft],h=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale[0])+2*(.5-l)*h,anchorY:u*o.height/a+2*(.5-u)*h}},t.prototype.execute_=function(t,e,n,i,r,o,s,a){var l,u,h;this.pixelCoordinates_&&(0,nn.fS)(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=gn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),h=n,(u=this.renderedTransform_)[0]=h[0],u[1]=h[1],u[2]=h[2],u[3]=h[3],u[4]=h[4],u[5]=h[5]);for(var c,p,f,d,_,y,v,m,x,w,b,E,S,C,T,O,R=0,I=i.length,P=0,L=0,A=0,M=null,F=null,k=this.coordinateCache_,D=this.viewRotation_,j=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,Z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},N=this.instructions!=i||this.overlaps?0:200;R<I;){var G=i[R];switch(G[0]){case Jo.BEGIN_GEOMETRY:S=G[1],O=G[3],S.getGeometry()?void 0===s||(0,g.kK)(s,O.getExtent())?++R:R=G[2]+1:R=G[2];break;case Jo.BEGIN_PATH:L>N&&(this.fill_(t),L=0),A>N&&(t.stroke(),A=0),L||A||(t.beginPath(),d=NaN,_=NaN),++R;break;case Jo.CIRCLE:var z=l[P=G[1]],W=l[P+1],X=l[P+2]-z,V=l[P+3]-W,Y=Math.sqrt(X*X+V*V);t.moveTo(z+Y,W),t.arc(z,W,Y,0,2*Math.PI,!0),++R;break;case Jo.CLOSE_PATH:t.closePath(),++R;break;case Jo.CUSTOM:P=G[1],c=G[2];var K=G[3],B=G[4],U=6==G.length?G[5]:void 0;Z.geometry=K,Z.feature=S,R in k||(k[R]=[]);var H=k[R];U?U(l,P,c,2,H):(H[0]=l[P],H[1]=l[P+1],H.length=2),B(H,Z),++R;break;case Jo.DRAW_IMAGE:P=G[1],c=G[2],m=G[3],p=G[4],f=G[5];var q=G[6],J=G[7],Q=G[8],$=G[9],tt=G[10],et=G[11],nt=G[12],it=G[13],rt=G[14];if(!m&&G.length>=19){x=G[18],w=G[19],b=G[20],E=G[21];var ot=this.drawLabelWithPointPlacement_(x,w,b,E);m=ot.label,G[3]=m;var st=G[22];p=(ot.anchorX-st)*this.pixelRatio,G[4]=p;var at=G[23];f=(ot.anchorY-at)*this.pixelRatio,G[5]=f,q=m.height,G[6]=q,it=m.width,G[13]=it}var lt=void 0;G.length>24&&(lt=G[24]);var ut=void 0,ht=void 0,ct=void 0;G.length>16?(ut=G[15],ht=G[16],ct=G[17]):(ut=dt,ht=!1,ct=!1),tt&&j?et+=D:tt||j||(et-=D);for(var pt=0;P<c;P+=2)if(!(lt&&lt[pt++]<it/this.pixelRatio)){var ft=[t,e,m,Wt=this.calculateImageOrLabelDimensions_(m.width,m.height,l[P],l[P+1],it,q,p,f,Q,$,et,nt,r,ut,ht||ct,S),J,ht?M:null,ct?F:null],gt=void 0,_t=void 0;if(a&&rt){var yt=c-P;if(!rt[yt]){rt[yt]=ft;continue}if(gt=rt[yt],delete rt[yt],_t=Ps(gt),a.collides(_t))continue}a&&a.collides(Wt.declutterBox)||(gt&&(a&&a.insert(_t),this.replayImageOrLabel_.apply(this,gt)),a&&a.insert(Wt.declutterBox),this.replayImageOrLabel_.apply(this,ft))}++R;break;case Jo.DRAW_CHARS:var vt=G[1],mt=G[2],xt=G[3],wt=G[4];E=G[5];var bt=G[6],Et=G[7],Ct=G[8];b=G[9];var Tt=G[10];x=G[11],w=G[12];var Ot=[G[13],G[13]],Rt=this.textStates[w],It=Rt.font,Pt=[Rt.scale[0]*Et,Rt.scale[1]*Et],Lt=void 0;It in this.widths_?Lt=this.widths_[It]:(Lt={},this.widths_[It]=Lt);var At=Ss(l,vt,mt,2),Mt=Math.abs(Pt[0])*St(It,x,Lt);if(wt||Mt<=At){var Ft=this.textStates[w].textAlign,kt=Es(l,vt,mt,2,x,(At-Mt)*fs[Ft],bt,Math.abs(Pt[0]),St,It,Lt,j?0:this.viewRotation_);t:if(kt){var Dt=[],jt=void 0,Zt=void 0,Nt=void 0,Gt=void 0,zt=void 0;if(b)for(jt=0,Zt=kt.length;jt<Zt;++jt){Nt=(zt=kt[jt])[4],Gt=this.createLabel(Nt,w,"",b),p=zt[2]+(Pt[0]<0?-Tt:Tt),f=xt*Gt.height+2*(.5-xt)*Tt*Pt[1]/Pt[0]-Ct;var Wt=this.calculateImageOrLabelDimensions_(Gt.width,Gt.height,zt[0],zt[1],Gt.width,Gt.height,p,f,0,0,zt[3],Ot,!1,dt,!1,S);if(a&&a.collides(Wt.declutterBox))break t;Dt.push([t,e,Gt,Wt,1,null,null])}if(E)for(jt=0,Zt=kt.length;jt<Zt;++jt){if(Nt=(zt=kt[jt])[4],Gt=this.createLabel(Nt,w,E,""),p=zt[2],f=xt*Gt.height-Ct,Wt=this.calculateImageOrLabelDimensions_(Gt.width,Gt.height,zt[0],zt[1],Gt.width,Gt.height,p,f,0,0,zt[3],Ot,!1,dt,!1,S),a&&a.collides(Wt.declutterBox))break t;Dt.push([t,e,Gt,Wt,1,null,null])}a&&a.load(Dt.map(Ps));for(var Xt=0,Vt=Dt.length;Xt<Vt;++Xt)this.replayImageOrLabel_.apply(this,Dt[Xt])}}++R;break;case Jo.END_GEOMETRY:if(void 0!==o){var Yt=o(S=G[1],O);if(Yt)return Yt}++R;break;case Jo.FILL:N?L++:this.fill_(t),++R;break;case Jo.MOVE_TO_LINE_TO:for(P=G[1],c=G[2],C=l[P],v=(T=l[P+1])+.5|0,(y=C+.5|0)===d&&v===_||(t.moveTo(C,T),d=y,_=v),P+=2;P<c;P+=2)y=(C=l[P])+.5|0,v=(T=l[P+1])+.5|0,P!=c-2&&y===d&&v===_||(t.lineTo(C,T),d=y,_=v);++R;break;case Jo.SET_FILL_STYLE:M=G,this.alignFill_=G[2],L&&(this.fill_(t),L=0,A&&(t.stroke(),A=0)),t.fillStyle=G[1],++R;break;case Jo.SET_STROKE_STYLE:F=G,A&&(t.stroke(),A=0),this.setStrokeStyle_(t,G),++R;break;case Jo.STROKE:N?A++:t.stroke(),++R;break;default:++R}}L&&this.fill_(t),A&&t.stroke()},t.prototype.execute=function(t,e,n,i,r,o){this.viewRotation_=i,this.execute_(t,e,n,this.instructions,r,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,n,i,r){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,r)},t}();const ks=Fs;var Ds=[ws,ys,xs,ms,bs,vs],js=function(){function t(t,e,n,i,r,o){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(r)}return t.prototype.clip=function(t,e){var n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var n=this.executorsByZIndex_[e];void 0===n&&(n={},this.executorsByZIndex_[e]=n);var i=t[e];for(var r in i){var o=i[r];n[r]=new ks(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[e],i=0,r=t.length;i<r;++i)if(t[i]in n)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r,o){var s=2*(i=Math.round(i))+1,a=p(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-n,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=(0,ot.E4)(s,s));var u,h=this.hitDetectionContext_;h.canvas.width!==s||h.canvas.height!==s?(h.canvas.width=s,h.canvas.height=s):l||h.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(u=(0,g.lJ)(),(0,g.Wj)(u,t),(0,g.f3)(u,e*(this.renderBuffer_+i),u));var c,f=function(t){if(void 0!==Zs[t])return Zs[t];for(var e=2*t+1,n=t*t,i=new Array(n+1),r=0;r<=t;++r)for(var o=0;o<=t;++o){var s=r*r+o*o;if(s>n)break;var a=i[s];a||(a=[],i[s]=a),a.push(4*((t+r)*e+(t+o))+3),r>0&&a.push(4*((t-r)*e+(t+o))+3),o>0&&(a.push(4*((t+r)*e+(t-o))+3),r>0&&a.push(4*((t-r)*e+(t-o))+3))}for(var l=[],u=(r=0,i.length);r<u;++r)i[r]&&l.push.apply(l,i[r]);return Zs[t]=l,l}(i);function d(t,e){for(var n=h.getImageData(0,0,s,s).data,a=0,l=f.length;a<l;a++)if(n[f[a]]>0){if(!o||c!==ms&&c!==bs||-1!==o.indexOf(t)){var u=(f[a]-3)/4,p=i-u%s,d=i-(u/s|0),g=r(t,e,p*p+d*d);if(g)return g}h.clearRect(0,0,s,s);break}}var _,y,v,m,x,w=Object.keys(this.executorsByZIndex_).map(Number);for(w.sort(nn.kK),_=w.length-1;_>=0;--_){var b=w[_].toString();for(v=this.executorsByZIndex_[b],y=Ds.length-1;y>=0;--y)if(void 0!==(m=v[c=Ds[y]])&&(x=m.executeHitDetection(h,a,n,d,u)))return x}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],i=e[1],r=e[2],o=e[3],s=[n,i,n,o,r,o,r,i];return gn(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return(0,M.xb)(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,i,r,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(nn.kK),this.maxExtent_&&(t.save(),this.clip(t,n));var l,u,h,c,p,f,d=o||Ds;for(s&&a.reverse(),l=0,u=a.length;l<u;++l){var g=a[l].toString();for(p=this.executorsByZIndex_[g],h=0,c=d.length;h<c;++h)void 0!==(f=p[d[h]])&&f.execute(t,e,n,i,r,s)}this.maxExtent_&&t.restore()},t}(),Zs={};const Ns=js;var Gs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),zs=function(t){function e(e,n,i,r,o,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=n,l.extent_=i,l.transform_=r,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return Gs(e,t),e.prototype.drawImages_=function(t,e,n,i){if(this.image_){var r=gn(t,e,n,i,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var u=0,h=r.length;u<h;u+=2){var c=r[u]-this.imageAnchorX_,f=r[u+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var d=c+this.imageAnchorX_,g=f+this.imageAnchorY_;p(s,d,g,1,1,l,-d,-g),o.setTransform.apply(o,s),o.translate(d,g),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,f,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,n,i){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=gn(t,e,n,i,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<n;e+=i){var a=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var u=p(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);o.setTransform.apply(o,u),o.translate(a,l),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,n,i,r){var o=this.context_,s=gn(t,e,n,i,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;r&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return r&&o.closePath(),n},e.prototype.drawRings_=function(t,e,n,i){for(var r=0,o=n.length;r<o;++r)e=this.moveToLineTo_(t,e,n[r],i,!0);return e},e.prototype.drawCircle=function(t){if((0,g.kK)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,n){var i=t.getFlatCoordinates();if(i){var r=t.getStride();return gn(i,0,i.length,r,e,n)}return null}(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],i=e[3]-e[1],r=Math.sqrt(n*n+i*i),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case Jt:this.drawPoint(t);break;case Qt:this.drawLineString(t);break;case $t:this.drawPolygon(t);break;case te:this.drawMultiPoint(t);break;case ee:this.drawMultiLineString(t);break;case ne:this.drawMultiPolygon(t);break;case ie:this.drawGeometryCollection(t);break;case re:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var n=e.getGeometryFunction()(t);n&&(0,g.kK)(this.extent_,n.getExtent())&&(this.setStyle(e),this.drawGeometry(n))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),n=0,i=e.length;n<i;++n)this.drawGeometry(e[n])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,g.kK)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var i=t.getFlatMidpoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if((0,g.kK)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=t.getFlatCoordinates(),r=0,o=t.getEnds(),s=t.getStride();n.beginPath();for(var a=0,l=o.length;a<l;++a)r=this.moveToLineTo_(i,r,o[a],s,!1);n.stroke()}if(""!==this.text_){var u=t.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,g.kK)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var n=t.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,g.kK)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getOrientedFlatCoordinates(),i=0,r=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=r.length;s<a;++s){var l=r[s];i=this.drawRings_(n,i,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var u=t.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&((0,nn.fS)(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,n=this.contextTextState_,i=t.textAlign?t.textAlign:pt;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=i&&(n.textAlign=i,e.textAlign=i),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=i,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:i,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var n=this;if(t){var i=t.getColor();this.fillState_={fillStyle:Oo(i||at)}}else this.fillState_=null;if(e){var r=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),l=e.getLineJoin(),u=e.getWidth(),h=e.getMiterLimit(),c=s||ut;this.strokeState_={lineCap:void 0!==o?o:lt,lineDash:1===this.pixelRatio_?c:c.map((function(t){return t*n.pixelRatio_})),lineDashOffset:(a||0)*this.pixelRatio_,lineJoin:void 0!==l?l:ht,lineWidth:(void 0!==u?u:1)*this.pixelRatio_,miterLimit:void 0!==h?h:10,strokeStyle:Oo(r||ct)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var n=t.getAnchor(),i=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*this.pixelRatio_,this.imageAnchorY_=n[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=i[0],this.imageOriginY_=i[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var n=e.getColor();this.textFillState_={fillStyle:Oo(n||at)}}else this.textFillState_=null;var i=t.getStroke();if(i){var r=i.getColor(),o=i.getLineCap(),s=i.getLineDash(),a=i.getLineDashOffset(),l=i.getLineJoin(),u=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:lt,lineDash:s||ut,lineDashOffset:a||0,lineJoin:void 0!==l?l:ht,lineWidth:void 0!==u?u:1,miterLimit:void 0!==h?h:10,strokeStyle:Oo(r||ct)}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),f=t.getOffsetY(),d=t.getRotateWithView(),g=t.getRotation(),_=t.getScaleArray(),y=t.getText(),v=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==c?c:st,textAlign:void 0!==v?v:pt,textBaseline:void 0!==m?m:ft},this.text_=void 0!==y?Array.isArray(y)?y.reduce((function(t,e,n){return t+(n%2?" ":e)}),""):y:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*_[0],this.pixelRatio_*_[1]]}else this.text_=""},e}($o);const Ws=zs,Xs="fraction",Vs="pixels",Ys="bottom-left",Ks="bottom-right",Bs="top-left",Us="top-right";var Hs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qs=null,Js=function(t){function e(e,n,i,r,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=i,a.src_=n,a.tainted_,a}return Hs(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&2===this.imageState_){qs||(qs=(0,ot.E4)(1,1)),qs.drawImage(this.image_,0,0);try{qs.getImageData(0,0,1,1),this.tainted_=!1}catch(t){qs=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(O.Z.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=2,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],n=(0,ot.E4)(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(0==this.imageState_){this.imageState_=1;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=io(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&2===this.imageState_){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=m(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var i=n.getImageData(0,0,e.width,e.height),r=i.data,o=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],u=0,h=r.length;u<h;u+=4)r[u]*=o,r[u+1]*=s,r[u+2]*=a,r[u+3]*=l;n.putImageData(i,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(rt.Z),Qs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$s=function(t){function e(e){var n=this,i=e||{},r=void 0!==i.opacity?i.opacity:1,o=void 0!==i.rotation?i.rotation:0,s=void 0!==i.scale?i.scale:1,a=void 0!==i.rotateWithView&&i.rotateWithView;(n=t.call(this,{opacity:r,rotation:o,scale:s,displacement:void 0!==i.displacement?i.displacement:[0,0],rotateWithView:a})||this).anchor_=void 0!==i.anchor?i.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:Bs,n.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:Xs,n.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:Xs,n.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var u=void 0!==i.img?i.img:null;n.imgSize_=i.imgSize;var c=i.src;(0,h.h)(!(void 0!==c&&u),4),(0,h.h)(!u||u&&n.imgSize_,5),void 0!==c&&0!==c.length||!u||(c=u.src||(0,l.sq)(u)),(0,h.h)(void 0!==c&&c.length>0,6);var p=void 0!==i.src?0:2;return n.color_=void 0!==i.color?w(i.color):null,n.iconImage_=function(t,e,n,i,r,o){var s=C.get(e,i,o);return s||(s=new Js(t,e,n,i,r,o),C.set(e,i,o,s)),s}(u,c,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,p,n.color_),n.offset_=void 0!==i.offset?i.offset:[0,0],n.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:Bs,n.origin_=null,n.size_=void 0!==i.size?i.size:null,n}return Qs(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==Xs||this.anchorYUnits_==Xs){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Xs&&(t[0]*=e[0]),this.anchorYUnits_==Xs&&(t[1]*=e[1])}if(this.anchorOrigin_!=Bs){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Us&&this.anchorOrigin_!=Ks||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Ys&&this.anchorOrigin_!=Ks||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var n=this.getDisplacement();return[t[0]-n[0],t[1]+n[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Bs){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=Us&&this.offsetOrigin_!=Ks||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=Ys&&this.offsetOrigin_!=Ks||(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(O.Z.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(O.Z.CHANGE,t)},e}(To);const ta=$s;var ea=.5,na={Point:function(t,e,n,i,r){var o,s=n.getImage(),a=n.getText();if(r&&(t=r,o=s&&a&&a.getText()?{}:void 0),s){if(2!=s.getImageState())return;var l=t.getBuilder(n.getZIndex(),ms);l.setImageStyle(s,o),l.drawPoint(e,i)}if(a&&a.getText()){var u=t.getBuilder(n.getZIndex(),bs);u.setTextStyle(a,o),u.drawText(e,i)}},LineString:function(t,e,n,i,r){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),xs);s.setFillStrokeStyle(null,o),s.drawLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(r||t).getBuilder(n.getZIndex(),bs);l.setTextStyle(a),l.drawText(e,i)}},Polygon:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),ws);a.setFillStrokeStyle(o,s),a.drawPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var u=(r||t).getBuilder(n.getZIndex(),bs);u.setTextStyle(l),u.drawText(e,i)}},MultiPoint:function(t,e,n,i,r){var o,s=n.getImage(),a=n.getText();if(r&&(t=r,o=s&&a&&a.getText()?{}:void 0),s){if(2!=s.getImageState())return;var l=t.getBuilder(n.getZIndex(),ms);l.setImageStyle(s,o),l.drawMultiPoint(e,i)}if(a&&a.getText()){var u=(r||t).getBuilder(n.getZIndex(),bs);u.setTextStyle(a,o),u.drawText(e,i)}},MultiLineString:function(t,e,n,i,r){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),xs);s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(r||t).getBuilder(n.getZIndex(),bs);l.setTextStyle(a),l.drawText(e,i)}},MultiPolygon:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(s||o){var a=t.getBuilder(n.getZIndex(),ws);a.setFillStrokeStyle(o,s),a.drawMultiPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var u=(r||t).getBuilder(n.getZIndex(),bs);u.setTextStyle(l),u.drawText(e,i)}},GeometryCollection:function(t,e,n,i,r){var o,s,a=e.getGeometriesArray();for(o=0,s=a.length;o<s;++o)(0,na[a[o].getType()])(t,a[o],n,i,r)},Circle:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),ys);a.setFillStrokeStyle(o,s),a.drawCircle(e,i)}var l=n.getText();if(l&&l.getText()){var u=(r||t).getBuilder(n.getZIndex(),bs);u.setTextStyle(l),u.drawText(e,i)}}};function ia(t,e){return parseInt((0,l.sq)(t),10)-parseInt((0,l.sq)(e),10)}function ra(t,e){return.5*t/e}function oa(t,e,n,i,r,o,s){var a=!1,l=n.getImage();if(l){var u=l.getImageState();2==u||3==u?l.unlistenImageChange(r):(0==u&&l.load(),u=l.getImageState(),l.listenImageChange(r),a=!0)}return function(t,e,n,i,r,o){var s=n.getGeometryFunction()(e);if(s){var a=s.simplifyTransformed(i,r);n.getRenderer()?sa(t,a,n,e):(0,na[a.getType()])(t,a,n,e,o)}}(t,e,n,i,o,s),a}function sa(t,e,n,i){if(e.getType()!=ie)t.getBuilder(n.getZIndex(),vs).drawCustom(e,i,n.getRenderer(),n.getHitDetectionRenderer());else for(var r=e.getGeometries(),o=0,s=r.length;o<s;++o)sa(t,r[o],n,i)}var aa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),la=function(t){function e(e){var n=t.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.dirty_=!1,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=(0,g.lJ)(),n.wrappedRenderedExtent_=(0,g.lJ)(),n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n}return aa(e,t),e.prototype.renderWorlds=function(t,e,n){var i=e.extent,r=e.viewState,o=r.center,s=r.resolution,a=r.projection,l=r.rotation,u=a.getExtent(),h=this.getLayer().getSource(),c=e.pixelRatio,p=e.viewHints,f=!(p[0]||p[1]),d=this.context,_=Math.round(e.size[0]*c),y=Math.round(e.size[1]*c),v=h.getWrapX()&&a.canWrapX(),m=v?(0,g.dz)(u):null,x=v?Math.ceil((i[2]-u[2])/m)+1:1,w=v?Math.floor((i[0]-u[0])/m):0;do{var b=this.getRenderTransform(o,s,l,c,_,y,w*m);t.execute(d,1,b,l,f,void 0,n)}while(++w<x)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var n=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];!function(t,e,n){!function(t,e,n,i,r,o,s){t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=s}(t,e,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),f(this.inversePixelTransform,this.pixelTransform);var r=d(this.pixelTransform);this.useContainer(e,r,i.opacity,this.getBackground(t));var o=this.context,s=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return null;var u=Math.round(t.size[0]*n),h=Math.round(t.size[1]*n);s.width!=u||s.height!=h?(s.width=u,s.height=h,s.style.transform!==r&&(s.style.transform=r)):this.containerReused||o.clearRect(0,0,u,h),this.preRender(o,t);var c=t.viewState,p=(c.projection,!1),_=!0;if(i.extent&&this.clipping){var y=Qe(i.extent);(p=(_=(0,g.kK)(y,t.extent))&&!(0,g.r4)(y,t.extent))&&this.clipUnrotated(o,t,y)}_&&this.renderWorlds(a,t),p&&o.restore(),this.postRender(o,t);var v=nt(i.opacity),m=this.container;return v!==m.style.opacity&&(m.style.opacity=v),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];c(this.pixelTransform,n);var i=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,s=this.renderedProjection_,a=this.wrappedRenderedExtent_,l=this.getLayer(),u=[],h=n[0]*ea,p=n[1]*ea;u.push(this.getRenderTransform(i,r,o,ea,h,p,0).slice());var f=l.getSource(),d=s.getExtent();if(f.getWrapX()&&s.canWrapX()&&!(0,g.r4)(d,a)){for(var y=a[0],v=(0,g.dz)(d),m=0,x=void 0;y<d[0];)x=v*--m,u.push(this.getRenderTransform(i,r,o,ea,h,p,x).slice()),y+=v;for(m=0,y=a[2];y>d[2];)x=v*++m,u.push(this.getRenderTransform(i,r,o,ea,h,p,x).slice()),y-=v}this.hitDetectionImageData_=function(t,e,n,i,r,o,s){var a=t[0]*ea,l=t[1]*ea,u=(0,ot.E4)(a,l);u.imageSmoothingEnabled=!1;for(var h=u.canvas,c=new Ws(u,ea,r,null,s),p=n.length,f=Math.floor(16777215/p),d={},_=1;_<=p;++_){var y=n[_-1],v=y.getStyleFunction()||i;if(i){var m=v(y,o);if(m){Array.isArray(m)||(m=[m]);for(var x="#"+("000000"+(_*f).toString(16)).slice(-6),w=0,b=m.length;w<b;++w){var E=m[w],S=E.getGeometryFunction()(y);if(S&&(0,g.kK)(r,S.getExtent())){var C=E.clone(),T=C.getFill();T&&T.setColor(x);var O=C.getStroke();O&&(O.setColor(x),O.setLineDash(null)),C.setText(void 0);var R=E.getImage();if(R&&0!==R.getOpacity()){var I=R.getImageSize();if(!I)continue;var P=(0,ot.E4)(I[0],I[1],void 0,{alpha:!1}),L=P.canvas;P.fillStyle=x,P.fillRect(0,0,L.width,L.height),C.setImage(new ta({img:L,imgSize:I,anchor:R.getAnchor(),anchorXUnits:Vs,anchorYUnits:Vs,offset:R.getOrigin(),opacity:1,size:R.getSize(),scale:R.getScale(),rotation:R.getRotation(),rotateWithView:R.getRotateWithView()}))}var A=C.getZIndex()||0;(k=d[A])||(k={},d[A]=k,k.Polygon=[],k.Circle=[],k.LineString=[],k.Point=[]),k[S.getType().replace("Multi","")].push(S,C)}}}}}for(var M=Object.keys(d).map(Number).sort(nn.kK),F=(_=0,M.length);_<F;++_){var k=d[M[_]];for(var D in k){var j=k[D];for(w=0,b=j.length;w<b;w+=2){c.setStyle(j[w+1]);for(var Z=0,N=e.length;Z<N;++Z)c.setTransform(e[Z]),c.drawGeometry(j[w])}}}return u.getImageData(0,0,h.width,h.height)}(n,u,this.renderedFeatures_,l.getStyleFunction(),a,r,o)}e(function(t,e,n){var i=[];if(n){var r=Math.floor(Math.round(t[0])*ea),o=Math.floor(Math.round(t[1])*ea),s=4*((0,_.uZ)(r,0,n.width-1)+(0,_.uZ)(o,0,n.height-1)*n.width),a=n.data[s],l=n.data[s+1],u=n.data[s+2]+256*(l+256*a),h=Math.floor(16777215/e.length);u&&u%h==0&&i.push(e[u/h-1])}return i}(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r){var o=this;if(this.replayGroup_){var s,a=e.viewState.resolution,u=e.viewState.rotation,h=this.getLayer(),c={},p=function(t,e,n){var o=(0,l.sq)(t),s=c[o];if(s){if(!0!==s&&n<s.distanceSq){if(0===n)return c[o]=!0,r.splice(r.lastIndexOf(s),1),i(t,h,e);s.geometry=e,s.distanceSq=n}}else{if(0===n)return c[o]=!0,i(t,h,e);r.push(c[o]={feature:t,layer:h,geometry:e,distanceSq:n,callback:i})}},f=[this.replayGroup_];return this.declutterExecutorGroup&&f.push(this.declutterExecutorGroup),f.some((function(i){return s=i.forEachFeatureAtCoordinate(t,a,u,n,p,i===o.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((function(t){return t.value})):null)})),s}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource();if(!n)return!1;var i=t.viewHints[0],r=t.viewHints[1],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&i||!s&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,u=l.projection,h=l.resolution,c=t.pixelRatio,p=e.getRevision(),f=e.getRenderBuffer(),d=e.getRenderOrder();void 0===d&&(d=ia);var _=l.center.slice(),y=(0,g.f3)(a,f*h),v=y.slice(),m=[y.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!(0,g.r4)(x,t.extent)){var w=(0,g.dz)(x),b=Math.max((0,g.dz)(y)/2,w);y[0]=x[0]-b,y[2]=x[2]+b,z(_,u);var E=(0,g.Cf)(m[0],u);E[0]<x[0]&&E[2]<x[2]?m.push([E[0]+w,E[1],E[2]+w,E[3]]):E[0]>x[0]&&E[2]>x[2]&&m.push([E[0]-w,E[1],E[2]-w,E[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&(0,g.r4)(this.wrappedRenderedExtent_,y))return(0,nn.fS)(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var S,C=new _s(ra(h,c),y,h,c);this.getLayer().getDeclutter()&&(S=new _s(ra(h,c),y,h,c));var T,O=Ue();if(O){for(var R=0,I=m.length;R<I;++R){var P=Je(m[R]);n.loadFeatures(P,$e(h),O)}T=Ge(O,u)}else for(R=0,I=m.length;R<I;++R)n.loadFeatures(m[R],h,u);var L=function(t,e){var n=ra(t,e);return n*n}(h,c),A=function(t){var n,i=t.getStyleFunction()||e.getStyleFunction();if(i&&(n=i(t,h)),n){var r=this.renderFeature(t,L,n,C,T,S);this.dirty_=this.dirty_||r}}.bind(this),M=Je(y),F=n.getFeaturesInExtent(M);for(d&&F.sort(d),R=0,I=F.length;R<I;++R)A(F[R]);this.renderedFeatures_=F;var k=C.finish(),D=new Ns(y,h,c,n.getOverlaps(),k,e.getRenderBuffer());return S&&(this.declutterExecutorGroup=new Ns(y,h,c,n.getOverlaps(),S.finish(),e.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=d,this.renderedExtent_=v,this.wrappedRenderedExtent_=y,this.renderedCenter_=_,this.renderedProjection_=u,this.replayGroup_=D,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,n,i,r,o){if(!n)return!1;var s=!1;if(Array.isArray(n))for(var a=0,l=n.length;a<l;++a)s=oa(i,t,n[a],e,this.boundHandleStyleImageChange_,r,o)||s;else s=oa(i,t,n,e,this.boundHandleStyleImageChange_,r,o);return s},e}(Zr);const ua=la;var ha=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const ca=function(t){function e(e){return t.call(this,e)||this}return ha(e,t),e.prototype.createRenderer=function(){return new ua(this)},e}(Yo);var pa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const fa=function(t){function e(e,n,i,r,o,s,a){var l=this,u=e.getExtent(),h=n.getExtent(),c=h?(0,g.Ed)(i,h):i,p=co(e,n,(0,g.qg)(c),r),f=new ao(e,n,c,u,.5*p,r),d=s(f.calculateSourceExtent(),p,o),_=d?0:4,y=d?d.getPixelRatio():1;return(l=t.call(this,i,r,y,_)||this).targetProj_=n,l.maxSourceExtent_=u,l.triangulation_=f,l.targetResolution_=r,l.targetExtent_=i,l.sourceImage_=d,l.sourcePixelRatio_=y,l.interpolate_=a,l.canvas_=null,l.sourceListenerKey_=null,l}return pa(e,t),e.prototype.disposeInternal=function(){1==this.state&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(2==t){var e=(0,g.dz)(this.targetExtent_)/this.targetResolution_,n=(0,g.Cr)(this.targetExtent_)/this.targetResolution_;this.canvas_=po(e,n,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()},e.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var t=this.sourceImage_.getState();2==t||3==t?this.reproject_():(this.sourceListenerKey_=(0,F.oL)(this.sourceImage_,O.Z.CHANGE,(function(t){var e=this.sourceImage_.getState();2!=e&&3!=e||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){(0,F.bN)(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(eo);var da=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ga=function(t){function e(e){var n=t.call(this)||this;n.projection=ke(e.projection),n.attributions_=_a(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:A.Z.READY,n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var i=n;return n.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e})),n}return da(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return(0,l.O3)()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=_a(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(it.Z);function _a(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const ya=ga;var va=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ma=function(t){function e(e,n){var i=t.call(this,e)||this;return i.image=n,i}return va(e,t),e}(B.ZP),xa=function(t){function e(e){var n=this,i=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),(n=t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state,interpolate:i})||this).on,n.once,n.un,n.resolutions_=void 0!==e.resolutions?e.resolutions:null,n.reprojectedImage_=null,n.reprojectedRevision_=0,n}return va(e,t),e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=(0,nn.h7)(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,n,i){var r=this.getProjection();if(r&&i&&!Ne(r,i)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Ne(this.reprojectedImage_.getProjection(),i)&&this.reprojectedImage_.getResolution()==e&&(0,g.fS)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new fa(r,i,t,e,n,function(t,e,n){return this.getImageInternal(t,e,n,r)}.bind(this),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return r&&(i=r),this.getImageInternal(t,e,n,i)},e.prototype.getImageInternal=function(t,e,n,i){return(0,l.O3)()},e.prototype.handleImageChange=function(t){var e,n=t.target;switch(n.getState()){case 1:this.loading=!0,e="imageloadstart";break;case 2:this.loading=!1,e="imageloadend";break;case 3:this.loading=!1,e="imageloaderror";break;default:return}this.hasListener(e)&&this.dispatchEvent(new ma(e,n))},e}(ya);function wa(t,e){t.getImage().src=e}const ba=xa;function Ea(t,e){var n=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&n.push(t+"="+encodeURIComponent(e[t]))}));var i=n.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+i}var Sa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ca=function(t){function e(e){var n=this,i=e||{},r=void 0===i.imageSmoothing||i.imageSmoothing;return void 0!==i.interpolate&&(r=i.interpolate),(n=t.call(this,{attributions:i.attributions,interpolate:r,projection:i.projection,resolutions:i.resolutions})||this).crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null,n.hidpi_=void 0===i.hidpi||i.hidpi,n.url_=i.url,n.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:wa,n.params_=i.params||{},n.image_=null,n.imageSize_=[0,0],n.renderedRevision_=0,n.ratio_=void 0!==i.ratio?i.ratio:1.5,n}return Sa(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,n,i){if(void 0===this.url_)return null;e=this.findNearestResolution(e),n=this.hidpi_?n:1;var r=this.image_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==n&&(0,g.r4)(r.getExtent(),t))return r;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};(0,M.f0)(o,this.params_);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.ratio_){var l=this.ratio_*(0,g.dz)(t)/2,u=this.ratio_*(0,g.Cr)(t)/2;t[0]=s-l,t[1]=a-u,t[2]=s+l,t[3]=a+u}var h=e/n,c=Math.ceil((0,g.dz)(t)/h),p=Math.ceil((0,g.Cr)(t)/h);t[0]=s-h*c/2,t[2]=s+h*c/2,t[1]=a-h*p/2,t[3]=a+h*p/2,this.imageSize_[0]=c,this.imageSize_[1]=p;var f=this.getRequestUrl_(t,this.imageSize_,n,i,o);return this.image_=new ro(t,e,n,f,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(O.Z.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,n,i,r){var o=i.getCode().split(/:(?=\d+$)/).pop();r.SIZE=e[0]+","+e[1],r.BBOX=t.join(","),r.BBOXSR=o,r.IMAGESR=o,r.DPI=Math.round(90*n);var s=this.url_,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&(0,h.h)(!1,50),Ea(a,r)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){(0,M.f0)(this.params_,t),this.image_=null,this.changed()},e}(ba);const Ta=Ca;var Oa="1.3.0";const Ra=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return(0,h.h)(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return(0,h.h)(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){(0,h.h)(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Ia(t,e,n,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function Pa(t,e,n){return t+"/"+e+"/"+n}function La(t){return Pa(t[0],t[1],t[2])}function Aa(t){return(t[1]<<t[0])+t[2]}var Ma=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Fa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ma(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey().split("/").map(Number)[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(La(e.tileCoord)),e.release())}.bind(this))}},e}(Ra);var ka=n(600),Da=[0,0,0],ja=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,h.h)((0,nn.pT)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var n=0,i=this.resolutions_.length-1;n<i;++n)if(e){if(this.resolutions_[n]/this.resolutions_[n+1]!==e){e=void 0;break}}else e=this.resolutions_[n]/this.resolutions_[n+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,(0,h.h)(this.origins_.length==this.resolutions_.length,20));var r=t.extent;void 0===r||this.origin_||this.origins_||(this.origin_=(0,g.rL)(r)),(0,h.h)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,(0,h.h)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,(0,h.h)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==r?r:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){var n=new vo(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(r){var i=this.getTileRangeForExtentAndZ(r,e);n.minX=Math.max(i.minX,n.minX),n.maxX=Math.min(i.maxX,n.maxX),n.minY=Math.max(i.minY,n.minY),n.maxY=Math.min(i.maxY,n.maxY)}return n}),this):r&&this.calculateTileRanges_(r)}return t.prototype.forEachTileCoord=function(t,e,n){for(var i=this.getTileRangeForExtentAndZ(t,e),r=i.minX,o=i.maxX;r<=o;++r)for(var s=i.minY,a=i.maxY;s<=a;++s)n([e,r,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,n,i){var r,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(r=t[1],o=t[2]):s=this.getTileCoordExtent(t,i);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?yo(r=Math.floor(r/2),r,o=Math.floor(o/2),o,n):this.getTileRangeForExtentAndZ(s,a,n)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var i=2*t[1],r=2*t[2];return yo(i,i+1,r,r+1,e)}var o=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;var i=t[0],r=t[1],o=t[2];if(e===i)return yo(r,o,r,o,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-i),a=Math.floor(r*s),l=Math.floor(o*s);return e<i?yo(a,a,l,l,n):yo(a,Math.floor(s*(r+1))-1,l,Math.floor(s*(o+1))-1,n)}var u=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(u,e,n)},t.prototype.getTileRangeExtent=function(t,e,n){var i=this.getOrigin(t),r=this.getResolution(t),o=ai(this.getTileSize(t),this.tmpSize_),s=i[0]+e.minX*o[0]*r,a=i[0]+(e.maxX+1)*o[0]*r,l=i[1]+e.minY*o[1]*r,u=i[1]+(e.maxY+1)*o[1]*r;return(0,g.T9)(s,l,a,u,n)},t.prototype.getTileRangeForExtentAndZ=function(t,e,n){var i=Da;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,i);var r=i[1],o=i[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,i),yo(r,i[1],o,i[2],n)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),n=this.getResolution(t[0]),i=ai(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*i[0]*n,e[1]-(t[2]+.5)*i[1]*n]},t.prototype.getTileCoordExtent=function(t,e){var n=this.getOrigin(t[0]),i=this.getResolution(t[0]),r=ai(this.getTileSize(t[0]),this.tmpSize_),o=n[0]+t[1]*r[0]*i,s=n[1]-(t[2]+1)*r[1]*i,a=o+r[0]*i,l=s+r[1]*i;return(0,g.T9)(o,s,a,l,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,n,i,r){var o=this.getZForResolution(n),s=n/this.getResolution(o),a=this.getOrigin(o),l=ai(this.getTileSize(o),this.tmpSize_),u=s*(t-a[0])/n/l[0],h=s*(a[1]-e)/n/l[1];return i?(u=(0,_.mD)(u,5)-1,h=(0,_.mD)(h,5)-1):(u=(0,_.GW)(u,5),h=(0,_.GW)(h,5)),Ia(o,u,h,r)},t.prototype.getTileCoordForXYAndZ_=function(t,e,n,i,r){var o=this.getOrigin(n),s=this.getResolution(n),a=ai(this.getTileSize(n),this.tmpSize_),l=(t-o[0])/s/a[0],u=(o[1]-e)/s/a[1];return i?(l=(0,_.mD)(l,5)-1,u=(0,_.mD)(u,5)-1):(l=(0,_.GW)(l,5),u=(0,_.GW)(u,5)),Ia(n,l,u,r)},t.prototype.getTileCoordForCoordAndZ=function(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){var n=(0,nn.h7)(this.resolutions_,t,e||0);return(0,_.uZ)(n,this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,n=new Array(e),i=this.minZoom;i<e;++i)n[i]=this.getTileRangeForExtentAndZ(t,i);this.fullTileRanges_=n},t}();const Za=ja;function Na(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,n,i){return function(t,e,n,i){var r=ka.Z.TOP_LEFT,o=Ga(t,undefined,n);return new Za({extent:t,origin:(0,g.g0)(t,r),resolutions:o,tileSize:n})}(za(t),0,void 0)}(t),t.setDefaultTileGrid(e)),e}function Ga(t,e,n,i){for(var r=void 0!==e?e:42,o=(0,g.Cr)(t),s=(0,g.dz)(t),a=ai(void 0!==n?n:256),l=i>0?i:Math.max(s/a[0],o/a[1]),u=r+1,h=new Array(u),c=0;c<u;++c)h[c]=l/Math.pow(2,c);return h}function za(t){var e=(t=ke(t)).getExtent();if(!e){var n=180*se[ae.DEGREES]/t.getMetersPerUnit();e=(0,g.T9)(-n,-n,n,n)}return e}var Wa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Xa=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;return n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null,n.tileGrid&&ai(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),[256,256]),n.tileCache=new Fa(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return Wa(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,i){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var o,s,a,l=!0,u=n.minX;u<=n.maxX;++u)for(var h=n.minY;h<=n.maxY;++h)s=Pa(e,u,h),a=!1,r.containsKey(s)&&(a=2===(o=r.get(s)).getState())&&(a=!1!==i(o)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,n,i,r){return(0,l.O3)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Na(t)},e.prototype.getTileCacheForProjection=function(t){return(0,h.h)(Ne(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var i=this.getTileGridForProjection(n),r=this.getTilePixelRatio(e),o=ai(i.getTileSize(t),this.tmpSize);return 1==r?o:si(o,r,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),i=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=function(t,e,n){var i=e[0],r=t.getTileCoordCenter(e),o=za(n);if((0,g.b8)(o,r))return e;var s=(0,g.dz)(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,t.getTileCoordForCoordAndZ(r,i)}(i,t,n)),function(t,e){var n=t[0],i=t[1],r=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;var o=e.getFullTileRange(n);return!o||o.containsXY(i,r)}(t,i)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,i){},e}(ya),Va=function(t){function e(e,n){var i=t.call(this,e)||this;return i.tile=n,i}return Wa(e,t),e}(B.ZP);const Ya=Xa;function Ka(t,e){var n=/\{z\}/g,i=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(n,s[0].toString()).replace(i,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],n=e.getFullTileRange(t);return(0,h.h)(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}var Ba=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ua=function(t){function e(n){var i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return i.generateTileUrlFunction_=i.tileUrlFunction===e.prototype.tileUrlFunction,i.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(i.tileUrlFunction=n.tileUrlFunction),i.urls=null,n.urls?i.setUrls(n.urls):n.url&&i.setUrl(n.url),i.tileLoadingKeys_={},i}return Ba(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,i=(0,l.sq)(n),r=n.getState();1==r?(this.tileLoadingKeys_[i]=!0,e="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=3==r?"tileloaderror":2==r?"tileloadend":void 0),null!=e&&this.dispatchEvent(new Va(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var i=n[1].charCodeAt(0),r=n[2].charCodeAt(0),o=void 0;for(o=i;o<=r;++o)e.push(t.replace(n[0],String.fromCharCode(o)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(n[2],10),a=parseInt(n[1],10);a<=s;a++)e.push(t.replace(n[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){for(var n=t.length,i=new Array(n),r=0;r<n;++r)i[r]=Ka(t[r],e);return function(t){return 1===t.length?t[0]:function(e,n,i){if(e){var r=Aa(e),o=(0,_.$W)(r,t.length);return t[o](e,n,i)}}}(i)}(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var i=Pa(t,e,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)},e}(Ya);const Ha=Ua;var qa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ja=function(t){function e(e){var n=this,i=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),(n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Qa,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:i,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:so,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return qa(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);for(var i in this.tileCache.expireCache(this.tileCache==n?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[i];r.expireCache(r==n?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Ne(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Ne(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Ne(e,t)){var n=(0,l.sq)(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Na(t)),this.tileGridForProjection[n]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Ne(e,t))return this.tileCache;var n=(0,l.sq)(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Fa(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},e.prototype.createTile_=function(t,e,n,i,r,o){var s=[t,e,n],a=this.getTileCoordForTileUrlFunction(s,r),l=a?this.tileUrlFunction(a,i,r):void 0,u=new this.tileClass(s,void 0!==l?0:4,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(O.Z.CHANGE,this.handleTileChange.bind(this)),u},e.prototype.getTile=function(t,e,n,i,r){var o=this.getProjection();if(o&&r&&!Ne(o,r)){var s=this.getTileCacheForProjection(r),a=[t,e,n],l=void 0,u=La(a);s.containsKey(u)&&(l=s.get(u));var h=this.getKey();if(l&&l.key==h)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(a,r),d=new go(o,c,r,p,a,f,this.getTilePixelRatio(i),this.getGutter(),function(t,e,n,i){return this.getTileInternal(t,e,n,i,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return d.key=h,l?(d.interimTile=l,d.refreshInterimChain(),s.replace(u,d)):s.set(u,d),d}return this.getTileInternal(t,e,n,i,o||r)},e.prototype.getTileInternal=function(t,e,n,i,r){var o=null,s=Pa(t,e,n),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,n,i,r,a),0==l.getState()?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,n,i,r,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var n=ke(t);if(n){var i=(0,l.sq)(n);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}},e}(Ha);function Qa(t,e){t.getImage().src=e}const $a=Ja;var tl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),el=function(t){function e(e){var n=this,i=e||{},r=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(r=i.interpolate);var o=i.params||{},s=!("TRANSPARENT"in o)||o.TRANSPARENT;return(n=t.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:r,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:i.zDirection})||this).gutter_=void 0!==i.gutter?i.gutter:0,n.params_=o,n.v13_=!0,n.serverType_=i.serverType,n.hidpi_=void 0===i.hidpi||i.hidpi,n.tmpExtent_=(0,g.lJ)(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return tl(e,t),e.prototype.getFeatureInfoUrl=function(t,e,n,i){var r=ke(n),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(r));var a=s.getZForResolution(e,this.zDirection),l=s.getTileCoordForCoordAndZ(t,a);if(!(s.getResolutions().length<=l[0])){var u=s.getResolution(l[0]),h=s.getTileCoordExtent(l,this.tmpExtent_),c=ai(s.getTileSize(l[0]),this.tmpSize),p=this.gutter_;0!==p&&(c=ri(c,p,this.tmpSize),h=(0,g.f3)(h,u*p,h)),o&&o!==r&&(u=co(o,r,t,u),h=Xe(h,r,o),t=We(t,r,o));var f={SERVICE:"WMS",VERSION:Oa,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};(0,M.f0)(f,this.params_,i);var d=Math.floor((t[0]-h[0])/u),_=Math.floor((h[3]-t[1])/u);return f[this.v13_?"I":"X"]=d,f[this.v13_?"J":"Y"]=_,this.getRequestUrl_(l,c,h,1,o||r,f)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var n={SERVICE:"WMS",VERSION:Oa,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var i=this.params_.LAYERS;if(Array.isArray(i)&&1!==i.length)return;n.LAYER=i}if(void 0!==t){var r=this.getProjection()?this.getProjection().getMetersPerUnit():1;n.SCALE=t*r/28e-5}return(0,M.f0)(n,e),Ea(this.urls[0],n)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,n,i,r,o){var s=this.urls;if(s){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=i)switch(this.serverType_){case"geoserver":var a=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case"mapserver":o.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":o.DPI=90*i;break;default:(0,h.h)(!1,52)}var l=r.getAxisOrientation(),u=n;if(this.v13_&&"ne"==l.substr(0,2)){var c=void 0;c=n[0],u[0]=n[1],u[1]=c,c=n[2],u[2]=n[3],u[3]=c}return o.BBOX=u.join(","),Ea(1==s.length?s[0]:s[(0,_.$W)(Aa(t),s.length)],o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")},e.prototype.updateParams=function(t){(0,M.f0)(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Oa;this.v13_=function(t,e){for(var n=(""+t).split("."),i="1.3".split("."),r=0;r<Math.max(n.length,i.length);r++){var o=parseInt(n[r]||"0",10),s=parseInt(i[r]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}(t)>=0},e.prototype.tileUrlFunction=function(t,e,n){var i=this.getTileGrid();if(i||(i=this.getTileGridForProjection(n)),!(i.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var r=i.getResolution(t[0]),o=i.getTileCoordExtent(t,this.tmpExtent_),s=ai(i.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(s=ri(s,a,this.tmpSize),o=(0,g.f3)(o,r*a,o)),1!=e&&(s=si(s,e,this.tmpSize));var l={SERVICE:"WMS",VERSION:Oa,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return(0,M.f0)(l,this.params_),this.getRequestUrl_(t,s,o,e,n,l)}},e}($a);const nl=el;var il=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rl=function(t){function e(e){var n=e||{},i=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(i=n.interpolate);var r=void 0!==n.projection?n.projection:"EPSG:3857",o=void 0!==n.tileGrid?n.tileGrid:function(t){var e=t||{},n=e.extent||ke("EPSG:3857").getExtent(),i={extent:n,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Ga(n,e.maxZoom,e.tileSize,e.maxResolution)};return new Za(i)}({extent:za(r),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});return t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:i,opaque:n.opaque,projection:r,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this}return il(e,t),e}($a);const ol=rl;var sl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),al=function(t){function e(e){var n,i=e||{},r=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(r=i.interpolate),n=void 0!==i.attributions?i.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var o=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",s=void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:n,attributionsCollapsible:!1,cacheSize:i.cacheSize,crossOrigin:o,interpolate:r,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,opaque:void 0===i.opaque||i.opaque,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,transition:i.transition,url:s,wrapX:i.wrapX,zDirection:i.zDirection})||this}return sl(e,t),e}(ol);const ll=al;const ul=function(){function t(t){this.rbush_=new So(t),this.items_={}}return t.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[(0,l.sq)(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),i=0,r=e.length;i<r;i++){var o=t[i],s=e[i],a={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};n[i]=a,this.items_[(0,l.sq)(s)]=a}this.rbush_.load(n)},t.prototype.remove=function(t){var e=(0,l.sq)(t),n=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(n)},t.prototype.update=function(t,e){var n=this.items_[(0,l.sq)(e)],i=[n.minX,n.minY,n.maxX,n.maxY];(0,g.fS)(i,t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var n,i=0,r=t.length;i<r;i++)if(n=e(t[i]))return n;return n},t.prototype.isEmpty=function(){return(0,M.xb)(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return(0,g.T9)(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),hl="addfeature",cl="removefeature";function pl(t,e){return[[-1/0,-1/0,1/0,1/0]]}const fl="arraybuffer";function dl(t,e){return function(n,i,r,o,s){var l=this;!function(t,e,n,i,r,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(n,i,r):t,!0),e.getType()==fl&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var i=e.getType(),l=void 0;"json"==i||"text"==i?l=a.responseText:"xml"==i?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):i==fl&&(l=a.response),l?o(e.readFeatures(l,{extent:n,featureProjection:r}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,n,i,r,(function(t,e){l.addFeatures(t),void 0!==o&&o(t)}),s||a.Zn)}}var gl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_l=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.feature=n,r.features=i,r}return gl(e,t),e}(B.ZP),yl=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:A.Z.READY,wrapX:void 0===i.wrapX||i.wrapX})||this).on,n.once,n.un,n.loader_=a.Zn,n.format_=i.format,n.overlaps_=void 0===i.overlaps||i.overlaps,n.url_=i.url,void 0!==i.loader?n.loader_=i.loader:void 0!==n.url_&&((0,h.h)(n.format_,7),n.loader_=dl(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:pl;var r,o,s=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=s?new ul:null,n.loadedExtentsRtree_=new ul,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?o=i.features:i.features&&(o=(r=i.features).getArray()),s||void 0!==r||(r=new Rt.Z(o)),void 0!==o&&n.addFeaturesInternal(o),void 0!==r&&n.bindFeaturesCollection_(r),n}return gl(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=(0,l.sq)(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var i=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new _l(hl,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[(0,F.oL)(e,O.Z.CHANGE,this.handleFeatureChange_,this),(0,F.oL)(e,K.Z.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,i=e.getId();return void 0!==i&&(i.toString()in this.idIndex_?n=!1:this.idIndex_[i.toString()]=e),n&&((0,h.h)(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],i=[],r=0,o=t.length;r<o;r++){var s=t[r],a=(0,l.sq)(s);this.addToIndex_(a,s)&&n.push(s)}r=0;for(var u=n.length;r<u;r++){s=n[r],a=(0,l.sq)(s),this.setupChangeEvents_(a,s);var h=s.getGeometry();if(h){var c=h.getExtent();e.push(c),i.push(s)}else this.nullGeometryFeatures_[a]=s}if(this.featuresRtree_&&this.featuresRtree_.load(e,i),this.hasListener(hl)){r=0;for(var p=n.length;r<p;r++)this.dispatchEvent(new _l(hl,n[r]))}},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(hl,(function(n){e||(e=!0,t.push(n.feature),e=!1)})),this.addEventListener(cl,(function(n){e||(e=!0,t.remove(n.feature),e=!1)})),t.addEventListener(It.Z.ADD,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(It.Z.REMOVE,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_)this.featureChangeKeys_[e].forEach(F.bN);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var n=function(t){this.removeFeatureInternal(t)}.bind(this);for(var i in this.featuresRtree_.forEach(n),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var r=new _l("clear");this.dispatchEvent(r),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,(function(n){return n.getGeometry().intersectsCoordinate(t)?e(n):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(n){if(n.getGeometry().intersectsExtent(t)){var i=e(n);if(i)return i}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,M.xb)(this.nullGeometryFeatures_)||(0,nn.l7)(t,(0,M.KX)(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var n=t[0],i=t[1],r=null,o=[NaN,NaN],s=1/0,l=[-1/0,-1/0,1/0,1/0],u=e||a.uX;return this.featuresRtree_.forEachInExtent(l,(function(t){if(u(t)){var e=t.getGeometry(),a=s;if((s=e.closestPointXY(n,i,o,s))<a){r=t;var h=Math.sqrt(s);l[0]=n-h,l[1]=i-h,l[2]=n+h,l[3]=i+h}}})),r},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,n=(0,l.sq)(e),i=e.getGeometry();if(i){var r=i.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(r,e)):this.featuresRtree_&&this.featuresRtree_.update(r,e)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);var o=e.getId();if(void 0!==o){var s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new _l("changefeature",e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:(0,l.sq)(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,M.xb)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()},e.prototype.loadFeatures=function(t,e,n){for(var i=this.loadedExtentsRtree_,r=this.strategy_(t,e,n),o=function(t,o){var a=r[t];i.forEachInExtent(a,(function(t){return(0,g.r4)(t.extent,a)}))||(++s.loadingExtentsCount_,s.dispatchEvent(new _l("featuresloadstart")),s.loader_.call(s,a,e,n,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new _l("featuresloadend",void 0,t))}.bind(s),function(){--this.loadingExtentsCount_,this.dispatchEvent(new _l("featuresloaderror"))}.bind(s)),i.insert(a,{extent:a.slice()}))},s=this,a=0,l=r.length;a<l;++a)o(a);this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,(function(n){if((0,g.fS)(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=(0,l.sq)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var e=(0,l.sq)(t),n=this.featureChangeKeys_[e];if(n){n.forEach(F.bN),delete this.featureChangeKeys_[e];var i=t.getId();return void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new _l(cl,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){(0,h.h)(this.format_,7),this.url_=t,this.setLoader(dl(t,this.format_))},e}(ya);const vl=yl;var ml=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xl=function(t){function e(e){var n=t.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;n.setGeometry(i)}else{var r=e;n.setProperties(r)}return n}return ml(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&((0,F.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=(0,F.oL)(t,O.Z.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){return"function"==typeof t?t:(Array.isArray(t)?e=t:((0,h.h)("function"==typeof t.getZIndex,41),e=[t]),function(){return e});var e}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(it.Z);const wl=xl;var bl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),El=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],Sl=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{element:document.createElement("div"),target:i.target})||this).on,n.once,n.un,n.keys_=void 0!==i.keys&&i.keys,n.source_=i.source,n.isInFullscreen_=!1,n.boundHandleMapTargetChange_=n.handleMapTargetChange_.bind(n),n.cssClassName_=void 0!==i.className?i.className:"ol-full-screen",n.documentListeners_=[],n.activeClassName_=void 0!==i.activeClassName?i.activeClassName.split(" "):[n.cssClassName_+"-true"],n.inactiveClassName_=void 0!==i.inactiveClassName?i.inactiveClassName.split(" "):[n.cssClassName_+"-false"];var r=void 0!==i.label?i.label:"⤢";n.labelNode_="string"==typeof r?document.createTextNode(r):r;var o=void 0!==i.labelActive?i.labelActive:"×";n.labelActiveNode_="string"==typeof o?document.createTextNode(o):o;var s=i.tipLabel?i.tipLabel:"Toggle full-screen";return n.button_=document.createElement("button"),n.button_.title=s,n.button_.setAttribute("type","button"),n.button_.appendChild(n.labelNode_),n.button_.addEventListener(O.Z.CLICK,n.handleClick_.bind(n),!1),n.setClassName_(n.button_,n.isInFullscreen_),n.element.className="".concat(n.cssClassName_," ").concat("ol-unselectable"," ").concat(Q),n.element.appendChild(n.button_),n}return bl(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){var t=this.getMap();if(t){var e=t.getOwnerDocument();if(Cl(e))if(Tl(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{var n;n=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():Ol(t)}(n):Ol(n)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var e=this.isInFullscreen_;this.isInFullscreen_=Tl(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,ot.$H)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,ot.$H)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}},e.prototype.setClassName_=function(t,e){var n,i,r,o;e?((n=t.classList).remove.apply(n,this.inactiveClassName_),(i=t.classList).add.apply(i,this.activeClassName_)):((r=t.classList).remove.apply(r,this.activeClassName_),(o=t.classList).add.apply(o,this.inactiveClassName_))},e.prototype.setMap=function(e){var n=this.getMap();n&&n.removeChangeListener(Yt,this.boundHandleMapTargetChange_),t.prototype.setMap.call(this,e),this.handleMapTargetChange_(),e&&e.addChangeListener(Yt,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,e=0,n=t.length;e<n;++e)(0,F.bN)(t[e]);t.length=0;var i=this.getMap();if(i){var r=i.getOwnerDocument();for(Cl(r)?this.element.classList.remove(J):this.element.classList.add(J),e=0,n=El.length;e<n;++e)t.push((0,F.oL)(r,El[e],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},e}(fi.default);function Cl(t){var e=t.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&t.msFullscreenEnabled||e.requestFullscreen&&t.fullscreenEnabled)}function Tl(t){return!!(t.webkitIsFullScreen||t.msFullscreenElement||t.fullscreenElement)}function Ol(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}const Rl=Sl;var Il=n(421),Pl=n.n(Il);const Ll=new vl,Al=new ca({source:Ll}),Ml=document.createElement("div");Ml.className="ol-control ol-unselectable locate",Ml.innerHTML='<button title="Locate me">◎</button>',Ml.addEventListener("click",(function(){let t=!0;navigator.geolocation.watchPosition((function(e){const n=[e.coords.longitude,e.coords.latitude],i=function(t,e,n,i){for(var r=[],o=0;o<32;++o)(0,nn.l7)(r,Ie(t,e,2*Math.PI*o/32,undefined));return r.push(r[0],r[1]),new Hn(r,fn,[r.length])}(n,e.coords.accuracy);var r;Ll.clear(!0),Ll.addFeatures([new wl(i.transform("EPSG:4326",Kl.getView().getProjection())),new wl(new Gn((r=n,Le(),We(r,"EPSG:4326","EPSG:3857"))))]),t&&(t=!1,Kl.getView().fit(Ll.getExtent(),{maxZoom:18,duration:500}))}),(function(t){alert(`ERROR: ${t.message}`)}),{enableHighAccuracy:!0})}));let Fl='&copy; <a href="https://www.o2online.de/service/netzabdeckung/" target="_blank">O2 Netzabdeckung</a>',kl="https://dccb7552-tiles.spatialbuzz.net/tiles/o2_de-v246/styles/o2_de_v246_",Dl='&copy; <a href="https://t-map.telekom.de" target="_blank">Telekom Netzabdeckung</a>',jl="https://t-map.telekom.de/arcgis/rest/services/public/coverage/MapServer",Zl='&copy; <a href="https://netmap.vodafone.de/cokart-client/index.html?lang=de&app=cokart_4x" target="_blank">Vodafone Netzkarte</a>',Nl="https://wifionic.de/vodafone-map/MapServer",Gl='&copy; <a href="https://app.wigeogis.com/kunden/tmobile/map.php" target="_blank">T-Mobile Speedmap</a>',zl="https://wifionic.de/magenta-at-map",Wl='&copy; <a href="https://scmplc.begasoft.ch/plcapp/pages/gis/netzabdeckung.jsf" target="_blank">Swisscom Mobilfunk-Abdeckung</a>',Xl="https://scmplc.begasoft.ch/plcapp/netzabdeckung/swisscom?layer=",Vl='&copy; <a href="https://www.salt.ch/de/coverage/" target="_blank">Salt Netzbdeckung</a',Yl="https://mapserver.salt.ch/public/gmaps";var Kl=new Or({target:"map",maxTilesLoading:512,controls:Ei().extend([new Rl,new fi.default({element:Ml}),new(Pl())({startActive:!0,activationMode:"click",reverse:!0})]),layers:[new Pt.default({title:"Grundkarte",layers:[new Eo({title:"OSM DE",type:"base",visible:!0,source:new ol({url:"https://gauss.openstreetmap.de/{z}/{x}/{y}.png",attributions:['Tiles &copy; <a href="https://openstreetmap.de/">OpenStreetMap - Deutschland</a>','© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.']})}),new Eo({title:"OSM",type:"base",visible:!0,source:new ll})]}),Al,new Eo({title:"Bahnstrecken",visible:!1,source:new ol({url:"https://c.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png",attributions:['Tiles &copy; <a href="https://openrailwaymaps.org/">OpenRailwayMaps</a>','© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.']})}),new Pt.default({title:"CH",layers:[new Eo({title:"Swisscom: GSM",visible:!1,opacity:.3,source:new ol({url:Xl+"gsm&zoom={z}&x={x}&y={y}",attributions:[Wl],minZoom:3,maxZoom:23})}),new Eo({title:"Swisscom: UMTS",visible:!1,opacity:.3,source:new ol({url:Xl+"umts&zoom={z}&x={x}&y={y}",attributions:[Wl],minZoom:3,maxZoom:23})}),new Eo({title:"Swisscom: LTE",visible:!1,opacity:.3,source:new ol({url:Xl+"lte;lteAdvanced&zoom={z}&x={x}&y={y}",attributions:[Wl],minZoom:3,maxZoom:23})}),new Eo({title:"Swisscom: NR",visible:!1,opacity:.3,source:new ol({url:Xl+"newRadioWide;newRadioFast&zoom={z}&x={x}&y={y}",attributions:[Wl],minZoom:3,maxZoom:23})}),new Eo({title:"Sunrise",visible:!1,opacity:.3,source:new ol({url:"https://maps.sunrise.ch/cgi-bin/mapserv?map=/opt/app/data/sunrise_coverages_2019.map&LAYERS=coverage&mode=tile&tilemode=gmap&tile={x}+{y}+{z}",attributions:['&copy; <a href="https://www.sunrise.ch/de/privatkunden/mobil-abos/mobilnetz/netzabdeckung/netzabdeckungskarte.html" target="_blank">Sunrise Netzbdeckung</a>'],minZoom:3,maxZoom:23})}),new Eo({title:"Salt: GSM + UMTS",visible:!1,opacity:.3,source:new ol({url:Yl+"2G3G@GoogleMapsCompatible/{z}/{x}/{y}.png",attributions:[Vl],maxZoom:19})}),new Eo({title:"Salt: GSM + UMTS + LTE",visible:!1,opacity:.3,source:new ol({url:Yl+"2G3G4G@GoogleMapsCompatible/{z}/{x}/{y}.png",attributions:[Vl],maxZoom:19})})]}),new Pt.default({title:"AT",layers:[new Eo({title:"A1: Kombi-Layer",visible:!1,opacity:.7,source:new ol({url:"https://cdn2.a1.net/final/tiles/a1/LIVE/tiles-0/{z}/{x}/{y}.png",attributions:['&copy; <a href="https://www.a1.net/hilfe-support/netzabdeckung/" target="_blank">A1 Netzabdeckungz</a>'],maxZoom:10})}),new Eo({title:"Magenta: Internet",visible:!1,opacity:.7,source:new nl({url:zl,params:{LAYERS:"tmobile:tmobile",SLD:"http://appserverpu.wigeo.lan/kunden/tmobile/sld/internet.xml"},attributions:[Gl],maxZoom:10})}),new Eo({title:"Magenta: NR",visible:!1,opacity:.7,source:new nl({url:zl,params:{LAYERS:"tmobile:tmobile",SLD:"http://appserverpu.wigeo.lan/kunden/tmobile/sld/5g.xml"},attributions:[Gl],maxZoom:10})})]}),new Pt.default({title:"DE",layers:[new Yr({title:"Vodafone: GSM",visible:!1,opacity:.3,source:new Ta({url:Nl,params:{LAYERS:"show:4,5"},attributions:[Zl]})}),new Yr({title:"Vodafone: LTE",visible:!1,opacity:.3,source:new Ta({url:Nl,params:{LAYERS:"show:110"},attributions:[Zl]})}),new Yr({title:"Vodafone: NR",visible:!1,opacity:.3,source:new Ta({url:Nl,params:{LAYERS:"show:105"},attributions:[Zl]})}),new Yr({title:"Telekom: GSM",visible:!1,opacity:.3,source:new Ta({url:jl,ratio:1,params:{LAYERS:"show:5"},attributions:[Dl]})}),new Yr({title:"Telekom: LTE",visible:!1,opacity:.3,source:new Ta({url:jl,ratio:1,params:{LAYERS:"show:3"},attributions:[Dl]})}),new Yr({title:"Telekom: NR",visible:!1,opacity:.3,source:new Ta({url:jl,ratio:1,params:{LAYERS:"show:6"},attributions:[Dl]})}),new Eo({title:"o2: GSM",visible:!1,opacity:.3,source:new ol({url:kl+"2g/{z}/{x}/{y}.png",attributions:[Fl],minZoom:11,maxZoom:19})}),new Eo({title:"o2: UMTS",visible:!1,opacity:.3,source:new ol({url:kl+"3g/{z}/{x}/{y}.png",attributions:[Fl],minZoom:11,maxZoom:19})}),new Eo({title:"o2: LTE",visible:!1,opacity:.3,source:new ol({url:kl+"4g/{z}/{x}/{y}.png",attributions:[Fl],minZoom:11,maxZoom:19})}),new Eo({title:"o2: NR",visible:!1,opacity:.3,source:new ol({url:kl+"5g/{z}/{x}/{y}.png",attributions:[Fl],minZoom:11,maxZoom:19})})]})],view:new ii({center:We([10.15,54.397],"EPSG:4326","EPSG:3857"),zoom:11})})})()})();-
\ No newline at end of file
+(()=>{var t={779:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(645),r=n.n(i)()((function(t){return t[1]}));r.push([t.id,".layer-switcher {\n  position: absolute;\n  top: 3.5em;\n  right: 0.5em;\n  text-align: left;\n}\n\n.layer-switcher .panel {\n  margin: 0;\n  border: 4px solid #eee;\n  border-radius: 4px;\n  background-color: white;\n  display: none;\n  max-height: inherit;\n  height: 100%;\n  box-sizing: border-box;\n  overflow-y: auto;\n}\n\n.layer-switcher button {\n  float: right;\n  z-index: 1;\n  width: 38px;\n  height: 38px;\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdEhV2JqytQeVmMhVmNoydUfVGUgVGQfVGQfVmVqy9hqy9dWw9AfVWRpydVry9YhVmMgVGNUw9BrytchVWRexdGw294gVWQgVmUhVWPd4N6HoaZsy9cfVmQgVGRrytZsy9cgVWQgVWMgVWRsy9YfVWNsy9YgVWVty9YgVWVry9UgVWRsy9Zsy9UfVWRsy9YgVWVty9YgVWRty9Vsy9aM09sgVWRTws/AzM0gVWRtzNYgVWRuy9Zsy9cgVWRGcHxty9bb5ORbxdEgVWRty9bn6OZTws9mydRfxtLX3Nva5eRix9NFcXxOd4JPeINQeIMiVmVUws9Vws9Vw9BXw9BYxNBaxNBbxNBcxdJexdElWWgmWmhjyNRlx9IqXGtoipNpytVqytVryNNrytZsjZUuX210k5t1y9R2zNR3y9V4lp57zth9zdaAnKOGoaeK0NiNpquV09mesrag1tuitbmj1tuj19uktrqr2d2svcCu2d2xwMO63N+7x8nA3uDC3uDFz9DK4eHL4eLN4eIyYnDX5OM5Z3Tb397e4uDf4uHf5uXi5ePi5+Xj5+Xk5+Xm5+Xm6OY6aHXQ19fT4+NfhI1Ww89gx9Nhx9Nsy9ZWw9Dpj2abAAAAWnRSTlMAAQICAwQEBgcIDQ0ODhQZGiAiIyYpKywvNTs+QklPUlNUWWJjaGt0dnd+hIWFh4mNjZCSm6CpsbW2t7nDzNDT1dje5efr7PHy9PT29/j4+Pn5+vr8/f39/f6DPtKwAAABTklEQVR4Xr3QVWPbMBSAUTVFZmZmhhSXMjNvkhwqMzMzMzPDeD+xASvObKePPa+ffHVl8PlsnE0+qPpBuQjVJjno6pZpSKXYl7/bZyFaQxhf98hHDKEppwdWIW1frFnrxSOWHFfWesSEWC6R/P4zOFrix3TzDFLlXRTR8c0fEEJ1/itpo7SVO9Jdr1DVxZ0USyjZsEY5vZfiiAC0UoTGOrm9PZLuRl8X+Dq1HQtoFbJZbv61i+Poblh/97TC7n0neCcK0ETNUrz1/xPHf+DNAW9Ac6t8O8WH3Vp98f5lCaYKAOFZMLyHL4Y0fe319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==')\n    /*logo.png*/;\n  background-repeat: no-repeat;\n  background-position: 2px;\n  background-color: white;\n  color: black;\n  border: none;\n}\n\n.layer-switcher button:focus,\n.layer-switcher button:hover {\n  background-color: white;\n}\n.layer-switcher.shown {\n  overflow-y: hidden;\n}\n.layer-switcher.shown.ol-control {\n  background-color: transparent;\n}\n\n.layer-switcher.shown.ol-control:hover {\n  background-color: transparent;\n}\n.layer-switcher.shown .panel {\n  display: block;\n}\n\n.layer-switcher.shown button {\n  display: none;\n}\n\n.layer-switcher.shown.layer-switcher-activation-mode-click > button {\n  display: block;\n  background-image: unset;\n  right: 2px;\n  position: absolute;\n  background-color: #eee;\n  margin: 0 1px;\n}\n\n.layer-switcher.shown button:focus,\n.layer-switcher.shown button:hover {\n  background-color: #fafafa;\n}\n\n.layer-switcher ul {\n  list-style: none;\n  margin: 1.6em 0.4em;\n  padding-left: 0;\n}\n.layer-switcher ul ul {\n  padding-left: 1.2em;\n  margin: 0.1em 0 0 0;\n}\n.layer-switcher li.group + li.group {\n  margin-top: 0.4em;\n}\n.layer-switcher li.group + li.layer-switcher-base-group {\n}\n\n.layer-switcher li.group > label {\n  font-weight: bold;\n}\n\n.layer-switcher.layer-switcher-group-select-style-none li.group > label {\n  padding-left: 1.2em;\n}\n\n.layer-switcher li {\n  position: relative;\n  margin-top: 0.3em;\n}\n\n.layer-switcher li input {\n  position: absolute;\n  left: 1.2em;\n  height: 1em;\n  width: 1em;\n  font-size: 1em;\n}\n.layer-switcher li label {\n  padding-left: 2.7em;\n  padding-right: 1.2em;\n  display: inline-block;\n  margin-top: 1px;\n}\n\n.layer-switcher label.disabled {\n  opacity: 0.4;\n}\n\n.layer-switcher input {\n  margin: 0px;\n}\n\n.layer-switcher.touch ::-webkit-scrollbar {\n  width: 4px;\n}\n\n.layer-switcher.touch ::-webkit-scrollbar-track {\n  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);\n  border-radius: 10px;\n}\n\n.layer-switcher.touch ::-webkit-scrollbar-thumb {\n  border-radius: 10px;\n  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);\n}\n\nli.layer-switcher-base-group > label {\n  padding-left: 1.2em;\n}\n\n.layer-switcher .group button {\n  position: absolute;\n  left: 0;\n  display: inline-block;\n  vertical-align: top;\n  float: none;\n  font-size: 1em;\n  width: 1em;\n  height: 1em;\n  margin: 0;\n  background-position: center 2px;\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAW0lEQVR4nGNgGAWMyBwXFxcGBgaGeii3EU0tXHzPnj1wQRYsihqQ+I0ExDEMQAYNONgoAN0AmMkNaDSyQSheY8JiaCMOGzE04zIAmyFYNTMw4A+DRhzsUUBtAADw4BCeIZkGdwAAAABJRU5ErkJggg==');\n  -webkit-transition: -webkit-transform 0.2s ease-in-out;\n  -ms-transition: -ms-transform 0.2s ease-in-out;\n  transition: transform 0.2s ease-in-out;\n}\n\n.layer-switcher .group.layer-switcher-close button {\n  transform: rotate(-90deg);\n  -webkit-transform: rotate(-90deg);\n}\n\n.layer-switcher .group.layer-switcher-fold.layer-switcher-close > ul {\n  overflow: hidden;\n  height: 0;\n}\n\n/*layerswitcher on the right*/\n.layer-switcher.shown.layer-switcher-activation-mode-click {\n  padding-left: 34px;\n}\n.layer-switcher.shown.layer-switcher-activation-mode-click > button {\n  left: 0;\n  border-right: 0;\n}\n\n/*layerswitcher on the left*/\n/*\n.layer-switcher.shown.layer-switcher-activation-mode-click {\n  padding-right: 34px;\n}\n.layer-switcher.shown.layer-switcher-activation-mode-click > button {\n  right: 0;\n  border-left: 0;\n}\n*/\n",""]);const o=r},788:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(645),r=n.n(i)()((function(t){return t[1]}));r.push([t.id,'.ol-box {\n  box-sizing: border-box;\n  border-radius: 2px;\n  border: 1.5px solid rgb(179,197,219);\n  background-color: rgba(255,255,255,0.4);\n}\n\n.ol-mouse-position {\n  top: 8px;\n  right: 8px;\n  position: absolute;\n}\n\n.ol-scale-line {\n  background: rgba(0,60,136,0.3);\n  border-radius: 4px;\n  bottom: 8px;\n  left: 8px;\n  padding: 2px;\n  position: absolute;\n}\n.ol-scale-line-inner {\n  border: 1px solid #eee;\n  border-top: none;\n  color: #eee;\n  font-size: 10px;\n  text-align: center;\n  margin: 1px;\n  will-change: contents, width;\n  transition: all 0.25s;\n}\n.ol-scale-bar {\n  position: absolute;\n  bottom: 8px;\n  left: 8px;\n}\n.ol-scale-step-marker {\n  width: 1px;\n  height: 15px;\n  background-color: #000000;\n  float: right;\n  z-index: 10;\n}\n.ol-scale-step-text {\n  position: absolute;\n  bottom: -5px;\n  font-size: 12px;\n  z-index: 11;\n  color: #000000;\n  text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-text {\n  position: absolute;\n  font-size: 14px;\n  text-align: center;\n  bottom: 25px;\n  color: #000000;\n  text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-singlebar {\n  position: relative;\n  height: 10px;\n  z-index: 9;\n  box-sizing: border-box;\n  border: 1px solid black;\n}\n\n.ol-unsupported {\n  display: none;\n}\n.ol-viewport, .ol-unselectable {\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n.ol-viewport canvas {\n  all: unset;\n}\n.ol-selectable {\n  -webkit-touch-callout: default;\n  -webkit-user-select: text;\n  -moz-user-select: text;\n  -ms-user-select: text;\n  user-select: text;\n}\n.ol-grabbing {\n  cursor: -webkit-grabbing;\n  cursor: -moz-grabbing;\n  cursor: grabbing;\n}\n.ol-grab {\n  cursor: move;\n  cursor: -webkit-grab;\n  cursor: -moz-grab;\n  cursor: grab;\n}\n.ol-control {\n  position: absolute;\n  background-color: rgba(255,255,255,0.4);\n  border-radius: 4px;\n  padding: 2px;\n}\n.ol-control:hover {\n  background-color: rgba(255,255,255,0.6);\n}\n.ol-zoom {\n  top: .5em;\n  left: .5em;\n}\n.ol-rotate {\n  top: .5em;\n  right: .5em;\n  transition: opacity .25s linear, visibility 0s linear;\n}\n.ol-rotate.ol-hidden {\n  opacity: 0;\n  visibility: hidden;\n  transition: opacity .25s linear, visibility 0s linear .25s;\n}\n.ol-zoom-extent {\n  top: 4.643em;\n  left: .5em;\n}\n.ol-full-screen {\n  right: .5em;\n  top: .5em;\n}\n\n.ol-control button {\n  display: block;\n  margin: 1px;\n  padding: 0;\n  color: white;\n  font-weight: bold;\n  text-decoration: none;\n  font-size: inherit;\n  text-align: center;\n  height: 1.375em;\n  width: 1.375em;\n  line-height: .4em;\n  background-color: rgba(0,60,136,0.5);\n  border: none;\n  border-radius: 2px;\n}\n.ol-control button::-moz-focus-inner {\n  border: none;\n  padding: 0;\n}\n.ol-zoom-extent button {\n  line-height: 1.4em;\n}\n.ol-compass {\n  display: block;\n  font-weight: normal;\n  font-size: 1.2em;\n  will-change: transform;\n}\n.ol-touch .ol-control button {\n  font-size: 1.5em;\n}\n.ol-touch .ol-zoom-extent {\n  top: 5.5em;\n}\n.ol-control button:hover,\n.ol-control button:focus {\n  text-decoration: none;\n  background-color: rgba(0,60,136,0.7);\n}\n.ol-zoom .ol-zoom-in {\n  border-radius: 2px 2px 0 0;\n}\n.ol-zoom .ol-zoom-out {\n  border-radius: 0 0 2px 2px;\n}\n\n\n.ol-attribution {\n  text-align: right;\n  bottom: .5em;\n  right: .5em;\n  max-width: calc(100% - 1.3em);\n  display: flex;\n  flex-flow: row-reverse;\n  align-items: center;\n}\n.ol-attribution a {\n  color: rgba(0,60,136,0.7);\n  text-decoration: none;\n}\n.ol-attribution ul {\n  margin: 0;\n  padding: 1px .5em;\n  color: #000;\n  text-shadow: 0 0 2px #fff;\n  font-size: 12px;\n}\n.ol-attribution li {\n  display: inline;\n  list-style: none;\n}\n.ol-attribution li:not(:last-child):after {\n  content: " ";\n}\n.ol-attribution img {\n  max-height: 2em;\n  max-width: inherit;\n  vertical-align: middle;\n}\n.ol-attribution button {\n  flex-shrink: 0;\n}\n.ol-attribution.ol-collapsed ul {\n  display: none;\n}\n.ol-attribution:not(.ol-collapsed) {\n  background: rgba(255,255,255,0.8);\n}\n.ol-attribution.ol-uncollapsible {\n  bottom: 0;\n  right: 0;\n  border-radius: 4px 0 0;\n}\n.ol-attribution.ol-uncollapsible img {\n  margin-top: -.2em;\n  max-height: 1.6em;\n}\n.ol-attribution.ol-uncollapsible button {\n  display: none;\n}\n\n.ol-zoomslider {\n  top: 4.5em;\n  left: .5em;\n  height: 200px;\n}\n.ol-zoomslider button {\n  position: relative;\n  height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n  top: 5.5em;\n}\n\n.ol-overviewmap {\n  left: 0.5em;\n  bottom: 0.5em;\n}\n.ol-overviewmap.ol-uncollapsible {\n  bottom: 0;\n  left: 0;\n  border-radius: 0 4px 0 0;\n}\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n  display: block;\n}\n.ol-overviewmap .ol-overviewmap-map {\n  border: 1px solid #7b98bc;\n  height: 150px;\n  margin: 2px;\n  width: 150px;\n}\n.ol-overviewmap:not(.ol-collapsed) button {\n  bottom: 2px;\n  left: 2px;\n  position: absolute;\n}\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n  display: none;\n}\n.ol-overviewmap:not(.ol-collapsed) {\n  background: rgba(255,255,255,0.8);\n}\n.ol-overviewmap-box {\n  border: 2px dotted rgba(0,60,136,0.7);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n  cursor: move;\n}\n',""]);const o=r},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);i&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},421:function(t,e,n){t.exports=function(t,e,n){"use strict";t="default"in t?t.default:t,n="default"in n?n.default:n;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o="layer-switcher-",s=function(t){function s(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var e=Object.assign({},t),n=e.tipLabel?e.tipLabel:"Legend",i=e.collapseTipLabel?e.collapseTipLabel:"Collapse legend",r=document.createElement("div"),a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,{element:r,target:e.target}));a.activationMode=e.activationMode||"mouseover",a.startActive=!0===e.startActive;var l=void 0!==e.label?e.label:"",u=void 0!==e.collapseLabel?e.collapseLabel:"»";a.groupSelectStyle=s.getGroupSelectStyle(e.groupSelectStyle),a.reverse=!1!==e.reverse,a.mapListeners=[],a.hiddenClassName="ol-unselectable ol-control layer-switcher",s.isTouchDevice_()&&(a.hiddenClassName+=" touch"),a.shownClassName="shown",r.className=a.hiddenClassName;var h=document.createElement("button");return h.setAttribute("title",n),h.setAttribute("aria-label",n),r.appendChild(h),a.panel=document.createElement("div"),a.panel.className="panel",r.appendChild(a.panel),s.enableTouchScroll_(a.panel),h.textContent=l,r.classList.add(o+"group-select-style-"+a.groupSelectStyle),r.classList.add(o+"activation-mode-"+a.activationMode),"click"===a.activationMode?(r.classList.add("activationModeClick"),a.startActive&&(h.textContent=u,h.setAttribute("title",i),h.setAttribute("aria-label",i)),h.onclick=function(t){var e=t||window.event;a.element.classList.contains(a.shownClassName)?(a.hidePanel(),h.textContent=l,h.setAttribute("title",n),h.setAttribute("aria-label",n)):(a.showPanel(),h.textContent=u,h.setAttribute("title",i),h.setAttribute("aria-label",i)),e.preventDefault()}):(h.onmouseover=function(){a.showPanel()},h.onclick=function(t){var e=t||window.event;a.showPanel(),e.preventDefault()},a.panel.onmouseout=function(t){a.panel.contains(t.relatedTarget)||a.hidePanel()}),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(s,t),i(s,[{key:"setMap",value:function(t){for(var n=this,i=0;i<this.mapListeners.length;i++)e.unByKey(this.mapListeners[i]);this.mapListeners.length=0,r(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"setMap",this).call(this,t),t&&(this.startActive?this.showPanel():this.renderPanel(),"click"!==this.activationMode&&this.mapListeners.push(t.on("pointerdown",(function(){n.hidePanel()}))))}},{key:"showPanel",value:function(){this.element.classList.contains(this.shownClassName)||(this.element.classList.add(this.shownClassName),this.renderPanel())}},{key:"hidePanel",value:function(){this.element.classList.contains(this.shownClassName)&&this.element.classList.remove(this.shownClassName)}},{key:"renderPanel",value:function(){this.dispatchEvent("render"),s.renderPanel(this.getMap(),this.panel,{groupSelectStyle:this.groupSelectStyle,reverse:this.reverse}),this.dispatchEvent("rendercomplete")}}],[{key:"renderPanel",value:function(t,e,n){var i=new Event("render");for(e.dispatchEvent(i),(n=n||{}).groupSelectStyle=s.getGroupSelectStyle(n.groupSelectStyle),s.ensureTopVisibleBaseLayerShown(t,n.groupSelectStyle);e.firstChild;)e.removeChild(e.firstChild);s.forEachRecursive(t,(function(t,e,n){t.set("indeterminate",!1)})),"children"===n.groupSelectStyle||"none"===n.groupSelectStyle?s.setGroupVisibility(t):"group"===n.groupSelectStyle&&s.setChildVisibility(t);var r=document.createElement("ul");e.appendChild(r),s.renderLayers_(t,t,r,n,(function(i){s.renderPanel(t,e,n)}));var o=new Event("rendercomplete");e.dispatchEvent(o)}},{key:"isBaseGroup",value:function(t){if(t instanceof n){var e=t.getLayers().getArray();return e.length&&"base"===e[0].get("type")}return!1}},{key:"setGroupVisibility",value:function(t){s.getGroupsAndLayers(t,(function(t){return t instanceof n&&!t.get("combine")&&!s.isBaseGroup(t)})).reverse().forEach((function(t){var e=t.getLayersArray().map((function(t){return t.getVisible()}));e.every((function(t){return!0===t}))?(t.setVisible(!0),t.set("indeterminate",!1)):e.every((function(t){return!1===t}))?(t.setVisible(!1),t.set("indeterminate",!1)):(t.setVisible(!0),t.set("indeterminate",!0))}))}},{key:"setChildVisibility",value:function(t){s.getGroupsAndLayers(t,(function(t){return t instanceof n&&!t.get("combine")&&!s.isBaseGroup(t)})).forEach((function(t){var e=t,n=e.getVisible(),i=e.get("indeterminate");e.getLayers().getArray().forEach((function(t){t.set("indeterminate",!1),n&&!i||!t.getVisible()||t.set("indeterminate",!0)}))}))}},{key:"ensureTopVisibleBaseLayerShown",value:function(t,e){var n=void 0;s.forEachRecursive(t,(function(t,e,i){"base"===t.get("type")&&t.getVisible()&&(n=t)})),n&&s.setVisible_(t,n,!0,e)}},{key:"getGroupsAndLayers",value:function(t,e){var n=[];return e=e||function(t,e,n){return!0},s.forEachRecursive(t,(function(t,i,r){t.get("title")&&e(t,i,r)&&n.push(t)})),n}},{key:"setVisible_",value:function(t,e,i,r){e.setVisible(i),i&&"base"===e.get("type")&&s.forEachRecursive(t,(function(t,n,i){t!=e&&"base"===t.get("type")&&t.setVisible(!1)})),e instanceof n&&!e.get("combine")&&"children"===r&&e.getLayers().forEach((function(n){s.setVisible_(t,n,e.getVisible(),r)}))}},{key:"renderLayer_",value:function(t,e,i,r,a){var l=document.createElement("li"),u=e.get("title"),h=s.uuid(),c=document.createElement("label");if(e instanceof n&&!e.get("combine")){var p=s.isBaseGroup(e);if(l.classList.add("group"),p&&l.classList.add(o+"base-group"),e.get("fold")){l.classList.add(o+"fold"),l.classList.add(o+e.get("fold"));var f=document.createElement("button");f.onclick=function(t){var n=t||window.event;s.toggleFold_(e,l),n.preventDefault()},l.appendChild(f)}if(!p&&"none"!=r.groupSelectStyle){var d=document.createElement("input");d.type="checkbox",d.id=h,d.checked=e.getVisible(),d.indeterminate=e.get("indeterminate"),d.onchange=function(n){var i=n.target;s.setVisible_(t,e,i.checked,r.groupSelectStyle),a(e)},l.appendChild(d),c.htmlFor=h}c.innerHTML=u,l.appendChild(c);var g=document.createElement("ul");l.appendChild(g),s.renderLayers_(t,e,g,r,a)}else{l.className="layer";var _=document.createElement("input");"base"===e.get("type")?(_.type="radio",_.name="base"):_.type="checkbox",_.id=h,_.checked=e.get("visible"),_.indeterminate=e.get("indeterminate"),_.onchange=function(n){var i=n.target;s.setVisible_(t,e,i.checked,r.groupSelectStyle),a(e)},l.appendChild(_),c.htmlFor=h,c.innerHTML=u;var y=t.getView().getResolution();(y>e.getMaxResolution()||y<e.getMinResolution())&&(c.className+=" disabled"),l.appendChild(c)}return l}},{key:"renderLayers_",value:function(t,e,n,i,r){var o=e.getLayers().getArray().slice();i.reverse&&(o=o.reverse());for(var a,l=0;l<o.length;l++)(a=o[l]).get("title")&&n.appendChild(s.renderLayer_(t,a,l,i,r))}},{key:"forEachRecursive",value:function(t,e){t.getLayers().forEach((function(t,i,r){e(t,i,r),t instanceof n&&s.forEachRecursive(t,e)}))}},{key:"uuid",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}},{key:"enableTouchScroll_",value:function(t){if(s.isTouchDevice_()){var e=0;t.addEventListener("touchstart",(function(t){e=this.scrollTop+t.touches[0].pageY}),!1),t.addEventListener("touchmove",(function(t){this.scrollTop=e-t.touches[0].pageY}),!1)}}},{key:"isTouchDevice_",value:function(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}},{key:"toggleFold_",value:function(t,e){e.classList.remove(o+t.get("fold")),t.set("fold","open"===t.get("fold")?"close":"open"),e.classList.add(o+t.get("fold"))}},{key:"getGroupSelectStyle",value:function(t){return["none","children","group"].indexOf(t)>=0?t:"children"}}]),s}(t);return window.ol&&window.ol.control&&(window.ol.control.LayerSwitcher=s),s}(n(775),n(706),n(734))},582:function(t){t.exports=function(){"use strict";function t(t,i,r,o,s){!function t(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,u=Math.log(a),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(a-h)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(r,Math.floor(i-l*h/a+c)),Math.min(o,Math.floor(i+(a-l)*h/a+c)),s)}var p=n[i],f=r,d=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[r],p)?e(n,r,d):e(n,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}(t,i,r||0,o||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=d(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(r,t.leaf?i(s):s)}return r}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,i,r,o){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=r)){var a=n+Math.ceil((i-n)/r/2)*r;t(e,a,n,i,o),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var i=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?i(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):r.push(s))}e=r.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var i=0;i<e.children.length;i++){var r=e.children[i],o=e.leaf?this.toBBox(r):r;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(r)}}e=n.pop()}return!1},i.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=d([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,i,o,s=this.data,a=this.toBBox(t),l=[],u=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=u.pop(),o=!0),s.leaf){var h=r(t,s.children,e);if(-1!==h)return s.children.splice(h,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?i?(n++,s=i.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,i){var r,s=n-e+1,a=this._maxEntries;if(s<=a)return o(r=d(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(r=d([])).leaf=!1,r.height=i;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));g(t,e,n,u,this.compareMinX);for(var h=e;h<=n;h+=u){var c=Math.min(h+u-1,n);g(t,h,c,l,this.compareMinY);for(var p=h;p<=c;p+=l){var f=Math.min(p+l-1,c);r.children.push(this._build(t,p,f,i-1))}}return o(r,this.toBBox),r},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],u=h(l),c=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-u);c<o?(o=c,r=u<r?u:r,s=l):c===o&&u<r&&(r=u,s=l)}e=s||e.children[0]}var p,f;return e},i.prototype._insert=function(t,e,n){var i=n?t:this.toBBox(t),r=[],o=this._chooseSubtree(i,this.data,e,r);for(o.children.push(t),a(o,i);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var s=this._chooseSplitIndex(n,r,i),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,a,l,u,c,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),_=s(t,d,n,this.toBBox),y=(r=g,o=_,void 0,void 0,void 0,void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),u=Math.min(r.maxX,o.maxX),c=Math.min(r.maxY,o.maxY),Math.max(0,u-a)*Math.max(0,c-l)),v=h(g)+h(_);y<p?(p=y,i=d,f=v<f?v:f):y===p&&v<f&&(f=v,i=d)}return i||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var i=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,n-e,n,r),u=c(o)+c(l),h=e;h<n-e;h++){var p=t.children[h];a(o,t.leaf?r(p):p),u+=c(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?r(d):d),u+=c(l)}return u},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i}()},379:(t,e,n)=>{"use strict";var i,r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function s(t){for(var e=-1,n=0;n<o.length;n++)if(o[n].identifier===t){e=n;break}return e}function a(t,e){for(var n={},i=[],r=0;r<t.length;r++){var a=t[r],l=e.base?a[0]+e.base:a[0],u=n[l]||0,h="".concat(l," ").concat(u);n[l]=u+1;var c=s(h),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==c?(o[c].references++,o[c].updater(p)):o.push({identifier:h,updater:g(p,e),references:1}),i.push(h)}return i}function l(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var s=r(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var u,h=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function c(t,e,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=h(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function p(t,e,n){var i=n.css,r=n.media,o=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var f=null,d=0;function g(t,e){var n,i,r;if(e.singleton){var o=d++;n=f||(f=l(e)),i=c.bind(null,n,o,!1),r=c.bind(null,n,o,!0)}else n=l(e),i=p.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i));var n=a(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var r=s(n[i]);o[r].references--}for(var l=a(t,e),u=0;u<n.length;u++){var h=s(n[u]);0===o[h].references&&(o[h].updater(),o.splice(h,1))}n=l}}}},813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i,r=n(187),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e){var n=this,i="Assertion failed. See https://openlayers.org/en/"+("latest"===r.q4?r.q4:"v"+r.q4.split("-")[0])+"/doc/errors/#"+e+" for details.";return(n=t.call(this,i)||this).code=e,n.name="AssertionError",n.message=i,n}return o(e,t),e}(Error)},714:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i,r=n(813),o=n(971),s=n(71),a=n(291),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u="length",h=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.element=n,r.index=i,r}return l(e,t),e}(a.ZP);const c=function(t){function e(e,n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};if(i.unique_=!!r.unique,i.array_=e||[],i.unique_)for(var o=0,s=i.array_.length;o<s;++o)i.assertUnique_(i.array_[o],o);return i.updateLength_(),i}return l(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e<n;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)t(e[n],n,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(u)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new h(s.Z.ADD,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)if(e[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new h(s.Z.REMOVE,e,t)),e},e.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new h(s.Z.REMOVE,i,t)),this.dispatchEvent(new h(s.Z.ADD,e,t))}else{for(var r=n;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(u,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===t&&n!==e)throw new r.Z(58)},e}(o.Z)},71:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={ADD:"add",REMOVE:"remove"}},431:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}()},126:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i,r=n(291),o=n(990),s=n(706),a=n(374),l=n(187),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.key=n,r.oldValue=i,r}return u(e,t),e}(r.ZP);const c=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,(0,l.sq)(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return u(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&(0,a.f0)({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:".concat(t),this.hasListener(n)&&this.dispatchEvent(new h(n,t,e)),n=o.Z.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new h(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:".concat(t),e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:".concat(t),e)},e.prototype.set=function(t,e,n){var i=this.values_||(this.values_={});if(n)i[t]=e;else{var r=i[t];i[t]=e,r!==e&&this.notify(t,r)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&(0,a.f0)(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],(0,a.xb)(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(s.default)},990:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={PROPERTYCHANGE:"propertychange"}},706:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>h,unByKey:()=>u});var i,r=n(208),o=n(487),s=n(818),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return a(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.Z.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,i=new Array(n),r=0;r<n;++r)i[r]=(0,s.oL)(this,t[r],e);return i}return(0,s.oL)(this,t,e)},e.prototype.onceInternal=function(t,e){var n;if(Array.isArray(t)){var i=t.length;n=new Array(i);for(var r=0;r<i;++r)n[r]=(0,s.Vx)(this,t[r],e)}else n=(0,s.Vx)(this,t,e);return e.ol_key=n,n},e.prototype.unInternal=function(t,e){var n=e.ol_key;if(n)u(n);else if(Array.isArray(t))for(var i=0,r=t.length;i<r;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(r.Z);function u(t){if(Array.isArray(t))for(var e=0,n=t.length;e<n;++e)(0,s.bN)(t[e]);else(0,s.bN)(t)}l.prototype.on,l.prototype.once,l.prototype.un;const h=l},537:(t,e,n)=>{"use strict";function i(t,e){return t>e?1:t<e?-1:0}function r(t,e,n){var i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;var r=void 0;if(n>0){for(r=1;r<i;++r)if(t[r]<e)return r-1}else if(n<0){for(r=1;r<i;++r)if(t[r]<=e)return r}else for(r=1;r<i;++r){if(t[r]==e)return r;if(t[r]<e)return"function"==typeof n?n(e,t[r-1],t[r])>0?r-1:r:t[r-1]-e<e-t[r]?r-1:r}return i-1}function o(t,e,n){for(;e<n;){var i=t[e];t[e]=t[n],t[n]=i,++e,--n}}function s(t,e){for(var n=Array.isArray(e)?e:[e],i=n.length,r=0;r<i;r++)t[t.length]=n[r]}function a(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function l(t,e,n){var r=e||i;return t.every((function(e,i){if(0===i)return!0;var o=r(t[i-1],e);return!(o>0||n&&0===o)}))}n.d(e,{FZ:()=>o,fS:()=>a,h7:()=>r,kK:()=>i,l7:()=>s,pT:()=>l})},515:(t,e,n)=>{"use strict";n.d(e,{h:()=>r});var i=n(813);function r(t,e){if(!t)throw new i.Z(e)}},775:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>h});var i,r=n(971),o=n(126),s=n(885),a=n(818),l=n(326),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const h=function(t){function e(e){var n=t.call(this)||this,i=e.element;return!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),n.element=i||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return u(e,t),e.prototype.disposeInternal=function(){(0,l.ZF)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&(0,l.ZF)(this.element);for(var e=0,n=this.listenerKeys.length;e<n;++e)(0,a.bN)(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==s.Zn&&this.listenerKeys.push((0,a.oL)(t,o.Z.POSTRENDER,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(r.Z)},326:(t,e,n)=>{"use strict";n.d(e,{$H:()=>o,E4:()=>r,ZF:()=>s,ep:()=>a,hF:()=>l});var i=n(177);function r(t,e,n,r){var o;return o=n&&n.length?n.shift():i.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",r)}function o(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function s(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function a(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function l(t,e){for(var n=t.childNodes,i=0;;++i){var r=n[i],o=e[i];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--i):t.appendChild(o))}}},818:(t,e,n)=>{"use strict";n.d(e,{Vx:()=>o,bN:()=>s,oL:()=>r});var i=n(374);function r(t,e,n,i,r){if(i&&i!==t&&(n=n.bind(i)),r){var o=n;n=function(){t.removeEventListener(e,n),o.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function o(t,e,n,i){return r(t,e,n,i,!0)}function s(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,i.ZH)(t))}},291:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>i});const i=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}()},487:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},208:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i,r=n(431),o=n(291),s=n(885),a=n(374),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const u=function(t){function e(e){var n=t.call(this)||this;return n.eventTarget_=e,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return l(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var n=this.listeners_||(this.listeners_={}),i=n[t]||(n[t]=[]);-1===i.indexOf(e)&&i.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t,n=e?t:t.type,i=this.listeners_&&this.listeners_[n];if(i){var r=e?new o.ZP(t):t;r.target||(r.target=this.eventTarget_||this);var a,l=this.dispatching_||(this.dispatching_={}),u=this.pendingRemovals_||(this.pendingRemovals_={});n in l||(l[n]=0,u[n]=0),++l[n];for(var h=0,c=i.length;h<c;++h)if(!1===(a="handleEvent"in i[h]?i[h].handleEvent(r):i[h].call(this,r))||r.propagationStopped){a=!1;break}if(0==--l[n]){var p=u[n];for(delete u[n];p--;)this.removeEventListener(n,s.Zn);delete l[n]}return a}},e.prototype.disposeInternal=function(){this.listeners_&&(0,a.ZH)(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var i=n.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=s.Zn,++this.pendingRemovals_[t]):(n.splice(i,1),0===n.length&&delete this.listeners_[t]))}},e}(r.Z)},641:(t,e,n)=>{"use strict";n.d(e,{Cf:()=>z,Cr:()=>L,EO:()=>Z,Ed:()=>A,GN:()=>v,H6:()=>S,HK:()=>y,I7:()=>N,Ne:()=>G,T9:()=>g,Wj:()=>w,Xv:()=>F,YN:()=>_,b8:()=>h,bg:()=>C,d9:()=>l,dz:()=>k,f3:()=>a,fS:()=>m,g0:()=>I,hC:()=>T,hI:()=>s,jE:()=>p,kK:()=>D,l7:()=>x,lJ:()=>d,p8:()=>P,pX:()=>f,qP:()=>b,qf:()=>u,qg:()=>R,r4:()=>c,rL:()=>M,w$:()=>O,xb:()=>j});var i=n(600),r=n(716),o=n(515);function s(t){for(var e=[1/0,1/0,-1/0,-1/0],n=0,i=t.length;n<i;++n)w(e,t[n]);return e}function a(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function l(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function u(t,e,n){var i,r;return(i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*i+(r=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0)*r}function h(t,e){return p(t,e[0],e[1])}function c(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function p(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function f(t,e){var n=t[0],i=t[1],o=t[2],s=t[3],a=e[0],l=e[1],u=r.Z.UNKNOWN;return a<n?u|=r.Z.LEFT:a>o&&(u|=r.Z.RIGHT),l<i?u|=r.Z.BELOW:l>s&&(u|=r.Z.ABOVE),u===r.Z.UNKNOWN&&(u=r.Z.INTERSECTING),u}function d(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,n,i,r){return r?(r[0]=t,r[1]=e,r[2]=n,r[3]=i,r):[t,e,n,i]}function _(t){return g(1/0,1/0,-1/0,-1/0,t)}function y(t,e){var n=t[0],i=t[1];return g(n,i,n,i,e)}function v(t,e,n,i,r){return b(_(r),t,e,n,i)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function x(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function w(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function b(t,e,n,i,r){for(;n<i;n+=r)E(t,e[n],e[n+1]);return t}function E(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function S(t,e){var n;return(n=e(T(t)))||(n=e(O(t)))||(n=e(F(t)))?n:(n=e(M(t)))||!1}function C(t){var e=0;return j(t)||(e=k(t)*L(t)),e}function T(t){return[t[0],t[1]]}function O(t){return[t[2],t[1]]}function R(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function I(t,e){var n;return e===i.Z.BOTTOM_LEFT?n=T(t):e===i.Z.BOTTOM_RIGHT?n=O(t):e===i.Z.TOP_LEFT?n=M(t):e===i.Z.TOP_RIGHT?n=F(t):(0,o.h)(!1,13),n}function P(t,e,n,i,r){var o=e*i[0]/2,s=e*i[1]/2,a=Math.cos(n),l=Math.sin(n),u=o*a,h=o*l,c=s*a,p=s*l,f=t[0],d=t[1],_=f-u+p,y=f-u-p,v=f+u-p,m=f+u+p,x=d-h-c,w=d-h+c,b=d+h+c,E=d+h-c;return g(Math.min(_,y,v,m),Math.min(x,w,b,E),Math.max(_,y,v,m),Math.max(x,w,b,E),r)}function L(t){return t[3]-t[1]}function A(t,e,n){var i=n||[1/0,1/0,-1/0,-1/0];return D(t,e)?(t[0]>e[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]<e[2]?i[2]=t[2]:i[2]=e[2],t[3]<e[3]?i[3]=t[3]:i[3]=e[3]):_(i),i}function M(t){return[t[0],t[3]]}function F(t){return[t[2],t[3]]}function k(t){return t[2]-t[0]}function D(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function j(t){return t[2]<t[0]||t[3]<t[1]}function Z(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function N(t,e,n){var i=!1,o=f(t,e),s=f(t,n);if(o===r.Z.INTERSECTING||s===r.Z.INTERSECTING)i=!0;else{var a=t[0],l=t[1],u=t[2],h=t[3],c=e[0],p=e[1],d=n[0],g=n[1],_=(g-p)/(d-c),y=void 0,v=void 0;s&r.Z.ABOVE&&!(o&r.Z.ABOVE)&&(i=(y=d-(g-h)/_)>=a&&y<=u),i||!(s&r.Z.RIGHT)||o&r.Z.RIGHT||(i=(v=g-(d-u)*_)>=l&&v<=h),i||!(s&r.Z.BELOW)||o&r.Z.BELOW||(i=(y=d-(g-l)/_)>=a&&y<=u),i||!(s&r.Z.LEFT)||o&r.Z.LEFT||(i=(v=g-(d-a)*_)>=l&&v<=h)}return i}function G(t,e,n,i){var r=[];if(i>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<i;++a)r.push(t[0]+o*a/i,t[1],t[2],t[1]+s*a/i,t[2]-o*a/i,t[3],t[0],t[3]-s*a/i);else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);for(var l=[],u=[],h=(a=0,r.length);a<h;a+=2)l.push(r[a]),u.push(r[a+1]);return function(t,e,n){return g(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),n)}(l,u,n)}function z(t,e){var n=e.getExtent(),i=R(t);if(e.canWrapX()&&(i[0]<n[0]||i[0]>=n[2])){var r=k(n),o=Math.floor((i[0]-n[0])/r)*r;t[0]-=o,t[2]-=o}return t}},600:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},716:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},885:(t,e,n)=>{"use strict";n.d(e,{Dv:()=>o,Zn:()=>s,qe:()=>a,uX:()=>r});var i=n(537);function r(){return!0}function o(){return!1}function s(){}function a(t){var e,n,r,o=!1;return function(){var s=Array.prototype.slice.call(arguments);return o&&this===r&&(0,i.fS)(s,n)||(o=!0,r=this,n=s,e=t.apply(this,arguments)),e}}},177:(t,e,n)=>{"use strict";n.d(e,{G$:()=>o,Id:()=>l,MP:()=>a,Tp:()=>u,V:()=>r,bM:()=>h,tK:()=>s});var i="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",r=-1!==i.indexOf("firefox"),o=(-1!==i.indexOf("safari")&&-1==i.indexOf("chrom")&&(i.indexOf("version/15.4")>=0||i.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==i.indexOf("webkit")&&-1==i.indexOf("edge")),s=-1!==i.indexOf("macintosh"),a="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,u="undefined"!=typeof Image&&Image.prototype.decode,h=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},947:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i,r=n(971),o=n(912),s=n(187),a=n(515),l=n(374),u=n(983),h=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const c=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var i=(0,l.f0)({},e);return"object"==typeof e.properties&&(delete i.properties,(0,l.f0)(i,e.properties)),i[o.Z.OPACITY]=void 0!==e.opacity?e.opacity:1,(0,a.h)("number"==typeof i[o.Z.OPACITY],64),i[o.Z.VISIBLE]=void 0===e.visible||e.visible,i[o.Z.Z_INDEX]=e.zIndex,i[o.Z.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,i[o.Z.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,i[o.Z.MIN_ZOOM]=void 0!==e.minZoom?e.minZoom:-1/0,i[o.Z.MAX_ZOOM]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==i.className?i.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return h(e,t),e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},n=this.getZIndex();return e.opacity=(0,u.uZ)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==n||e.managed?n:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return(0,s.O3)()},e.prototype.getLayerStatesArray=function(t){return(0,s.O3)()},e.prototype.getExtent=function(){return this.get(o.Z.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(o.Z.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(o.Z.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(o.Z.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(o.Z.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(o.Z.OPACITY)},e.prototype.getSourceState=function(){return(0,s.O3)()},e.prototype.getVisible=function(){return this.get(o.Z.VISIBLE)},e.prototype.getZIndex=function(){return this.get(o.Z.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(o.Z.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(o.Z.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(o.Z.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(o.Z.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(o.Z.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){(0,a.h)("number"==typeof t,64),this.set(o.Z.OPACITY,t)},e.prototype.setVisible=function(t){this.set(o.Z.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(o.Z.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(r.Z)},734:(t,e,n)=>{"use strict";n.r(e),n.d(e,{GroupEvent:()=>y,default:()=>m});var i,r=n(947),o=n(714),s=n(71),a=n(291),l=n(487),u=n(990),h=n(562),c=n(515),p=n(374),f=n(641),d=n(187),g=n(818),_=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),y=function(t){function e(e,n){var i=t.call(this,e)||this;return i.layer=n,i}return _(e,t),e}(a.ZP),v="layers";const m=function(t){function e(e){var n=this,i=e||{},r=(0,p.f0)({},i);delete r.layers;var s=i.layers;return(n=t.call(this,r)||this).on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(v,n.handleLayersChanged_),s?Array.isArray(s)?s=new o.Z(s.slice(),{unique:!0}):(0,c.h)("function"==typeof s.getArray,43):s=new o.Z(void 0,{unique:!0}),n.setLayers(s),n}return _(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(g.bN),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push((0,g.oL)(t,s.Z.ADD,this.handleLayersAdd_,this),(0,g.oL)(t,s.Z.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(g.bN);(0,p.ZH)(this.listenerKeys_);for(var n=t.getArray(),i=0,r=n.length;i<r;i++){var o=n[i];this.registerLayerListeners_(o),this.dispatchEvent(new y("addlayer",o))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[(0,g.oL)(t,u.Z.PROPERTYCHANGE,this.handleLayerChange_,this),(0,g.oL)(t,l.Z.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push((0,g.oL)(t,"addlayer",this.handleLayerGroupAdd_,this),(0,g.oL)(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,d.sq)(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new y("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new y("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new y("addlayer",e)),this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,n=(0,d.sq)(e);this.listenerKeys_[n].forEach(g.bN),delete this.listenerKeys_[n],this.dispatchEvent(new y("removelayer",e)),this.changed()},e.prototype.getLayers=function(){return this.get(v)},e.prototype.setLayers=function(t){var e=this.getLayers();if(e)for(var n=e.getArray(),i=0,r=n.length;i<r;++i)this.dispatchEvent(new y("removelayer",n[i]));this.set(v,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],n=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var i=this.getLayerState(),r=i.zIndex;t||void 0!==i.zIndex||(r=0);for(var o=n,s=e.length;o<s;o++){var a=e[o];a.opacity*=i.opacity,a.visible=a.visible&&i.visible,a.maxResolution=Math.min(a.maxResolution,i.maxResolution),a.minResolution=Math.max(a.minResolution,i.minResolution),a.minZoom=Math.max(a.minZoom,i.minZoom),a.maxZoom=Math.min(a.maxZoom,i.maxZoom),void 0!==i.extent&&(void 0!==a.extent?a.extent=(0,f.Ed)(a.extent,i.extent):a.extent=i.extent),void 0===a.zIndex&&(a.zIndex=r)}return e},e.prototype.getSourceState=function(){return h.Z.READY},e}(r.Z)},912:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},983:(t,e,n)=>{"use strict";function i(t,e,n){return Math.min(Math.max(t,e),n)}n.d(e,{$W:()=>c,GW:()=>d,SV:()=>l,Ux:()=>u,Yr:()=>h,bI:()=>a,f9:()=>r,k3:()=>o,mD:()=>g,rU:()=>s,t7:()=>p,uZ:()=>i});var r="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},o="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function s(t,e,n,i,r,o){var s=r-n,l=o-i;if(0!==s||0!==l){var u=((t-n)*s+(e-i)*l)/(s*s+l*l);u>1?(n=r,i=o):u>0&&(n+=s*u,i+=l*u)}return a(t,e,n,i)}function a(t,e,n,i){var r=n-t,o=i-e;return r*r+o*o}function l(t){for(var e=t.length,n=0;n<e;n++){for(var i=n,r=Math.abs(t[n][n]),o=n+1;o<e;o++){var s=Math.abs(t[o][n]);s>r&&(r=s,i=o)}if(0===r)return null;var a=t[i];t[i]=t[n],t[n]=a;for(var l=n+1;l<e;l++)for(var u=-t[l][n]/t[n][n],h=n;h<e+1;h++)n==h?t[l][h]=0:t[l][h]+=u*t[n][h]}for(var c=new Array(e),p=e-1;p>=0;p--){c[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*c[p]}return c}function u(t){return 180*t/Math.PI}function h(t){return t*Math.PI/180}function c(t,e){var n=t%e;return n*e<0?n+e:n}function p(t,e,n){return t+n*(e-t)}function f(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function d(t,e){return Math.floor(f(t,e))}function g(t,e){return Math.ceil(f(t,e))}},374:(t,e,n)=>{"use strict";n.d(e,{KX:()=>o,ZH:()=>r,f0:()=>i,xb:()=>s});var i="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),i=1,r=arguments.length;i<r;++i){var o=arguments[i];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(n[s]=o[s])}return n};function r(t){for(var e in t)delete t[e]}var o="function"==typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e};function s(t){var e;for(e in t)return!1;return!e}},562:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},187:(t,e,n)=>{"use strict";function i(){return function(){throw new Error("Unimplemented abstract method.")}()}n.d(e,{O3:()=>i,q4:()=>s,sq:()=>o});var r=0;function o(t){return t.ol_uid||(t.ol_uid=String(++r))}var s="6.14.1"}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={id:i,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0,(()=>{"use strict";var t=n(379),e=n.n(t),i=n(788);e()(i.Z,{insert:"head",singleton:!1}),i.Z.locals;var r=n(779);e()(r.Z,{insert:"head",singleton:!1}),r.Z.locals;var o,s=n(431),a=n(885),l=n(187),u=n(177),h=n(515);function c(t,e){var n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e}function p(t,e,n,i,r,o,s,a){var l=Math.sin(o),u=Math.cos(o);return t[0]=i*u,t[1]=r*l,t[2]=-i*l,t[3]=r*u,t[4]=s*i*u-a*i*l+e,t[5]=s*r*l+a*r*u+n,t}function f(t,e){var n,i=(n=e)[0]*n[3]-n[1]*n[2];(0,h.h)(0!==i,32);var r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];return t[0]=a/i,t[1]=-o/i,t[2]=-s/i,t[3]=r/i,t[4]=(s*u-a*l)/i,t[5]=-(r*u-o*l)/i,t}function d(t){var e="matrix("+t.join(", ")+")";if(u.Id)return e;var n=o||(o=document.createElement("div"));return n.style.transform=e,n.style.transform}new Array(6);var g=n(641),_=n(983),y=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,v=/^([a-z]*)$|^hsla?\(.*\)$/i;function m(t){return"string"==typeof t?t:E(t)}var x=function(){var t={},e=0;return function(n){var i;if(t.hasOwnProperty(n))i=t[n];else{if(e>=1024){var r=0;for(var o in t)0==(3&r++)&&(delete t[o],--e)}i=function(t){var e,n,i,r,o;if(v.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}(t)),y.exec(t)){var s,a=t.length-1;s=a<=4?1:2;var l=4===a||8===a;e=parseInt(t.substr(1+0*s,s),16),n=parseInt(t.substr(1+1*s,s),16),i=parseInt(t.substr(1+2*s,s),16),r=l?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,l&&(r=(r<<4)+r)),o=[e,n,i,r/255]}else 0==t.indexOf("rgba(")?b(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),b(o)):(0,h.h)(!1,14);return o}(n),t[n]=i,++e}return i}}();function w(t){return Array.isArray(t)?t:x(t)}function b(t){return t[0]=(0,_.uZ)(t[0]+.5|0,0,255),t[1]=(0,_.uZ)(t[1]+.5|0,0,255),t[2]=(0,_.uZ)(t[2]+.5|0,0,255),t[3]=(0,_.uZ)(t[3],0,1),t}function E(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var i=t[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+e+","+n+","+i+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function S(t,e,n){return e+":"+t+":"+(n?m(n):"null")}var C=new(function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var i=S(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var r=S(t,e,n);this.cache_[r]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}()),T=n(947),O=n(487),R=n(912);const I="precompose",P="rendercomplete";var L,A=n(562),M=n(374),F=n(818),k=(L=function(t,e){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},L(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}L(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),D=function(t){function e(e){var n=this,i=(0,M.f0)({},e);delete i.source,(n=t.call(this,i)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(R.Z.SOURCE,n.handleSourcePropertyChange_);var r=e.source?e.source:null;return n.setSource(r),n}return k(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(R.Z.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():A.Z.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,F.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=(0,F.oL)(t,O.Z.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(R.Z.MAP,t)},e.prototype.getMapInternal=function(){return this.get(R.Z.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&((0,F.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,F.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,F.oL)(t,I,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);(0,h.h)(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=(0,F.oL)(this,O.Z.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(R.Z.SOURCE,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(T.Z);function j(t,e){if(!t.visible)return!1;var n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}const Z=D;function N(t,e){for(var n=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function G(t,e){var n=Math.cos(e),i=Math.sin(e),r=t[0]*n-t[1]*i,o=t[1]*n+t[0]*i;return t[0]=r,t[1]=o,t}function z(t,e){if(e.canWrapX()){var n=(0,g.dz)(e.getExtent()),i=function(t,e,n){var i=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){var o=n||(0,g.dz)(i);r=Math.floor((t[0]-i[0])/o)}return r}(t,e,n);i&&(t[0]-=i*n)}return t}var W=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),X=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return W(e,t),e.prototype.dispatchRenderEvent=function(t,e){(0,l.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;p(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),f(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r,o,s,a){var l,u=e.viewState;function h(t,e,n,i){return r.call(o,e,t?n:null,i)}var c=u.projection,p=z(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&i){var d=c.getExtent(),_=(0,g.dz)(d);f.push([-_,0],[_,0])}for(var y=e.layerStatesArray,v=y.length,m=[],x=[],w=0;w<f.length;w++)for(var b=v-1;b>=0;--b){var E=y[b],S=E.layer;if(S.hasRenderer()&&j(E,u)&&s.call(a,S)){var C=S.getRenderer(),T=S.getSource();if(C&&T){var O=T.getWrapX()?p:t,R=h.bind(null,E.managed);x[0]=O[0]+f[w][0],x[1]=O[1]+f[w][1],l=C.forEachFeatureAtCoordinate(x,e,n,R,m)}if(l)return l}}if(0!==m.length){var I=1/m.length;return m.forEach((function(t,e){return t.distanceSq+=e*I})),m.sort((function(t,e){return t.distanceSq-e.distanceSq})),m.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,n,i,r){return(0,l.O3)()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,i,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,i,a.uX,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,l.O3)()},e.prototype.scheduleExpireIconCache=function(t){C.canExpireCache()&&t.postRenderFunctions.push(V)},e}(s.Z);function V(t,e){C.expire()}const Y=X;var K=n(990),B=n(291),U=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const H=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.inversePixelTransform=n,o.frameState=i,o.context=r,o}return U(e,t),e}(B.ZP);var q="ol-hidden",J="ol-unsupported",Q="ol-control",$=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),tt=["style","variant","weight","size","lineHeight","family"],et=function(t){var e=t.match($);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,r=tt.length;i<r;++i){var o=e[i+1];void 0!==o&&(n[tt[i]]=o)}return n.families=n.family.split(/,\s?/),n};function nt(t){return 1===t?"":String(Math.round(100*t)/100)}var it=n(971),rt=n(208),ot=n(326),st="10px sans-serif",at="#000",lt="round",ut=[],ht="round",ct="#000",pt="center",ft="middle",dt=[0,0,0,0],gt=new it.Z;(new rt.Z).setSize=function(){console.warn("labelCache is deprecated.")};var _t,yt,vt=null,mt={},xt=function(){var t,e,n="32px ",i=["monospace","serif"],r=i.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,u=0;u<r;++u){var h=i[u];if(e=Et(t+" "+s+" "+n+h,o),a!=h){var c=Et(t+" "+s+" "+n+a+","+h,o);l=l&&c!=e}}return!!l}function a(){for(var e=!0,n=gt.getKeys(),i=0,r=n.length;i<r;++i){var o=n[i];gt.get(o)<100&&(s.apply(this,o.split("\n"))?((0,M.ZH)(mt),vt=null,_t=void 0,gt.set(o,100)):(gt.set(o,gt.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var n=et(e);if(n)for(var i=n.families,r=0,o=i.length;r<o;++r){var l=i[r],u=n.style+"\n"+n.weight+"\n"+l;void 0===gt.get(u)&&(gt.set(u,100,!0),s(n.style,n.weight,l)||(gt.set(u,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),wt=function(t){var e=mt[t];if(null==e){if(u.Id){var n=et(t),i=bt(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else yt||((yt=document.createElement("div")).innerHTML="M",yt.style.minHeight="0",yt.style.maxHeight="none",yt.style.height="auto",yt.style.padding="0",yt.style.border="none",yt.style.position="absolute",yt.style.display="block",yt.style.left="-99999px"),yt.style.font=t,document.body.appendChild(yt),e=yt.offsetHeight,document.body.removeChild(yt);mt[t]=e}return e};function bt(t,e){return vt||(vt=(0,ot.E4)(1,1)),t!=_t&&(vt.font=t,_t=vt.font),vt.measureText(e)}function Et(t,e){return bt(t,e).width}function St(t,e,n){if(e in n)return n[e];var i=Et(t,e);return n[e]=i,i}var Ct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tt=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=(0,F.oL)(gt,K.Z.PROPERTYCHANGE,e.redrawText.bind(e)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className="ol-unselectable ol-layers";var r=e.getViewport();return r.insertBefore(n.element_,r.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return Ct(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var i=new H(t,void 0,e);n.dispatchEvent(i)}},e.prototype.disposeInternal=function(){(0,F.bN)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(I,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var i=[],r=null,o=0,s=e.length;o<s;++o){var a=e[o];t.layerIndex=o;var l=a.layer,u=l.getSourceState();if(!j(a,n)||u!=A.Z.READY&&u!=A.Z.UNDEFINED)l.unrender();else{var h=l.render(t,r);h&&(h!==r&&(this.children_.push(h),r=h),"getDeclutter"in l&&i.push(l))}}for(o=i.length-1;o>=0;--o)i[o].renderDeclutter(t);(0,ot.hF)(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,n,i,r){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],u=l.layer;if(u.hasRenderer()&&j(l,o)&&r(u)){var h=u.getRenderer().getDataAtPixel(t,e,n);if(h){var c=i(u,h);if(c)return c}}}},e}(Y);const Ot=Tt;var Rt=n(714),It=n(71),Pt=n(734),Lt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),At=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.map=n,r.frameState=void 0!==i?i:null,r}return Lt(e,t),e}(B.ZP);const Mt=At;var Ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kt=function(t){function e(e,n,i,r,o){var s=t.call(this,e,n,o)||this;return s.originalEvent=i,s.pixel_=null,s.coordinate_=null,s.dragging=void 0!==r&&r,s}return Ft(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(Mt);const Dt=kt,jt={SINGLECLICK:"singleclick",CLICK:O.Z.CLICK,DBLCLICK:O.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Zt="pointerdown";var Nt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gt=function(t){function e(e,n){var i=t.call(this,e)||this;i.map_=e,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=void 0===n?1:n,i.down_=null;var r=i.map_.getViewport();return i.activePointers_=0,i.trackedTouches_={},i.element_=r,i.pointerdownListenerKey_=(0,F.oL)(r,Zt,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=(0,F.oL)(r,"pointermove",i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(O.Z.TOUCHMOVE,i.boundHandleTouchMove_,!!u.bM&&{passive:!1}),i}return Nt(e,t),e.prototype.emulateClick_=function(t){var e=new Dt(jt.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Dt(jt.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new Dt(jt.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==jt.POINTERUP||e.type==jt.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==jt.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new Dt(jt.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(F.bN),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new Dt(jt.POINTERDOWN,this.map_,t);for(var n in this.dispatchEvent(e),this.down_={},t){var i=t[n];this.down_[n]="function"==typeof i?a.Zn:i}if(0===this.dragListenerKeys_.length){var r=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,F.oL)(r,jt.POINTERMOVE,this.handlePointerMove_,this),(0,F.oL)(r,jt.POINTERUP,this.handlePointerUp_,this),(0,F.oL)(this.element_,jt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==r&&this.dragListenerKeys_.push((0,F.oL)(this.element_.getRootNode(),jt.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new Dt(jt.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Dt(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&((0,F.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(O.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,F.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(F.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(rt.Z);const zt=Gt;var Wt=n(126);const Xt="layergroup",Vt="size",Yt="target",Kt="view";var Bt=1/0;const Ut=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,(0,M.ZH)(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},t.prototype.enqueue=function(t){(0,h.h)(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Bt&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,i=e.length,r=e[t],o=n[t],s=t;t<i>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=l<i&&n[l]<n[a]?l:a;e[t]=e[u],n[t]=n[u],t=u}e[t]=r,n[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var n=this.elements_,i=this.priorities_,r=n[e],o=i[e];e>t;){var s=this.getParentIndex_(e);if(!(i[s]>o))break;n[e]=n[s],i[e]=i[s],e=s}n[e]=r,i[e]=o},t.prototype.reprioritize=function(){var t,e,n,i=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e<a;++e)(n=i(t=r[e]))==Bt?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=n,r[s++]=t);r.length=s,o.length=s,this.heapify_()},t}();var Ht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const qt=function(t){function e(e,n){var i=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=n,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return Ht(e,t),e.prototype.enqueue=function(e){var n=t.prototype.enqueue.call(this,e);return n&&e[0].addEventListener(O.Z.CHANGE,this.boundHandleTileChange_),n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,n=e.getState();if(2===n||3===n||4===n){e.removeEventListener(O.Z.CHANGE,this.boundHandleTileChange_);var i=e.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var n,i,r=0;this.tilesLoading_<t&&r<e&&this.getCount()>0;)i=(n=this.dequeue()[0]).getKey(),0!==n.getState()||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++r,n.load())},e}(Ut),Jt="Point",Qt="LineString",$t="Polygon",te="MultiPoint",ee="MultiLineString",ne="MultiPolygon",ie="GeometryCollection",re="Circle";var oe={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},se={};se[oe.RADIANS]=6370997/(2*Math.PI),se[oe.DEGREES]=2*Math.PI*6370997/360,se[oe.FEET]=.3048,se[oe.METERS]=1,se[oe.USFEET]=1200/3937;const ae=oe,le={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var ue=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||se[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();const he=ue;var ce=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pe=6378137,fe=Math.PI*pe,de=[-fe,-fe,fe,fe],ge=[-180,-85,180,85],_e=pe*Math.log(Math.tan(Math.PI/2)),ye=function(t){function e(e){return t.call(this,{code:e,units:ae.METERS,extent:de,global:!0,worldExtent:ge,getPointResolution:function(t,e){return t/(0,_.f9)(e[1]/pe)}})||this}return ce(e,t),e}(he),ve=[new ye("EPSG:3857"),new ye("EPSG:102100"),new ye("EPSG:102113"),new ye("EPSG:900913"),new ye("http://www.opengis.net/def/crs/EPSG/0/3857"),new ye("http://www.opengis.net/gml/srs/epsg.xml#3857")];var me=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xe=[-180,-90,180,90],we=6378137*Math.PI/180,be=function(t){function e(e,n){return t.call(this,{code:e,units:ae.DEGREES,extent:xe,axisOrientation:n,global:!0,metersPerUnit:we,worldExtent:xe})||this}return me(e,t),e}(he),Ee=[new be("CRS:84"),new be("EPSG:4326","neu"),new be("urn:ogc:def:crs:OGC:1.3:CRS84"),new be("urn:ogc:def:crs:OGC:2:84"),new be("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new be("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new be("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],Se={},Ce={};function Te(t,e,n){var i=t.getCode(),r=e.getCode();i in Ce||(Ce[i]={}),Ce[i][r]=n}var Oe=6371008.8;function Re(t,e,n){var i=n||Oe,r=(0,_.Yr)(t[1]),o=(0,_.Yr)(e[1]),s=(o-r)/2,a=(0,_.Yr)(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function Ie(t,e,n,i){var r=i||Oe,o=(0,_.Yr)(t[1]),s=(0,_.Yr)(t[0]),a=e/r,l=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(n)),u=s+Math.atan2(Math.sin(n)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(l));return[(0,_.Ux)(u),(0,_.Ux)(l)]}var Pe=!0;function Le(t){Pe=!(void 0===t||t)}function Ae(t,e,n){var i;if(void 0!==e){for(var r=0,o=t.length;r<o;++r)e[r]=t[r];i=e}else i=t.slice();return i}function Me(t,e,n){if(void 0!==e&&t!==e){for(var i=0,r=t.length;i<r;++i)e[i]=t[i];t=e}return t}function Fe(t){!function(t,e){Se[t]=e}(t.getCode(),t),Te(t,t,Ae)}function ke(t){return"string"==typeof t?Se[e=t]||Se[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function De(t,e,n,i){var r,o=(t=ke(t)).getPointResolutionFunc();if(o)r=o(e,n),i&&i!==t.getUnits()&&(a=t.getMetersPerUnit())&&(r=r*a/se[i]);else{var s=t.getUnits();if(s==ae.DEGREES&&!i||i==ae.DEGREES)r=e;else{var a,l=Ge(t,ke("EPSG:4326"));if(l===Me&&s!==ae.DEGREES)r=e*t.getMetersPerUnit();else{var u=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];r=(Re((u=l(u,u,2)).slice(0,2),u.slice(2,4))+Re(u.slice(4,6),u.slice(6,8)))/2}void 0!==(a=i?se[i]:t.getMetersPerUnit())&&(r/=a)}}return r}function je(t){!function(t){t.forEach(Fe)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Te(e,t,Ae)}))}))}function Ze(t,e){return t?"string"==typeof t?ke(t):t:ke(e)}function Ne(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Ge(t,e)===Ae)&&n}function Ge(t,e){var n=function(t,e){var n;return t in Ce&&e in Ce[t]&&(n=Ce[t][e]),n}(t.getCode(),e.getCode());return n||(n=Me),n}function ze(t,e){return Ge(ke(t),ke(e))}function We(t,e,n){return ze(e,n)(t,void 0,t.length)}function Xe(t,e,n,i){var r=ze(e,n);return(0,g.Ne)(t,r,void 0,i)}var Ve,Ye,Ke,Be=null;function Ue(){return Be}function He(t,e){return t}function qe(t,e){return Pe&&!N(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Pe=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function Je(t,e){return t}function Qe(t,e){return t}function $e(t,e){return t}function tn(t,e,n){return function(i,r,o,s,a){if(i){if(!r&&!e)return i;var l=e?0:o[0]*r,u=e?0:o[1]*r,h=a?a[0]:0,c=a?a[1]:0,p=t[0]+l/2+h,f=t[2]-l/2+h,d=t[1]+u/2+c,g=t[3]-u/2+c;p>f&&(f=p=(f+p)/2),d>g&&(g=d=(g+d)/2);var y=(0,_.uZ)(i[0],p,f),v=(0,_.uZ)(i[1],d,g);if(s&&n&&r){var m=30*r;y+=-m*Math.log(1+Math.max(0,p-i[0])/m)+m*Math.log(1+Math.max(0,i[0]-f)/m),v+=-m*Math.log(1+Math.max(0,d-i[1])/m)+m*Math.log(1+Math.max(0,i[1]-g)/m)}return[y,v]}}}function en(t){return t}je(ve),je(Ee),Ve=ve,Ye=function(t,e,n){var i=t.length,r=n>1?n:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(i));for(var s=0;s<i;s+=r){o[s]=fe*t[s]/180;var a=pe*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>_e?a=_e:a<-_e&&(a=-_e),o[s+1]=a}return o},Ke=function(t,e,n){var i=t.length,r=n>1?n:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(i));for(var s=0;s<i;s+=r)o[s]=180*t[s]/fe,o[s+1]=360*Math.atan(Math.exp(t[s+1]/pe))/Math.PI-90;return o},Ee.forEach((function(t){Ve.forEach((function(e){Te(t,e,Ye),Te(e,t,Ke)}))}));var nn=n(537);function rn(t,e,n,i){var r=(0,g.dz)(e)/n[0],o=(0,g.Cr)(e)/n[1];return i?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function on(t,e,n){var i=Math.min(t,e);return i*=Math.log(1+50*Math.max(0,t/e-1))/50+1,n&&(i=Math.max(i,n),i/=Math.log(1+50*Math.max(0,n/t-1))/50+1),(0,_.uZ)(i,n/2,2*e)}function sn(t,e,n,i,r){return function(o,s,a,l){if(void 0!==o){var u=i?rn(t,i,a,r):t;return(void 0===n||n)&&l?on(o,u,e):(0,_.uZ)(o,e,u)}}}function an(t){return void 0!==t?0:void 0}function ln(t){return void 0!==t?t:void 0}function un(t){return Math.pow(t,3)}function hn(t){return 1-un(1-t)}function cn(t){return 3*t*t-2*t*t*t}function pn(t){return t}const fn="XY",dn="XYZM";function gn(t,e,n,i,r,o){for(var s=o||[],a=0,l=e;l<n;l+=i){var u=t[l],h=t[l+1];s[a++]=r[0]*u+r[2]*h+r[4],s[a++]=r[1]*u+r[3]*h+r[5]}return o&&s.length!=a&&(s.length=a),s}function _n(t,e,n,i,r,o,s){for(var a=s||[],l=Math.cos(r),u=Math.sin(r),h=o[0],c=o[1],p=0,f=e;f<n;f+=i){var d=t[f]-h,g=t[f+1]-c;a[p++]=h+d*l-g*u,a[p++]=c+d*u+g*l;for(var _=f+2;_<f+i;++_)a[p++]=t[_]}return s&&a.length!=p&&(a.length=p),a}var yn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vn=[1,0,0,1,0,0],mn=function(t){function e(){var e=t.call(this)||this;return e.extent_=(0,g.lJ)(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=(0,a.qe)((function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(e)})),e}return yn(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return(0,l.O3)()},e.prototype.closestPointXY=function(t,e,n,i){return(0,l.O3)()},e.prototype.containsXY=function(t,e){var n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e},e.prototype.getClosestPoint=function(t,e){var n=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],n,1/0),n},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return(0,l.O3)()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&(0,g.YN)(e),this.extentRevision_=this.getRevision()}return(0,g.EO)(this.extent_,t)},e.prototype.rotate=function(t,e){(0,l.O3)()},e.prototype.scale=function(t,e,n){(0,l.O3)()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return(0,l.O3)()},e.prototype.getType=function(){return(0,l.O3)()},e.prototype.applyTransform=function(t){(0,l.O3)()},e.prototype.intersectsExtent=function(t){return(0,l.O3)()},e.prototype.translate=function(t,e){(0,l.O3)()},e.prototype.transform=function(t,e){var n=ke(t),i=n.getUnits()==ae.TILE_PIXELS?function(t,i,r){var o=n.getExtent(),s=n.getWorldExtent(),a=(0,g.Cr)(s)/(0,g.Cr)(o);return p(vn,s[0],s[3],a,-a,0,0,0),gn(t,0,t.length,r,vn,i),ze(n,e)(t,i,r)}:ze(n,e);return this.applyTransform(i),this},e}(it.Z);const xn=mn;var wn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),bn=function(t){function e(){var e=t.call(this)||this;return e.layout=fn,e.stride=2,e.flatCoordinates=null,e}return wn(e,t),e.prototype.computeExtent=function(t){return(0,g.GN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return(0,l.O3)()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=En(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){(0,l.O3)()},e.prototype.setLayout=function(t,e,n){var i;if(t)i=En(t);else{for(var r=0;r<n;++r){if(0===e.length)return this.layout=fn,void(this.stride=2);e=e[0]}t=function(t){var e;return 2==t?e=fn:3==t?e="XYZ":4==t&&(e=dn),e}(i=e.length)}this.layout=t,this.stride=i},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();_n(n,0,n.length,i,t,e,n),this.changed()}},e.prototype.scale=function(t,e,n){var i=e;void 0===i&&(i=t);var r=n;r||(r=(0,g.qg)(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,n,i,r,o,s,a){for(var l=a||[],u=s[0],h=s[1],c=0,p=0;p<n;p+=i){var f=t[p]-u,d=t[p+1]-h;l[c++]=u+r*f,l[c++]=h+o*d;for(var g=p+2;g<p+i;++g)l[c++]=t[g]}a&&l.length!=c&&(l.length=c)}(o,0,o.length,s,t,i,r,o),this.changed()}},e.prototype.translate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();!function(t,e,n,i,r,o,s){for(var a=s||[],l=0,u=0;u<n;u+=i){a[l++]=t[u]+r,a[l++]=t[u+1]+o;for(var h=u+2;h<u+i;++h)a[l++]=t[h]}s&&a.length!=l&&(a.length=l)}(n,0,n.length,i,t,e,n),this.changed()}},e}(xn);function En(t){var e;return t==fn?e=2:"XYZ"==t||"XYM"==t?e=3:t==dn&&(e=4),e}const Sn=bn;function Cn(t,e,n,i,r,o,s){var a,l=t[e],u=t[e+1],h=t[n]-l,c=t[n+1]-u;if(0===h&&0===c)a=e;else{var p=((r-l)*h+(o-u)*c)/(h*h+c*c);if(p>1)a=n;else{if(p>0){for(var f=0;f<i;++f)s[f]=(0,_.t7)(t[e+f],t[n+f],p);return void(s.length=i)}a=e}}for(f=0;f<i;++f)s[f]=t[a+f];s.length=i}function Tn(t,e,n,i,r){var o=t[e],s=t[e+1];for(e+=i;e<n;e+=i){var a=t[e],l=t[e+1],u=(0,_.bI)(o,s,a,l);u>r&&(r=u),o=a,s=l}return r}function On(t,e,n,i,r,o,s,a,l,u,h){if(e==n)return u;var c,p;if(0===r){if((p=(0,_.bI)(s,a,t[e],t[e+1]))<u){for(c=0;c<i;++c)l[c]=t[e+c];return l.length=i,p}return u}for(var f=h||[NaN,NaN],d=e+i;d<n;)if(Cn(t,d-i,d,i,s,a,f),(p=(0,_.bI)(s,a,f[0],f[1]))<u){for(u=p,c=0;c<i;++c)l[c]=f[c];l.length=i,d+=i}else d+=i*Math.max((Math.sqrt(p)-Math.sqrt(u))/r|0,1);if(o&&(Cn(t,n-i,e,i,s,a,f),(p=(0,_.bI)(s,a,f[0],f[1]))<u)){for(u=p,c=0;c<i;++c)l[c]=f[c];l.length=i}return u}function Rn(t,e,n,i){for(var r=0,o=n.length;r<o;++r)for(var s=n[r],a=0;a<i;++a)t[e++]=s[a];return e}function In(t,e){return e*Math.round(t/e)}function Pn(t,e,n,i,r,o,s){if(e==n)return s;var a,l,u=In(t[e],r),h=In(t[e+1],r);e+=i,o[s++]=u,o[s++]=h;do{if(a=In(t[e],r),l=In(t[e+1],r),(e+=i)==n)return o[s++]=a,o[s++]=l,s}while(a==u&&l==h);for(;e<n;){var c=In(t[e],r),p=In(t[e+1],r);if(e+=i,c!=a||p!=l){var f=a-u,d=l-h,g=c-u,_=p-h;f*_==d*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(d<0&&_<d||d==_||d>0&&_>d)?(a=c,l=p):(o[s++]=a,o[s++]=l,u=a,h=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function Ln(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=e;a<n;a+=i)o[s++]=t.slice(a,a+i);return o.length=s,o}function An(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=0,l=n.length;a<l;++a){var u=n[a];o[s++]=Ln(t,e,u,i,o[s]),e=u}return o.length=s,o}function Mn(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=0,l=n.length;a<l;++a){var u=n[a];o[s++]=An(t,e,u,i,o[s]),e=u[u.length-1]}return o.length=s,o}function Fn(t,e,n,i){for(var r=0,o=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];r+=s*a-o*l,o=a,s=l}return r/2}var kn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Dn=function(t){function e(e,n){var i=t.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?i.setCoordinates(e,n):i.setFlatCoordinates(n,e),i}return kn(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,n,i){return i<(0,g.qf)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),On(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.getArea=function(){return Fn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return Ln(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=function(t,e,n,i,r,o,s){var a=(n-e)/i;if(a<3){for(;e<n;e+=i)o[s++]=t[e],o[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var u=[e,n-i],h=0;u.length>0;){for(var c=u.pop(),p=u.pop(),f=0,d=t[p],g=t[p+1],y=t[c],v=t[c+1],m=p+i;m<c;m+=i){var x=t[m],w=t[m+1],b=(0,_.rU)(x,w,d,g,y,v);b>f&&(h=m,f=b)}f>r&&(l[(h-e)/i]=1,p+i<h&&u.push(p,h),h+i<c&&u.push(h,c))}for(m=0;m<a;++m)l[m]&&(o[s++]=t[e+m*i],o[s++]=t[e+m*i+1]);return s}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,fn)},e.prototype.getType=function(){return"LinearRing"},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Rn(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Sn);const jn=Dn;var Zn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Nn=function(t){function e(e,n){var i=t.call(this)||this;return i.setCoordinates(e,n),i}return Zn(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){var r=this.flatCoordinates,o=(0,_.bI)(t,e,r[0],r[1]);if(o<i){for(var s=this.stride,a=0;a<s;++a)n[a]=r[a];return n.length=s,o}return i},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return(0,g.HK)(this.flatCoordinates,t)},e.prototype.getType=function(){return Jt},e.prototype.intersectsExtent=function(t){return(0,g.jE)(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,n,i){for(var r=0,o=n.length;r<o;++r)t[e++]=n[r];return e}(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Sn);const Gn=Nn;function zn(t,e,n,i,r){return!(0,g.H6)(r,(function(r){return!Wn(t,e,n,i,r[0],r[1])}))}function Wn(t,e,n,i,r,o){for(var s=0,a=t[n-i],l=t[n-i+1];e<n;e+=i){var u=t[e],h=t[e+1];l<=o?h>o&&(u-a)*(o-l)-(r-a)*(h-l)>0&&s++:h<=o&&(u-a)*(o-l)-(r-a)*(h-l)<0&&s--,a=u,l=h}return 0!==s}function Xn(t,e,n,i,r,o){if(0===n.length)return!1;if(!Wn(t,e,n[0],i,r,o))return!1;for(var s=1,a=n.length;s<a;++s)if(Wn(t,n[s-1],n[s],i,r,o))return!1;return!0}function Vn(t,e,n,i,r){var o=(0,g.qP)((0,g.lJ)(),t,e,n,i);return!!(0,g.kK)(r,o)&&(!!(0,g.r4)(r,o)||o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]||function(t,e,n,i,o){var s,a,l;for(e+=i;e<n;e+=i)if(a=t.slice(e-i,e),l=t.slice(e,e+i),s=(0,g.I7)(r,a,l))return s;return!1}(t,e,n,i))}function Yn(t,e,n,i){for(;e<n-i;){for(var r=0;r<i;++r){var o=t[e+r];t[e+r]=t[n-i+r],t[n-i+r]=o}e+=i,n-=i}}function Kn(t,e,n,i){for(var r=0,o=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];r+=(a-o)*(l+s),o=a,s=l}return 0===r?void 0:r>0}function Bn(t,e,n,i,r){for(var o=void 0!==r&&r,s=0,a=n.length;s<a;++s){var l=n[s],u=Kn(t,e,l,i);(0===s?o&&u||!o&&!u:o&&!u||!o&&u)&&Yn(t,e,l,i),e=l}return e}var Un=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hn=function(t){function e(e,n,i){var r=t.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==n&&i?(r.setFlatCoordinates(n,e),r.ends_=i):r.setCoordinates(e,n),r}return Un(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,nn.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){return i<(0,g.qf)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,n,i,r){for(var o=0,s=n.length;o<s;++o){var a=n[o];r=Tn(t,e,a,i,r),e=a}return r}(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,n,i,r,o,s,a,l,u,h){for(var c=h||[NaN,NaN],p=0,f=n.length;p<f;++p){var d=n[p];u=On(t,e,d,i,r,o,s,a,l,u,c),e=d}return u}(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.containsXY=function(t,e){return Xn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,n,i){for(var r=0,o=0,s=n.length;o<s;++o){var a=n[o];r+=Fn(t,e,a,i),e=a}return r}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Bn(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,An(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=(0,g.qg)(this.getExtent());this.flatInteriorPoint_=function(t,e,n,i,r,o,s){for(var a,l,u,h,c,p,f,d=r[o+1],g=[],_=0,y=n.length;_<y;++_){var v=n[_];for(h=t[v-i],p=t[v-i+1],a=e;a<v;a+=i)c=t[a],f=t[a+1],(d<=p&&f<=d||p<=d&&d<=f)&&(u=(d-p)/(f-p)*(c-h)+h,g.push(u)),h=c,p=f}var m=NaN,x=-1/0;for(g.sort(nn.kK),h=g[0],a=1,l=g.length;a<l;++a){c=g[a];var w=Math.abs(c-h);w>x&&Xn(t,e,n,i,u=(h+c)/2,d)&&(m=u,x=w),h=c}return isNaN(m)&&(m=r[o]),s?(s.push(m,d,x),s):[m,d,x]}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new Gn(this.getFlatInteriorPoint(),"XYM")},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new jn(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.ends_,i=[],r=0,o=0,s=n.length;o<s;++o){var a=n[o],l=new jn(e.slice(r,a),t);i.push(l),r=a}return i},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,n,i,r){for(var o=void 0!==r&&r,s=0,a=n.length;s<a;++s){var l=n[s],u=Kn(t,e,l,i);if(0===s){if(o&&u||!o&&!u)return!1}else if(o&&!u||!o&&u)return!1;e=l}return!0}(t,0,this.ends_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Bn(this.orientedFlatCoordinates_,0,this.ends_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=function(t,e,n,i,r,o,s,a){for(var l=0,u=n.length;l<u;++l){var h=n[l];s=Pn(t,e,h,i,r,o,s),a.push(s),e=h}return s}(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,i),new e(n,fn,i)},e.prototype.getType=function(){return $t},e.prototype.intersectsExtent=function(t){return function(t,e,n,i,r){if(!function(t,e,n,i,r){return!!(Vn(t,e,n,i,r)||Wn(t,e,n,i,r[0],r[1])||Wn(t,e,n,i,r[0],r[3])||Wn(t,e,n,i,r[2],r[1])||Wn(t,e,n,i,r[2],r[3]))}(t,e,n[0],i,r))return!1;if(1===n.length)return!0;for(var o=1,s=n.length;o<s;++o)if(zn(t,n[o-1],n[o],i,r)&&!Vn(t,n[o-1],n[o],i,r))return!1;return!0}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=function(t,e,n,i,r){for(var o=r||[],s=0,a=0,l=n.length;a<l;++a){var u=Rn(t,e,n[a],i);o[s++]=u,e=u}return o.length=s,o}(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},e}(Sn);const qn=Hn;function Jn(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=[e,n,e,r,i,r,i,n,e,n];return new Hn(o,fn,[o.length])}var Qn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$n=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=(0,M.f0)({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=Ze(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,i.projection&&Le(),i.center&&(i.center=qe(i.center,n.projection_)),i.extent&&(i.extent=Qe(i.extent,n.projection_)),n.applyOptions_(i),n}return Qn(e,t),e.prototype.applyOptions_=function(t){var e=(0,M.f0)({},t);for(var n in le)delete e[n];this.setProperties(e,!0);var i=function(t){var e,n,i,r=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,l=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,h=Ze(t.projection,"EPSG:3857"),c=h.getExtent(),p=t.constrainOnlyCenter,f=t.extent;if(a||f||!h.isGlobal()||(p=!1,f=c),void 0!==t.resolutions){var d=t.resolutions;n=d[r],i=void 0!==d[o]?d[o]:d[d.length-1],e=t.constrainResolution?function(t,e,n,i){return function(r,o,s,a){if(void 0!==r){var l=t[0],u=t[t.length-1],h=n?rn(l,n,s,i):l;if(a)return void 0===e||e?on(r,h,u):(0,_.uZ)(r,u,h);var c=Math.min(h,r),p=Math.floor((0,nn.h7)(t,c,o));return t[p]>h&&p<t.length-1?t[p+1]:t[p]}}}(d,l,!p&&f,u):sn(n,i,l,!p&&f,u)}else{var y=(c?Math.max((0,g.dz)(c),(0,g.Cr)(c)):360*se[ae.DEGREES]/h.getMetersPerUnit())/256/Math.pow(2,0),v=y/Math.pow(2,28);void 0!==(n=t.maxResolution)?r=0:n=y/Math.pow(s,r),void 0===(i=t.minResolution)&&(i=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(s,o):y/Math.pow(s,o):v),o=r+Math.floor(Math.log(n/i)/Math.log(s)),i=n/Math.pow(s,o-r),e=t.constrainResolution?function(t,e,n,i,r,o){return function(s,a,l,u){if(void 0!==s){var h=r?rn(e,r,l,o):e,c=void 0!==n?n:0;if(u)return void 0===i||i?on(s,h,c):(0,_.uZ)(s,c,h);var p=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),f=-a*(.5-1e-9)+.5,d=Math.min(h,s),g=Math.floor(Math.log(e/d)/Math.log(t)+f),y=Math.max(p,g),v=e/Math.pow(t,y);return(0,_.uZ)(v,c,h)}}}(s,n,i,l,!p&&f,u):sn(n,i,l,!p&&f,u)}return{constraint:e,maxResolution:n,minResolution:i,minZoom:r,zoomFactor:s}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;var r=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return tn(t.extent,t.constrainOnlyCenter,e)}var n=Ze(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&n.isGlobal()){var i=n.getExtent().slice();return i[0]=-1/0,i[2]=1/0,tn(i,!1,!1)}return en}(t),o=i.constraint,s=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(r=(0,_.Yr)(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=r?0:t:void 0}):!1===e?ln:"number"==typeof e?(n=e,i=2*Math.PI/n,function(t,e){return e?t:void 0!==t?t=Math.floor(t/i+.5)*i:void 0}):ln}return an;var n,i,r}(t);this.constraints_={center:r,resolution:o,rotation:s},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var n=this.getCenter();if(n){var i=t||[0,0,0,0];e=e||[0,0,0,0];var r=this.getResolution(),o=r/2*(i[3]-e[3]+e[1]-i[1]),s=r/2*(i[0]-e[0]+e[2]-i[2]);this.setCenterInternal([n[0]+o,n[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),(0,M.f0)({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),n=0;n<e.length;++n){var i=arguments[n];i.center&&((i=(0,M.f0)({},i)).center=qe(i.center,this.getProjection())),i.anchor&&((i=(0,M.f0)({},i)).anchor=qe(i.anchor,this.getProjection())),e[n]=i}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var i=0;i<n&&!this.isDef();++i){var r=arguments[i];r.center&&this.setCenterInternal(r.center),void 0!==r.zoom?this.setZoom(r.zoom):r.resolution&&this.setResolution(r.resolution),void 0!==r.rotation&&this.setRotation(r.rotation)}if(i!==n){for(var o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,u=[];i<n;++i){var h=arguments[i],c={start:o,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||cn,callback:e};if(h.center&&(c.sourceCenter=s,c.targetCenter=h.center.slice(),s=c.targetCenter),void 0!==h.zoom?(c.sourceResolution=a,c.targetResolution=this.getResolutionForZoom(h.zoom),a=c.targetResolution):h.resolution&&(c.sourceResolution=a,c.targetResolution=h.resolution,a=c.targetResolution),void 0!==h.rotation){c.sourceRotation=l;var p=(0,_.$W)(h.rotation-l+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=l+p,l=c.targetRotation}ei(c)?c.complete=!0:o+=c.duration,u.push(c)}this.animations_.push(u),this.setHint(0,1),this.updateAnimations_()}else e&&ti(e,!0)},e.prototype.getAnimating=function(){return this.hints_[0]>0},e.prototype.getInteracting=function(){return this.hints_[1]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(0,-this.hints_[0]);for(var e=0,n=this.animations_.length;e<n;++e){var i=this.animations_[e];if(i[0].callback&&ti(i[0].callback,!1),!t)for(var r=0,o=i.length;r<o;++r){var s=i[r];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,n=this.animations_.length-1;n>=0;--n){for(var i=this.animations_[n],r=!0,o=0,s=i.length;o<s;++o){var a=i[o];if(!a.complete){var l=t-a.start,u=a.duration>0?l/a.duration:1;u>=1?(a.complete=!0,u=1):r=!1;var h=a.easing(u);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],f=a.targetCenter[0],d=a.targetCenter[1];this.nextCenter_=a.targetCenter;var g=c+h*(f-c),y=p+h*(d-p);this.targetCenter_=[g,y]}if(a.sourceResolution&&a.targetResolution){var v=1===h?a.targetResolution:a.sourceResolution+h*(a.targetResolution-a.sourceResolution);if(a.anchor){var m=this.getViewportSize_(this.getRotation()),x=this.constraints_.resolution(v,0,m,!0);this.targetCenter_=this.calculateCenterZoom(x,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=v,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var w=1===h?(0,_.$W)(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+h*(a.targetRotation-a.sourceRotation);if(a.anchor){var b=this.constraints_.rotation(w,!0);this.targetCenter_=this.calculateCenterRotate(b,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=w}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[n]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var E=i[0].callback;E&&ti(E,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var n,i,r,o=this.getCenterInternal();return void 0!==o&&(G(n=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(i=n)[0]+=+r[0],i[1]+=+r[1]),n},e.prototype.calculateCenterZoom=function(t,e){var n,i=this.getCenterInternal(),r=this.getResolution();return void 0!==i&&void 0!==r&&(n=[e[0]-t*(e[0]-i[0])/r,e[1]-t*(e[1]-i[1])/r]),n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],i=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(i*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?He(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(le.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return Je(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();(0,h.h)(n,1);var i=this.getResolution();(0,h.h)(void 0!==i,2);var r=this.getRotation();return(0,h.h)(void 0!==r,3),(0,g.p8)(n,i,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(le.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Qe(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),i=(0,g.dz)(t)/n[0],r=(0,g.Cr)(t)/n[1];return Math.max(i,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/Math.log(e);return function(t){return n/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(le.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/e;return function(t){return Math.log(n/t)/e/r}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),i=this.getCenterInternal(),r=this.padding_;if(r){var o=this.getViewportSizeMinusPadding_();i=ni(i,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,n)}return{center:i.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,n,i=this.minZoom_||0;if(this.resolutions_){var r=(0,nn.h7)(this.resolutions_,t,1);i=r,e=this.resolutions_[r],n=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,n=this.zoomFactor_;return i+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=(0,_.uZ)(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,(0,_.uZ)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if((0,h.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))(0,h.h)(!(0,g.xb)(t),25),n=Jn(i=Qe(t,this.getProjection()));else if(t.getType()===re){var i;(n=Jn(i=Qe(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),(0,g.qg)(i))}else{var r=Ue();n=r?t.clone().transform(r,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),i=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,l=-1/0,u=-1/0,h=0,c=r.length;h<c;h+=o){var p=r[h]*n-r[h+1]*i,f=r[h]*i+r[h+1]*n;s=Math.min(s,p),a=Math.min(a,f),l=Math.max(l,p),u=Math.max(u,f)}return[s,a,l,u]},e.prototype.fitInternal=function(t,e){var n=e||{},i=n.size;i||(i=this.getViewportSizeMinusPadding_());var r,o=void 0!==n.padding?n.padding:[0,0,0,0],s=void 0!==n.nearest&&n.nearest;r=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.getResolutionForZoom(n.maxZoom):0;var l=this.rotatedExtentForGeometry(t),u=this.getResolutionForExtentInternal(l,[i[0]-o[1]-o[3],i[1]-o[0]-o[2]]);u=isNaN(u)?r:Math.max(u,r),u=this.getConstrainedResolution(u,s?0:1);var h=this.getRotation(),c=Math.sin(h),p=Math.cos(h),f=(0,g.qg)(l);f[0]+=(o[1]-o[3])/2*u,f[1]+=(o[0]-o[2])/2*u;var d=f[0]*p-f[1]*c,_=f[1]*p+f[0]*c,y=this.getConstrainedCenter([d,_],u),v=n.callback?n.callback:a.Zn;void 0!==n.duration?this.animateInternal({resolution:u,center:y,duration:n.duration,easing:n.easing},v):(this.targetResolution_=u,this.targetCenter_=y,this.applyTargetState_(!1,!0),ti(v,!0))},e.prototype.centerOn=function(t,e,n){this.centerOnInternal(qe(t,this.getProjection()),e,n)},e.prototype.centerOnInternal=function(t,e,n){this.setCenterInternal(ni(t,e,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,n,i){var r,o=this.padding_;if(o&&t){var s=this.getViewportSizeMinusPadding_(-n),a=ni(t,i,[s[0]/2+o[3],s[1]/2+o[0]],e,n);r=[t[0]-a[0],t[1]-a[1]]}return r},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=He(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var n=e&&qe(e,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,i,n);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=qe(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(i,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t?qe(t,this.getProjection()):t)},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var n=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,n),r=this.getViewportSize_(i),o=this.constraints_.resolution(this.targetResolution_,0,r,n),s=this.constraints_.center(this.targetCenter_,o,r,n,this.calculateCenterShift(this.targetCenter_,o,i,r));this.get(le.ROTATION)!==i&&this.set(le.ROTATION,i),this.get(le.RESOLUTION)!==o&&(this.set(le.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(le.CENTER)&&N(this.get(le.CENTER),s)||this.set(le.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,n){var i=void 0!==t?t:200,r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(0===i&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var u=n||(0===i?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&N(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:i,easing:hn,anchor:u}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(1,1)},e.prototype.endInteraction=function(t,e,n){var i=n&&qe(n,this.getProjection());this.endInteractionInternal(t,e,i)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(1,-1),this.resolveConstraints(t,e,n)},e.prototype.getConstrainedCenter=function(t,e){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)},e.prototype.getConstrainedZoom=function(t,e){var n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))},e.prototype.getConstrainedResolution=function(t,e){var n=e||0,i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,n,i)},e}(it.Z);function ti(t,e){setTimeout((function(){t(e)}),0)}function ei(t){return!(t.sourceCenter&&t.targetCenter&&!N(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function ni(t,e,n,i,r){var o=Math.cos(-r),s=Math.sin(-r),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;return[(a+=(e[0]/2-n[0])*i)*o-(l+=(n[1]-e[1]/2)*i)*(s=-s),l*o+a*s]}const ii=$n;function ri(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]+2*e,n[1]=t[1]+2*e,n}function oi(t){return t[0]>0&&t[1]>0}function si(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function ai(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var li=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function ui(t){t instanceof Z?t.setMapInternal(null):t instanceof Pt.default&&t.getLayers().forEach(ui)}function hi(t,e){if(t instanceof Z)t.setMapInternal(e);else if(t instanceof Pt.default)for(var n=t.getLayers().getArray(),i=0,r=n.length;i<r;++i)hi(n[i],e)}var ci=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var n,i,r,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Pt.default({layers:t.layers});return o.layergroup=s,o.target=t.target,o.view=t.view instanceof ii?t.view:new ii,void 0!==t.controls&&(Array.isArray(t.controls)?n=new Rt.Z(t.controls.slice()):((0,h.h)("function"==typeof t.controls.getArray,47),n=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?i=new Rt.Z(t.interactions.slice()):((0,h.h)("function"==typeof t.interactions.getArray,48),i=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?r=new Rt.Z(t.overlays.slice()):((0,h.h)("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new Rt.Z,{controls:n,interactions:i,keyboardEventTarget:e,overlays:r,values:o}}(e);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,n.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:u.MP,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=[1,0,0,1,0,0],n.pixelToCoordinateTransform_=[1,0,0,1,0,0],n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=e.moveTolerance,n.keyboardEventTarget_=i.keyboardEventTarget,n.targetChangeHandlerKeys_=null,n.controls=i.controls||new Rt.Z,n.interactions=i.interactions||new Rt.Z,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new qt(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(Xt,n.handleLayerGroupChanged_),n.addChangeListener(Kt,n.handleViewChanged_),n.addChangeListener(Vt,n.handleSizeChanged_),n.addChangeListener(Yt,n.handleTargetChanged_),n.setProperties(i.values);var r=n;return!e.view||e.view instanceof ii||e.view.then((function(t){r.setView(new ii(t))})),n.controls.addEventListener(It.Z.ADD,function(t){t.element.setMap(this)}.bind(n)),n.controls.addEventListener(It.Z.REMOVE,function(t){t.element.setMap(null)}.bind(n)),n.interactions.addEventListener(It.Z.ADD,function(t){t.element.setMap(this)}.bind(n)),n.interactions.addEventListener(It.Z.REMOVE,function(t){t.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(It.Z.ADD,function(t){this.addOverlayInternal_(t.element)}.bind(n)),n.overlays_.addEventListener(It.Z.REMOVE,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(n)),n.controls.forEach(function(t){t.setMap(this)}.bind(n)),n.interactions.forEach(function(t){t.setMap(this)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return li(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.handleLayerAdd_=function(t){hi(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var i=this.getCoordinateFromPixelInternal(t),r=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,o=void 0!==n.layerFilter?n.layerFilter:a.uX,s=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,r,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var n=[];return this.forEachFeatureAtPixel(t,(function(t){n.push(t)}),e),n},e.prototype.getAllLayers=function(){var t=[];return function e(n){n.forEach((function(n){n instanceof Pt.default?e(n.getLayers()):t.push(n)}))}(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var i=n||{},r=void 0!==i.hitTolerance?i.hitTolerance:0,o=i.layerFilter||a.uX;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,r,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_||!this.renderer_)return!1;var n=this.getCoordinateFromPixelInternal(t),i=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:a.uX,r=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,o,i,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]},e.prototype.getTarget=function(){return this.get(Yt)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return He(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?c(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(Xt)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof Rt.Z)e.setLayers(t);else{var n=e.getLayers();n.clear(),n.extend(t)}},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e];if(i.visible){var r=i.layer.getRenderer();if(r&&!r.ready)return!0;var o=i.layer.getSource();if(o&&o.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=qe(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?c(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Vt)},e.prototype.getView=function(){return this.get(Kt)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,n,i){return function(t,e,n,i,r){if(!t||!(n in t.wantedTiles))return Bt;if(!t.wantedTiles[n][e.getKey()])return Bt;var o=t.viewState.center,s=i[0]-o[0],a=i[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}(this.frameState_,t,e,n,i)},e.prototype.handleBrowserEvent=function(t,e){var n=e||t.type,i=new Dt(n,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,n=e.type;if(n===Zt||n===O.Z.WHEEL||n===O.Z.KEYDOWN){var i=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():i,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(r===i?i.documentElement:r).contains(o))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement()&&(!l.handleEvent(t)||t.propagationStopped))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,i=n;if(t){var r=t.viewHints;if(r[0]||r[1]){var o=Date.now()-t.time>8;n=o?0:8,i=o?0:2}}e.getTilesLoading()<n&&(e.reprioritize(),e.loadMoreTiles(n,i))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(P)&&this.renderer_.dispatchRenderEvent(P,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new Mt(Wt.Z.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new Mt(Wt.Z.LOADSTART,this,t))));for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,F.bN)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(O.Z.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(O.Z.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,ot.ZF)(this.viewport_)}var n=this.getTargetElement();if(n){for(var i in n.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new zt(this,this.moveTolerance_),jt)this.mapBrowserEventHandler_.addEventListener(jt[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(O.Z.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(O.Z.WHEEL,this.boundHandleBrowserEvent_,!!u.bM&&{passive:!1});var r=this.getOwnerDocument().defaultView,o=this.keyboardEventTarget_?this.keyboardEventTarget_:n;this.targetChangeHandlerKeys_=[(0,F.oL)(o,O.Z.KEYDOWN,this.handleBrowserEvent,this),(0,F.oL)(o,O.Z.KEYPRESS,this.handleBrowserEvent,this),(0,F.oL)(r,O.Z.RESIZE,this.updateSize,this)]}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&((0,F.bN)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,F.bN)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,F.oL)(t,K.Z.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,F.oL)(t,O.Z.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(F.bN),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Pt.GroupEvent("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,F.oL)(t,K.Z.PROPERTYCHANGE,this.render,this),(0,F.oL)(t,O.Z.CHANGE,this.render,this),(0,F.oL)(t,"addlayer",this.handleLayerAdd_,this),(0,F.oL)(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.handleLayerRemove_=function(t){ui(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,n=this.getSize(),i=this.getView(),r=this.frameState_,o=null;if(void 0!==n&&oi(n)&&i&&i.isDef()){var s=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=i.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:(0,g.p8)(a.center,a.resolution,a.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:(0,l.sq)(this),renderTargets:{}},a.nextCenter&&a.nextResolution){var u=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=(0,g.p8)(a.nextCenter,a.nextResolution,u,n)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r&&(!this.previousExtent_||!(0,g.xb)(this.previousExtent_)&&!(0,g.fS)(o.extent,this.previousExtent_))&&(this.dispatchEvent(new Mt(Wt.Z.MOVESTART,this,r)),this.previousExtent_=(0,g.YN)(this.previousExtent_)),this.previousExtent_&&!o.viewHints[0]&&!o.viewHints[1]&&!(0,g.fS)(o.extent,this.previousExtent_)&&(this.dispatchEvent(new Mt(Wt.Z.MOVEEND,this,o)),(0,g.d9)(o.extent,this.previousExtent_))),this.dispatchEvent(new Mt(Wt.Z.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(Wt.Z.LOADSTART)||this.hasListener(Wt.Z.LOADEND)||this.hasListener(P)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){var e=this.getLayerGroup();e&&this.handleLayerRemove_(new Pt.GroupEvent("removelayer",e)),this.set(Xt,t)},e.prototype.setSize=function(t){this.set(Vt,t)},e.prototype.setTarget=function(t){this.set(Yt,t)},e.prototype.setView=function(t){if(!t||t instanceof ii)this.set(Kt,t);else{this.set(Kt,new ii);var e=this;t.then((function(t){e.setView(new ii(t))}))}},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var n=getComputedStyle(t),i=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),r=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(i)||isNaN(r)||!oi(e=[i,r])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}},e}(it.Z);const pi=ci;var fi=n(775),di=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gi=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).ulElement_=document.createElement("ul"),n.collapsed_=void 0===i.collapsed||i.collapsed,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=void 0!==i.collapsible,n.collapsible_=void 0===i.collapsible||i.collapsible,n.collapsible_||(n.collapsed_=!1);var r=void 0!==i.className?i.className:"ol-attribution",o=void 0!==i.tipLabel?i.tipLabel:"Attributions",s=void 0!==i.expandClassName?i.expandClassName:r+"-expand",a=void 0!==i.collapseLabel?i.collapseLabel:"›",l=void 0!==i.collapseClassName?i.collapseClassName:r+"-collapse";"string"==typeof a?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=a,n.collapseLabel_.className=l):n.collapseLabel_=a;var u=void 0!==i.label?i.label:"i";"string"==typeof u?(n.label_=document.createElement("span"),n.label_.textContent=u,n.label_.className=s):n.label_=u;var h=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=o,n.toggleButton_.appendChild(h),n.toggleButton_.addEventListener(O.Z.CLICK,n.handleClick_.bind(n),!1);var c=r+" ol-unselectable "+Q+(n.collapsed_&&n.collapsible_?" ol-collapsed":"")+(n.collapsible_?"":" ol-uncollapsible"),p=n.element;return p.className=c,p.appendChild(n.toggleButton_),p.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return di(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],i=!0,r=t.layerStatesArray,o=0,s=r.length;o<s;++o){var a=r[o];if(j(a,t.viewState)){var l=a.layer.getSource();if(l){var u=l.getAttributions();if(u){var h=u(t);if(h)if(i=i&&!1!==l.getAttributionsCollapsible(),Array.isArray(h))for(var c=0,p=h.length;c<p;++c)h[c]in e||(n.push(h[c]),e[h[c]]=!0);else h in e||(n.push(h),e[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(i),n},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!(0,nn.fS)(e,this.renderedAttributions_)){(0,ot.ep)(this.ulElement_);for(var i=0,r=e.length;i<r;++i){var o=document.createElement("li");o.innerHTML=e[i],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?(0,ot.$H)(this.collapseLabel_,this.label_):(0,ot.$H)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(fi.default);const _i=gi;var yi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vi=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var r=void 0!==i.className?i.className:"ol-rotate",o=void 0!==i.label?i.label:"⇧",s=void 0!==i.compassClassName?i.compassClassName:"ol-compass";n.label_=null,"string"==typeof o?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=o):(n.label_=o,n.label_.classList.add(s));var a=i.tipLabel?i.tipLabel:"Reset rotation",l=document.createElement("button");l.className=r+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(n.label_),l.addEventListener(O.Z.CLICK,n.handleClick_.bind(n),!1);var u=r+" ol-unselectable "+Q,h=n.element;return h.className=u,h.appendChild(l),n.callResetNorth_=i.resetNorth?i.resetNorth:void 0,n.duration_=void 0!==i.duration?i.duration:250,n.autoHide_=void 0===i.autoHide||i.autoHide,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(q),n}return yi(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:hn}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var i="rotate("+n+"rad)";if(this.autoHide_){var r=this.element.classList.contains(q);r||0!==n?r&&0!==n&&this.element.classList.remove(q):this.element.classList.add(q)}this.label_.style.transform=i}this.rotation_=n}},e}(fi.default);const mi=vi;var xi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wi=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),target:i.target})||this;var r=void 0!==i.className?i.className:"ol-zoom",o=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInClassName?i.zoomInClassName:r+"-in",a=void 0!==i.zoomOutClassName?i.zoomOutClassName:r+"-out",l=void 0!==i.zoomInLabel?i.zoomInLabel:"+",u=void 0!==i.zoomOutLabel?i.zoomOutLabel:"–",h=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",c=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=h,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(O.Z.CLICK,n.handleClick_.bind(n,o),!1);var f=document.createElement("button");f.className=a,f.setAttribute("type","button"),f.title=c,f.appendChild("string"==typeof u?document.createTextNode(u):u),f.addEventListener(O.Z.CLICK,n.handleClick_.bind(n,-o),!1);var d=r+" ol-unselectable "+Q,g=n.element;return g.className=d,g.appendChild(p),g.appendChild(f),n.duration_=void 0!==i.duration?i.duration:250,n}return xi(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var n=e.getZoom();if(void 0!==n){var i=e.getConstrainedZoom(n+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:i,duration:this.duration_,easing:hn})):e.setZoom(i)}}},e}(fi.default);const bi=wi;function Ei(t){var e=t||{},n=new Rt.Z;return(void 0===e.zoom||e.zoom)&&n.push(new bi(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new mi(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new _i(e.attributionOptions)),n}const Si="active";var Ci=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ti=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return Ci(e,t),e.prototype.getActive=function(){return this.get(Si)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Si,t)},e.prototype.setMap=function(t){this.map_=t},e}(it.Z);function Oi(t,e,n,i){var r=t.getZoom();if(void 0!==r){var o=t.getConstrainedZoom(r+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:n,duration:void 0!==i?i:250,easing:hn})}}const Ri=Ti;var Ii=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pi=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:250,n}return Ii(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==jt.DBLCLICK){var n=t.originalEvent,i=t.map,r=t.coordinate,o=n.shiftKey?-this.delta_:this.delta_;Oi(i.getView(),o,r,this.duration_),n.preventDefault(),e=!0}return!e},e}(Ri);const Li=Pi;var Ai=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Mi=function(t){function e(e){var n=this,i=e||{};return n=t.call(this,i)||this,i.handleDownEvent&&(n.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(n.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(n.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(n.handleUpEvent=i.handleUpEvent),i.stopDown&&(n.stopDown=i.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return Ai(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==jt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==jt.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==jt.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==jt.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===jt.POINTERDOWN||e===jt.POINTERDRAG||e===jt.POINTERUP}(t)){var e=t.originalEvent,n=e.pointerId.toString();t.type==jt.POINTERUP?delete this.trackedPointers_[n]:(t.type==jt.POINTERDOWN||n in this.trackedPointers_)&&(this.trackedPointers_[n]=e),this.targetPointers=(0,M.KX)(this.trackedPointers_)}},e}(Ri);function Fi(t){for(var e=t.length,n=0,i=0,r=0;r<e;r++)n+=t[r].clientX,i+=t[r].clientY;return[n/e,i/e]}const ki=Mi;function Di(t){var e=arguments;return function(t){for(var n=!0,i=0,r=e.length;i<r&&(n=n&&e[i](t));++i);return n}}var ji=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Zi=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){var e=t.map.getTargetElement(),n=t.map.getOwnerDocument().activeElement;return e.contains(n)}(t)},Ni=a.uX,Gi=function(t){var e=t.originalEvent;return 0==e.button&&!(u.G$&&u.tK&&e.ctrlKey)},zi=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Wi=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Xi=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},Vi=function(t){var e=t.originalEvent;return(0,h.h)(void 0!==e,56),"mouse"==e.pointerType},Yi=function(t){var e=t.originalEvent;return(0,h.h)(void 0!==e,56),e.isPrimary&&0===e.button},Ki=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Bi=function(t){function e(e){var n=t.call(this,{stopDown:a.Dv})||this,i=e||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var r=i.condition?i.condition:Di(zi,Yi);return n.condition_=i.onFocusOnly?Di(Zi,r):r,n.noKinetic_=!1,n}return Ki(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,n,i=this.targetPointers,r=Fi(i);if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var o=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],s=t.map.getView();e=o,n=s.getResolution(),e[0]*=n,e[1]*=n,G(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var i=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=n.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-i*Math.cos(r),s[1]-i*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(a),duration:500,easing:hn})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(ki);const Ui=Bi;var Hi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qi=function(t){function e(e){var n=this,i=e||{};return(n=t.call(this,{stopDown:a.Dv})||this).condition_=i.condition?i.condition:ji,n.lastAngle_=void 0,n.duration_=void 0!==i.duration?i.duration:250,n}return Hi(e,t),e.prototype.handleDragEvent=function(t){if(Vi(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==an){var i=e.getSize(),r=t.pixel,o=Math.atan2(i[1]/2-r[1],r[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!Vi(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!Vi(t)||!Gi(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(ki);const Ji=qi;var Qi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$i=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return Qi(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+n,i.top=Math.min(t[1],e[1])+n,i.width=Math.abs(e[0]-t[0])+n,i.height=Math.abs(e[1]-t[1])+n},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new qn([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(s.Z);const tr=$i;var er=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),nr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.coordinate=n,r.mapBrowserEvent=i,r}return er(e,t),e}(B.ZP),ir=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new tr(i.className||"ol-dragbox"),n.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:Gi,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return er(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var i=n[0]-e[0],r=n[1]-e[1];return i*i+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new nr("boxdrag",t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new nr(e?"boxend":"boxcancel",t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new nr("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(ki);const rr=ir;var or=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),sr=function(t){function e(e){var n=this,i=e||{},r=i.condition?i.condition:Wi;return(n=t.call(this,{condition:r,className:i.className||"ol-dragzoom",minArea:i.minArea})||this).duration_=void 0!==i.duration?i.duration:200,n.out_=void 0!==i.out&&i.out,n}return or(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var i=e.rotatedExtentForGeometry(n),r=e.getResolutionForExtentInternal(i),o=e.getResolution()/r;(n=n.clone()).scale(o*o)}e.fitInternal(n,{duration:this.duration_,easing:hn})},e}(rr);const ar=sr;var lr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ur=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.defaultCondition_=function(t){return zi(t)&&Xi(t)},n.condition_=void 0!==i.condition?i.condition:n.defaultCondition_,n.duration_=void 0!==i.duration?i.duration:100,n.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128,n}return lr(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==O.Z.KEYDOWN){var n=t.originalEvent,i=n.keyCode;if(this.condition_(t)&&(40==i||37==i||39==i||38==i)){var r=t.map.getView(),o=r.getResolution()*this.pixelDelta_,s=0,a=0;40==i?a=-o:37==i?s=-o:39==i?s=o:a=o;var l=[s,a];G(l,r.getRotation()),function(t,e,n){var i=t.getCenterInternal();if(i){var r=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:pn,center:t.getConstrainedCenter(r)})}}(r,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Ri);const hr=ur;var cr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pr=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:Xi,n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:100,n}return cr(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==O.Z.KEYDOWN||t.type==O.Z.KEYPRESS){var n=t.originalEvent,i=n.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var r=t.map,o=i=="+".charCodeAt(0)?this.delta_:-this.delta_;Oi(r.getView(),o,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Ri);const fr=pr,dr=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var n=e-3;n>0&&this.points_[n+2]>t;)n-=3;var i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;var r=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();var gr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_r="trackpad",yr=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,i)||this).totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==i.maxDelta?i.maxDelta:1,n.duration_=void 0!==i.duration?i.duration:250,n.timeout_=void 0!==i.timeout?i.timeout:80,n.useAnchor_=void 0===i.useAnchor||i.useAnchor,n.constrainResolution_=void 0!==i.constrainResolution&&i.constrainResolution;var r=i.condition?i.condition:Ni;return n.condition_=i.onFocusOnly?Di(Zi,r):r,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return gr(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==O.Z.WHEEL)return!0;var e,n=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==O.Z.WHEEL&&(e=i.deltaY,u.V&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=u.MP),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?_r:"wheel");var o=n.getView();if(this.mode_===_r&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-(0,_.uZ)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Oi(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Ri);const vr=yr;var mr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xr=function(t){function e(e){var n=this,i=e||{},r=i;return r.stopDown||(r.stopDown=a.Dv),(n=t.call(this,r)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==i.threshold?i.threshold:.3,n.duration_=void 0!==i.duration?i.duration:250,n}return mr(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],i=this.targetPointers[1],r=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==an){var l=s.getViewport().getBoundingClientRect(),u=Fi(this.targetPointers);u[0]-=l.left,u[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(u),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2&&(t.map.getView().endInteraction(this.duration_),1))},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(ki);const wr=xr;var br=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Er=function(t){function e(e){var n=this,i=e||{},r=i;return r.stopDown||(r.stopDown=a.Dv),(n=t.call(this,r)||this).anchor_=null,n.duration_=void 0!==i.duration?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return br(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],i=this.targetPointers[1],r=n.clientX-i.clientX,o=n.clientY-i.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var u=a.getViewport().getBoundingClientRect(),h=Fi(this.targetPointers);h[0]-=u.left,h[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(h),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(ki);const Sr=Er;var Cr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tr=function(t){function e(e){return(e=(0,M.f0)({},e)).controls||(e.controls=Ei()),e.interactions||(e.interactions=function(t){var e={onFocusOnly:!0}||{},n=new Rt.Z,i=new dr(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new Ji),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new Li({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new Ui({onFocusOnly:e.onFocusOnly,kinetic:i})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new wr),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new Sr({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new hr),n.push(new fr({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new vr({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new ar({duration:e.zoomDuration})),n}()),t.call(this,e)||this}return Cr(e,t),e.prototype.createRenderer=function(){return new Ot(this)},e}(pi);const Or=Tr;var Rr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ir=function(t){function e(e){var n=e||{};return t.call(this,n)||this}return Rr(e,t),e}(Z);const Pr=Ir;var Lr=n(706),Ar=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Mr=function(t){function e(e){var n=t.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return Ar(e,t),e.prototype.getFeatures=function(t){return(0,l.O3)()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return(0,l.O3)()},e.prototype.renderFrame=function(t,e){return(0,l.O3)()},e.prototype.loadedTileCallback=function(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n},e.prototype.createLoadedTileFinder=function(t,e,n){return function(i,r){var o=this.loadedTileCallback.bind(this,n,i);return t.forEachLoadedTile(e,i,r,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r){},e.prototype.getDataAtPixel=function(t,e,n){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){2===t.target.getState()&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return 2!=e&&3!=e&&t.addEventListener(O.Z.CHANGE,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==A.Z.READY&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(Lr.default);const Fr=Mr;var kr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Dr=null,jr=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=[1,0,0,1,0,0],n.pixelTransform=[1,0,0,1,0,0],n.inversePixelTransform=[1,0,0,1,0,0],n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return kr(e,t),e.prototype.getImageData=function(t,e,n){var i,r;Dr||((i=document.createElement("canvas")).width=1,i.height=1,Dr=i.getContext("2d")),Dr.clearRect(0,0,1,1);try{Dr.drawImage(t,e,n,1,1,0,0,1,1),r=Dr.getImageData(0,0,1,1).data}catch(t){return null}return r},e.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},e.prototype.useContainer=function(t,e,n,i){var r,o,s=this.getLayer().getClassName();if(t&&t.className===s&&""===t.style.opacity&&1===n&&(!i||t.style.backgroundColor&&(0,nn.fS)(w(t.style.backgroundColor),w(i)))&&(l=t.firstElementChild)instanceof HTMLCanvasElement&&(o=l.getContext("2d")),o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(r=document.createElement("div")).className=s;var a=r.style;a.position="absolute",a.width="100%",a.height="100%",i&&(a.backgroundColor=i);var l=(o=(0,ot.E4)()).canvas;r.appendChild(l),(a=l.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=o}},e.prototype.clipUnrotated=function(t,e,n){var i=(0,g.rL)(n),r=(0,g.Xv)(n),o=(0,g.w$)(n),s=(0,g.hC)(n);c(e.coordinateToPixelTransform,i),c(e.coordinateToPixelTransform,r),c(e.coordinateToPixelTransform,o),c(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;c(a,i),c(a,r),c(a,o),c(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var i=this.getLayer();if(i.hasListener(t)){var r=new H(t,this.inversePixelTransform,n,e);i.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_("prerender",t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_("postrender",t,e)},e.prototype.getRenderTransform=function(t,e,n,i,r,o,s){var a=r/2,l=o/2,u=i/e,h=-u,c=-t[0]+s,f=-t[1];return p(this.tempTransform,a,l,u,h,-n,c,f)},e.prototype.getDataAtPixel=function(t,e,n){var i=c(this.inversePixelTransform,t.slice()),r=this.context,o=this.getLayer().getExtent();if(o){var s=c(e.pixelToCoordinateTransform,t.slice());if(!(0,g.b8)(o,s))return null}var a,l=Math.round(i[0]),u=Math.round(i[1]),h=this.pixelContext_;if(!h){var p=document.createElement("canvas");p.width=1,p.height=1,h=p.getContext("2d"),this.pixelContext_=h}h.clearRect(0,0,1,1);try{h.drawImage(r.canvas,l,u,1,1,0,0,1,1),a=h.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.pixelContext_=null,new Uint8Array):a}return 0===a[3]?null:a},e.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},e}(Fr);const Zr=jr;var Nr={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Gr={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},zr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wr=function(t){function e(e){var n=t.call(this,e)||this;return n.image_=null,n}return zr(e,t),e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],n=t.pixelRatio,i=t.viewState,r=i.resolution,o=this.getLayer().getSource(),s=t.viewHints,a=t.extent;if(void 0!==e.extent&&(a=(0,g.Ed)(a,Qe(e.extent,i.projection))),!s[0]&&!s[1]&&!(0,g.xb)(a))if(o){var l=i.projection,u=o.getImage(a,r,n,l);u&&(this.loadImage(u)?this.image_=u:4===u.getState()&&(this.image_=null))}else this.image_=null;return!!this.image_},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),i=c(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!(0,g.b8)(r,i))return null;var o=this.image_.getExtent(),s=this.image_.getImage(),a=(0,g.dz)(o),l=Math.floor(s.width*((i[0]-o[0])/a));if(l<0||l>=s.width)return null;var u=(0,g.Cr)(o),h=Math.floor(s.height*((o[3]-i[1])/u));return h<0||h>=s.height?null:this.getImageData(s,l,h)},e.prototype.renderFrame=function(t,e){var n=this.image_,i=n.getExtent(),r=n.getResolution(),o=n.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,u=l.center,h=l.resolution,c=t.size,_=a*r/(h*o),y=Math.round(c[0]*a),v=Math.round(c[1]*a),m=l.rotation;if(m){var x=Math.round(Math.sqrt(y*y+v*v));y=x,v=x}p(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,m,-y/2,-v/2),f(this.inversePixelTransform,this.pixelTransform);var w=d(this.pixelTransform);this.useContainer(e,w,s.opacity,this.getBackground(t));var b=this.context,E=b.canvas;E.width!=y||E.height!=v?(E.width=y,E.height=v):this.containerReused||b.clearRect(0,0,y,v);var S=!1,C=!0;if(s.extent){var T=Qe(s.extent,l.projection);(S=(C=(0,g.kK)(T,t.extent))&&!(0,g.r4)(T,t.extent))&&this.clipUnrotated(b,t,T)}var O=n.getImage(),R=p(this.tempTransform,y/2,v/2,_,_,0,o*(i[0]-u[0])/r,o*(u[1]-i[3])/r);this.renderedResolution=r*a/o;var I=O.width*R[0],P=O.height*R[3];if(this.getLayer().getSource().getInterpolate()||(0,M.f0)(b,Nr),this.preRender(b,t),C&&I>=.5&&P>=.5){var L=R[4],A=R[5],F=s.opacity,k=void 0;1!==F&&(k=b.globalAlpha,b.globalAlpha=F),b.drawImage(O,0,0,+O.width,+O.height,Math.round(L),Math.round(A),Math.round(I),Math.round(P)),1!==F&&(b.globalAlpha=k)}return this.postRender(b,t),S&&b.restore(),(0,M.f0)(b,Gr),w!==E.style.transform&&(E.style.transform=w),this.container},e}(Zr);const Xr=Wr;var Vr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Yr=function(t){function e(e){return t.call(this,e)||this}return Vr(e,t),e.prototype.createRenderer=function(){return new Xr(this)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(Pr),Kr="preload",Br="useInterimTilesOnError";var Ur=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hr=function(t){function e(e){var n=this,i=e||{},r=(0,M.f0)({},i);return delete r.preload,delete r.useInterimTilesOnError,(n=t.call(this,r)||this).on,n.once,n.un,n.setPreload(void 0!==i.preload?i.preload:0),n.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),n}return Ur(e,t),e.prototype.getPreload=function(){return this.get(Kr)},e.prototype.setPreload=function(t){this.set(Kr,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Br)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Br,t)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(Z);const qr=Hr;var Jr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Qr=function(t){function e(e,n,i){var r=t.call(this)||this,o=i||{};return r.tileCoord=e,r.state=n,r.interimTile=null,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r.interpolate=!!o.interpolate,r}return Jr(e,t),e.prototype.changed=function(){this.dispatchEvent(O.Z.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(2==t.getState())return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(2==t.getState()){t.interimTile=null;break}1==t.getState()?e=t:0==t.getState()?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(3!==this.state&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){(0,l.O3)()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var i=e-n+1e3/60;return i>=this.transition_?1:un(i/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(rt.Z);const $r=Qr;var to=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const eo=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=i,o.resolution=n,o.state=r,o}return to(e,t),e.prototype.changed=function(){this.dispatchEvent(O.Z.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return(0,l.O3)()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){(0,l.O3)()},e}(rt.Z);var no=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function io(t,e,n){var i=t,r=!0,o=!1,s=!1,a=[(0,F.Vx)(i,O.Z.LOAD,(function(){s=!0,o||e()}))];return i.src&&u.Tp?(o=!0,i.decode().then((function(){r&&e()})).catch((function(t){r&&(s?e():n())}))):a.push((0,F.Vx)(i,O.Z.ERROR,n)),function(){r=!1,a.forEach(F.bN)}}const ro=function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,i,0)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=0,a.imageLoadFunction_=s,a}return no(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=3,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=(0,g.Cr)(this.extent)/this.image_.height),this.state=2,this.unlistenImage_(),this.changed()},e.prototype.load=function(){0!=this.state&&3!=this.state||(this.state=1,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=io(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=(0,g.Cr)(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(eo);var oo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const so=function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,s)||this;return a.crossOrigin_=r,a.src_=i,a.key=i,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return oo(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=2,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=3,this.unlistenImage_(),this.image_=((t=(0,ot.E4)(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=2:this.state=4,this.unlistenImage_(),this.changed()},e.prototype.load=function(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=io(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}($r),ao=function(){function t(t,e,n,i,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=ze(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=i,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&(0,g.dz)(i)==(0,g.dz)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,g.dz)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,g.dz)(this.targetProj_.getExtent()):null;var l=(0,g.rL)(n),u=(0,g.Xv)(n),h=(0,g.w$)(n),c=(0,g.hC)(n),p=this.transformInv_(l),f=this.transformInv_(u),d=this.transformInv_(h),y=this.transformInv_(c),v=10+(o?Math.max(0,Math.ceil((0,_.k3)((0,g.bg)(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,h,c,p,f,d,y,v),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,n){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,n,i,r,o){this.triangles_.push({source:[i,r,o],target:[t,e,n]})},t.prototype.addQuad_=function(t,e,n,i,r,o,s,a,l){var u=(0,g.hI)([r,o,s,a]),h=this.sourceWorldWidth_?(0,g.dz)(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&h>.5&&h<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var d=(0,g.hI)([t,e,n,i]);f=(0,g.dz)(d)/this.targetWorldWidth_>.25||f}!p&&this.sourceProj_.isGlobal()&&h&&(f=h>.25||f)}if(!(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3]))||(0,g.kK)(u,this.maxSourceExtent_)){var y=0;if(!(f||isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)f=!0;else if(1!=(y=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=y&&4!=y&&8!=y)return;if(l>0){if(!f){var v=[(t[0]+n[0])/2,(t[1]+n[1])/2],m=this.transformInv_(v),x=void 0;x=p?((0,_.$W)(r[0],c)+(0,_.$W)(s[0],c))/2-(0,_.$W)(m[0],c):(r[0]+s[0])/2-m[0];var w=(r[1]+s[1])/2-m[1];f=x*x+w*w>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var b=[(e[0]+n[0])/2,(e[1]+n[1])/2],E=this.transformInv_(b),S=[(i[0]+t[0])/2,(i[1]+t[1])/2],C=this.transformInv_(S);this.addQuad_(t,e,b,S,r,o,E,C,l-1),this.addQuad_(S,b,n,i,C,E,s,a,l-1)}else{var T=[(t[0]+e[0])/2,(t[1]+e[1])/2],O=this.transformInv_(T),R=[(n[0]+i[0])/2,(n[1]+i[1])/2],I=this.transformInv_(R);this.addQuad_(t,T,R,i,r,O,I,a,l-1),this.addQuad_(T,e,n,R,O,o,s,I,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&y)&&this.addTriangle_(t,n,i,r,s,a),0==(14&y)&&this.addTriangle_(t,n,e,r,s,o),y&&(0==(13&y)&&this.addTriangle_(e,i,t,o,a,r),0==(7&y)&&this.addTriangle_(e,i,n,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=(0,g.lJ)();return this.triangles_.forEach((function(e,n,i){var r=e.source;(0,g.Wj)(t,r[0]),(0,g.Wj)(t,r[1]),(0,g.Wj)(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();var lo;function uo(t,e,n,i,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,r)),t.restore()}function ho(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function co(t,e,n,i){var r=We(n,e,t),o=De(e,i,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||(0,g.b8)(l,r)){var u=De(t,o,r)/o;isFinite(u)&&u>0&&(o/=u)}return o}function po(t,e,n,i,r,o,s,a,l,u,h,c){var p=(0,ot.E4)(Math.round(n*t),Math.round(n*e));if(c||(0,M.f0)(p,Nr),0===l.length)return p.canvas;function f(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var d=(0,g.lJ)();l.forEach((function(t,e,n){(0,g.l7)(d,t.extent)}));var y=(0,g.dz)(d),v=(0,g.Cr)(d),m=(0,ot.E4)(Math.round(n*y/i),Math.round(n*v/i));c||(0,M.f0)(m,Nr);var x=n/i;l.forEach((function(t,e,n){var i=t.extent[0]-d[0],r=-(t.extent[3]-d[3]),o=(0,g.dz)(t.extent),s=(0,g.Cr)(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,i*x,r*x,o*x,s*x)}));var w=(0,g.rL)(s);return a.getTriangles().forEach((function(t,e,r){var s=t.source,a=t.target,l=s[0][0],u=s[0][1],h=s[1][0],g=s[1][1],y=s[2][0],v=s[2][1],x=f((a[0][0]-w[0])/o),b=f(-(a[0][1]-w[1])/o),E=f((a[1][0]-w[0])/o),S=f(-(a[1][1]-w[1])/o),C=f((a[2][0]-w[0])/o),T=f(-(a[2][1]-w[1])/o),O=l,R=u;l=0,u=0;var I=[[h-=O,g-=R,0,0,E-x],[y-=O,v-=R,0,0,C-x],[0,0,h,g,S-b],[0,0,y,v,T-b]],P=(0,_.SV)(I);if(P){if(p.save(),p.beginPath(),function(){if(void 0===lo){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",uo(t,4,5,4,0),uo(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;lo=ho(e,0)||ho(e,4)||ho(e,8)}return lo}()||!c){p.moveTo(E,S);for(var L=x-E,A=b-S,M=0;M<4;M++)p.lineTo(E+f((M+1)*L/4),S+f(M*A/3)),3!=M&&p.lineTo(E+f((M+1)*L/4),S+f((M+1)*A/3));p.lineTo(C,T)}else p.moveTo(E,S),p.lineTo(x,b),p.lineTo(C,T);p.clip(),p.transform(P[0],P[2],P[1],P[3],x,b),p.translate(d[0]-O,d[3]-R),p.scale(i/n,-i/n),p.drawImage(m.canvas,0,0),p.restore()}})),h&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,n){var i=t.target,r=(i[0][0]-w[0])/o,s=-(i[0][1]-w[1])/o,a=(i[1][0]-w[0])/o,l=-(i[1][1]-w[1])/o,u=(i[2][0]-w[0])/o,h=-(i[2][1]-w[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(r,s),p.lineTo(u,h),p.closePath(),p.stroke()})),p.restore()),p.canvas}var fo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const go=function(t){function e(e,n,i,r,o,s,a,l,u,h,c,p){var f=t.call(this,o,0,{interpolate:!!p})||this;f.renderEdges_=void 0!==c&&c,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=n,f.targetTileGrid_=r,f.wrappedTileCoord_=s||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=r.getTileCoordExtent(f.wrappedTileCoord_),y=f.targetTileGrid_.getExtent(),v=f.sourceTileGrid_.getExtent(),m=y?(0,g.Ed)(d,y):d;if(0===(0,g.bg)(m))return f.state=4,f;var x=e.getExtent();x&&(v=v?(0,g.Ed)(v,x):x);var w=r.getResolution(f.wrappedTileCoord_[0]),b=function(t,e,n,i){var r=(0,g.qg)(n),o=co(t,e,r,i);return(!isFinite(o)||o<=0)&&(0,g.H6)(n,(function(n){return o=co(t,e,n,i),isFinite(o)&&o>0})),o}(e,i,m,w);if(!isFinite(b)||b<=0)return f.state=4,f;var E=void 0!==h?h:.5;if(f.triangulation_=new ao(e,i,m,v,b*E,w),0===f.triangulation_.getTriangles().length)return f.state=4,f;f.sourceZ_=n.getZForResolution(b);var S=f.triangulation_.calculateSourceExtent();if(v&&(e.canWrapX()?(S[1]=(0,_.uZ)(S[1],v[1],v[3]),S[3]=(0,_.uZ)(S[3],v[1],v[3])):S=(0,g.Ed)(S,v)),(0,g.bg)(S)){for(var C=n.getTileRangeForExtentAndZ(S,f.sourceZ_),T=C.minX;T<=C.maxX;T++)for(var O=C.minY;O<=C.maxY;O++){var R=u(f.sourceZ_,T,O,a);R&&f.sourceTiles_.push(R)}0===f.sourceTiles_.length&&(f.state=4)}else f.state=4;return f}return fo(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,i){e&&2==e.getState()&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=3;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),i="number"==typeof n?n:n[0],r="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=po(i,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()},e.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,i){var r=e.getState();if(0==r||1==r){t++;var o=(0,F.oL)(e,O.Z.CHANGE,(function(n){var i=e.getState();2!=i&&3!=i&&4!=i||((0,F.bN)(o),0==--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,n){0==t.getState()&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(F.bN),this.sourcesListenerKeys_=null},e}($r);var _o=function(){function t(t,e,n,i){this.minX=t,this.maxX=e,this.minY=n,this.maxY=i}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function yo(t,e,n,i,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=n,r.maxY=i,r):new _o(t,e,n,i)}const vo=_o;var mo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xo=function(t){function e(e){var n=t.call(this,e)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=(0,g.lJ)(),n.tmpTileRange_=new vo(0,0,0,0),n}return mo(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),i=e.getUseInterimTilesOnError();return 2==n||4==n||3==n&&!i},e.prototype.getTile=function(t,e,n,i){var r=i.pixelRatio,o=i.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,n,r,o);return 3==a.getState()&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(2)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),i=c(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!(0,g.b8)(r,i))return null;for(var o=e.pixelRatio,s=e.viewState.projection,a=e.viewState,l=n.getRenderSource(),u=l.getTileGridForProjection(a.projection),h=l.getTilePixelRatio(e.pixelRatio),p=u.getZForResolution(a.resolution);p>=u.getMinZoom();--p){var f=u.getTileCoordForCoordAndZ(i,p),d=l.getTile(p,f[1],f[2],o,s);if(!(d instanceof so||d instanceof go))return null;if(2===d.getState()){var _=u.getOrigin(p),y=ai(u.getTileSize(p)),v=u.getResolution(p),m=Math.floor(h*((i[0]-_[0])/v-f[1]*y[0])),x=Math.floor(h*((_[1]-i[1])/v-f[2]*y[1]));return this.getImageData(d.getImage(),m,x)}}return null},e.prototype.loadedTileCallback=function(e,n,i){return!!this.isDrawableTile(i)&&t.prototype.loadedTileCallback.call(this,e,n,i)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],i=t.viewState,r=i.projection,o=i.resolution,s=i.center,a=i.rotation,u=t.pixelRatio,h=this.getLayer(),_=h.getSource(),y=_.getRevision(),v=_.getTileGridForProjection(r),m=v.getZForResolution(o,_.zDirection),x=v.getResolution(m),w=t.extent,b=n.extent&&Qe(n.extent);b&&(w=(0,g.Ed)(w,Qe(n.extent)));var E=_.getTilePixelRatio(u),S=Math.round(t.size[0]*E),C=Math.round(t.size[1]*E);if(a){var T=Math.round(Math.sqrt(S*S+C*C));S=T,C=T}var O=x*S/2/E,R=x*C/2/E,I=[s[0]-O,s[1]-R,s[0]+O,s[1]+R],P=v.getTileRangeForExtentAndZ(w,m),L={};L[m]={};var A=this.createLoadedTileFinder(_,r,L),F=this.tmpExtent,k=this.tmpTileRange_;this.newTiles_=!1;for(var D=P.minX;D<=P.maxX;++D)for(var j=P.minY;j<=P.maxY;++j){var Z=this.getTile(m,D,j,t);if(this.isDrawableTile(Z)){var N=(0,l.sq)(this);if(2==Z.getState()){L[m][Z.tileCoord.toString()]=Z;var G=Z.inTransition(N);this.newTiles_||!G&&-1!==this.renderedTiles.indexOf(Z)||(this.newTiles_=!0)}if(1===Z.getAlpha(N,t.time))continue}var z=v.getTileCoordChildTileRange(Z.tileCoord,k,F),W=!1;z&&(W=A(m+1,z)),W||v.forEachTileCoordParentTileRange(Z.tileCoord,A,k,F)}var X=x/o;p(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/E,1/E,a,-S/2,-C/2);var V=d(this.pixelTransform);this.useContainer(e,V,n.opacity,this.getBackground(t));var Y=this.context,K=Y.canvas;f(this.inversePixelTransform,this.pixelTransform),p(this.tempTransform,S/2,C/2,X,X,0,-S/2,-C/2),K.width!=S||K.height!=C?(K.width=S,K.height=C):this.containerReused||Y.clearRect(0,0,S,C),b&&this.clipUnrotated(Y,t,b),_.getInterpolate()||(0,M.f0)(Y,Nr),this.preRender(Y,t),this.renderedTiles.length=0;var B,U,H,q=Object.keys(L).map(Number);q.sort(nn.kK),1!==n.opacity||this.containerReused&&!_.getOpaque(t.viewState.projection)?(B=[],U=[]):q=q.reverse();for(var J=q.length-1;J>=0;--J){var Q=q[J],$=_.getTilePixelSize(Q,u,r),tt=v.getResolution(Q)/x,et=$[0]*tt*X,it=$[1]*tt*X,rt=v.getTileCoordForCoordAndZ((0,g.rL)(I),Q),ot=v.getTileCoordExtent(rt),st=c(this.tempTransform,[E*(ot[0]-I[0])/x,E*(I[3]-ot[3])/x]),at=E*_.getGutterForProjection(r),lt=L[Q];for(var ut in lt){var ht=(Z=lt[ut]).tileCoord,ct=rt[1]-ht[1],pt=Math.round(st[0]-(ct-1)*et),ft=rt[2]-ht[2],dt=Math.round(st[1]-(ft-1)*it),gt=pt-(D=Math.round(st[0]-ct*et)),_t=dt-(j=Math.round(st[1]-ft*it)),yt=m===Q,vt=!1;if(!(G=yt&&1!==Z.getAlpha((0,l.sq)(this),t.time)))if(B){H=[D,j,D+gt,j,D+gt,j+_t,D,j+_t];for(var mt=0,xt=B.length;mt<xt;++mt)if(m!==Q&&Q<U[mt]){var wt=B[mt];(0,g.kK)([D,j,D+gt,j+_t],[wt[0],wt[3],wt[4],wt[7]])&&(vt||(Y.save(),vt=!0),Y.beginPath(),Y.moveTo(H[0],H[1]),Y.lineTo(H[2],H[3]),Y.lineTo(H[4],H[5]),Y.lineTo(H[6],H[7]),Y.moveTo(wt[6],wt[7]),Y.lineTo(wt[4],wt[5]),Y.lineTo(wt[2],wt[3]),Y.lineTo(wt[0],wt[1]),Y.clip())}B.push(H),U.push(Q)}else Y.clearRect(D,j,gt,_t);this.drawTileImage(Z,t,D,j,gt,_t,at,yt),B&&!G?(vt&&Y.restore(),this.renderedTiles.unshift(Z)):this.renderedTiles.push(Z),this.updateUsedTiles(t.usedTiles,_,Z)}}this.renderedRevision=y,this.renderedResolution=x,this.extentChanged=!this.renderedExtent_||!(0,g.fS)(this.renderedExtent_,I),this.renderedExtent_=I,this.renderedPixelRatio=u,this.renderedProjection=r,this.manageTilePyramid(t,_,v,u,r,w,m,h.getPreload()),this.scheduleExpireCache(t,_),this.postRender(Y,t),n.extent&&Y.restore(),(0,M.f0)(Y,Gr),V!==K.style.transform&&(K.style.transform=V);var bt=nt(n.opacity),Et=this.container;return bt!==Et.style.opacity&&(Et.style.opacity=bt),this.container},e.prototype.drawTileImage=function(t,e,n,i,r,o,s,a){var u=this.getTileImage(t);if(u){var h=(0,l.sq)(this),c=a?t.getAlpha(h,e.time):1,p=c!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(u,s,s,u.width-2*s,u.height-2*s,n,i,r,o),p&&this.context.restore(),1!==c?e.animate=!0:a&&t.endTransition(h)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var n=function(t,e,n){var i=(0,l.sq)(t);i in n.usedTiles&&t.expireCache(n.viewState.projection,n.usedTiles[i])}.bind(null,e);t.postRenderFunctions.push(n)}},e.prototype.updateUsedTiles=function(t,e,n){var i=(0,l.sq)(e);i in t||(t[i]={}),t[i][n.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,n,i,r,o,s,a,u){var h=(0,l.sq)(e);h in t.wantedTiles||(t.wantedTiles[h]={});var c,p,f,d,g,_,y=t.wantedTiles[h],v=t.tileQueue,m=0;for(_=n.getMinZoom();_<=s;++_)for(p=n.getTileRangeForExtentAndZ(o,_,p),f=n.getResolution(_),d=p.minX;d<=p.maxX;++d)for(g=p.minY;g<=p.maxY;++g)s-_<=a?(++m,0==(c=e.getTile(_,d,g,i,r)).getState()&&(y[c.getKey()]=!0,v.isKeyQueued(c.getKey())||v.enqueue([c,h,n.getTileCoordCenter(c.tileCoord),f])),void 0!==u&&u(c)):e.useTile(_,d,g,r);e.updateCacheSize(m,r)},e}(Zr);const wo=xo;var bo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Eo=function(t){function e(e){return t.call(this,e)||this}return bo(e,t),e.prototype.createRenderer=function(){return new wo(this)},e}(qr);var So=n(582),Co=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=ai(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return(0,l.O3)()},t.prototype.getImage=function(t){return(0,l.O3)()},t.prototype.getHitDetectionImage=function(){return(0,l.O3)()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return(0,l.O3)()},t.prototype.getImageSize=function(){return(0,l.O3)()},t.prototype.getOrigin=function(){return(0,l.O3)()},t.prototype.getSize=function(){return(0,l.O3)()},t.prototype.setDisplacement=function(t){this.displacement_=t},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=ai(t)},t.prototype.listenImageChange=function(t){(0,l.O3)()},t.prototype.load=function(){(0,l.O3)()},t.prototype.unlistenImageChange=function(t){(0,l.O3)()},t}();const To=Co;function Oo(t){return Array.isArray(t)?E(t):t}var Ro=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Io=function(t){function e(e){var n=this,i=void 0!==e.rotateWithView&&e.rotateWithView;return(n=t.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=void 0!==e.fill?e.fill:null,n.origin_=[0,0],n.points_=e.points,n.radius_=void 0!==e.radius?e.radius:e.radius1,n.radius2_=e.radius2,n.angle_=void 0!==e.angle?e.angle:0,n.stroke_=void 0!==e.stroke?e.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return Ro(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var n=this.renderOptions_,i=(0,ot.E4)(n.size*t,n.size*t);this.draw_(n,i,t),e=i.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return 2},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,n){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var i=this.radius_,r=void 0===this.radius2_?i:this.radius2_;if(i<r){var o=i;i=r,r=o}var s=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/s,l=r*Math.sin(a),u=i-Math.sqrt(r*r-l*l),h=Math.sqrt(l*l+u*u),c=h/l;if("miter"===t&&c<=n)return c*e;var p=e/2/c,f=e/2*(u/h),d=Math.sqrt((i+p)*(i+p)+f*f)-i;if(void 0===this.radius2_||"bevel"===t)return 2*d;var g=i*Math.sin(a),_=r-Math.sqrt(i*i-g*g),y=Math.sqrt(g*g+_*_)/g;if(y<=n){var v=y*e/2-r-i;return 2*Math.max(d,v)}return 2*d},e.prototype.createRenderOptions=function(){var t,e=ht,n=0,i=null,r=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=ct),t=Oo(t),void 0===(o=this.stroke_.getWidth())&&(o=1),i=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=ht),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var s=this.calculateLineJoinSize_(e,o,n),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:i,lineDashOffset:r,lineJoin:e,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var i=this.fill_.getColor();null===i&&(i=at),e.fillStyle=Oo(i),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),n=0;if("string"==typeof e&&(e=w(e)),null===e?n=1:Array.isArray(e)&&(n=4===e.length?e[3]:1),0===n){var i=(0,ot.E4)(t.size,t.size);this.hitDetectionCanvas_=i.canvas,this.drawHitDetectionCanvas_(t,i)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{var i=void 0===this.radius2_?n:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var r=this.angle_-Math.PI/2,o=2*Math.PI/e,s=0;s<e;s++){var a=r+s*o,l=s%2==0?n:i;t.lineTo(l*Math.cos(a),l*Math.sin(a))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=at,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e}(To);const Po=Io;var Lo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ao=function(t){function e(e){var n=e||{};return t.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:void 0!==n.scale?n.scale:1,rotation:void 0!==n.rotation?n.rotation:0,rotateWithView:void 0!==n.rotateWithView&&n.rotateWithView,displacement:void 0!==n.displacement?n.displacement:[0,0]})||this}return Lo(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Po);const Mo=Ao;var Fo=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}();const ko=Fo;var Do=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();const jo=Do;var Zo=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=zo,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=zo,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}(),No=null;function Go(t,e){if(!No){var n=new ko({color:"rgba(255,255,255,0.4)"}),i=new jo({color:"#3399CC",width:1.25});No=[new Zo({image:new Mo({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return No}function zo(t){return t.getGeometry()}var Wo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Xo="renderOrder",Vo=function(t){function e(e){var n=this,i=e||{},r=(0,M.f0)({},i);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(n=t.call(this,r)||this).declutter_=void 0!==i.declutter&&i.declutter,n.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,n.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,n}return Wo(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(Xo)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new So(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(Xo,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:Go,this.styleFunction_=null===t?void 0:function(t){var e,n;"function"==typeof t?e=t:(Array.isArray(t)?n=t:((0,h.h)("function"==typeof t.getZIndex,41),n=[t]),e=function(){return n});return e}(this.style_),this.changed()},e}(Z);const Yo=Vo;var Ko={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Bo=[Ko.FILL],Uo=[Ko.STROKE],Ho=[Ko.BEGIN_PATH],qo=[Ko.CLOSE_PATH];const Jo=Ko;var Qo=n(716);const $o=function(){function t(){}return t.prototype.drawCustom=function(t,e,n,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();var ts=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),es=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=n,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return ts(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var n=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,r=this.coordinates,o=r.length,s=0,a=t.length;s<a;s+=e)i[0]=t[s],i[1]=t[s+1],(0,g.b8)(n,i)&&(r[o++]=i[0],r[o++]=i[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,n,i,r,o){var s=this.coordinates,a=s.length,l=this.getBufferedMaxExtent();o&&(e+=i);var u,h,c,p=t[e],f=t[e+1],d=this.tmpCoordinate_,_=!0;for(u=e+i;u<n;u+=i)d[0]=t[u],d[1]=t[u+1],(c=(0,g.pX)(l,d))!==h?(_&&(s[a++]=p,s[a++]=f,_=!1),s[a++]=d[0],s[a++]=d[1]):c===Qo.Z.INTERSECTING?(s[a++]=d[0],s[a++]=d[1],_=!1):_=!0,p=d[0],f=d[1],h=c;return(r&&_||u===e+i)&&(s[a++]=p,s[a++]=f),a},e.prototype.drawCustomCoordinates_=function(t,e,n,i,r){for(var o=0,s=n.length;o<s;++o){var a=n[o],l=this.appendFlatLineCoordinates(t,e,a,i,!1,!1);r.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,n,i){this.beginGeometry(t,e);var r,o,s,a,l,u=t.getType(),h=t.getStride(),c=this.coordinates.length;switch(u){case ne:r=t.getOrientedFlatCoordinates(),a=[];var p=t.getEndss();l=0;for(var f=0,d=p.length;f<d;++f){var g=[];l=this.drawCustomCoordinates_(r,l,p[f],h,g),a.push(g)}this.instructions.push([Jo.CUSTOM,c,a,t,n,Mn]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,a,t,i||n,Mn]);break;case $t:case ee:s=[],r=u==$t?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),l=this.drawCustomCoordinates_(r,0,t.getEnds(),h,s),this.instructions.push([Jo.CUSTOM,c,s,t,n,An]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,s,t,i||n,An]);break;case Qt:case re:r=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(r,0,r.length,h,!1,!1),this.instructions.push([Jo.CUSTOM,c,o,t,n,Ln]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,o,t,i||n,Ln]);break;case te:r=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(r,h))>c&&(this.instructions.push([Jo.CUSTOM,c,o,t,n,Ln]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,o,t,i||n,Ln]));break;case Jt:r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),o=this.coordinates.length,this.instructions.push([Jo.CUSTOM,c,o,t,n]),this.hitDetectionInstructions.push([Jo.CUSTOM,c,o,t,i||n])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[Jo.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Jo.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var n,i,r=e.length,o=-1;for(t=0;t<r;++t)(i=(n=e[t])[0])==Jo.END_GEOMETRY?o=t:i==Jo.BEGIN_GEOMETRY&&(n[2]=t,(0,nn.FZ)(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var n=this.state;if(t){var i=t.getColor();n.fillStyle=Oo(i||at)}else n.fillStyle=void 0;if(e){var r=e.getColor();n.strokeStyle=Oo(r||ct);var o=e.getLineCap();n.lineCap=void 0!==o?o:lt;var s=e.getLineDash();n.lineDash=s?s.slice():ut;var a=e.getLineDashOffset();n.lineDashOffset=a||0;var l=e.getLineJoin();n.lineJoin=void 0!==l?l:ht;var u=e.getWidth();n.lineWidth=void 0!==u?u:1;var h=e.getMiterLimit();n.miterLimit=void 0!==h?h:10,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[Jo.SET_FILL_STYLE,e];return"string"!=typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Jo.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,i=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=i||r!=t.currentLineDash&&!(0,nn.fS)(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[Jo.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,g.d9)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,g.f3)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}($o);const ns=es;var is=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const rs=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return is(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,i);this.instructions.push([Jo.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([Jo.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,i);this.instructions.push([Jo.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([Jo.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var n=t.getAnchor(),i=t.getSize(),r=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=r,this.image_=o,this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0]*this.imagePixelRatio_,this.originY_=s[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterImageWithText_=e},e}(ns);var os=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ss=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return os(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,i){var r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,i,!1,!1),s=[Jo.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ut,0],Ho);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(Uo),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Ho);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinates_(s,l,o[u],a);this.hitDetectionInstructions.push(Uo),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Uo),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Uo),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(Ho)},e}(ns);const as=ss;var ls=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),us=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return ls(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,n,i){var r=this.state,o=void 0!==r.fillStyle,s=void 0!==r.strokeStyle,a=n.length;this.instructions.push(Ho),this.hitDetectionInstructions.push(Ho);for(var l=0;l<a;++l){var u=n[l],h=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,i,!0,!s),p=[Jo.MOVE_TO_LINE_TO,h,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(qo),this.hitDetectionInstructions.push(qo)),e=u}return o&&(this.instructions.push(Bo),this.hitDetectionInstructions.push(Bo)),s&&(this.instructions.push(Uo),this.hitDetectionInstructions.push(Uo)),e},e.prototype.drawCircle=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Jo.SET_FILL_STYLE,at]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var l=[Jo.CIRCLE,a];this.instructions.push(Ho,l),this.hitDetectionInstructions.push(Ho,l),void 0!==n.fillStyle&&(this.instructions.push(Bo),this.hitDetectionInstructions.push(Bo)),void 0!==n.strokeStyle&&(this.instructions.push(Uo),this.hitDetectionInstructions.push(Uo)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Jo.SET_FILL_STYLE,at]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Jo.SET_FILL_STYLE,at]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Jo.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinatess_(s,l,o[u],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var n=this.coordinates,i=0,r=n.length;i<r;++i)n[i]=In(n[i],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(ns);const hs=us;function cs(t,e,n,i,r){var o,s,a,l,u,h,c,p,f,d=n,g=n,_=0,y=0,v=n;for(o=n;o<i;o+=r){var m=e[o],x=e[o+1];void 0!==l&&(p=m-l,f=x-u,a=Math.sqrt(p*p+f*f),void 0!==h&&(y+=s,Math.acos((h*p+c*f)/(s*a))>t&&(y>_&&(_=y,d=v,g=o),y=0,v=o-r)),s=a,h=p,c=f),l=m,u=x}return(y+=a)>_?[v,o]:[d,g]}var ps=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fs={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},ds=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return ps(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var n=this.textFillState_,i=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(n||i)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,u=t.getStride();if("line"!==r.placement||a!=Qt&&a!=ee&&a!=$t&&a!=ne){var h=r.overflow?null:[];switch(a){case Jt:case te:l=t.getFlatCoordinates();break;case Qt:l=t.getFlatMidpoint();break;case re:l=t.getCenter();break;case ee:l=t.getFlatMidpoints(),u=2;break;case $t:l=t.getFlatInteriorPoint(),r.overflow||h.push(l[2]/this.resolution),u=3;break;case ne:var c=t.getFlatInteriorPoints();for(l=[],E=0,S=c.length;E<S;E+=3)r.overflow||h.push(c[E+2]/this.resolution),l.push(c[E],c[E+1]);if(0===l.length)return;u=2}if((L=this.appendFlatPointCoordinates(l,u))===s)return;if(h&&(L-s)/2!=l.length/u){var p=s/2;h=h.filter((function(t,e){var n=o[2*(p+e)]===l[e*u]&&o[2*(p+e)+1]===l[e*u+1];return n||--p,n}))}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var f=r.padding;if(f!=dt&&(r.scale[0]<0||r.scale[1]<0)){var d=r.padding[0],_=r.padding[1],y=r.padding[2],v=r.padding[3];r.scale[0]<0&&(_=-_,v=-v),r.scale[1]<0&&(d=-d,y=-y),f=[d,_,y,v]}var m=this.pixelRatio;this.instructions.push([Jo.DRAW_IMAGE,s,L,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,f==dt?dt:f.map((function(t){return t*m})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);var x=1/m;this.hitDetectionInstructions.push([Jo.DRAW_IMAGE,s,L,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[x,x],NaN,this.declutterImageWithText_,f,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),this.endGeometry(e)}else{if(!(0,g.kK)(this.getBufferedMaxExtent(),t.getExtent()))return;var w=void 0;if(l=t.getFlatCoordinates(),a==Qt)w=[l.length];else if(a==ee)w=t.getEnds();else if(a==$t)w=t.getEnds().slice(0,1);else if(a==ne){var b=t.getEndss();w=[];for(var E=0,S=b.length;E<S;++E)w.push(b[E][0])}this.beginGeometry(t,e);for(var C=r.textAlign,T=0,O=void 0,R=0,I=w.length;R<I;++R){if(null==C){var P=cs(r.maxAngle,l,T,w[R],u);T=P[0],O=P[1]}else O=w[R];for(E=T;E<O;E+=u)o.push(l[E],l[E+1]);var L=o.length;T=w[R],this.drawChars_(s,L),s=L}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,i=this.strokeKey_;t&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||pt,textBaseline:e.textBaseline||ft,scale:e.scale});var o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))},e.prototype.drawChars_=function(t,e){var n=this.textStrokeState_,i=this.textState_,r=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=fs[i.textBaseline],u=this.textOffsetY_*a,h=this.text_,c=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([Jo.DRAW_CHARS,t,e,l,i.overflow,s,i.maxAngle,a,u,r,c*a,h,o,1]),this.hitDetectionInstructions.push([Jo.DRAW_CHARS,t,e,l,i.overflow,s,i.maxAngle,1,u,r,c,h,o,1/a])},e.prototype.setTextStyle=function(t,e){var n,i,r;if(t){var o=t.getFill();o?((i=this.textFillState_)||(i={},this.textFillState_=i),i.fillStyle=Oo(o.getColor()||at)):(i=null,this.textFillState_=i);var s=t.getStroke();if(s){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);var a=s.getLineDash(),u=s.getLineDashOffset(),h=s.getWidth(),c=s.getMiterLimit();r.lineCap=s.getLineCap()||lt,r.lineDash=a?a.slice():ut,r.lineDashOffset=void 0===u?0:u,r.lineJoin=s.getLineJoin()||ht,r.lineWidth=void 0===h?1:h,r.miterLimit=void 0===c?10:c,r.strokeStyle=Oo(s.getColor()||ct)}else r=null,this.textStrokeState_=r;n=this.textState_;var p=t.getFont()||st;xt(p);var f=t.getScaleArray();n.overflow=t.getOverflow(),n.font=p,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.textBaseline=t.getTextBaseline()||ft,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||dt,n.scale=void 0===f?[1,1]:f;var d=t.getOffsetX(),g=t.getOffsetY(),_=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===g?0:g,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===y?0:y,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:(0,l.sq)(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.textBaseline||"?"),this.fillKey_=i?"string"==typeof i.fillStyle?i.fillStyle:"|"+(0,l.sq)(i.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(ns),gs={Circle:hs,Default:ns,Image:rs,LineString:as,Polygon:hs,Text:ds};const _s=function(){function t(t,e,n,i){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=n,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var n=this.buildersByZIndex_[e];for(var i in n){var r=n[i].finish();t[e][i]=r}}return t},t.prototype.getBuilder=function(t,e){var n=void 0!==t?t.toString():"0",i=this.buildersByZIndex_[n];void 0===i&&(i={},this.buildersByZIndex_[n]=i);var r=i[e];return void 0===r&&(r=new(0,gs[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=r),r},t}(),ys="Circle",vs="Default",ms="Image",xs="LineString",ws="Polygon",bs="Text";function Es(t,e,n,i,r,o,s,a,l,u,h,c){var p=t[e],f=t[e+1],d=0,g=0,y=0,v=0;function m(){d=p,g=f,p=t[e+=i],f=t[e+1],v+=y,y=Math.sqrt((p-d)*(p-d)+(f-g)*(f-g))}do{m()}while(e<n-i&&v+y<o);for(var x=0===y?0:(o-v)/y,w=(0,_.t7)(d,p,x),b=(0,_.t7)(g,f,x),E=e-i,S=v,C=o+a*l(u,r,h);e<n-i&&v+y<C;)m();x=0===y?0:(C-v)/y;var T,O=(0,_.t7)(d,p,x),R=(0,_.t7)(g,f,x);if(c){var I=[w,b,O,R];_n(I,0,4,2,c,I,I),T=I[0]>I[2]}else T=w>O;var P,L=Math.PI,A=[],M=E+i===e;if(y=0,v=S,p=t[e=E],f=t[e+1],M){m(),P=Math.atan2(f-g,p-d),T&&(P+=P>0?-L:L);var F=(O+w)/2,k=(R+b)/2;return A[0]=[F,k,(C-o)/2,P,r],A}for(var D=0,j=r.length;D<j;){m();var Z=Math.atan2(f-g,p-d);if(T&&(Z+=Z>0?-L:L),void 0!==P){var N=Z-P;if(N+=N>L?-2*L:N<-L?2*L:0,Math.abs(N)>s)return null}P=Z;for(var G=D,z=0;D<j;++D){var W=a*l(u,r[T?j-D-1:D],h);if(e+i<n&&v+y<o+z+W/2)break;z+=W}if(D!==G){var X=T?r.substring(j-G,j-D):r.substring(G,D);x=0===y?0:(o+z/2-v)/y,F=(0,_.t7)(d,p,x),k=(0,_.t7)(g,f,x),A.push([F,k,z/2,Z,X]),o+=z}}return A}function Ss(t,e,n,i){for(var r=t[e],o=t[e+1],s=0,a=e+i;a<n;a+=i){var l=t[a],u=t[a+1];s+=Math.sqrt((l-r)*(l-r)+(u-o)*(u-o)),r=l,o=u}return s}var Cs=(0,g.lJ)(),Ts=[],Os=[],Rs=[],Is=[];function Ps(t){return t[3].declutterBox}var Ls=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function As(t,e){return"start"!==e&&"end"!==e||Ls.test(t)||(e="start"===e?"left":"right"),fs[e]}function Ms(t,e,n){return n>0&&t.push("\n",""),t.push(e,""),t}var Fs=function(){function t(t,e,n,i){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,i){var r=t+e+n+i;if(this.labels_[r])return this.labels_[r];var o=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],c=Array.isArray(t),p=As(c?t[0]:t,a.textAlign||pt),f=i&&o.lineWidth?o.lineWidth:0,d=c?t:t.split("\n").reduce(Ms,[]),g=function(t,e){for(var n=[],i=[],r=[],o=0,s=0,a=0,l=0,u=0,h=e.length;u<=h;u+=2){var c=e[u];if("\n"!==c&&u!==h){var p=e[u+1]||t.font,f=Et(p,c);n.push(f),s+=f;var d=wt(p);i.push(d),l=Math.max(l,d)}else o=Math.max(o,s),r.push(s),s=0,a+=l}return{width:o,height:a,widths:n,heights:i,lineWidths:r}}(a,d),_=g.width,y=g.height,v=g.widths,m=g.heights,x=g.lineWidths,w=_+f,b=[],E=(w+2)*h[0],S=(y+f)*h[1],C={width:E<0?Math.floor(E):Math.ceil(E),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:b};1==h[0]&&1==h[1]||b.push("scale",h),i&&(b.push("strokeStyle",o.strokeStyle),b.push("lineWidth",f),b.push("lineCap",o.lineCap),b.push("lineJoin",o.lineJoin),b.push("miterLimit",o.miterLimit),(u.Id?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(b.push("setLineDash",[o.lineDash]),b.push("lineDashOffset",o.lineDashOffset))),n&&b.push("fillStyle",s.fillStyle),b.push("textBaseline","middle"),b.push("textAlign","center");for(var T,O=.5-p,R=p*w+O*f,I=[],P=[],L=0,A=0,M=0,F=0,k=0,D=d.length;k<D;k+=2){var j=d[k];if("\n"!==j){var Z=d[k+1]||a.font;Z!==T&&(i&&I.push("font",Z),n&&P.push("font",Z),T=Z),L=Math.max(L,m[M]);var N=[j,R+O*v[M]+p*(v[M]-x[F]),.5*(f+L)+A];R+=v[M],i&&I.push("strokeText",N),n&&P.push("fillText",N),++M}else A+=L,L=0,R=p*w+O*f,++F}return Array.prototype.push.apply(b,I),Array.prototype.push.apply(b,P),this.labels_[r]=C,C},t.prototype.replayTextBackground_=function(t,e,n,i,r,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,n,i,r,o,s,a,l,u,h,f,d,_,y,v){var m,x=n-(s*=f[0]),w=i-(a*=f[1]),b=r+l>t?t-l:r,E=o+u>e?e-u:o,S=_[3]+b*f[0]+_[1],C=_[0]+E*f[1]+_[2],T=x-_[3],O=w-_[0];return(y||0!==h)&&(Ts[0]=T,Is[0]=T,Ts[1]=O,Os[1]=O,Os[0]=T+S,Rs[0]=Os[0],Rs[1]=O+C,Is[1]=Rs[1]),0!==h?(c(m=p([1,0,0,1,0,0],n,i,1,1,h,-n,-i),Ts),c(m,Os),c(m,Rs),c(m,Is),(0,g.T9)(Math.min(Ts[0],Os[0],Rs[0],Is[0]),Math.min(Ts[1],Os[1],Rs[1],Is[1]),Math.max(Ts[0],Os[0],Rs[0],Is[0]),Math.max(Ts[1],Os[1],Rs[1],Is[1]),Cs)):(0,g.T9)(Math.min(T,T+S),Math.min(O,O+C),Math.max(T,T+S),Math.max(O,O+C),Cs),d&&(x=Math.round(x),w=Math.round(w)),{drawImageX:x,drawImageY:w,drawImageW:b,drawImageH:E,originX:l,originY:u,declutterBox:{minX:Cs[0],minY:Cs[1],maxX:Cs[2],maxY:Cs[3],value:v},canvasTransform:m,scale:f}},t.prototype.replayImageOrLabel_=function(t,e,n,i,r,o,s){var a=!(!o&&!s),l=i.declutterBox,u=t.canvas,h=s?s[2]*i.scale[0]/2:0;return l.minX-h<=u.width/e&&l.maxX+h>=0&&l.minY-h<=u.height/e&&l.maxY+h>=0&&(a&&this.replayTextBackground_(t,Ts,Os,Rs,Is,o,s),function(t,e,n,i,r,o,s,a,l,u,h){t.save(),1!==n&&(t.globalAlpha*=n),e&&t.setTransform.apply(t,e),i.contextInstructions?(t.translate(l,u),t.scale(h[0],h[1]),function(t,e){for(var n=t.contextInstructions,i=0,r=n.length;i<r;i+=2)Array.isArray(n[i+1])?e[n[i]].apply(e,n[i+1]):e[n[i]]=n[i+1]}(i,t)):h[0]<0||h[1]<0?(t.translate(l,u),t.scale(h[0],h[1]),t.drawImage(i,r,o,s,a,0,0,s,a)):t.drawImage(i,r,o,s,a,l,u,s*h[0],a*h[1]),t.restore()}(t,i.canvasTransform,r,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=c(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,n,i){var r=this.textStates[e],o=this.createLabel(t,e,i,n),s=this.strokeStates[n],a=this.pixelRatio,l=As(Array.isArray(t)?t[0]:t,r.textAlign||pt),u=fs[r.textBaseline||ft],h=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale[0])+2*(.5-l)*h,anchorY:u*o.height/a+2*(.5-u)*h}},t.prototype.execute_=function(t,e,n,i,r,o,s,a){var l,u,h;this.pixelCoordinates_&&(0,nn.fS)(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=gn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),h=n,(u=this.renderedTransform_)[0]=h[0],u[1]=h[1],u[2]=h[2],u[3]=h[3],u[4]=h[4],u[5]=h[5]);for(var c,p,f,d,_,y,v,m,x,w,b,E,S,C,T,O,R=0,I=i.length,P=0,L=0,A=0,M=null,F=null,k=this.coordinateCache_,D=this.viewRotation_,j=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,Z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},N=this.instructions!=i||this.overlaps?0:200;R<I;){var G=i[R];switch(G[0]){case Jo.BEGIN_GEOMETRY:S=G[1],O=G[3],S.getGeometry()?void 0===s||(0,g.kK)(s,O.getExtent())?++R:R=G[2]+1:R=G[2];break;case Jo.BEGIN_PATH:L>N&&(this.fill_(t),L=0),A>N&&(t.stroke(),A=0),L||A||(t.beginPath(),d=NaN,_=NaN),++R;break;case Jo.CIRCLE:var z=l[P=G[1]],W=l[P+1],X=l[P+2]-z,V=l[P+3]-W,Y=Math.sqrt(X*X+V*V);t.moveTo(z+Y,W),t.arc(z,W,Y,0,2*Math.PI,!0),++R;break;case Jo.CLOSE_PATH:t.closePath(),++R;break;case Jo.CUSTOM:P=G[1],c=G[2];var K=G[3],B=G[4],U=6==G.length?G[5]:void 0;Z.geometry=K,Z.feature=S,R in k||(k[R]=[]);var H=k[R];U?U(l,P,c,2,H):(H[0]=l[P],H[1]=l[P+1],H.length=2),B(H,Z),++R;break;case Jo.DRAW_IMAGE:P=G[1],c=G[2],m=G[3],p=G[4],f=G[5];var q=G[6],J=G[7],Q=G[8],$=G[9],tt=G[10],et=G[11],nt=G[12],it=G[13],rt=G[14];if(!m&&G.length>=19){x=G[18],w=G[19],b=G[20],E=G[21];var ot=this.drawLabelWithPointPlacement_(x,w,b,E);m=ot.label,G[3]=m;var st=G[22];p=(ot.anchorX-st)*this.pixelRatio,G[4]=p;var at=G[23];f=(ot.anchorY-at)*this.pixelRatio,G[5]=f,q=m.height,G[6]=q,it=m.width,G[13]=it}var lt=void 0;G.length>24&&(lt=G[24]);var ut=void 0,ht=void 0,ct=void 0;G.length>16?(ut=G[15],ht=G[16],ct=G[17]):(ut=dt,ht=!1,ct=!1),tt&&j?et+=D:tt||j||(et-=D);for(var pt=0;P<c;P+=2)if(!(lt&&lt[pt++]<it/this.pixelRatio)){var ft=[t,e,m,Wt=this.calculateImageOrLabelDimensions_(m.width,m.height,l[P],l[P+1],it,q,p,f,Q,$,et,nt,r,ut,ht||ct,S),J,ht?M:null,ct?F:null],gt=void 0,_t=void 0;if(a&&rt){var yt=c-P;if(!rt[yt]){rt[yt]=ft;continue}if(gt=rt[yt],delete rt[yt],_t=Ps(gt),a.collides(_t))continue}a&&a.collides(Wt.declutterBox)||(gt&&(a&&a.insert(_t),this.replayImageOrLabel_.apply(this,gt)),a&&a.insert(Wt.declutterBox),this.replayImageOrLabel_.apply(this,ft))}++R;break;case Jo.DRAW_CHARS:var vt=G[1],mt=G[2],xt=G[3],wt=G[4];E=G[5];var bt=G[6],Et=G[7],Ct=G[8];b=G[9];var Tt=G[10];x=G[11],w=G[12];var Ot=[G[13],G[13]],Rt=this.textStates[w],It=Rt.font,Pt=[Rt.scale[0]*Et,Rt.scale[1]*Et],Lt=void 0;It in this.widths_?Lt=this.widths_[It]:(Lt={},this.widths_[It]=Lt);var At=Ss(l,vt,mt,2),Mt=Math.abs(Pt[0])*St(It,x,Lt);if(wt||Mt<=At){var Ft=this.textStates[w].textAlign,kt=Es(l,vt,mt,2,x,(At-Mt)*fs[Ft],bt,Math.abs(Pt[0]),St,It,Lt,j?0:this.viewRotation_);t:if(kt){var Dt=[],jt=void 0,Zt=void 0,Nt=void 0,Gt=void 0,zt=void 0;if(b)for(jt=0,Zt=kt.length;jt<Zt;++jt){Nt=(zt=kt[jt])[4],Gt=this.createLabel(Nt,w,"",b),p=zt[2]+(Pt[0]<0?-Tt:Tt),f=xt*Gt.height+2*(.5-xt)*Tt*Pt[1]/Pt[0]-Ct;var Wt=this.calculateImageOrLabelDimensions_(Gt.width,Gt.height,zt[0],zt[1],Gt.width,Gt.height,p,f,0,0,zt[3],Ot,!1,dt,!1,S);if(a&&a.collides(Wt.declutterBox))break t;Dt.push([t,e,Gt,Wt,1,null,null])}if(E)for(jt=0,Zt=kt.length;jt<Zt;++jt){if(Nt=(zt=kt[jt])[4],Gt=this.createLabel(Nt,w,E,""),p=zt[2],f=xt*Gt.height-Ct,Wt=this.calculateImageOrLabelDimensions_(Gt.width,Gt.height,zt[0],zt[1],Gt.width,Gt.height,p,f,0,0,zt[3],Ot,!1,dt,!1,S),a&&a.collides(Wt.declutterBox))break t;Dt.push([t,e,Gt,Wt,1,null,null])}a&&a.load(Dt.map(Ps));for(var Xt=0,Vt=Dt.length;Xt<Vt;++Xt)this.replayImageOrLabel_.apply(this,Dt[Xt])}}++R;break;case Jo.END_GEOMETRY:if(void 0!==o){var Yt=o(S=G[1],O);if(Yt)return Yt}++R;break;case Jo.FILL:N?L++:this.fill_(t),++R;break;case Jo.MOVE_TO_LINE_TO:for(P=G[1],c=G[2],C=l[P],v=(T=l[P+1])+.5|0,(y=C+.5|0)===d&&v===_||(t.moveTo(C,T),d=y,_=v),P+=2;P<c;P+=2)y=(C=l[P])+.5|0,v=(T=l[P+1])+.5|0,P!=c-2&&y===d&&v===_||(t.lineTo(C,T),d=y,_=v);++R;break;case Jo.SET_FILL_STYLE:M=G,this.alignFill_=G[2],L&&(this.fill_(t),L=0,A&&(t.stroke(),A=0)),t.fillStyle=G[1],++R;break;case Jo.SET_STROKE_STYLE:F=G,A&&(t.stroke(),A=0),this.setStrokeStyle_(t,G),++R;break;case Jo.STROKE:N?A++:t.stroke(),++R;break;default:++R}}L&&this.fill_(t),A&&t.stroke()},t.prototype.execute=function(t,e,n,i,r,o){this.viewRotation_=i,this.execute_(t,e,n,this.instructions,r,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,n,i,r){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,r)},t}();const ks=Fs;var Ds=[ws,ys,xs,ms,bs,vs],js=function(){function t(t,e,n,i,r,o){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(r)}return t.prototype.clip=function(t,e){var n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var n=this.executorsByZIndex_[e];void 0===n&&(n={},this.executorsByZIndex_[e]=n);var i=t[e];for(var r in i){var o=i[r];n[r]=new ks(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[e],i=0,r=t.length;i<r;++i)if(t[i]in n)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r,o){var s=2*(i=Math.round(i))+1,a=p(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-n,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=(0,ot.E4)(s,s));var u,h=this.hitDetectionContext_;h.canvas.width!==s||h.canvas.height!==s?(h.canvas.width=s,h.canvas.height=s):l||h.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(u=(0,g.lJ)(),(0,g.Wj)(u,t),(0,g.f3)(u,e*(this.renderBuffer_+i),u));var c,f=function(t){if(void 0!==Zs[t])return Zs[t];for(var e=2*t+1,n=t*t,i=new Array(n+1),r=0;r<=t;++r)for(var o=0;o<=t;++o){var s=r*r+o*o;if(s>n)break;var a=i[s];a||(a=[],i[s]=a),a.push(4*((t+r)*e+(t+o))+3),r>0&&a.push(4*((t-r)*e+(t+o))+3),o>0&&(a.push(4*((t+r)*e+(t-o))+3),r>0&&a.push(4*((t-r)*e+(t-o))+3))}for(var l=[],u=(r=0,i.length);r<u;++r)i[r]&&l.push.apply(l,i[r]);return Zs[t]=l,l}(i);function d(t,e){for(var n=h.getImageData(0,0,s,s).data,a=0,l=f.length;a<l;a++)if(n[f[a]]>0){if(!o||c!==ms&&c!==bs||-1!==o.indexOf(t)){var u=(f[a]-3)/4,p=i-u%s,d=i-(u/s|0),g=r(t,e,p*p+d*d);if(g)return g}h.clearRect(0,0,s,s);break}}var _,y,v,m,x,w=Object.keys(this.executorsByZIndex_).map(Number);for(w.sort(nn.kK),_=w.length-1;_>=0;--_){var b=w[_].toString();for(v=this.executorsByZIndex_[b],y=Ds.length-1;y>=0;--y)if(void 0!==(m=v[c=Ds[y]])&&(x=m.executeHitDetection(h,a,n,d,u)))return x}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],i=e[1],r=e[2],o=e[3],s=[n,i,n,o,r,o,r,i];return gn(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return(0,M.xb)(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,i,r,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(nn.kK),this.maxExtent_&&(t.save(),this.clip(t,n));var l,u,h,c,p,f,d=o||Ds;for(s&&a.reverse(),l=0,u=a.length;l<u;++l){var g=a[l].toString();for(p=this.executorsByZIndex_[g],h=0,c=d.length;h<c;++h)void 0!==(f=p[d[h]])&&f.execute(t,e,n,i,r,s)}this.maxExtent_&&t.restore()},t}(),Zs={};const Ns=js;var Gs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),zs=function(t){function e(e,n,i,r,o,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=n,l.extent_=i,l.transform_=r,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return Gs(e,t),e.prototype.drawImages_=function(t,e,n,i){if(this.image_){var r=gn(t,e,n,i,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var u=0,h=r.length;u<h;u+=2){var c=r[u]-this.imageAnchorX_,f=r[u+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var d=c+this.imageAnchorX_,g=f+this.imageAnchorY_;p(s,d,g,1,1,l,-d,-g),o.setTransform.apply(o,s),o.translate(d,g),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,f,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,n,i){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=gn(t,e,n,i,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<n;e+=i){var a=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var u=p(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);o.setTransform.apply(o,u),o.translate(a,l),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,n,i,r){var o=this.context_,s=gn(t,e,n,i,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;r&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return r&&o.closePath(),n},e.prototype.drawRings_=function(t,e,n,i){for(var r=0,o=n.length;r<o;++r)e=this.moveToLineTo_(t,e,n[r],i,!0);return e},e.prototype.drawCircle=function(t){if((0,g.kK)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,n){var i=t.getFlatCoordinates();if(i){var r=t.getStride();return gn(i,0,i.length,r,e,n)}return null}(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],i=e[3]-e[1],r=Math.sqrt(n*n+i*i),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case Jt:this.drawPoint(t);break;case Qt:this.drawLineString(t);break;case $t:this.drawPolygon(t);break;case te:this.drawMultiPoint(t);break;case ee:this.drawMultiLineString(t);break;case ne:this.drawMultiPolygon(t);break;case ie:this.drawGeometryCollection(t);break;case re:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var n=e.getGeometryFunction()(t);n&&(0,g.kK)(this.extent_,n.getExtent())&&(this.setStyle(e),this.drawGeometry(n))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),n=0,i=e.length;n<i;++n)this.drawGeometry(e[n])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,g.kK)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var i=t.getFlatMidpoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if((0,g.kK)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=t.getFlatCoordinates(),r=0,o=t.getEnds(),s=t.getStride();n.beginPath();for(var a=0,l=o.length;a<l;++a)r=this.moveToLineTo_(i,r,o[a],s,!1);n.stroke()}if(""!==this.text_){var u=t.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,g.kK)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var n=t.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,g.kK)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getOrientedFlatCoordinates(),i=0,r=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=r.length;s<a;++s){var l=r[s];i=this.drawRings_(n,i,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var u=t.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&((0,nn.fS)(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,n=this.contextTextState_,i=t.textAlign?t.textAlign:pt;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=i&&(n.textAlign=i,e.textAlign=i),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=i,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:i,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var n=this;if(t){var i=t.getColor();this.fillState_={fillStyle:Oo(i||at)}}else this.fillState_=null;if(e){var r=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),l=e.getLineJoin(),u=e.getWidth(),h=e.getMiterLimit(),c=s||ut;this.strokeState_={lineCap:void 0!==o?o:lt,lineDash:1===this.pixelRatio_?c:c.map((function(t){return t*n.pixelRatio_})),lineDashOffset:(a||0)*this.pixelRatio_,lineJoin:void 0!==l?l:ht,lineWidth:(void 0!==u?u:1)*this.pixelRatio_,miterLimit:void 0!==h?h:10,strokeStyle:Oo(r||ct)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var n=t.getAnchor(),i=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*this.pixelRatio_,this.imageAnchorY_=n[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=i[0],this.imageOriginY_=i[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var n=e.getColor();this.textFillState_={fillStyle:Oo(n||at)}}else this.textFillState_=null;var i=t.getStroke();if(i){var r=i.getColor(),o=i.getLineCap(),s=i.getLineDash(),a=i.getLineDashOffset(),l=i.getLineJoin(),u=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:lt,lineDash:s||ut,lineDashOffset:a||0,lineJoin:void 0!==l?l:ht,lineWidth:void 0!==u?u:1,miterLimit:void 0!==h?h:10,strokeStyle:Oo(r||ct)}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),f=t.getOffsetY(),d=t.getRotateWithView(),g=t.getRotation(),_=t.getScaleArray(),y=t.getText(),v=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==c?c:st,textAlign:void 0!==v?v:pt,textBaseline:void 0!==m?m:ft},this.text_=void 0!==y?Array.isArray(y)?y.reduce((function(t,e,n){return t+(n%2?" ":e)}),""):y:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*_[0],this.pixelRatio_*_[1]]}else this.text_=""},e}($o);const Ws=zs,Xs="fraction",Vs="pixels",Ys="bottom-left",Ks="bottom-right",Bs="top-left",Us="top-right";var Hs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qs=null,Js=function(t){function e(e,n,i,r,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=i,a.src_=n,a.tainted_,a}return Hs(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&2===this.imageState_){qs||(qs=(0,ot.E4)(1,1)),qs.drawImage(this.image_,0,0);try{qs.getImageData(0,0,1,1),this.tainted_=!1}catch(t){qs=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(O.Z.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=2,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],n=(0,ot.E4)(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(0==this.imageState_){this.imageState_=1;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=io(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&2===this.imageState_){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=m(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var i=n.getImageData(0,0,e.width,e.height),r=i.data,o=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],u=0,h=r.length;u<h;u+=4)r[u]*=o,r[u+1]*=s,r[u+2]*=a,r[u+3]*=l;n.putImageData(i,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(rt.Z),Qs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$s=function(t){function e(e){var n=this,i=e||{},r=void 0!==i.opacity?i.opacity:1,o=void 0!==i.rotation?i.rotation:0,s=void 0!==i.scale?i.scale:1,a=void 0!==i.rotateWithView&&i.rotateWithView;(n=t.call(this,{opacity:r,rotation:o,scale:s,displacement:void 0!==i.displacement?i.displacement:[0,0],rotateWithView:a})||this).anchor_=void 0!==i.anchor?i.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:Bs,n.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:Xs,n.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:Xs,n.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var u=void 0!==i.img?i.img:null;n.imgSize_=i.imgSize;var c=i.src;(0,h.h)(!(void 0!==c&&u),4),(0,h.h)(!u||u&&n.imgSize_,5),void 0!==c&&0!==c.length||!u||(c=u.src||(0,l.sq)(u)),(0,h.h)(void 0!==c&&c.length>0,6);var p=void 0!==i.src?0:2;return n.color_=void 0!==i.color?w(i.color):null,n.iconImage_=function(t,e,n,i,r,o){var s=C.get(e,i,o);return s||(s=new Js(t,e,n,i,r,o),C.set(e,i,o,s)),s}(u,c,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,p,n.color_),n.offset_=void 0!==i.offset?i.offset:[0,0],n.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:Bs,n.origin_=null,n.size_=void 0!==i.size?i.size:null,n}return Qs(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==Xs||this.anchorYUnits_==Xs){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Xs&&(t[0]*=e[0]),this.anchorYUnits_==Xs&&(t[1]*=e[1])}if(this.anchorOrigin_!=Bs){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Us&&this.anchorOrigin_!=Ks||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Ys&&this.anchorOrigin_!=Ks||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var n=this.getDisplacement();return[t[0]-n[0],t[1]+n[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Bs){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=Us&&this.offsetOrigin_!=Ks||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=Ys&&this.offsetOrigin_!=Ks||(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(O.Z.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(O.Z.CHANGE,t)},e}(To);const ta=$s;var ea=.5,na={Point:function(t,e,n,i,r){var o,s=n.getImage(),a=n.getText();if(r&&(t=r,o=s&&a&&a.getText()?{}:void 0),s){if(2!=s.getImageState())return;var l=t.getBuilder(n.getZIndex(),ms);l.setImageStyle(s,o),l.drawPoint(e,i)}if(a&&a.getText()){var u=t.getBuilder(n.getZIndex(),bs);u.setTextStyle(a,o),u.drawText(e,i)}},LineString:function(t,e,n,i,r){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),xs);s.setFillStrokeStyle(null,o),s.drawLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(r||t).getBuilder(n.getZIndex(),bs);l.setTextStyle(a),l.drawText(e,i)}},Polygon:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),ws);a.setFillStrokeStyle(o,s),a.drawPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var u=(r||t).getBuilder(n.getZIndex(),bs);u.setTextStyle(l),u.drawText(e,i)}},MultiPoint:function(t,e,n,i,r){var o,s=n.getImage(),a=n.getText();if(r&&(t=r,o=s&&a&&a.getText()?{}:void 0),s){if(2!=s.getImageState())return;var l=t.getBuilder(n.getZIndex(),ms);l.setImageStyle(s,o),l.drawMultiPoint(e,i)}if(a&&a.getText()){var u=(r||t).getBuilder(n.getZIndex(),bs);u.setTextStyle(a,o),u.drawText(e,i)}},MultiLineString:function(t,e,n,i,r){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),xs);s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(r||t).getBuilder(n.getZIndex(),bs);l.setTextStyle(a),l.drawText(e,i)}},MultiPolygon:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(s||o){var a=t.getBuilder(n.getZIndex(),ws);a.setFillStrokeStyle(o,s),a.drawMultiPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var u=(r||t).getBuilder(n.getZIndex(),bs);u.setTextStyle(l),u.drawText(e,i)}},GeometryCollection:function(t,e,n,i,r){var o,s,a=e.getGeometriesArray();for(o=0,s=a.length;o<s;++o)(0,na[a[o].getType()])(t,a[o],n,i,r)},Circle:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),ys);a.setFillStrokeStyle(o,s),a.drawCircle(e,i)}var l=n.getText();if(l&&l.getText()){var u=(r||t).getBuilder(n.getZIndex(),bs);u.setTextStyle(l),u.drawText(e,i)}}};function ia(t,e){return parseInt((0,l.sq)(t),10)-parseInt((0,l.sq)(e),10)}function ra(t,e){return.5*t/e}function oa(t,e,n,i,r,o,s){var a=!1,l=n.getImage();if(l){var u=l.getImageState();2==u||3==u?l.unlistenImageChange(r):(0==u&&l.load(),u=l.getImageState(),l.listenImageChange(r),a=!0)}return function(t,e,n,i,r,o){var s=n.getGeometryFunction()(e);if(s){var a=s.simplifyTransformed(i,r);n.getRenderer()?sa(t,a,n,e):(0,na[a.getType()])(t,a,n,e,o)}}(t,e,n,i,o,s),a}function sa(t,e,n,i){if(e.getType()!=ie)t.getBuilder(n.getZIndex(),vs).drawCustom(e,i,n.getRenderer(),n.getHitDetectionRenderer());else for(var r=e.getGeometries(),o=0,s=r.length;o<s;++o)sa(t,r[o],n,i)}var aa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),la=function(t){function e(e){var n=t.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.dirty_=!1,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=(0,g.lJ)(),n.wrappedRenderedExtent_=(0,g.lJ)(),n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n}return aa(e,t),e.prototype.renderWorlds=function(t,e,n){var i=e.extent,r=e.viewState,o=r.center,s=r.resolution,a=r.projection,l=r.rotation,u=a.getExtent(),h=this.getLayer().getSource(),c=e.pixelRatio,p=e.viewHints,f=!(p[0]||p[1]),d=this.context,_=Math.round(e.size[0]*c),y=Math.round(e.size[1]*c),v=h.getWrapX()&&a.canWrapX(),m=v?(0,g.dz)(u):null,x=v?Math.ceil((i[2]-u[2])/m)+1:1,w=v?Math.floor((i[0]-u[0])/m):0;do{var b=this.getRenderTransform(o,s,l,c,_,y,w*m);t.execute(d,1,b,l,f,void 0,n)}while(++w<x)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var n=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];!function(t,e,n){!function(t,e,n,i,r,o,s){t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=s}(t,e,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),f(this.inversePixelTransform,this.pixelTransform);var r=d(this.pixelTransform);this.useContainer(e,r,i.opacity,this.getBackground(t));var o=this.context,s=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return null;var u=Math.round(t.size[0]*n),h=Math.round(t.size[1]*n);s.width!=u||s.height!=h?(s.width=u,s.height=h,s.style.transform!==r&&(s.style.transform=r)):this.containerReused||o.clearRect(0,0,u,h),this.preRender(o,t);var c=t.viewState,p=(c.projection,!1),_=!0;if(i.extent&&this.clipping){var y=Qe(i.extent);(p=(_=(0,g.kK)(y,t.extent))&&!(0,g.r4)(y,t.extent))&&this.clipUnrotated(o,t,y)}_&&this.renderWorlds(a,t),p&&o.restore(),this.postRender(o,t);var v=nt(i.opacity),m=this.container;return v!==m.style.opacity&&(m.style.opacity=v),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];c(this.pixelTransform,n);var i=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,s=this.renderedProjection_,a=this.wrappedRenderedExtent_,l=this.getLayer(),u=[],h=n[0]*ea,p=n[1]*ea;u.push(this.getRenderTransform(i,r,o,ea,h,p,0).slice());var f=l.getSource(),d=s.getExtent();if(f.getWrapX()&&s.canWrapX()&&!(0,g.r4)(d,a)){for(var y=a[0],v=(0,g.dz)(d),m=0,x=void 0;y<d[0];)x=v*--m,u.push(this.getRenderTransform(i,r,o,ea,h,p,x).slice()),y+=v;for(m=0,y=a[2];y>d[2];)x=v*++m,u.push(this.getRenderTransform(i,r,o,ea,h,p,x).slice()),y-=v}this.hitDetectionImageData_=function(t,e,n,i,r,o,s){var a=t[0]*ea,l=t[1]*ea,u=(0,ot.E4)(a,l);u.imageSmoothingEnabled=!1;for(var h=u.canvas,c=new Ws(u,ea,r,null,s),p=n.length,f=Math.floor(16777215/p),d={},_=1;_<=p;++_){var y=n[_-1],v=y.getStyleFunction()||i;if(i){var m=v(y,o);if(m){Array.isArray(m)||(m=[m]);for(var x="#"+("000000"+(_*f).toString(16)).slice(-6),w=0,b=m.length;w<b;++w){var E=m[w],S=E.getGeometryFunction()(y);if(S&&(0,g.kK)(r,S.getExtent())){var C=E.clone(),T=C.getFill();T&&T.setColor(x);var O=C.getStroke();O&&(O.setColor(x),O.setLineDash(null)),C.setText(void 0);var R=E.getImage();if(R&&0!==R.getOpacity()){var I=R.getImageSize();if(!I)continue;var P=(0,ot.E4)(I[0],I[1],void 0,{alpha:!1}),L=P.canvas;P.fillStyle=x,P.fillRect(0,0,L.width,L.height),C.setImage(new ta({img:L,imgSize:I,anchor:R.getAnchor(),anchorXUnits:Vs,anchorYUnits:Vs,offset:R.getOrigin(),opacity:1,size:R.getSize(),scale:R.getScale(),rotation:R.getRotation(),rotateWithView:R.getRotateWithView()}))}var A=C.getZIndex()||0;(k=d[A])||(k={},d[A]=k,k.Polygon=[],k.Circle=[],k.LineString=[],k.Point=[]),k[S.getType().replace("Multi","")].push(S,C)}}}}}for(var M=Object.keys(d).map(Number).sort(nn.kK),F=(_=0,M.length);_<F;++_){var k=d[M[_]];for(var D in k){var j=k[D];for(w=0,b=j.length;w<b;w+=2){c.setStyle(j[w+1]);for(var Z=0,N=e.length;Z<N;++Z)c.setTransform(e[Z]),c.drawGeometry(j[w])}}}return u.getImageData(0,0,h.width,h.height)}(n,u,this.renderedFeatures_,l.getStyleFunction(),a,r,o)}e(function(t,e,n){var i=[];if(n){var r=Math.floor(Math.round(t[0])*ea),o=Math.floor(Math.round(t[1])*ea),s=4*((0,_.uZ)(r,0,n.width-1)+(0,_.uZ)(o,0,n.height-1)*n.width),a=n.data[s],l=n.data[s+1],u=n.data[s+2]+256*(l+256*a),h=Math.floor(16777215/e.length);u&&u%h==0&&i.push(e[u/h-1])}return i}(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r){var o=this;if(this.replayGroup_){var s,a=e.viewState.resolution,u=e.viewState.rotation,h=this.getLayer(),c={},p=function(t,e,n){var o=(0,l.sq)(t),s=c[o];if(s){if(!0!==s&&n<s.distanceSq){if(0===n)return c[o]=!0,r.splice(r.lastIndexOf(s),1),i(t,h,e);s.geometry=e,s.distanceSq=n}}else{if(0===n)return c[o]=!0,i(t,h,e);r.push(c[o]={feature:t,layer:h,geometry:e,distanceSq:n,callback:i})}},f=[this.replayGroup_];return this.declutterExecutorGroup&&f.push(this.declutterExecutorGroup),f.some((function(i){return s=i.forEachFeatureAtCoordinate(t,a,u,n,p,i===o.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((function(t){return t.value})):null)})),s}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource();if(!n)return!1;var i=t.viewHints[0],r=t.viewHints[1],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&i||!s&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,u=l.projection,h=l.resolution,c=t.pixelRatio,p=e.getRevision(),f=e.getRenderBuffer(),d=e.getRenderOrder();void 0===d&&(d=ia);var _=l.center.slice(),y=(0,g.f3)(a,f*h),v=y.slice(),m=[y.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!(0,g.r4)(x,t.extent)){var w=(0,g.dz)(x),b=Math.max((0,g.dz)(y)/2,w);y[0]=x[0]-b,y[2]=x[2]+b,z(_,u);var E=(0,g.Cf)(m[0],u);E[0]<x[0]&&E[2]<x[2]?m.push([E[0]+w,E[1],E[2]+w,E[3]]):E[0]>x[0]&&E[2]>x[2]&&m.push([E[0]-w,E[1],E[2]-w,E[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&(0,g.r4)(this.wrappedRenderedExtent_,y))return(0,nn.fS)(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var S,C=new _s(ra(h,c),y,h,c);this.getLayer().getDeclutter()&&(S=new _s(ra(h,c),y,h,c));var T,O=Ue();if(O){for(var R=0,I=m.length;R<I;++R){var P=Je(m[R]);n.loadFeatures(P,$e(h),O)}T=Ge(O,u)}else for(R=0,I=m.length;R<I;++R)n.loadFeatures(m[R],h,u);var L=function(t,e){var n=ra(t,e);return n*n}(h,c),A=function(t){var n,i=t.getStyleFunction()||e.getStyleFunction();if(i&&(n=i(t,h)),n){var r=this.renderFeature(t,L,n,C,T,S);this.dirty_=this.dirty_||r}}.bind(this),M=Je(y),F=n.getFeaturesInExtent(M);for(d&&F.sort(d),R=0,I=F.length;R<I;++R)A(F[R]);this.renderedFeatures_=F;var k=C.finish(),D=new Ns(y,h,c,n.getOverlaps(),k,e.getRenderBuffer());return S&&(this.declutterExecutorGroup=new Ns(y,h,c,n.getOverlaps(),S.finish(),e.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=d,this.renderedExtent_=v,this.wrappedRenderedExtent_=y,this.renderedCenter_=_,this.renderedProjection_=u,this.replayGroup_=D,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,n,i,r,o){if(!n)return!1;var s=!1;if(Array.isArray(n))for(var a=0,l=n.length;a<l;++a)s=oa(i,t,n[a],e,this.boundHandleStyleImageChange_,r,o)||s;else s=oa(i,t,n,e,this.boundHandleStyleImageChange_,r,o);return s},e}(Zr);const ua=la;var ha=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const ca=function(t){function e(e){return t.call(this,e)||this}return ha(e,t),e.prototype.createRenderer=function(){return new ua(this)},e}(Yo);var pa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const fa=function(t){function e(e,n,i,r,o,s,a){var l=this,u=e.getExtent(),h=n.getExtent(),c=h?(0,g.Ed)(i,h):i,p=co(e,n,(0,g.qg)(c),r),f=new ao(e,n,c,u,.5*p,r),d=s(f.calculateSourceExtent(),p,o),_=d?0:4,y=d?d.getPixelRatio():1;return(l=t.call(this,i,r,y,_)||this).targetProj_=n,l.maxSourceExtent_=u,l.triangulation_=f,l.targetResolution_=r,l.targetExtent_=i,l.sourceImage_=d,l.sourcePixelRatio_=y,l.interpolate_=a,l.canvas_=null,l.sourceListenerKey_=null,l}return pa(e,t),e.prototype.disposeInternal=function(){1==this.state&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(2==t){var e=(0,g.dz)(this.targetExtent_)/this.targetResolution_,n=(0,g.Cr)(this.targetExtent_)/this.targetResolution_;this.canvas_=po(e,n,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()},e.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var t=this.sourceImage_.getState();2==t||3==t?this.reproject_():(this.sourceListenerKey_=(0,F.oL)(this.sourceImage_,O.Z.CHANGE,(function(t){var e=this.sourceImage_.getState();2!=e&&3!=e||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){(0,F.bN)(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(eo);var da=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ga=function(t){function e(e){var n=t.call(this)||this;n.projection=ke(e.projection),n.attributions_=_a(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:A.Z.READY,n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var i=n;return n.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e})),n}return da(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return(0,l.O3)()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=_a(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(it.Z);function _a(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const ya=ga;var va=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ma=function(t){function e(e,n){var i=t.call(this,e)||this;return i.image=n,i}return va(e,t),e}(B.ZP),xa=function(t){function e(e){var n=this,i=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),(n=t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state,interpolate:i})||this).on,n.once,n.un,n.resolutions_=void 0!==e.resolutions?e.resolutions:null,n.reprojectedImage_=null,n.reprojectedRevision_=0,n}return va(e,t),e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=(0,nn.h7)(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,n,i){var r=this.getProjection();if(r&&i&&!Ne(r,i)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Ne(this.reprojectedImage_.getProjection(),i)&&this.reprojectedImage_.getResolution()==e&&(0,g.fS)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new fa(r,i,t,e,n,function(t,e,n){return this.getImageInternal(t,e,n,r)}.bind(this),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return r&&(i=r),this.getImageInternal(t,e,n,i)},e.prototype.getImageInternal=function(t,e,n,i){return(0,l.O3)()},e.prototype.handleImageChange=function(t){var e,n=t.target;switch(n.getState()){case 1:this.loading=!0,e="imageloadstart";break;case 2:this.loading=!1,e="imageloadend";break;case 3:this.loading=!1,e="imageloaderror";break;default:return}this.hasListener(e)&&this.dispatchEvent(new ma(e,n))},e}(ya);function wa(t,e){t.getImage().src=e}const ba=xa;function Ea(t,e){var n=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&n.push(t+"="+encodeURIComponent(e[t]))}));var i=n.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+i}var Sa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ca=function(t){function e(e){var n=this,i=e||{},r=void 0===i.imageSmoothing||i.imageSmoothing;return void 0!==i.interpolate&&(r=i.interpolate),(n=t.call(this,{attributions:i.attributions,interpolate:r,projection:i.projection,resolutions:i.resolutions})||this).crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null,n.hidpi_=void 0===i.hidpi||i.hidpi,n.url_=i.url,n.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:wa,n.params_=i.params||{},n.image_=null,n.imageSize_=[0,0],n.renderedRevision_=0,n.ratio_=void 0!==i.ratio?i.ratio:1.5,n}return Sa(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,n,i){if(void 0===this.url_)return null;e=this.findNearestResolution(e),n=this.hidpi_?n:1;var r=this.image_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==n&&(0,g.r4)(r.getExtent(),t))return r;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};(0,M.f0)(o,this.params_);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.ratio_){var l=this.ratio_*(0,g.dz)(t)/2,u=this.ratio_*(0,g.Cr)(t)/2;t[0]=s-l,t[1]=a-u,t[2]=s+l,t[3]=a+u}var h=e/n,c=Math.ceil((0,g.dz)(t)/h),p=Math.ceil((0,g.Cr)(t)/h);t[0]=s-h*c/2,t[2]=s+h*c/2,t[1]=a-h*p/2,t[3]=a+h*p/2,this.imageSize_[0]=c,this.imageSize_[1]=p;var f=this.getRequestUrl_(t,this.imageSize_,n,i,o);return this.image_=new ro(t,e,n,f,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(O.Z.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,n,i,r){var o=i.getCode().split(/:(?=\d+$)/).pop();r.SIZE=e[0]+","+e[1],r.BBOX=t.join(","),r.BBOXSR=o,r.IMAGESR=o,r.DPI=Math.round(90*n);var s=this.url_,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&(0,h.h)(!1,50),Ea(a,r)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){(0,M.f0)(this.params_,t),this.image_=null,this.changed()},e}(ba);const Ta=Ca;var Oa="1.3.0";const Ra=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return(0,h.h)(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return(0,h.h)(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){(0,h.h)(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Ia(t,e,n,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function Pa(t,e,n){return t+"/"+e+"/"+n}function La(t){return Pa(t[0],t[1],t[2])}function Aa(t){return(t[1]<<t[0])+t[2]}var Ma=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Fa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ma(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey().split("/").map(Number)[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(La(e.tileCoord)),e.release())}.bind(this))}},e}(Ra);var ka=n(600),Da=[0,0,0],ja=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,h.h)((0,nn.pT)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var n=0,i=this.resolutions_.length-1;n<i;++n)if(e){if(this.resolutions_[n]/this.resolutions_[n+1]!==e){e=void 0;break}}else e=this.resolutions_[n]/this.resolutions_[n+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,(0,h.h)(this.origins_.length==this.resolutions_.length,20));var r=t.extent;void 0===r||this.origin_||this.origins_||(this.origin_=(0,g.rL)(r)),(0,h.h)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,(0,h.h)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,(0,h.h)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==r?r:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){var n=new vo(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(r){var i=this.getTileRangeForExtentAndZ(r,e);n.minX=Math.max(i.minX,n.minX),n.maxX=Math.min(i.maxX,n.maxX),n.minY=Math.max(i.minY,n.minY),n.maxY=Math.min(i.maxY,n.maxY)}return n}),this):r&&this.calculateTileRanges_(r)}return t.prototype.forEachTileCoord=function(t,e,n){for(var i=this.getTileRangeForExtentAndZ(t,e),r=i.minX,o=i.maxX;r<=o;++r)for(var s=i.minY,a=i.maxY;s<=a;++s)n([e,r,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,n,i){var r,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(r=t[1],o=t[2]):s=this.getTileCoordExtent(t,i);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?yo(r=Math.floor(r/2),r,o=Math.floor(o/2),o,n):this.getTileRangeForExtentAndZ(s,a,n)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var i=2*t[1],r=2*t[2];return yo(i,i+1,r,r+1,e)}var o=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;var i=t[0],r=t[1],o=t[2];if(e===i)return yo(r,o,r,o,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-i),a=Math.floor(r*s),l=Math.floor(o*s);return e<i?yo(a,a,l,l,n):yo(a,Math.floor(s*(r+1))-1,l,Math.floor(s*(o+1))-1,n)}var u=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(u,e,n)},t.prototype.getTileRangeExtent=function(t,e,n){var i=this.getOrigin(t),r=this.getResolution(t),o=ai(this.getTileSize(t),this.tmpSize_),s=i[0]+e.minX*o[0]*r,a=i[0]+(e.maxX+1)*o[0]*r,l=i[1]+e.minY*o[1]*r,u=i[1]+(e.maxY+1)*o[1]*r;return(0,g.T9)(s,l,a,u,n)},t.prototype.getTileRangeForExtentAndZ=function(t,e,n){var i=Da;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,i);var r=i[1],o=i[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,i),yo(r,i[1],o,i[2],n)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),n=this.getResolution(t[0]),i=ai(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*i[0]*n,e[1]-(t[2]+.5)*i[1]*n]},t.prototype.getTileCoordExtent=function(t,e){var n=this.getOrigin(t[0]),i=this.getResolution(t[0]),r=ai(this.getTileSize(t[0]),this.tmpSize_),o=n[0]+t[1]*r[0]*i,s=n[1]-(t[2]+1)*r[1]*i,a=o+r[0]*i,l=s+r[1]*i;return(0,g.T9)(o,s,a,l,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,n,i,r){var o=this.getZForResolution(n),s=n/this.getResolution(o),a=this.getOrigin(o),l=ai(this.getTileSize(o),this.tmpSize_),u=s*(t-a[0])/n/l[0],h=s*(a[1]-e)/n/l[1];return i?(u=(0,_.mD)(u,5)-1,h=(0,_.mD)(h,5)-1):(u=(0,_.GW)(u,5),h=(0,_.GW)(h,5)),Ia(o,u,h,r)},t.prototype.getTileCoordForXYAndZ_=function(t,e,n,i,r){var o=this.getOrigin(n),s=this.getResolution(n),a=ai(this.getTileSize(n),this.tmpSize_),l=(t-o[0])/s/a[0],u=(o[1]-e)/s/a[1];return i?(l=(0,_.mD)(l,5)-1,u=(0,_.mD)(u,5)-1):(l=(0,_.GW)(l,5),u=(0,_.GW)(u,5)),Ia(n,l,u,r)},t.prototype.getTileCoordForCoordAndZ=function(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){var n=(0,nn.h7)(this.resolutions_,t,e||0);return(0,_.uZ)(n,this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,n=new Array(e),i=this.minZoom;i<e;++i)n[i]=this.getTileRangeForExtentAndZ(t,i);this.fullTileRanges_=n},t}();const Za=ja;function Na(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,n,i){return function(t,e,n,i){var r=ka.Z.TOP_LEFT,o=Ga(t,undefined,n);return new Za({extent:t,origin:(0,g.g0)(t,r),resolutions:o,tileSize:n})}(za(t),0,void 0)}(t),t.setDefaultTileGrid(e)),e}function Ga(t,e,n,i){for(var r=void 0!==e?e:42,o=(0,g.Cr)(t),s=(0,g.dz)(t),a=ai(void 0!==n?n:256),l=i>0?i:Math.max(s/a[0],o/a[1]),u=r+1,h=new Array(u),c=0;c<u;++c)h[c]=l/Math.pow(2,c);return h}function za(t){var e=(t=ke(t)).getExtent();if(!e){var n=180*se[ae.DEGREES]/t.getMetersPerUnit();e=(0,g.T9)(-n,-n,n,n)}return e}var Wa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Xa=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;return n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null,n.tileGrid&&ai(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),[256,256]),n.tileCache=new Fa(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return Wa(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,i){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var o,s,a,l=!0,u=n.minX;u<=n.maxX;++u)for(var h=n.minY;h<=n.maxY;++h)s=Pa(e,u,h),a=!1,r.containsKey(s)&&(a=2===(o=r.get(s)).getState())&&(a=!1!==i(o)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,n,i,r){return(0,l.O3)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Na(t)},e.prototype.getTileCacheForProjection=function(t){return(0,h.h)(Ne(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var i=this.getTileGridForProjection(n),r=this.getTilePixelRatio(e),o=ai(i.getTileSize(t),this.tmpSize);return 1==r?o:si(o,r,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),i=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=function(t,e,n){var i=e[0],r=t.getTileCoordCenter(e),o=za(n);if((0,g.b8)(o,r))return e;var s=(0,g.dz)(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,t.getTileCoordForCoordAndZ(r,i)}(i,t,n)),function(t,e){var n=t[0],i=t[1],r=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;var o=e.getFullTileRange(n);return!o||o.containsXY(i,r)}(t,i)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,i){},e}(ya),Va=function(t){function e(e,n){var i=t.call(this,e)||this;return i.tile=n,i}return Wa(e,t),e}(B.ZP);const Ya=Xa;function Ka(t,e){var n=/\{z\}/g,i=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(n,s[0].toString()).replace(i,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],n=e.getFullTileRange(t);return(0,h.h)(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}var Ba=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ua=function(t){function e(n){var i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return i.generateTileUrlFunction_=i.tileUrlFunction===e.prototype.tileUrlFunction,i.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(i.tileUrlFunction=n.tileUrlFunction),i.urls=null,n.urls?i.setUrls(n.urls):n.url&&i.setUrl(n.url),i.tileLoadingKeys_={},i}return Ba(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,i=(0,l.sq)(n),r=n.getState();1==r?(this.tileLoadingKeys_[i]=!0,e="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=3==r?"tileloaderror":2==r?"tileloadend":void 0),null!=e&&this.dispatchEvent(new Va(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var i=n[1].charCodeAt(0),r=n[2].charCodeAt(0),o=void 0;for(o=i;o<=r;++o)e.push(t.replace(n[0],String.fromCharCode(o)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(n[2],10),a=parseInt(n[1],10);a<=s;a++)e.push(t.replace(n[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){for(var n=t.length,i=new Array(n),r=0;r<n;++r)i[r]=Ka(t[r],e);return function(t){return 1===t.length?t[0]:function(e,n,i){if(e){var r=Aa(e),o=(0,_.$W)(r,t.length);return t[o](e,n,i)}}}(i)}(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var i=Pa(t,e,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)},e}(Ya);const Ha=Ua;var qa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ja=function(t){function e(e){var n=this,i=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),(n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Qa,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:i,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:so,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return qa(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);for(var i in this.tileCache.expireCache(this.tileCache==n?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[i];r.expireCache(r==n?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Ne(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Ne(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Ne(e,t)){var n=(0,l.sq)(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Na(t)),this.tileGridForProjection[n]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Ne(e,t))return this.tileCache;var n=(0,l.sq)(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Fa(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},e.prototype.createTile_=function(t,e,n,i,r,o){var s=[t,e,n],a=this.getTileCoordForTileUrlFunction(s,r),l=a?this.tileUrlFunction(a,i,r):void 0,u=new this.tileClass(s,void 0!==l?0:4,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(O.Z.CHANGE,this.handleTileChange.bind(this)),u},e.prototype.getTile=function(t,e,n,i,r){var o=this.getProjection();if(o&&r&&!Ne(o,r)){var s=this.getTileCacheForProjection(r),a=[t,e,n],l=void 0,u=La(a);s.containsKey(u)&&(l=s.get(u));var h=this.getKey();if(l&&l.key==h)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(a,r),d=new go(o,c,r,p,a,f,this.getTilePixelRatio(i),this.getGutter(),function(t,e,n,i){return this.getTileInternal(t,e,n,i,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return d.key=h,l?(d.interimTile=l,d.refreshInterimChain(),s.replace(u,d)):s.set(u,d),d}return this.getTileInternal(t,e,n,i,o||r)},e.prototype.getTileInternal=function(t,e,n,i,r){var o=null,s=Pa(t,e,n),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,n,i,r,a),0==l.getState()?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,n,i,r,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var n=ke(t);if(n){var i=(0,l.sq)(n);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}},e}(Ha);function Qa(t,e){t.getImage().src=e}const $a=Ja;var tl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),el=function(t){function e(e){var n=this,i=e||{},r=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(r=i.interpolate);var o=i.params||{},s=!("TRANSPARENT"in o)||o.TRANSPARENT;return(n=t.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:r,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:i.zDirection})||this).gutter_=void 0!==i.gutter?i.gutter:0,n.params_=o,n.v13_=!0,n.serverType_=i.serverType,n.hidpi_=void 0===i.hidpi||i.hidpi,n.tmpExtent_=(0,g.lJ)(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return tl(e,t),e.prototype.getFeatureInfoUrl=function(t,e,n,i){var r=ke(n),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(r));var a=s.getZForResolution(e,this.zDirection),l=s.getTileCoordForCoordAndZ(t,a);if(!(s.getResolutions().length<=l[0])){var u=s.getResolution(l[0]),h=s.getTileCoordExtent(l,this.tmpExtent_),c=ai(s.getTileSize(l[0]),this.tmpSize),p=this.gutter_;0!==p&&(c=ri(c,p,this.tmpSize),h=(0,g.f3)(h,u*p,h)),o&&o!==r&&(u=co(o,r,t,u),h=Xe(h,r,o),t=We(t,r,o));var f={SERVICE:"WMS",VERSION:Oa,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};(0,M.f0)(f,this.params_,i);var d=Math.floor((t[0]-h[0])/u),_=Math.floor((h[3]-t[1])/u);return f[this.v13_?"I":"X"]=d,f[this.v13_?"J":"Y"]=_,this.getRequestUrl_(l,c,h,1,o||r,f)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var n={SERVICE:"WMS",VERSION:Oa,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var i=this.params_.LAYERS;if(Array.isArray(i)&&1!==i.length)return;n.LAYER=i}if(void 0!==t){var r=this.getProjection()?this.getProjection().getMetersPerUnit():1;n.SCALE=t*r/28e-5}return(0,M.f0)(n,e),Ea(this.urls[0],n)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,n,i,r,o){var s=this.urls;if(s){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=i)switch(this.serverType_){case"geoserver":var a=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case"mapserver":o.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":o.DPI=90*i;break;default:(0,h.h)(!1,52)}var l=r.getAxisOrientation(),u=n;if(this.v13_&&"ne"==l.substr(0,2)){var c=void 0;c=n[0],u[0]=n[1],u[1]=c,c=n[2],u[2]=n[3],u[3]=c}return o.BBOX=u.join(","),Ea(1==s.length?s[0]:s[(0,_.$W)(Aa(t),s.length)],o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")},e.prototype.updateParams=function(t){(0,M.f0)(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Oa;this.v13_=function(t,e){for(var n=(""+t).split("."),i="1.3".split("."),r=0;r<Math.max(n.length,i.length);r++){var o=parseInt(n[r]||"0",10),s=parseInt(i[r]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}(t)>=0},e.prototype.tileUrlFunction=function(t,e,n){var i=this.getTileGrid();if(i||(i=this.getTileGridForProjection(n)),!(i.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var r=i.getResolution(t[0]),o=i.getTileCoordExtent(t,this.tmpExtent_),s=ai(i.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(s=ri(s,a,this.tmpSize),o=(0,g.f3)(o,r*a,o)),1!=e&&(s=si(s,e,this.tmpSize));var l={SERVICE:"WMS",VERSION:Oa,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return(0,M.f0)(l,this.params_),this.getRequestUrl_(t,s,o,e,n,l)}},e}($a);const nl=el;var il=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rl=function(t){function e(e){var n=e||{},i=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(i=n.interpolate);var r=void 0!==n.projection?n.projection:"EPSG:3857",o=void 0!==n.tileGrid?n.tileGrid:function(t){var e=t||{},n=e.extent||ke("EPSG:3857").getExtent(),i={extent:n,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Ga(n,e.maxZoom,e.tileSize,e.maxResolution)};return new Za(i)}({extent:za(r),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});return t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:i,opaque:n.opaque,projection:r,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this}return il(e,t),e}($a);const ol=rl;var sl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),al=function(t){function e(e){var n,i=e||{},r=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(r=i.interpolate),n=void 0!==i.attributions?i.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var o=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",s=void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:n,attributionsCollapsible:!1,cacheSize:i.cacheSize,crossOrigin:o,interpolate:r,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,opaque:void 0===i.opaque||i.opaque,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,transition:i.transition,url:s,wrapX:i.wrapX,zDirection:i.zDirection})||this}return sl(e,t),e}(ol);const ll=al;const ul=function(){function t(t){this.rbush_=new So(t),this.items_={}}return t.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[(0,l.sq)(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),i=0,r=e.length;i<r;i++){var o=t[i],s=e[i],a={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};n[i]=a,this.items_[(0,l.sq)(s)]=a}this.rbush_.load(n)},t.prototype.remove=function(t){var e=(0,l.sq)(t),n=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(n)},t.prototype.update=function(t,e){var n=this.items_[(0,l.sq)(e)],i=[n.minX,n.minY,n.maxX,n.maxY];(0,g.fS)(i,t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var n,i=0,r=t.length;i<r;i++)if(n=e(t[i]))return n;return n},t.prototype.isEmpty=function(){return(0,M.xb)(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return(0,g.T9)(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),hl="addfeature",cl="removefeature";function pl(t,e){return[[-1/0,-1/0,1/0,1/0]]}const fl="arraybuffer";function dl(t,e){return function(n,i,r,o,s){var l=this;!function(t,e,n,i,r,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(n,i,r):t,!0),e.getType()==fl&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var i=e.getType(),l=void 0;"json"==i||"text"==i?l=a.responseText:"xml"==i?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):i==fl&&(l=a.response),l?o(e.readFeatures(l,{extent:n,featureProjection:r}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,n,i,r,(function(t,e){l.addFeatures(t),void 0!==o&&o(t)}),s||a.Zn)}}var gl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_l=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.feature=n,r.features=i,r}return gl(e,t),e}(B.ZP),yl=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:A.Z.READY,wrapX:void 0===i.wrapX||i.wrapX})||this).on,n.once,n.un,n.loader_=a.Zn,n.format_=i.format,n.overlaps_=void 0===i.overlaps||i.overlaps,n.url_=i.url,void 0!==i.loader?n.loader_=i.loader:void 0!==n.url_&&((0,h.h)(n.format_,7),n.loader_=dl(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:pl;var r,o,s=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=s?new ul:null,n.loadedExtentsRtree_=new ul,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?o=i.features:i.features&&(o=(r=i.features).getArray()),s||void 0!==r||(r=new Rt.Z(o)),void 0!==o&&n.addFeaturesInternal(o),void 0!==r&&n.bindFeaturesCollection_(r),n}return gl(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=(0,l.sq)(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var i=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new _l(hl,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[(0,F.oL)(e,O.Z.CHANGE,this.handleFeatureChange_,this),(0,F.oL)(e,K.Z.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,i=e.getId();return void 0!==i&&(i.toString()in this.idIndex_?n=!1:this.idIndex_[i.toString()]=e),n&&((0,h.h)(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],i=[],r=0,o=t.length;r<o;r++){var s=t[r],a=(0,l.sq)(s);this.addToIndex_(a,s)&&n.push(s)}r=0;for(var u=n.length;r<u;r++){s=n[r],a=(0,l.sq)(s),this.setupChangeEvents_(a,s);var h=s.getGeometry();if(h){var c=h.getExtent();e.push(c),i.push(s)}else this.nullGeometryFeatures_[a]=s}if(this.featuresRtree_&&this.featuresRtree_.load(e,i),this.hasListener(hl)){r=0;for(var p=n.length;r<p;r++)this.dispatchEvent(new _l(hl,n[r]))}},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(hl,(function(n){e||(e=!0,t.push(n.feature),e=!1)})),this.addEventListener(cl,(function(n){e||(e=!0,t.remove(n.feature),e=!1)})),t.addEventListener(It.Z.ADD,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(It.Z.REMOVE,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_)this.featureChangeKeys_[e].forEach(F.bN);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var n=function(t){this.removeFeatureInternal(t)}.bind(this);for(var i in this.featuresRtree_.forEach(n),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var r=new _l("clear");this.dispatchEvent(r),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,(function(n){return n.getGeometry().intersectsCoordinate(t)?e(n):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(n){if(n.getGeometry().intersectsExtent(t)){var i=e(n);if(i)return i}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,M.xb)(this.nullGeometryFeatures_)||(0,nn.l7)(t,(0,M.KX)(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var n=t[0],i=t[1],r=null,o=[NaN,NaN],s=1/0,l=[-1/0,-1/0,1/0,1/0],u=e||a.uX;return this.featuresRtree_.forEachInExtent(l,(function(t){if(u(t)){var e=t.getGeometry(),a=s;if((s=e.closestPointXY(n,i,o,s))<a){r=t;var h=Math.sqrt(s);l[0]=n-h,l[1]=i-h,l[2]=n+h,l[3]=i+h}}})),r},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,n=(0,l.sq)(e),i=e.getGeometry();if(i){var r=i.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(r,e)):this.featuresRtree_&&this.featuresRtree_.update(r,e)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);var o=e.getId();if(void 0!==o){var s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new _l("changefeature",e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:(0,l.sq)(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,M.xb)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()},e.prototype.loadFeatures=function(t,e,n){for(var i=this.loadedExtentsRtree_,r=this.strategy_(t,e,n),o=function(t,o){var a=r[t];i.forEachInExtent(a,(function(t){return(0,g.r4)(t.extent,a)}))||(++s.loadingExtentsCount_,s.dispatchEvent(new _l("featuresloadstart")),s.loader_.call(s,a,e,n,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new _l("featuresloadend",void 0,t))}.bind(s),function(){--this.loadingExtentsCount_,this.dispatchEvent(new _l("featuresloaderror"))}.bind(s)),i.insert(a,{extent:a.slice()}))},s=this,a=0,l=r.length;a<l;++a)o(a);this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,(function(n){if((0,g.fS)(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=(0,l.sq)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var e=(0,l.sq)(t),n=this.featureChangeKeys_[e];if(n){n.forEach(F.bN),delete this.featureChangeKeys_[e];var i=t.getId();return void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new _l(cl,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){(0,h.h)(this.format_,7),this.url_=t,this.setLoader(dl(t,this.format_))},e}(ya);const vl=yl;var ml=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xl=function(t){function e(e){var n=t.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;n.setGeometry(i)}else{var r=e;n.setProperties(r)}return n}return ml(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&((0,F.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=(0,F.oL)(t,O.Z.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){return"function"==typeof t?t:(Array.isArray(t)?e=t:((0,h.h)("function"==typeof t.getZIndex,41),e=[t]),function(){return e});var e}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(it.Z);const wl=xl;var bl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),El=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],Sl=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{element:document.createElement("div"),target:i.target})||this).on,n.once,n.un,n.keys_=void 0!==i.keys&&i.keys,n.source_=i.source,n.isInFullscreen_=!1,n.boundHandleMapTargetChange_=n.handleMapTargetChange_.bind(n),n.cssClassName_=void 0!==i.className?i.className:"ol-full-screen",n.documentListeners_=[],n.activeClassName_=void 0!==i.activeClassName?i.activeClassName.split(" "):[n.cssClassName_+"-true"],n.inactiveClassName_=void 0!==i.inactiveClassName?i.inactiveClassName.split(" "):[n.cssClassName_+"-false"];var r=void 0!==i.label?i.label:"⤢";n.labelNode_="string"==typeof r?document.createTextNode(r):r;var o=void 0!==i.labelActive?i.labelActive:"×";n.labelActiveNode_="string"==typeof o?document.createTextNode(o):o;var s=i.tipLabel?i.tipLabel:"Toggle full-screen";return n.button_=document.createElement("button"),n.button_.title=s,n.button_.setAttribute("type","button"),n.button_.appendChild(n.labelNode_),n.button_.addEventListener(O.Z.CLICK,n.handleClick_.bind(n),!1),n.setClassName_(n.button_,n.isInFullscreen_),n.element.className="".concat(n.cssClassName_," ").concat("ol-unselectable"," ").concat(Q),n.element.appendChild(n.button_),n}return bl(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){var t=this.getMap();if(t){var e=t.getOwnerDocument();if(Cl(e))if(Tl(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{var n;n=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():Ol(t)}(n):Ol(n)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var e=this.isInFullscreen_;this.isInFullscreen_=Tl(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,ot.$H)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,ot.$H)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}},e.prototype.setClassName_=function(t,e){var n,i,r,o;e?((n=t.classList).remove.apply(n,this.inactiveClassName_),(i=t.classList).add.apply(i,this.activeClassName_)):((r=t.classList).remove.apply(r,this.activeClassName_),(o=t.classList).add.apply(o,this.inactiveClassName_))},e.prototype.setMap=function(e){var n=this.getMap();n&&n.removeChangeListener(Yt,this.boundHandleMapTargetChange_),t.prototype.setMap.call(this,e),this.handleMapTargetChange_(),e&&e.addChangeListener(Yt,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,e=0,n=t.length;e<n;++e)(0,F.bN)(t[e]);t.length=0;var i=this.getMap();if(i){var r=i.getOwnerDocument();for(Cl(r)?this.element.classList.remove(J):this.element.classList.add(J),e=0,n=El.length;e<n;++e)t.push((0,F.oL)(r,El[e],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},e}(fi.default);function Cl(t){var e=t.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&t.msFullscreenEnabled||e.requestFullscreen&&t.fullscreenEnabled)}function Tl(t){return!!(t.webkitIsFullScreen||t.msFullscreenElement||t.fullscreenElement)}function Ol(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}const Rl=Sl;var Il=n(421),Pl=n.n(Il);const Ll=new vl,Al=new ca({source:Ll}),Ml=document.createElement("div");Ml.className="ol-control ol-unselectable locate",Ml.innerHTML='<button title="Locate me">◎</button>',Ml.addEventListener("click",(function(){let t=!0;navigator.geolocation.watchPosition((function(e){const n=[e.coords.longitude,e.coords.latitude],i=function(t,e,n,i){for(var r=[],o=0;o<32;++o)(0,nn.l7)(r,Ie(t,e,2*Math.PI*o/32,undefined));return r.push(r[0],r[1]),new Hn(r,fn,[r.length])}(n,e.coords.accuracy);var r;Ll.clear(!0),Ll.addFeatures([new wl(i.transform("EPSG:4326",Kl.getView().getProjection())),new wl(new Gn((r=n,Le(),We(r,"EPSG:4326","EPSG:3857"))))]),t&&(t=!1,Kl.getView().fit(Ll.getExtent(),{maxZoom:18,duration:500}))}),(function(t){alert(`ERROR: ${t.message}`)}),{enableHighAccuracy:!0})}));let Fl='&copy; <a href="https://www.o2online.de/service/netzabdeckung/" target="_blank">O2 Netzabdeckung</a>',kl="https://dccb7552-tiles.spatialbuzz.net/tiles/o2_de-v246/styles/o2_de_v246_",Dl='&copy; <a href="https://t-map.telekom.de" target="_blank">Telekom Netzabdeckung</a>',jl="https://t-map.telekom.de/arcgis/rest/services/public/coverage/MapServer",Zl='&copy; <a href="https://netmap.vodafone.de/cokart-client/index.html?lang=de&app=cokart_4x" target="_blank">Vodafone Netzkarte</a>',Nl="https://wifionic.de/vodafone-map/MapServer",Gl='&copy; <a href="https://app.wigeogis.com/kunden/tmobile/map.php" target="_blank">T-Mobile Speedmap</a>',zl="https://wifionic.de/magenta-at-map",Wl='&copy; <a href="https://scmplc.begasoft.ch/plcapp/pages/gis/netzabdeckung.jsf" target="_blank">Swisscom Mobilfunk-Abdeckung</a>',Xl="https://scmplc.begasoft.ch/plcapp/netzabdeckung/swisscom?layer=",Vl='&copy; <a href="https://www.salt.ch/de/coverage/" target="_blank">Salt Netzbdeckung</a',Yl="https://mapserver.salt.ch/public/gmaps";var Kl=new Or({target:"map",maxTilesLoading:512,controls:Ei().extend([new Rl,new fi.default({element:Ml}),new(Pl())({startActive:!0,activationMode:"click",reverse:!0})]),layers:[new Pt.default({title:"Grundkarte",layers:[new Eo({title:"OSM DE",type:"base",visible:!0,source:new ol({url:"https://gauss.openstreetmap.de/{z}/{x}/{y}.png",attributions:['Tiles &copy; <a href="https://openstreetmap.de/">OpenStreetMap - Deutschland</a>','© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.']})}),new Eo({title:"OSM",type:"base",visible:!0,source:new ll})]}),Al,new Pt.default({title:"CH",layers:[new Eo({title:"Swisscom: GSM",visible:!1,opacity:.3,source:new ol({url:Xl+"gsm&zoom={z}&x={x}&y={y}",attributions:[Wl],minZoom:3,maxZoom:23})}),new Eo({title:"Swisscom: UMTS",visible:!1,opacity:.3,source:new ol({url:Xl+"umts&zoom={z}&x={x}&y={y}",attributions:[Wl],minZoom:3,maxZoom:23})}),new Eo({title:"Swisscom: LTE",visible:!1,opacity:.3,source:new ol({url:Xl+"lte;lteAdvanced&zoom={z}&x={x}&y={y}",attributions:[Wl],minZoom:3,maxZoom:23})}),new Eo({title:"Swisscom: NR",visible:!1,opacity:.3,source:new ol({url:Xl+"newRadioWide;newRadioFast&zoom={z}&x={x}&y={y}",attributions:[Wl],minZoom:3,maxZoom:23})}),new Eo({title:"Sunrise",visible:!1,opacity:.3,source:new ol({url:"https://maps.sunrise.ch/cgi-bin/mapserv?map=/opt/app/data/sunrise_coverages_2019.map&LAYERS=coverage&mode=tile&tilemode=gmap&tile={x}+{y}+{z}",attributions:['&copy; <a href="https://www.sunrise.ch/de/privatkunden/mobil-abos/mobilnetz/netzabdeckung/netzabdeckungskarte.html" target="_blank">Sunrise Netzbdeckung</a>'],minZoom:3,maxZoom:23})}),new Eo({title:"Salt: GSM + UMTS",visible:!1,opacity:.3,source:new ol({url:Yl+"2G3G@GoogleMapsCompatible/{z}/{x}/{y}.png",attributions:[Vl],maxZoom:19})}),new Eo({title:"Salt: GSM + UMTS + LTE",visible:!1,opacity:.3,source:new ol({url:Yl+"2G3G4G@GoogleMapsCompatible/{z}/{x}/{y}.png",attributions:[Vl],maxZoom:19})})]}),new Pt.default({title:"AT",layers:[new Eo({title:"A1: Kombi-Layer",visible:!1,opacity:.7,source:new ol({url:"https://cdn2.a1.net/final/tiles/a1/LIVE/tiles-0/{z}/{x}/{y}.png",attributions:['&copy; <a href="https://www.a1.net/hilfe-support/netzabdeckung/" target="_blank">A1 Netzabdeckungz</a>'],maxZoom:10})}),new Eo({title:"Magenta: Internet",visible:!1,opacity:.7,source:new nl({url:zl,params:{LAYERS:"tmobile:tmobile",SLD:"http://appserverpu.wigeo.lan/kunden/tmobile/sld/internet.xml"},attributions:[Gl],maxZoom:10})}),new Eo({title:"Magenta: NR",visible:!1,opacity:.7,source:new nl({url:zl,params:{LAYERS:"tmobile:tmobile",SLD:"http://appserverpu.wigeo.lan/kunden/tmobile/sld/5g.xml"},attributions:[Gl],maxZoom:10})})]}),new Pt.default({title:"DE",layers:[new Yr({title:"Vodafone: GSM",visible:!1,opacity:.3,source:new Ta({url:Nl,params:{LAYERS:"show:4,5"},attributions:[Zl]})}),new Yr({title:"Vodafone: LTE",visible:!1,opacity:.3,source:new Ta({url:Nl,params:{LAYERS:"show:110"},attributions:[Zl]})}),new Yr({title:"Vodafone: NR",visible:!1,opacity:.3,source:new Ta({url:Nl,params:{LAYERS:"show:105"},attributions:[Zl]})}),new Yr({title:"Telekom: GSM",visible:!1,opacity:.3,source:new Ta({url:jl,ratio:1,params:{LAYERS:"show:5"},attributions:[Dl]})}),new Yr({title:"Telekom: LTE",visible:!1,opacity:.3,source:new Ta({url:jl,ratio:1,params:{LAYERS:"show:3"},attributions:[Dl]})}),new Yr({title:"Telekom: NR",visible:!1,opacity:.3,source:new Ta({url:jl,ratio:1,params:{LAYERS:"show:6"},attributions:[Dl]})}),new Eo({title:"o2: GSM",visible:!1,opacity:.3,source:new ol({url:kl+"2g/{z}/{x}/{y}.png",attributions:[Fl],minZoom:11,maxZoom:19})}),new Eo({title:"o2: UMTS",visible:!1,opacity:.3,source:new ol({url:kl+"3g/{z}/{x}/{y}.png",attributions:[Fl],minZoom:11,maxZoom:19})}),new Eo({title:"o2: LTE",visible:!1,opacity:.3,source:new ol({url:kl+"4g/{z}/{x}/{y}.png",attributions:[Fl],minZoom:11,maxZoom:19})}),new Eo({title:"o2: NR",visible:!1,opacity:.3,source:new ol({url:kl+"5g/{z}/{x}/{y}.png",attributions:[Fl],minZoom:11,maxZoom:19})})]}),new Eo({title:"Bahnstrecken",visible:!1,source:new ol({url:"https://{a-c}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png",attributions:['Tiles &copy; <a href="https://openrailwaymaps.org/">OpenRailwayMaps</a>','© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.']})})],view:new ii({center:We([10.15,54.397],"EPSG:4326","EPSG:3857"),zoom:11})})})()})();+
\ No newline at end of file
diff --git a/main.js b/main.js
@@ -120,15 +120,6 @@ var map = new Map({
 
 		ownLocationLayer,
 
-		new LayerTile({
-			title: 'Bahnstrecken',
-			visible: false,
-			source: new SourceXYZ({
-				url: "https://c.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png",
-				attributions: [ 'Tiles &copy; <a href="https://openrailwaymaps.org/">OpenRailwayMaps</a>', '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.' ]
-			})
-		}),
-
 
 
 		//

@@ -434,7 +425,19 @@ var map = new Map({
 					})
 				})
 			]
+		}),
+
+
+
+		new LayerTile({
+			title: 'Bahnstrecken',
+			visible: false,
+			source: new SourceXYZ({
+				url: "https://{a-c}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png",
+				attributions: [ 'Tiles &copy; <a href="https://openrailwaymaps.org/">OpenRailwayMaps</a>', '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.' ]
+			})
 		})
+
 	],
 
 	view: new View({