/*! For license information please see farmOS-map.js.LICENSE.txt */ (()=>{var t,e,n,i,r={3965:function(t,e,n){t.exports=function(t,e,n,i,r,o,s,a){"use strict";function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(t),c=l(e),h=l(n),p=l(i),f=l(r),d=l(o),g=l(s),_=function(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}(a),y="gcd-container",v="gcd-button-control",m="gcd-input-query",x="gcd-input-label",E="gcd-input-search",C={namespace:"ol-geocoder",spin:"gcd-pseudo-rotate",hidden:"gcd-hidden",address:"gcd-address",country:"gcd-country",city:"gcd-city",road:"gcd-road",olControl:"ol-control",glass:{container:"gcd-gl-container",control:"gcd-gl-control",button:"gcd-gl-btn",input:"gcd-gl-input",expanded:"gcd-gl-expanded",search:"gcd-gl-search",result:"gcd-gl-result"},inputText:{container:"gcd-txt-container",control:"gcd-txt-control",label:"gcd-txt-label",input:"gcd-txt-input",search:"gcd-txt-search",icon:"gcd-txt-glass",result:"gcd-txt-result"}},w={containerId:y,buttonControlId:v,inputQueryId:m,inputLabelId:x,inputSearchId:E,cssClasses:C};const T=Object.freeze({__proto__:null,containerId:y,buttonControlId:v,inputQueryId:m,inputLabelId:x,inputSearchId:E,cssClasses:C,default:w}),S="addresschosen",O="nominatim",b="reverse",R="glass-button",P="osm",I={provider:P,label:"",placeholder:"Search for an address",featureStyle:null,targetType:R,lang:"en-US",limit:5,keepOpen:!1,preventDefault:!1,preventPanning:!1,preventMarker:!1,defaultFlyResolution:10,debug:!1};function L(t,e="Assertion failed"){if(!t){if("undefined"!=typeof Error)throw new Error(e);throw e}}function M(t){const e=function(){if("performance"in window==0&&(window.performance={}),"now"in window.performance==0){let t=Date.now();performance.timing&&performance.timing.navigationStart&&(t=performance.timing.navigationStart),window.performance.now=()=>Date.now()-t}return window.performance.now()}().toString(36);return t?t+e:e}function A(t){return/^\d+$/u.test(t)}function Z(t,e,n){if(Array.isArray(t))return void t.forEach((t=>Z(t,e)));const i=Array.isArray(e)?e:e.split(/\s+/u);let r=i.length;for(;r--;)N(t,i[r])||j(t,i[r],n)}function F(t,e,n){if(Array.isArray(t))return void t.forEach((t=>F(t,e,n)));const i=Array.isArray(e)?e:e.split(/\s+/u);let r=i.length;for(;r--;)N(t,i[r])&&G(t,i[r],n)}function N(t,e){return t.classList?t.classList.contains(e):D(e).test(t.className)}function k(t,e){let n;if(Array.isArray(t)){if(n=document.createElement(t[0]),t[1].id&&(n.id=t[1].id),t[1].classname&&(n.className=t[1].classname),t[1].attr){const{attr:e}=t[1];if(Array.isArray(e)){let t=-1;for(;++tG(t,e)),n)}function G(t,e,n){t.classList?t.classList.remove(e):t.className=t.className.replace(D(e)," ").trim(),n&&A(n)&&window.setTimeout((()=>j(t,e)),n)}const X=T.cssClasses;class Y{constructor(t){this.options=t,this.els=this.createControl()}createControl(){let t,e,n;return"text-input"===this.options.targetType?(e=`${X.namespace} ${X.inputText.container}`,t=k(["div",{id:T.containerId,classname:e}],Y.input),n={container:t,control:t.querySelector(`.${X.inputText.control}`),label:t.querySelector(`.${X.inputText.label}`),input:t.querySelector(`.${X.inputText.input}`),search:t.querySelector(`.${X.inputText.search}`),result:t.querySelector(`.${X.inputText.result}`)},n.label.innerHTML=this.options.label):(e=`${X.namespace} ${X.glass.container}`,t=k(["div",{id:T.containerId,classname:e}],Y.glass),n={container:t,control:t.querySelector(`.${X.glass.control}`),button:t.querySelector(`.${X.glass.button}`),input:t.querySelector(`.${X.glass.input}`),search:t.querySelector(`.${X.glass.search}`),result:t.querySelector(`.${X.glass.result}`)}),n.input.placeholder=this.options.placeholder,n}}function U(t){return new Promise(((e,n)=>{const i=function(t,e){return e&&"object"==typeof e&&(t+=(/\?/u.test(t)?"&":"?")+W(e)),t}(t.url,t.data);t.jsonp?function(t,e,n){const{head:i}=document,r=document.createElement("script"),o=`f${Math.round(Math.random()*Date.now())}`;r.setAttribute("src",`${t+(t.indexOf("?")>0?"&":"?")+e}=${o}`),window[o]=t=>{window[o]=void 0,setTimeout((()=>i.removeChild(r)),0),n(t)},i.append(r)}(i,t.callbackName,e):fetch(i,{method:"GET",mode:"cors",credentials:"same-origin"}).then((t=>t.json())).then(e).catch(n)}))}function W(t){return Object.keys(t).reduce(((e,n)=>(e.push("object"==typeof t[n]?W(t[n]):`${encodeURIComponent(n)}=${encodeURIComponent(t[n])}`),e)),[]).join("&")}Y.glass=`\n
\n \n \n \n
\n \n`,Y.input=`\n
\n \n \n \n \n
\n \n`;class z{constructor(){this.settings={url:"https://photon.komoot.io/api/",params:{q:"",limit:10,lang:"en"},langs:["de","it","fr","en"]}}getParameters(t){return t.lang=t.lang.toLowerCase(),{url:this.settings.url,params:{q:t.query,limit:t.limit||this.settings.params.limit,lang:this.settings.langs.includes(t.lang)?t.lang:this.settings.params.lang}}}handleResponse(t){return 0===t.features.length?[]:t.features.map((t=>({lon:t.geometry.coordinates[0],lat:t.geometry.coordinates[1],address:{name:t.properties.name,postcode:t.properties.postcode,city:t.properties.city,state:t.properties.state,country:t.properties.country},original:{formatted:t.properties.name,details:t.properties}})))}}class B{constructor(t){this.settings={url:"https://nominatim.openstreetmap.org/search",...t,params:{q:"",format:"json",addressdetails:1,limit:10,countrycodes:"",viewbox:"","accept-language":"en-US"}}}getParameters(t){return{url:this.settings.url,params:{q:t.query,format:this.settings.params.format,addressdetails:this.settings.params.addressdetails,limit:t.limit||this.settings.params.limit,countrycodes:t.countrycodes||this.settings.params.countrycodes,viewbox:t.viewbox||this.settings.params.viewbox,"accept-language":t.lang||this.settings.params["accept-language"]}}}handleResponse(t){return 0===t.length?[]:t.map((t=>({lon:t.lon,lat:t.lat,bbox:t.boundingbox,address:{name:t.display_name,road:t.address.road||"",houseNumber:t.address.house_number||"",postcode:t.address.postcode,city:t.address.city||t.address.town,state:t.address.state,country:t.address.country},original:{formatted:t.display_name,details:t.address}})))}}class V{constructor(){this.settings={url:"https://open.mapquestapi.com/nominatim/v1/search.php",params:{q:"",key:"",format:"json",addressdetails:1,limit:10,countrycodes:"","accept-language":"en-US"}}}getParameters(t){return{url:this.settings.url,params:{q:t.query,key:t.key,format:"json",addressdetails:1,limit:t.limit||this.settings.params.limit,countrycodes:t.countrycodes||this.settings.params.countrycodes,"accept-language":t.lang||this.settings.params["accept-language"]}}}handleResponse(t){return 0===t.length?[]:t.map((t=>({lon:t.lon,lat:t.lat,address:{name:t.address.neighbourhood||"",road:t.address.road||"",postcode:t.address.postcode,city:t.address.city||t.address.town,state:t.address.state,country:t.address.country},original:{formatted:t.display_name,details:t.address}})))}}class K{constructor(){this.settings={url:"https://dev.virtualearth.net/REST/v1/Locations",callbackName:"jsonp",params:{query:"",key:"",includeNeighborhood:0,maxResults:10}}}getParameters(t){return{url:this.settings.url,callbackName:this.settings.callbackName,params:{query:t.query,key:t.key,includeNeighborhood:t.includeNeighborhood||this.settings.params.includeNeighborhood,maxResults:t.maxResults||this.settings.params.maxResults}}}handleResponse(t){const{resources:e}=t.resourceSets[0];return 0===e.length?[]:e.map((t=>({lon:t.point.coordinates[1],lat:t.point.coordinates[0],address:{name:t.name},original:{formatted:t.address.formattedAddress,details:t.address}})))}}class q{constructor(){this.settings={url:"https://api.opencagedata.com/geocode/v1/json?",params:{q:"",key:"",limit:10,countrycode:"",pretty:1,no_annotations:1}}}getParameters(t){return{url:this.settings.url,params:{q:t.query,key:t.key,limit:t.limit||this.settings.params.limit,countrycode:t.countrycodes||this.settings.params.countrycodes}}}handleResponse(t){return 0===t.results.length?[]:t.results.map((t=>({lon:t.geometry.lng,lat:t.geometry.lat,address:{name:t.components.house_number||"",road:t.components.road||"",postcode:t.components.postcode,city:t.components.city||t.components.town,state:t.components.state,country:t.components.country},original:{formatted:t.formatted,details:t.components}})))}}const H=T.cssClasses;class ${constructor(t,e){this.Base=t,this.layerName=M("geocoder-layer-"),this.layer=new p.default({name:this.layerName,source:new f.default,displayInLayerSwitcher:!1}),this.options=t.options,this.options.provider="string"==typeof this.options.provider?this.options.provider.toLowerCase():this.options.provider,this.provider=this.newProvider(),this.els=e,this.lastQuery="",this.container=this.els.container,this.registeredListeners={mapClick:!1},this.setListeners()}setListeners(){this.els.input.addEventListener("keypress",(t=>{const e=t.target.value.trim();(t.key?"Enter"===t.key:t.which?13===t.which:t.keyCode&&13===t.keyCode)&&(t.preventDefault(),this.query(e))}),!1),this.els.input.addEventListener("click",(t=>t.stopPropagation()),!1),this.els.input.addEventListener("input",(t=>{0!==t.target.value.trim().length?F(this.els.search,H.hidden):Z(this.els.search,H.hidden)}),!1),this.els.search.addEventListener("click",(()=>{this.els.input.focus(),this.query(this.els.input.value)}),!1),this.options.targetType===R&&this.els.button.addEventListener("click",(t=>{t.stopPropagation(),N(this.els.control,H.glass.expanded)?this.collapse():this.expand()}),!1)}query(t){this.provider||(this.provider=this.newProvider());const e=this.provider.getParameters({query:t,key:this.options.key,lang:this.options.lang,countrycodes:this.options.countrycodes,viewbox:this.options.viewbox,limit:this.options.limit});if(this.lastQuery===t&&this.els.result.firstChild)return;this.lastQuery=t,this.clearResults(),Z(this.els.search,H.spin);const n={url:e.url,data:e.params};e.callbackName&&(n.jsonp=!0,n.callbackName=e.callbackName),U(n).then((t=>{this.options.debug&&console.info(t),F(this.els.search,H.spin);const e=this.provider.handleResponse(t);e&&(this.createList(e),this.listenMapClick())})).catch((()=>{F(this.els.search,H.spin);const t=k("li","
Error! No internet connection?
");this.els.result.append(t)}))}createList(t){const e=this.els.result;t.forEach((n=>{let i;if(i=this.options.provider===P?`${n.address.name}`:this.addressTemplate(n.address),1==t.length)this.chosen(n,i,n.address,n.original);else{const t=k("li",`${i}`);t.addEventListener("click",(t=>{t.preventDefault(),this.chosen(n,i,n.address,n.original)}),!1),e.append(t)}}))}chosen(t,e,n,i){const r=this.Base.getMap(),o=[Number.parseFloat(t.lon),Number.parseFloat(t.lat)],s=r.getView().getProjection(),a=_.transform(o,"EPSG:4326",s);let{bbox:l}=t;l&&(l=_.transformExtent([parseFloat(l[2]),parseFloat(l[0]),parseFloat(l[3]),parseFloat(l[1])],"EPSG:4326",s));const u={formatted:e,details:n,original:i};if(!1===this.options.keepOpen&&this.clearResults(!0),!0===this.options.preventDefault||!0===this.options.preventMarker)this.Base.dispatchEvent({type:S,address:u,coordinate:a,bbox:l,place:t});else{const e=this.createFeature(a,u);this.Base.dispatchEvent({type:S,address:u,feature:e,coordinate:a,bbox:l,place:t})}!0!==this.options.preventDefault&&!0!==this.options.preventPanning&&(l?r.getView().fit(l,{duration:500}):r.getView().animate({center:a,resolution:this.options.defaultFlyResolution,duration:500}))}createFeature(t){const e=new g.default(new d.default(t));return this.addLayer(),e.setStyle(this.options.featureStyle),e.setId(M("geocoder-ft-")),this.getSource().addFeature(e),e}addressTemplate(t){const e=[];return t.name&&e.push(['{name}'].join("")),(t.road||t.building||t.house_number)&&e.push(['{building} {road} {house_number}'].join("")),(t.city||t.town||t.village)&&e.push(['{postcode} {city} {town} {village}'].join("")),(t.state||t.country)&&e.push(['{state} {country}'].join("")),function(t,e){return t.replace(/\{\s*([\w-]+)\s*\}/gu,((t,n)=>{const i=void 0===e[n]?"":e[n];return String(i).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}))}(e.join("
"),t)}newProvider(){switch(this.options.provider){case P:return new B(this.options);case"mapquest":return new V;case"photon":return new z;case"bing":return new K;case"opencage":return new q;default:return this.options.provider}}expand(){F(this.els.input,H.spin),Z(this.els.control,H.glass.expanded),window.setTimeout((()=>this.els.input.focus()),100),this.listenMapClick()}collapse(){this.els.input.value="",this.els.input.blur(),Z(this.els.search,H.hidden),F(this.els.control,H.glass.expanded),this.clearResults()}listenMapClick(){if(this.registeredListeners.mapClick)return;const t=this,e=this.Base.getMap().getTargetElement();this.registeredListeners.mapClick=!0,e.addEventListener("click",{handleEvent(n){t.clearResults(!0),e.removeEventListener(n.type,this,!1),t.registeredListeners.mapClick=!1}},!1)}clearResults(t){t&&this.options.targetType===R?this.collapse():function(t){for(;t.firstChild;)t.firstChild.remove()}(this.els.result)}getSource(){return this.layer.getSource()}addLayer(){let t=!1;const e=this.Base.getMap();e.getLayers().forEach((e=>{e===this.layer&&(t=!0)})),t||e.addLayer(this.layer)}}class J extends u.default{constructor(t=O,e){L("string"==typeof t,"@param `type` should be string!"),L(t===O||t===b,`@param 'type' should be '${O}'\n or '${b}'!`);const n={...I,featureStyle:[new c.default({image:new h.default({scale:.7,src:"//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png"})})],...e};let i,r;const o=new Y(n);if(t===O&&(i=o.els.container),super({element:i,...n}),!(this instanceof J))return new J;this.options=n,this.container=i,t===O&&(r=new $(this,o.els),this.layer=r.layer)}getLayer(){return this.layer}getSource(){return this.getLayer().getSource()}setProvider(t){this.options.provider=t}setProviderKey(t){this.options.key=t}}return J}(n(8775),n(7539),n(4115),n(9271),n(933),n(188),n(1090),n(2290))},6421: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;ne.getMaxResolution()||y=0?t:"children"}}]),s}(t);return window.ol&&window.ol.control&&(window.ol.control.LayerSwitcher=s),s}(n(8775),n(2706),n(8734))},3437:function(t,e,n){t.exports=function(t){"use strict";t="default"in t?t.default:t;var e=function(){function t(t,e){for(var n=0;nr;){if(o-r>600){var a=o-r+1,l=i-r+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(r,Math.floor(i-l*c/a+h)),Math.min(o,Math.floor(i+(a-l)*c/a+h)),s)}var p=n[i],f=r,d=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);f0;)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 te?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=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=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,h,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),h=Math.min(r.maxY,o.maxY),Math.max(0,u-a)*Math.max(0,h-l)),v=c(g)+c(_);y=e;f--){var d=t.children[f];a(l,t.leaf?r(d):d),u+=h(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}()},3126:(t,e,n)=>{"use strict";function i(t){return{attach:async(e,i)=>n(2226)(`./${t}`).then((t=>{t.default.attach(e,i)}))}}n.r(e),n.d(e,{default:()=>r});const r={edit:i("edit"),layerSwitcherInSidePanel:i("layerSwitcherInSidePanel"),loading:i("loading"),measure:i("measure"),rememberLayer:i("rememberLayer"),sidePanel:i("sidePanel"),snappingGrid:i("snappingGrid")}},2226:(t,e,n)=>{var i={"./":[3126],"./edit":[2832,807,243,723],"./edit.js":[2832,807,243,723],"./index":[3126],"./index.js":[3126],"./layerSwitcherInSidePanel":[9444,553],"./layerSwitcherInSidePanel.css":[7493,285],"./layerSwitcherInSidePanel.js":[9444,553],"./loading":[4593,330],"./loading.css":[300,687],"./loading.js":[4593,330],"./measure":[1868,92],"./measure.css":[9338,412],"./measure.js":[1868,92],"./rememberLayer":[8481,32],"./rememberLayer.js":[8481,32],"./sidePanel":[856,103],"./sidePanel.css":[8957,395],"./sidePanel.js":[856,103],"./snappingGrid":[9899,807,663],"./snappingGrid.js":[9899,807,663]};function r(t){if(!n.o(i,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=i[t],r=e[0];return Promise.all(e.slice(1).map(n.e)).then((()=>n(r)))}r.keys=()=>Object.keys(i),r.id=2226,t.exports=r},8813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}},5037:(t,e,n)=>{void 0!==window.farmosMapPublicPath&&(n.p=window.farmosMapPublicPath)},7673:(t,e,n)=>{"use strict";function i(t,e){t.getLayers().forEach(((t,n,r)=>{e(t,n,r),t.getLayers&&i(t,e)}))}n.d(e,{Z:()=>i})},3945:(t,e,n)=>{"use strict";n.d(e,{Yt:()=>d});var i=n(2083),r=n(2033),o=n(7580);const s=1,a=.001,l=3.28084,u=.0006213712,c=1,h=1e-4,p=10.76391,f=.0002471052;function d(t,e="metric"){let n;return n=t instanceof r.ZP?function(t,e="metric"){const n=(0,o.getArea)(t);switch(e){case"metric":return n*h>.25?`${(n*h).toFixed(2)} ha`:`${(n*c).toFixed(0)} m2`;case"us":return n*f>.25?`${(n*f).toFixed(2)} ac`:`${(n*p).toFixed(0)} ft2`;default:return""}}(t,e):t instanceof i.Z?function(t,e="metric"){const n=(0,o.getLength)(t);switch(e){case"metric":return n*a>.25?`${(n*a).toFixed(2)} km`:`${(n*s).toFixed(0)} m`;case"us":return n*u>.25?`${(n*u).toFixed(2)} mi`:`${(n*l).toFixed(0)} ft`;default:return""}}(t,e):"",n}},6813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i,r=n(4187),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)},8714:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i,r=n(6813),o=n(2971),s=n(2071),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",c=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 h=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;o0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e{"use strict";n.d(e,{Z:()=>i});const i={ADD:"add",REMOVE:"remove"}},5431:(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}()},1090:(t,e,n)=>{"use strict";n.r(e),n.d(e,{createStyleFunction:()=>u,default:()=>c});var i,r=n(2971),o=n(5487),s=n(9515),a=n(5818),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)});function u(t){return"function"==typeof t?t:(Array.isArray(t)?e=t:((0,s.h)("function"==typeof t.getZIndex,41),e=[t]),function(){return e});var e}const c=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 l(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,a.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=(0,a.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?u(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}(r.Z)},9807:(t,e,n)=>{"use strict";n.d(e,{K:()=>g});var i,r=n(5487),o=n(208),s=n(4187),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(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 a(e,t),e.prototype.changed=function(){this.dispatchEvent(r.Z.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return(0,s.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,s.O3)()},e}(o.Z);const u=l;var c=n(553),h=n(177),p=n(8641),f=n(5818),d=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 g(t,e,n){var i=t,o=!0,s=!1,a=!1,l=[(0,f.Vx)(i,r.Z.LOAD,(function(){a=!0,s||e()}))];return i.src&&h.Tp?(s=!0,i.decode().then((function(){o&&e()})).catch((function(t){o&&(a?e():n())}))):l.push((0,f.Vx)(i,r.Z.ERROR,n)),function(){o=!1,l.forEach(f.bN)}}!function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,i,c.Z.IDLE)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=c.Z.IDLE,a.imageLoadFunction_=s,a}d(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=c.Z.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=(0,p.getHeight)(this.extent)/this.image_.height),this.state=c.Z.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=c.Z.IDLE&&this.state!=c.Z.ERROR||(this.state=c.Z.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=g(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=(0,p.getHeight)(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(u)},553:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},8630:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i,r=n(3536),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,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 o(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}(r.Z)},2217:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(5487);const r={SINGLECLICK:"singleclick",CLICK:i.Z.CLICK,DBLCLICK:i.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},3536:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i,r=n(291),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,n,i){var r=t.call(this,e)||this;return r.map=n,r.frameState=void 0!==i?i:null,r}return o(e,t),e}(r.ZP)},2126:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},2971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i,r=n(291),o=n(5990),s=n(2706),a=n(9374),l=n(4187),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)}),c=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 h=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 c(n,t,e)),n=o.Z.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new c(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)},5990:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={PROPERTYCHANGE:"propertychange"}},2706:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>c,unByKey:()=>u});var i,r=n(208),o=n(5487),s=n(5818),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{"use strict";n.r(e),n.d(e,{default:()=>x});var i=n(2971),r=n(2126);const o="bottom-center",s="bottom-right",a="center-center",l="center-right";var u,c=n(245),h=n(8641),p=n(5818),f=n(8326),d=(u=function(t,e){return u=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])},u(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}u(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g="element",_="map",y="offset",v="position",m="positioning";const x=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.options=e,n.id=e.id,n.insertFirst=void 0===e.insertFirst||e.insertFirst,n.stopEvent=void 0===e.stopEvent||e.stopEvent,n.element=document.createElement("div"),n.element.className=void 0!==e.className?e.className:"ol-overlay-container "+c.$A,n.element.style.position="absolute",n.element.style.pointerEvents="auto";var i=e.autoPan;return i&&"object"!=typeof i&&(i={animation:e.autoPanAnimation,margin:e.autoPanMargin}),n.autoPan=i||!1,n.rendered={transform_:"",visible:!0},n.mapPostrenderListenerKey=null,n.addChangeListener(g,n.handleElementChanged),n.addChangeListener(_,n.handleMapChanged),n.addChangeListener(y,n.handleOffsetChanged),n.addChangeListener(v,n.handlePositionChanged),n.addChangeListener(m,n.handlePositioningChanged),void 0!==e.element&&n.setElement(e.element),n.setOffset(void 0!==e.offset?e.offset:[0,0]),n.setPositioning(void 0!==e.positioning?e.positioning:"top-left"),void 0!==e.position&&n.setPosition(e.position),n}return d(e,t),e.prototype.getElement=function(){return this.get(g)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(_)||null},e.prototype.getOffset=function(){return this.get(y)},e.prototype.getPosition=function(){return this.get(v)},e.prototype.getPositioning=function(){return this.get(m)},e.prototype.handleElementChanged=function(){(0,f.ep)(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&((0,f.ZF)(this.element),(0,p.bN)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,p.oL)(t,r.Z.POSTRENDER,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(g,t)},e.prototype.setMap=function(t){this.set(_,t)},e.prototype.setOffset=function(t){this.set(y,t)},e.prototype.setPosition=function(t){this.set(v,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get(v)){var n=this.getRect(e.getTargetElement(),e.getSize()),i=this.getElement(),r=this.getRect(i,[(0,f.iO)(i),(0,f.Pb)(i)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!(0,h.containsExtent)(n,r)){var a=r[0]-n[0],l=n[2]-r[2],u=r[1]-n[1],c=n[3]-r[3],p=[0,0];if(a<0?p[0]=a-s:l<0&&(p[0]=Math.abs(l)+s),u<0?p[1]=u-s:c<0&&(p[1]=Math.abs(c)+s),0!==p[0]||0!==p[1]){var d=e.getView().getCenterInternal(),g=e.getPixelFromCoordinateInternal(d);if(!g)return;var _=[g[0]+p[0],g[1]+p[1]],y=o.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(_),duration:y.duration,easing:y.easing})}}}},e.prototype.getRect=function(t,e){var n=t.getBoundingClientRect(),i=n.left+window.pageXOffset,r=n.top+window.pageYOffset;return[i,r,i+e[0],r+e[1]]},e.prototype.setPositioning=function(t){this.set(m,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var n=t.getPixelFromCoordinate(e),i=t.getSize();this.updateRenderedPosition(n,i)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var n=this.element.style,i=this.getOffset(),r=this.getPositioning();this.setVisible(!0);var u=Math.round(t[0]+i[0])+"px",c=Math.round(t[1]+i[1])+"px",h="0%",p="0%";r==s||r==l||"top-right"==r?h="-100%":r!=o&&r!=a&&"top-center"!=r||(h="-50%"),"bottom-left"==r||r==o||r==s?p="-100%":"center-left"!=r&&r!=a&&r!=l||(p="-50%");var f="translate(".concat(h,", ").concat(p,") translate(").concat(u,", ").concat(c,")");this.rendered.transform_!=f&&(this.rendered.transform_=f,n.transform=f,n.msTransform=f)},e.prototype.getOptions=function(){return this.options},e}(i.Z)},7755:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={ANIMATING:0,INTERACTING:1}},5537:(t,e,n)=>{"use strict";function i(t,e,n){for(var i,o,s=n||r,a=0,l=t.length,u=!1;a>1)],e))<0?a=i+1:(l=i,u=!o);return u?a:~a}function r(t,e){return t>e?1:t=0}function s(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;r0?r-1:r:t[r-1]-e0||n&&0===o)}))}n.d(e,{FZ:()=>a,fS:()=>u,h7:()=>s,kK:()=>r,l7:()=>l,pT:()=>c,q9:()=>o,ry:()=>i})},9515:(t,e,n)=>{"use strict";n.d(e,{h:()=>r});var i=n(6813);function r(t,e){if(!t)throw new i.Z(e)}},9706:(t,e,n)=>{"use strict";n.d(e,{BB:()=>f,XC:()=>a,_2:()=>h});var i=n(9515),r=n(3983),o=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,s=/^([a-z]*)$|^hsla?\(.*\)$/i;function a(t){return"string"==typeof t?t:f(t)}var l,u,c=(l={},u=0,function(t){var e;if(l.hasOwnProperty(t))e=l[t];else{if(u>=1024){var n=0;for(var r in l)0==(3&n++)&&(delete l[r],--u)}e=function(t){var e,n,r,a,l;if(s.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)),o.exec(t)){var u,c=t.length-1;u=c<=4?1:2;var h=4===c||8===c;e=parseInt(t.substr(1+0*u,u),16),n=parseInt(t.substr(1+1*u,u),16),r=parseInt(t.substr(1+2*u,u),16),a=h?parseInt(t.substr(1+3*u,u),16):255,1==u&&(e=(e<<4)+e,n=(n<<4)+n,r=(r<<4)+r,h&&(a=(a<<4)+a)),l=[e,n,r,a/255]}else 0==t.indexOf("rgba(")?p(l=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((l=t.slice(4,-1).split(",").map(Number)).push(1),p(l)):(0,i.h)(!1,14);return l}(t),l[t]=e,++u}return e});function h(t){return Array.isArray(t)?t:c(t)}function p(t){return t[0]=(0,r.uZ)(t[0]+.5|0,0,255),t[1]=(0,r.uZ)(t[1]+.5|0,0,255),t[2]=(0,r.uZ)(t[2]+.5|0,0,255),t[3]=(0,r.uZ)(t[3],0,1),t}function f(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)+")"}},6620:(t,e,n)=>{"use strict";n.d(e,{y:()=>r});var i=n(9706);function r(t){return Array.isArray(t)?(0,i.BB)(t):t}},8775:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>c});var i,r=n(2971),o=n(2126),s=n(6885),a=n(5818),l=n(8326),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 c=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{"use strict";n.d(e,{Bs:()=>p,Cf:()=>f,Ed:()=>o,IH:()=>r,TE:()=>h,U1:()=>l,bA:()=>u,bI:()=>c,fS:()=>a,jk:()=>d,oL:()=>s});var i=n(8641);function r(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function o(t,e){var n=e.getRadius(),i=e.getCenter(),r=i[0],o=i[1],s=t[0]-r,a=t[1]-o;0===s&&0===a&&(s=1);var l=Math.sqrt(s*s+a*a);return[r+n*s/l,o+n*a/l]}function s(t,e){var n,i,r=t[0],o=t[1],s=e[0],a=e[1],l=s[0],u=s[1],c=a[0],h=a[1],p=c-l,f=h-u,d=0===p&&0===f?0:(p*(r-l)+f*(o-u))/(p*p+f*f||0);return d<=0?(n=l,i=u):d>=1?(n=c,i=h):(n=l+d*p,i=u+d*f),[n,i]}function a(t,e){for(var n=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function l(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 u(t,e){return t[0]*=e,t[1]*=e,t}function c(t,e){var n=t[0]-e[0],i=t[1]-e[1];return n*n+i*i}function h(t,e){return Math.sqrt(c(t,e))}function p(t,e){return c(t,s(t,e))}function f(t,e){if(e.canWrapX()){var n=(0,i.getWidth)(e.getExtent()),r=d(t,e,n);r&&(t[0]-=r*n)}return t}function d(t,e,n){var r=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]r[2])){var s=n||(0,i.getWidth)(r);o=Math.floor((t[0]-r[0])/s)}return o}},245:(t,e,n)=>{"use strict";n.d(e,{$A:()=>r,Qi:()=>s,XV:()=>o,Xy:()=>p,hN:()=>l,hg:()=>a,oj:()=>i,p:()=>h});var i="ol-hidden",r="ol-selectable",o="ol-unselectable",s="ol-unsupported",a="ol-control",l="ol-collapsed",u=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"),c=["style","variant","weight","size","lineHeight","family"],h=function(t){var e=t.match(u);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,r=c.length;i{"use strict";n.d(e,{$H:()=>a,E4:()=>r,Pb:()=>s,ZF:()=>l,ep:()=>u,hF:()=>c,iO:()=>o});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){var e=t.offsetWidth,n=getComputedStyle(t);return e+(parseInt(n.marginLeft,10)+parseInt(n.marginRight,10))}function s(t){var e=t.offsetHeight,n=getComputedStyle(t);return e+(parseInt(n.marginTop,10)+parseInt(n.marginBottom,10))}function a(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function l(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function u(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function c(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))}}},1015:(t,e,n)=>{"use strict";function i(t){return Math.pow(t,3)}function r(t){return 1-i(1-t)}function o(t){return 3*t*t-2*t*t*t}function s(t){return t}n.d(e,{GE:()=>s,Vv:()=>r,YQ:()=>i,rd:()=>o})},5818:(t,e,n)=>{"use strict";n.d(e,{Vx:()=>o,bN:()=>s,oL:()=>r});var i=n(9374);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}()},5487:(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(5431),o=n(291),s=n(6885),a=n(9374),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 c=0,h=i.length;c0)},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)},8683:(t,e,n)=>{"use strict";n.d(e,{$6:()=>a,Bx:()=>h,Fi:()=>f,Kf:()=>d,Ko:()=>l,QL:()=>v,TN:()=>y,Xp:()=>m,aj:()=>u,rM:()=>g,v8:()=>p,vY:()=>_,yZ:()=>c});var i=n(2217),r=n(6885),o=n(177),s=n(9515);function a(t){var e=arguments;return function(t){for(var n=!0,i=0,r=e.length;i{"use strict";n.r(e),n.d(e,{applyTransform:()=>H,approximatelyEquals:()=>C,boundingExtent:()=>s,buffer:()=>a,clone:()=>l,closestSquaredDistanceXY:()=>u,containsCoordinate:()=>c,containsExtent:()=>h,containsXY:()=>p,coordinateRelationship:()=>f,createEmpty:()=>d,createOrUpdate:()=>g,createOrUpdateEmpty:()=>_,createOrUpdateFromCoordinate:()=>y,createOrUpdateFromCoordinates:()=>v,createOrUpdateFromFlatCoordinates:()=>m,createOrUpdateFromRings:()=>x,equals:()=>E,extend:()=>w,extendCoordinate:()=>T,extendCoordinates:()=>S,extendFlatCoordinates:()=>O,extendRings:()=>b,extendXY:()=>R,forEachCorner:()=>P,getArea:()=>I,getBottomLeft:()=>L,getBottomRight:()=>M,getCenter:()=>A,getCorner:()=>Z,getEnlargedArea:()=>F,getForViewAndSize:()=>N,getHeight:()=>k,getIntersection:()=>j,getIntersectionArea:()=>D,getMargin:()=>G,getSize:()=>X,getTopLeft:()=>Y,getTopRight:()=>U,getWidth:()=>W,intersects:()=>z,intersectsSegment:()=>q,isEmpty:()=>B,returnOrUpdate:()=>V,scaleFromCenter:()=>K,wrapX:()=>$});var i=n(9600),r=n(8716),o=n(9515);function s(t){for(var e=[1/0,1/0,-1/0,-1/0],n=0,i=t.length;no&&(u|=r.Z.RIGHT),ls&&(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){return S(_(e),t)}function m(t,e,n,i,r){return O(_(r),t,e,n,i)}function x(t,e){return b(_(e),t)}function E(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function C(t,e,n){return Math.abs(t[0]-e[0])t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function T(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function S(t,e){for(var n=0,i=e.length;ne[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function B(t){return t[2]=a&&y<=u),i||!(s&r.Z.RIGHT)||o&r.Z.RIGHT||(i=(v=g-(d-u)*_)>=l&&v<=c),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<=c)}return i}function H(t,e,n,i){var r=[];if(i>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a=n[2])){var r=W(n),o=Math.floor((i[0]-n[0])/r)*r;t[0]-=o,t[2]-=o}return t}},9600:(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"}},8716:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},7537:(t,e,n)=>{"use strict";n.d(e,{Be:()=>s,Nn:()=>a});var i=n(6617),r=n(6885),o=!1;function s(t,e){return function(n,s,a,l,u){var c=this;!function(t,e,n,r,s,a,l){var u=new XMLHttpRequest;u.open("GET","function"==typeof t?t(n,r,s):t,!0),e.getType()==i.Z.ARRAY_BUFFER&&(u.responseType="arraybuffer"),u.withCredentials=o,u.onload=function(t){if(!u.status||u.status>=200&&u.status<300){var r=e.getType(),o=void 0;r==i.Z.JSON||r==i.Z.TEXT?o=u.responseText:r==i.Z.XML?(o=u.responseXML)||(o=(new DOMParser).parseFromString(u.responseText,"application/xml")):r==i.Z.ARRAY_BUFFER&&(o=u.response),o?a(e.readFeatures(o,{extent:n,featureProjection:s}),e.readProjection(o)):l()}else l()},u.onerror=l,u.send()}(t,e,n,s,a,(function(t,e){c.addFeatures(t),void 0!==l&&l(t)}),u||r.Zn)}}function a(t){o=t}},9646:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>a,fI:()=>l});var i=n(8375),r=n(4187),o=n(9374),s=n(2290);const a=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return t.prototype.getReadOptions=function(t,e){var n;if(e){var r=e.dataProjection?(0,s.get)(e.dataProjection):this.readProjection(t);e.extent&&r&&r.getUnits()===i.ZP.TILE_PIXELS&&(r=(0,s.get)(r)).setWorldExtent(e.extent),n={dataProjection:r,featureProjection:e.featureProjection}}return this.adaptOptions(n)},t.prototype.adaptOptions=function(t){return(0,o.f0)({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return(0,r.O3)()},t.prototype.readFeature=function(t,e){return(0,r.O3)()},t.prototype.readFeatures=function(t,e){return(0,r.O3)()},t.prototype.readGeometry=function(t,e){return(0,r.O3)()},t.prototype.readProjection=function(t){return(0,r.O3)()},t.prototype.writeFeature=function(t,e){return(0,r.O3)()},t.prototype.writeFeatures=function(t,e){return(0,r.O3)()},t.prototype.writeGeometry=function(t,e){return(0,r.O3)()},t}();function l(t,e,n){var i,r=n?(0,s.get)(n.featureProjection):null,o=n?(0,s.get)(n.dataProjection):null;if(i=r&&o&&!(0,s.equivalent)(r,o)?(e?t.clone():t).transform(e?r:o,e?o:r):t,e&&n&&void 0!==n.decimals){var a=Math.pow(10,n.decimals);i===t&&(i=t.clone()),i.applyTransform((function(t){for(var e=0,n=t.length;e{"use strict";n.d(e,{Z:()=>i});const i={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"}},9466:(t,e,n)=>{"use strict";n.d(e,{Z:()=>S});var i,r=n(1090),o=n(3958),s=n(4754),a=n(9646),l=n(6617),u=n(4187),c=(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)});function h(t){return"string"==typeof t?JSON.parse(t)||null:null!==t?t:null}const p=function(t){function e(){return t.call(this)||this}return c(e,t),e.prototype.getType=function(){return l.Z.JSON},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(h(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(h(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return(0,u.O3)()},e.prototype.readFeaturesFromObject=function(t,e){return(0,u.O3)()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(h(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return(0,u.O3)()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(h(t))},e.prototype.readProjectionFromObject=function(t){return(0,u.O3)()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return(0,u.O3)()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return(0,u.O3)()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return(0,u.O3)()},e}(a.ZP);var f=n(2083),d=n(7403),g=n(6259),_=n(3643),y=n(188),v=n(2033),m=n(9515),x=n(9374),E=n(2290),C=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 w(t,e){if(!t)return null;var n;switch(t.type){case s.Z.POINT:n=function(t){return new y.default(t.coordinates)}(t);break;case s.Z.LINE_STRING:n=function(t){return new f.Z(t.coordinates)}(t);break;case s.Z.POLYGON:n=function(t){return new v.ZP(t.coordinates)}(t);break;case s.Z.MULTI_POINT:n=function(t){return new g.Z(t.coordinates)}(t);break;case s.Z.MULTI_LINE_STRING:n=function(t){return new d.Z(t.coordinates)}(t);break;case s.Z.MULTI_POLYGON:n=function(t){return new _.Z(t.coordinates)}(t);break;case s.Z.GEOMETRY_COLLECTION:n=function(t,e){var n=t.geometries.map((function(t){return w(t,undefined)}));return new o.Z(n)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return(0,a.fI)(n,!1,e)}function T(t,e){var n,i=(t=(0,a.fI)(t,!0,e)).getType();switch(i){case s.Z.POINT:n=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case s.Z.LINE_STRING:n=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case s.Z.POLYGON:n=function(t,e){var n;return e&&(n=e.rightHanded),{type:"Polygon",coordinates:t.getCoordinates(n)}}(t,e);break;case s.Z.MULTI_POINT:n=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case s.Z.MULTI_LINE_STRING:n=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case s.Z.MULTI_POLYGON:n=function(t,e){var n;return e&&(n=e.rightHanded),{type:"MultiPolygon",coordinates:t.getCoordinates(n)}}(t,e);break;case s.Z.GEOMETRY_COLLECTION:n=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var n=(0,x.f0)({},e);return delete n.featureProjection,T(t,n)}))}}(t,e);break;case s.Z.CIRCLE:n={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+i)}return n}const S=function(t){function e(e){var n=this,i=e||{};return(n=t.call(this)||this).dataProjection=(0,E.get)(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(n.defaultFeatureProjection=(0,E.get)(i.featureProjection)),n.geometryName_=i.geometryName,n.extractGeometryName_=i.extractGeometryName,n.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],n}return C(e,t),e.prototype.readFeatureFromObject=function(t,e){var n,i=w((n="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),o=new r.default;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&o.setGeometryName(n.geometry_name),o.setGeometry(i),"id"in n&&o.setId(n.id),n.properties&&o.setProperties(n.properties,!0),o},e.prototype.readFeaturesFromObject=function(t,e){var n=null;if("FeatureCollection"===t.type){n=[];for(var i=t.features,r=0,o=i.length;r{"use strict";n.d(e,{Z:()=>A});var i,r=n(1090),o=n(3958),s=n(2450),a=n(4754),l=n(2083),u=n(7403),c=n(6259),h=n(3643),p=n(188),f=n(2033),d=n(9646),g=n(6617),_=n(4187),y=(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)});function v(t){return"string"==typeof t?t:""}const m=function(t){function e(){return t.call(this)||this}return y(e,t),e.prototype.getType=function(){return g.Z.TEXT},e.prototype.readFeature=function(t,e){return this.readFeatureFromText(v(t),this.adaptOptions(e))},e.prototype.readFeatureFromText=function(t,e){return(0,_.O3)()},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromText(v(t),this.adaptOptions(e))},e.prototype.readFeaturesFromText=function(t,e){return(0,_.O3)()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromText(v(t),this.adaptOptions(e))},e.prototype.readGeometryFromText=function(t,e){return(0,_.O3)()},e.prototype.readProjection=function(t){return this.readProjectionFromText(v(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){return(0,_.O3)()},e.prototype.writeFeatures=function(t,e){return this.writeFeaturesText(t,this.adaptOptions(e))},e.prototype.writeFeaturesText=function(t,e){return(0,_.O3)()},e.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},e.prototype.writeGeometryText=function(t,e){return(0,_.O3)()},e}(d.ZP);var x=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)}}(),E={POINT:p.default,LINESTRING:l.Z,POLYGON:f.ZP,MULTIPOINT:c.Z,MULTILINESTRING:u.Z,MULTIPOLYGON:h.Z},C="EMPTY",w={};for(var T in a.Z)w[T]=a.Z[T].toUpperCase();var S=function(){function t(t){this.wkt=t,this.index_=-1}return t.prototype.isAlpha_=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.isNumeric_=function(t,e){return t>="0"&&t<="9"||"."==t&&!(void 0!==e&&e)},t.prototype.isWhiteSpace_=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},t.prototype.nextToken=function(){var t,e=this.nextChar_(),n=this.index_,i=e;if("("==e)t=2;else if(","==e)t=5;else if(")"==e)t=3;else if(this.isNumeric_(e)||"-"==e)t=4,i=this.readNumber_();else if(this.isAlpha_(e))t=1,i=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=6}return{position:n,value:i,type:t}},t.prototype.readNumber_=function(){var t,e=this.index_,n=!1,i=!1;do{"."==t?n=!0:"e"!=t&&"E"!=t||(i=!0),t=this.nextChar_()}while(this.isNumeric_(t,n)||!i&&("e"==t||"E"==t)||i&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))},t.prototype.readText_=function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()},t}(),O=function(){function t(t){this.lexer_=t,this.token_={position:0,type:0},this.layout_=s.Z.XY}return t.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},t.prototype.isTokenType=function(t){return this.token_.type==t},t.prototype.match=function(t){var e=this.isTokenType(t);return e&&this.consume_(),e},t.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},t.prototype.parseGeometryLayout_=function(){var t=s.Z.XY,e=this.token_;if(this.isTokenType(1)){var n=e.value;"Z"===n?t=s.Z.XYZ:"M"===n?t=s.Z.XYM:"ZM"===n&&(t=s.Z.XYZM),t!==s.Z.XY&&this.consume_()}return t},t.prototype.parseGeometryCollectionText_=function(){if(this.match(2)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(5));if(this.match(3))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePointText_=function(){if(this.match(2)){var t=this.parsePoint_();if(this.match(3))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseLineStringText_=function(){if(this.match(2)){var t=this.parsePointList_();if(this.match(3))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePolygonText_=function(){if(this.match(2)){var t=this.parseLineStringTextList_();if(this.match(3))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPointText_=function(){if(this.match(2)){var t;if(t=2==this.token_.type?this.parsePointTextList_():this.parsePointList_(),this.match(3))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiLineStringText_=function(){if(this.match(2)){var t=this.parseLineStringTextList_();if(this.match(3))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPolygonText_=function(){if(this.match(2)){var t=this.parsePolygonTextList_();if(this.match(3))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePoint_=function(){for(var t=[],e=this.layout_.length,n=0;n0&&(e+=" "+i)}return 0===n.length?e+" "+C:e+"("+n+")"}const A=b},6885:(t,e,n)=>{"use strict";n.d(e,{Dv:()=>o,Zn:()=>s,qe:()=>a,uX:()=>r});var i=n(5537);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}}},1694:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i,r=n(2971),o=n(8375),s=n(4187),a=n(6101),l=n(8641),u=n(2290),c=n(6885),h=n(6442),p=(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)}),f=(0,a.Ue)();const d=function(t){function e(){var e=t.call(this)||this;return e.extent_=(0,l.createEmpty)(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=(0,c.qe)((function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(e)})),e}return p(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return(0,s.O3)()},e.prototype.closestPointXY=function(t,e,n,i){return(0,s.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,s.O3)()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&(0,l.createOrUpdateEmpty)(e),this.extentRevision_=this.getRevision()}return(0,l.returnOrUpdate)(this.extent_,t)},e.prototype.rotate=function(t,e){(0,s.O3)()},e.prototype.scale=function(t,e,n){(0,s.O3)()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return(0,s.O3)()},e.prototype.getType=function(){return(0,s.O3)()},e.prototype.applyTransform=function(t){(0,s.O3)()},e.prototype.intersectsExtent=function(t){return(0,s.O3)()},e.prototype.translate=function(t,e){(0,s.O3)()},e.prototype.transform=function(t,e){var n=(0,u.get)(t),i=n.getUnits()==o.ZP.TILE_PIXELS?function(t,i,r){var o=n.getExtent(),s=n.getWorldExtent(),c=(0,l.getHeight)(s)/(0,l.getHeight)(o);return(0,a.qC)(f,s[0],s[3],c,-c,0,0,0),(0,h.vT)(t,0,t.length,r,f,i),(0,u.getTransform)(n,e)(t,i,r)}:(0,u.getTransform)(n,e);return this.applyTransform(i),this},e}(r.Z)},3958:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i,r=n(5487),o=n(1694),s=n(4754),a=n(8641),l=n(5818),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)});function c(t){for(var e=[],n=0,i=t.length;n{"use strict";n.d(e,{Z:()=>i});const i={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"}},4754:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"}},2083:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i,r=n(2450),o=n(4754),s=n(2967),a=n(3042),l=n(8641),u=n(8527),c=n(226),h=n(5537),p=n(3032),f=n(9241),d=n(9405),g=n(3746),_=n(7374),y=(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 v=function(t){function e(e,n){var i=t.call(this)||this;return i.flatMidpoint_=null,i.flatMidpointRevision_=-1,i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?i.setCoordinates(e,n):i.setFlatCoordinates(n,e),i}return y(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?(0,h.l7)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},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){return i<(0,l.closestSquaredDistanceXY)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,a.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,a.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,i))},e.prototype.forEachSegment=function(t){return(0,p.E)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=r.Z.XYM&&this.layout!=r.Z.XYZM)return null;var n=void 0!==e&&e;return(0,d.iJ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n)},e.prototype.getCoordinates=function(){return(0,f.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return(0,d.WW)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return(0,_.W)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=(0,c.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,r.Z.XY)},e.prototype.getType=function(){return o.Z.LINE_STRING},e.prototype.intersectsExtent=function(t){return(0,g.Kz)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,u.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(s.ZP)},7538:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i,r=n(2450),o=n(4754),s=n(2967),a=n(3042),l=n(8641),u=n(8527),c=n(226),h=n(9241),p=n(4078),f=(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 d=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 f(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,l.closestSquaredDistanceXY)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,a.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,a.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.getArea=function(){return(0,p.QQ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return(0,h.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=(0,c.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,r.Z.XY)},e.prototype.getType=function(){return o.Z.LINEAR_RING},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=(0,u.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(s.ZP)},7403:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i,r=n(2450),o=n(4754),s=n(2083),a=n(2967),l=n(3042),u=n(8641),c=n(8527),h=n(226),p=n(5537),f=n(9241),d=n(9405),g=n(3746),_=(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 y=function(t){function e(e,n,i){var r=t.call(this)||this;if(r.ends_=[],r.maxDelta_=-1,r.maxDeltaRevision_=-1,Array.isArray(e[0]))r.setCoordinates(e,n);else if(void 0!==n&&i)r.setFlatCoordinates(n,e),r.ends_=i;else{for(var o=r.getLayout(),s=e,a=[],l=[],u=0,c=s.length;u{"use strict";n.d(e,{Z:()=>f});var i,r=n(4754),o=n(188),s=n(2967),a=n(8641),l=n(8527),u=n(5537),c=n(9241),h=n(3983),p=(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 f=function(t){function e(e,n){var i=t.call(this)||this;return n&&!Array.isArray(e[0])?i.setFlatCoordinates(n,e):i.setCoordinates(e,n),i}return p(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?(0,u.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},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){if(i<(0,a.closestSquaredDistanceXY)(this.getExtent(),t,e))return i;for(var r=this.flatCoordinates,o=this.stride,s=0,l=r.length;s{"use strict";n.d(e,{Z:()=>E});var i,r=n(2450),o=n(4754),s=n(6259),a=n(2033),l=n(2967),u=n(3042),c=n(8641),h=n(8527),p=n(5537),f=n(3448),d=n(9241),g=n(3746),_=n(974),y=n(4078),v=n(9679),m=n(226),x=(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 E=function(t){function e(e,n,i){var r=t.call(this)||this;if(r.endss_=[],r.flatInteriorPointsRevision_=-1,r.flatInteriorPoints_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,!i&&!Array.isArray(e[0])){for(var o=r.getLayout(),s=e,a=[],l=[],u=0,c=s.length;u{"use strict";n.r(e),n.d(e,{default:()=>c});var i,r=n(4754),o=n(2967),s=n(8641),a=n(8527),l=n(3983),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 c=function(t){function e(e,n){var i=t.call(this)||this;return i.setCoordinates(e,n),i}return u(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,l.bI)(t,e,r[0],r[1]);if(o{"use strict";n.d(e,{Bb:()=>b,Ej:()=>R,ZP:()=>T,iu:()=>S,oJ:()=>O});var i,r=n(2450),o=n(4754),s=n(7538),a=n(188),l=n(2967),u=n(3042),c=n(8641),h=n(8527),p=n(5537),f=n(3448),d=n(9241),g=n(3746),_=n(974),y=n(4078),v=n(9679),m=n(3983),x=n(226),E=n(7580),C=(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)}),w=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 C(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,p.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,c.closestSquaredDistanceXY)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,u.Af)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,u.Xl)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.containsXY=function(t,e){return(0,v.wY)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return(0,y.KP)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,_.zX)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,d.o1)(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,c.getCenter)(this.getExtent());this.flatInteriorPoint_=(0,f.X)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new a.default(this.getFlatInteriorPoint(),r.Z.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new s.Z(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,a=n.length;o{"use strict";n.d(e,{Kr:()=>h,ZP:()=>p});var i,r=n(1694),o=n(2450),s=n(4187),a=n(8641),l=n(6442),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)});function c(t){var e;return t==o.Z.XY?e=2:t==o.Z.XYZ||t==o.Z.XYM?e=3:t==o.Z.XYZM&&(e=4),e}function h(t,e,n){var i=t.getFlatCoordinates();if(i){var r=t.getStride();return(0,l.vT)(i,0,i.length,r,e,n)}return null}const p=function(t){function e(){var e=t.call(this)||this;return e.layout=o.Z.XY,e.stride=2,e.flatCoordinates=null,e}return u(e,t),e.prototype.computeExtent=function(t){return(0,a.createOrUpdateFromFlatCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return(0,s.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{"use strict";function i(t,e,n,i){for(var r=0,o=t[n-i],s=t[n-i+1];eo,KP:()=>r,QQ:()=>i})},3042:(t,e,n)=>{"use strict";n.d(e,{Af:()=>s,Bv:()=>o,H$:()=>l,Xl:()=>u,gI:()=>c,sD:()=>a});var i=n(3983);function r(t,e,n,r,o,s,a){var l,u=t[e],c=t[e+1],h=t[n]-u,p=t[n+1]-c;if(0===h&&0===p)l=e;else{var f=((o-u)*h+(s-c)*p)/(h*h+p*p);if(f>1)l=n;else{if(f>0){for(var d=0;do&&(o=c),s=l,a=u}return o}function s(t,e,n,i,r){for(var s=0,a=n.length;s{"use strict";n.d(e,{TG:()=>o,Zl:()=>a,uG:()=>r,wY:()=>s});var i=n(8641);function r(t,e,n,r,s){return!(0,i.forEachCorner)(s,(function(i){return!o(t,e,n,r,i[0],i[1])}))}function o(t,e,n,i,r,o){for(var s=0,a=t[n-i],l=t[n-i+1];eo&&(u-a)*(o-l)-(r-a)*(c-l)>0&&s++:c<=o&&(u-a)*(o-l)-(r-a)*(c-l)<0&&s--,a=u,l=c}return 0!==s}function s(t,e,n,i,r,s){if(0===n.length)return!1;if(!o(t,e,n[0],i,r,s))return!1;for(var a=1,l=n.length;a{"use strict";function i(t,e,n,i){for(var r=0,o=n.length;ri,QT:()=>s,Sg:()=>r,_5:()=>o})},9241:(t,e,n)=>{"use strict";function i(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=e;ai,o1:()=>r,ug:()=>o})},3448:(t,e,n)=>{"use strict";n.d(e,{U:()=>s,X:()=>o});var i=n(9679),r=n(5537);function o(t,e,n,o,s,a,l){for(var u,c,h,p,f,d,g,_=s[a+1],y=[],v=0,m=n.length;vC&&(h=(p+f)/2,(0,i.wY)(t,e,n,o,h,_)&&(E=h,C=w)),p=f}return isNaN(E)&&(E=s[a]),l?(l.push(E,_,C),l):[E,_,C]}function s(t,e,n,i,r){for(var s=[],a=0,l=n.length;a{"use strict";n.d(e,{WW:()=>o,dG:()=>a,iJ:()=>s});var i=n(5537),r=n(3983);function o(t,e,n,o,s,a,l){var u,c,h=(n-e)/o;if(1===h)u=e;else if(2===h)u=e,c=s;else if(0!==h){for(var p=t[e],f=t[e+1],d=0,g=[0],_=e+o;_1?l:2,C=a||new Array(E);for(_=0;_>1;o{"use strict";n.d(e,{AW:()=>a,Kz:()=>s,ac:()=>l,oW:()=>u});var i=n(8641),r=n(3032),o=n(9679);function s(t,e,n,o,s){var a=(0,i.extendFlatCoordinates)((0,i.createEmpty)(),t,e,n,o);return!!(0,i.intersects)(s,a)&&(!!(0,i.containsExtent)(s,a)||a[0]>=s[0]&&a[2]<=s[2]||a[1]>=s[1]&&a[3]<=s[3]||(0,r.E)(t,e,n,o,(function(t,e){return(0,i.intersectsSegment)(s,t,e)})))}function a(t,e,n,i,r){for(var o=0,a=n.length;o{"use strict";function i(t,e,n,i){for(var r=t[e],o=t[e+1],s=0,a=e+i;ai})},974:(t,e,n)=>{"use strict";function i(t,e,n,i){for(;e0}function o(t,e,n,i,o){for(var s=void 0!==o&&o,a=0,l=n.length;ao,Oj:()=>s,zX:()=>a,dL:()=>l})},3032:(t,e,n)=>{"use strict";function i(t,e,n,i,r){var o;for(e+=i;ei})},226:(t,e,n)=>{"use strict";n.d(e,{Pp:()=>u,UJ:()=>o,Zh:()=>l,dt:()=>r,uZ:()=>s});var i=n(3983);function r(t,e,n,r,o,s,a){var l=(n-e)/r;if(l<3){for(;e0;){for(var p=c.pop(),f=c.pop(),d=0,g=t[f],_=t[f+1],y=t[p],v=t[p+1],m=f+r;md&&(h=m,d=C)}d>o&&(u[(h-e)/r]=1,f+r0&&_>d)&&(g<0&&y0&&y>g)?(l=p,u=f):(o[a++]=l,o[a++]=u,c=l,h=u,l=p,u=f)}}return o[a++]=l,o[a++]=u,a}function l(t,e,n,i,r,o,s,l){for(var u=0,c=n.length;u{"use strict";function i(t,e,n,i,r,o){for(var s=o||[],a=0,l=e;ls,U1:()=>r,bA:()=>o,vT:()=>i})},177:(t,e,n)=>{"use strict";n.d(e,{G$:()=>o,Id:()=>l,MP:()=>a,Tp:()=>u,V:()=>r,bM:()=>c,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,c=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}()},7182:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>c,pan:()=>l,zoomByDelta:()=>u});var i,r=n(2971),o=n(4049),s=n(1015),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)});function l(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:s.GE,center:t.getConstrainedCenter(r)})}}function u(t,e,n,i){var r=t.getZoom();if(void 0!==r){var o=t.getConstrainedZoom(r+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:n,duration:void 0!==i?i:250,easing:s.Vv})}}const c=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 a(e,t),e.prototype.getActive=function(){return this.get(o.Z.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(o.Z.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(r.Z)},4515:(t,e,n)=>{"use strict";n.d(e,{S:()=>l,Z:()=>u});var i,r=n(7182),o=n(2217),s=n(9374),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)});function l(t){for(var e=t.length,n=0,i=0,r=0;r0}}else if(t.type==o.Z.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==o.Z.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===o.Z.POINTERDOWN||e===o.Z.POINTERDRAG||e===o.Z.POINTERUP}(t)){var e=t.originalEvent,n=e.pointerId.toString();t.type==o.Z.POINTERUP?delete this.trackedPointers_[n]:(t.type==o.Z.POINTERDOWN||n in this.trackedPointers_)&&(this.trackedPointers_[n]=e),this.targetPointers=(0,s.KX)(this.trackedPointers_)}},e}(r.default)},4049:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={ACTIVE:"active"}},947:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i,r=n(2971),o=n(1912),s=n(4187),a=n(9515),l=n(9374),u=n(3983),c=(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;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 c(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)},8734:(t,e,n)=>{"use strict";n.r(e),n.d(e,{GroupEvent:()=>y,default:()=>m});var i,r=n(947),o=n(8714),s=n(2071),a=n(291),l=n(5487),u=n(5990),c=n(4562),h=n(9515),p=n(9374),f=n(8641),d=n(4187),g=n(5818),_=(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,h.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{"use strict";n.d(e,{Z:()=>d,j:()=>f});var i,r=n(947),o=n(5487),s=n(1912),a=n(8771),l=n(4562),u=n(9515),c=n(9374),h=n(5818),p=(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)});function f(t,e){if(!t.visible)return!1;var n=e.resolution;if(n=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}const d=function(t){function e(e){var n=this,i=(0,c.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(s.Z.SOURCE,n.handleSourcePropertyChange_);var r=e.source?e.source:null;return n.setSource(r),n}return p(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(s.Z.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():l.Z.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,h.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=(0,h.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(s.Z.MAP,t)},e.prototype.getMapInternal=function(){return this.get(s.Z.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&((0,h.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,h.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,h.oL)(t,a.Z.PRECOMPOSE,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);(0,u.h)(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=(0,h.oL)(this,o.Z.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(s.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}(r.Z)},1912:(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"}},9271:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>Mt});var i,r=n(1295),o=n(2582),s=n(9374),a=n(7539),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="renderOrder";const c=function(t){function e(e){var n=this,i=e||{},r=(0,s.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 l(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(u)},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 o(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(u,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:a.createDefaultStyle,this.styleFunction_=null===t?void 0:(0,a.toFunction)(this.style_),this.changed()},e}(r.Z);var h={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},p=[h.FILL],f=[h.STROKE],d=[h.BEGIN_PATH],g=[h.CLOSE_PATH];const _=h;var y=n(4754),v=n(8716);const m=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 x=n(6620),E=n(8641),C=n(147),w=n(5537),T=n(9241),S=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)}}(),O=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 S(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;sh&&(this.instructions.push([_.CUSTOM,h,o,t,n,T.Ml]),this.hitDetectionInstructions.push([_.CUSTOM,h,o,t,i||n,T.Ml]));break;case y.Z.POINT:r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),o=this.coordinates.length,this.instructions.push([_.CUSTOM,h,o,t,n]),this.hitDetectionInstructions.push([_.CUSTOM,h,o,t,i||n])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[_.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[_.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;tthis.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=[_.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[_.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,w.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=[_.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,E.clone)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,E.buffer)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(m);const b=O;var R=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 P=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 R(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([_.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([_.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([_.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([_.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}(b);var I=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 L=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return I(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=[_.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([_.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,C.X9,C.He],d);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(f),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([_.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],d);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,u=0,c=o.length;ut&&(y>_&&(_=y,d=v,g=o),y=0,v=o-r)),s=a,c=p,h=f),l=m,u=x}return(y+=a)>_?[v,o]:[d,g]}var D=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)}}(),j={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},G=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 D(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(r.placement!==F.Z.LINE||a!=y.Z.LINE_STRING&&a!=y.Z.MULTI_LINE_STRING&&a!=y.Z.POLYGON&&a!=y.Z.MULTI_POLYGON){var c=r.overflow?null:[];switch(a){case y.Z.POINT:case y.Z.MULTI_POINT:l=t.getFlatCoordinates();break;case y.Z.LINE_STRING:l=t.getFlatMidpoint();break;case y.Z.CIRCLE:l=t.getCenter();break;case y.Z.MULTI_LINE_STRING:l=t.getFlatMidpoints(),u=2;break;case y.Z.POLYGON:l=t.getFlatInteriorPoint(),r.overflow||c.push(l[2]/this.resolution),u=3;break;case y.Z.MULTI_POLYGON:var h=t.getFlatInteriorPoints();for(l=[],O=0,b=h.length;OR[2]}else S=x>O;var P,I=Math.PI,L=[],M=C+i===e;if(_=0,y=w,p=t[e=C],f=t[e+1],M){v(),P=Math.atan2(f-g,p-d),S&&(P+=P>0?-I:I);var A=(O+x)/2,Z=(b+E)/2;return L[0]=[A,Z,(T-o)/2,P,r],L}for(var F=0,N=r.length;F0?-I:I),void 0!==P){var D=k-P;if(D+=D>I?-2*I:D<-I?2*I:0,Math.abs(D)>s)return null}P=k;for(var j=F,G=0;F0&&t.push("\n",""),t.push(e,""),t}var st=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_=(0,B.Ue)(),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,u=[a.scale[0]*l,a.scale[1]*l],c=Array.isArray(t),h=rt(c?t[0]:t,a.textAlign||C.PH),p=i&&o.lineWidth?o.lineWidth:0,f=c?t:t.split("\n").reduce(ot,[]),d=(0,C.Zw)(a,f),g=d.width,_=d.height,y=d.widths,v=d.heights,m=d.lineWidths,x=g+p,E=[],w=(x+2)*u[0],T=(_+p)*u[1],S={width:w<0?Math.floor(w):Math.ceil(w),height:T<0?Math.floor(T):Math.ceil(T),contextInstructions:E};1==u[0]&&1==u[1]||E.push("scale",u),i&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",p),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),(z.Id?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset))),n&&E.push("fillStyle",s.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");for(var O,b=.5-h,R=h*x+b*p,P=[],I=[],L=0,M=0,A=0,Z=0,F=0,N=f.length;Ft?t-l:r,x=o+u>e?e-u:o,C=f[3]+m*h[0]+f[1],w=f[0]+x*h[1]+f[2],T=y-f[3],S=v-f[0];return(d||0!==c)&&(J[0]=T,et[0]=T,J[1]=S,Q[1]=S,Q[0]=T+C,tt[0]=Q[0],tt[1]=S+w,et[1]=tt[1]),0!==c?(_=(0,B.qC)((0,B.Ue)(),n,i,1,1,c,-n,-i),(0,B.nn)(_,J),(0,B.nn)(_,Q),(0,B.nn)(_,tt),(0,B.nn)(_,et),(0,E.createOrUpdate)(Math.min(J[0],Q[0],tt[0],et[0]),Math.min(J[1],Q[1],tt[1],et[1]),Math.max(J[0],Q[0],tt[0],et[0]),Math.max(J[1],Q[1],tt[1],et[1]),$)):(0,E.createOrUpdate)(Math.min(T,T+C),Math.min(S,S+w),Math.max(T,T+C),Math.max(S,S+w),$),p&&(y=Math.round(y),v=Math.round(v)),{drawImageX:y,drawImageY:v,drawImageW:m,drawImageH:x,originX:l,originY:u,declutterBox:{minX:$[0],minY:$[1],maxX:$[2],maxY:$[3],value:g},canvasTransform:_,scale:h}},t.prototype.replayImageOrLabel_=function(t,e,n,i,r,o,s){var a=!(!o&&!s),l=i.declutterBox,u=t.canvas,c=s?s[2]*i.scale[0]/2:0;return l.minX-c<=u.width/e&&l.maxX+c>=0&&l.minY-c<=u.height/e&&l.maxY+c>=0&&(a&&this.replayTextBackground_(t,J,Q,tt,et,o,s),(0,C._f)(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=(0,B.nn)(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=rt(Array.isArray(t)?t[0]:t,r.textAlign||C.PH),u=j[r.textBaseline||C.ru],c=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale[0])+2*(.5-l)*c,anchorY:u*o.height/a+2*(.5-u)*c}},t.prototype.execute_=function(t,e,n,i,r,o,s,a){var l;this.pixelCoordinates_&&(0,w.fS)(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=(0,K.vT)(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),(0,B.lk)(this.renderedTransform_,n));for(var u,c,h,p,f,d,g,y,v,m,x,T,S,O,b,R,P=0,I=i.length,L=0,M=0,A=0,Z=null,F=null,N=this.coordinateCache_,k=this.viewRotation_,D=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,G={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:k},X=this.instructions!=i||this.overlaps?0:200;PX&&(this.fill_(t),M=0),A>X&&(t.stroke(),A=0),M||A||(t.beginPath(),p=NaN,f=NaN),++P;break;case _.CIRCLE:var U=l[L=Y[1]],W=l[L+1],z=l[L+2]-U,V=l[L+3]-W,$=Math.sqrt(z*z+V*V);t.moveTo(U+$,W),t.arc(U,W,$,0,2*Math.PI,!0),++P;break;case _.CLOSE_PATH:t.closePath(),++P;break;case _.CUSTOM:L=Y[1],u=Y[2];var J=Y[3],Q=Y[4],tt=6==Y.length?Y[5]:void 0;G.geometry=J,G.feature=S,P in N||(N[P]=[]);var et=N[P];tt?tt(l,L,u,2,et):(et[0]=l[L],et[1]=l[L+1],et.length=2),Q(et,G),++P;break;case _.DRAW_IMAGE:L=Y[1],u=Y[2],y=Y[3],c=Y[4],h=Y[5];var it=Y[6],rt=Y[7],ot=Y[8],st=Y[9],at=Y[10],lt=Y[11],ut=Y[12],ct=Y[13],ht=Y[14];if(!y&&Y.length>=19){v=Y[18],m=Y[19],x=Y[20],T=Y[21];var pt=this.drawLabelWithPointPlacement_(v,m,x,T);y=pt.label,Y[3]=y;var ft=Y[22];c=(pt.anchorX-ft)*this.pixelRatio,Y[4]=c;var dt=Y[23];h=(pt.anchorY-dt)*this.pixelRatio,Y[5]=h,it=y.height,Y[6]=it,ct=y.width,Y[13]=ct}var gt=void 0;Y.length>24&&(gt=Y[24]);var _t=void 0,yt=void 0,vt=void 0;Y.length>16?(_t=Y[15],yt=Y[16],vt=Y[17]):(_t=C.oB,yt=!1,vt=!1),at&&D?lt+=k:at||D||(lt-=k);for(var mt=0;Ln)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);r0){if(!o||h!==W.IMAGE&&h!==W.TEXT||-1!==o.indexOf(t)){var u=(p[a]-3)/4,f=i-u%s,d=i-(u/s|0),g=r(t,e,f*f+d*d);if(g)return g}c.clearRect(0,0,s,s);break}}var d,g,_,y,v,m=Object.keys(this.executorsByZIndex_).map(Number);for(m.sort(w.kK),d=m.length-1;d>=0;--d){var x=m[d].toString();for(_=this.executorsByZIndex_[x],g=ut.length-1;g>=0;--g)if(void 0!==(y=_[h=ut[g]])&&(v=y.executeHitDetection(c,a,n,f,u)))return v}},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(0,K.vT)(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return(0,s.xb)(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,i,r,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(w.kK),this.maxExtent_&&(t.save(),this.clip(t,n));var l,u,c,h,p,f,d=o||ut;for(s&&a.reverse(),l=0,u=a.length;lf[2];)v=g*++_,u.push(this.getRenderTransform(i,r,o,mt,c,h,v).slice()),d-=g}this.hitDetectionImageData_=function(t,e,n,i,r,o,s){var a=t[0]*mt,l=t[1]*mt,u=(0,lt.E4)(a,l);u.imageSmoothingEnabled=!1;for(var c=u.canvas,h=new _t(u,mt,r,null,s),p=n.length,f=Math.floor(16777215/p),d={},g=1;g<=p;++g){var _=n[g-1],v=_.getStyleFunction()||i;if(i){var m=v(_,o);if(m){Array.isArray(m)||(m=[m]);for(var x="#"+("000000"+(g*f).toString(16)).slice(-6),C=0,T=m.length;Cm[0]&&T[2]>m[2]&&v.push([T[0]-x,T[1],T[2]-x,T[3]])}if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&(0,E.containsExtent)(this.wrappedRenderedExtent_,_))return(0,w.fS)(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var S,O=new Y(Tt(c,h),_,c,h);this.getLayer().getDeclutter()&&(S=new Y(Tt(c,h),_,c,h));var b,R=(0,bt.getUserProjection)();if(R){for(var P=0,I=v.length;P{"use strict";function i(t,e,n){return Math.min(Math.max(t,e),n)}n.d(e,{$W:()=>h,GW:()=>d,SV:()=>l,Ux:()=>u,Yr:()=>c,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;nr&&(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=0;p--){h[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*h[p]}return h}function u(t){return 180*t/Math.PI}function c(t){return t*Math.PI/180}function h(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))}},9374:(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{"use strict";n.r(e),n.d(e,{METERS_PER_UNIT:()=>o.Wm,Projection:()=>r.Z,addCommon:()=>J,addCoordinateTransforms:()=>L,addEquivalentProjections:()=>O,addEquivalentTransforms:()=>b,addProjection:()=>C,addProjections:()=>w,clearAllProjections:()=>R,clearUserProjection:()=>Y,cloneTransform:()=>x,createProjection:()=>P,createSafeCoordinateTransform:()=>$,createTransformFromCoordinateTransform:()=>I,disableCoordinateWarning:()=>m,equivalent:()=>Z,fromLonLat:()=>M,fromUserCoordinate:()=>B,fromUserExtent:()=>K,fromUserResolution:()=>H,get:()=>T,getPointResolution:()=>S,getTransform:()=>N,getTransformFromProjections:()=>F,getUserProjection:()=>U,identityTransform:()=>E,setUserProjection:()=>X,toLonLat:()=>A,toUserCoordinate:()=>z,toUserExtent:()=>V,toUserResolution:()=>q,transform:()=>k,transformExtent:()=>D,transformWithProjections:()=>j,useGeographic:()=>W});var i,r=n(9619),o=n(8375),s=n(5984),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=[-180,-90,180,90],u=6378137*Math.PI/180,c=function(t){function e(e,n){return t.call(this,{code:e,units:o.ZP.DEGREES,extent:l,axisOrientation:n,global:!0,metersPerUnit:u,worldExtent:l})||this}return a(e,t),e}(r.Z),h=[new c("CRS:84"),new c("EPSG:4326","neu"),new c("urn:ogc:def:crs:OGC:1.3:CRS84"),new c("urn:ogc:def:crs:OGC:2:84"),new c("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new c("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new c("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],p={},f=n(9556),d=n(8641),g=n(3983),_=n(1900),y=n(7580),v=!0;function m(t){v=!(void 0===t||t)}function x(t,e,n){var i;if(void 0!==e){for(var r=0,o=t.length;r=2;--u)s[a+u]=e[a+u]}return s}}function L(t,e,n,i){var r=T(t),o=T(e);(0,f.IH)(r,o,I(n)),(0,f.IH)(o,r,I(i))}function M(t,e){return m(),k(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function A(t,e){var n=k(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),i=n[0];return(i<-180||i>180)&&(n[0]=(0,g.$W)(i+180,360)-180),n}function Z(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||F(t,e)===x)&&n}function F(t,e){var n=t.getCode(),i=e.getCode(),r=(0,f.U2)(n,i);return r||(r=E),r}function N(t,e){return F(T(t),T(e))}function k(t,e,n){return N(e,n)(t,void 0,t.length)}function D(t,e,n,i){var r=N(e,n);return(0,d.applyTransform)(t,r,void 0,i)}function j(t,e,n){return F(e,n)(t)}var G=null;function X(t){G=T(t)}function Y(){G=null}function U(){return G}function W(){X("EPSG:4326")}function z(t,e){return G?k(t,e,G):t}function B(t,e){return G?k(t,G,e):(v&&!(0,_.fS)(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(v=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function V(t,e){return G?D(t,e,G):t}function K(t,e){return G?D(t,G,e):t}function q(t,e){if(!G)return t;var n=T(e).getUnits(),i=G.getUnits();return n&&i?t*o.Wm[n]/o.Wm[i]:t}function H(t,e){if(!G)return t;var n=T(e).getUnits(),i=G.getUnits();return n&&i?t*o.Wm[i]/o.Wm[n]:t}function $(t,e,n){return function(i){var r,o,s=i[0],a=i[1];if(t.canWrapX()){var l=t.getExtent(),u=(0,d.getWidth)(l);(o=(0,_.jk)(i,t,u))&&(s-=o*u),s=(0,g.uZ)(s,l[0],l[2]),a=(0,g.uZ)(a,l[1],l[3]),r=n([s,a])}else r=n(i);return o&&e.canWrapX()&&(r[0]+=o*(0,d.getWidth)(e.getExtent())),r}}function J(){O(s.LB),O(h),b(h,s.LB,s.jn,s.DE)}J()},9619:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(8375);const r=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_||i.Wm[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}()},8375:(t,e,n)=>{"use strict";n.d(e,{Wm:()=>r,ZP:()=>o});var i={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},r={};r[i.RADIANS]=6370997/(2*Math.PI),r[i.DEGREES]=2*Math.PI*6370997/360,r[i.FEET]=.3048,r[i.METERS]=1,r[i.USFEET]=1200/3937;const o=i},5984:(t,e,n)=>{"use strict";n.d(e,{DE:()=>_,LB:()=>d,jn:()=>g});var i,r=n(9619),o=n(8375),s=n(3983),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=6378137,u=Math.PI*l,c=[-u,-u,u,u],h=[-180,-85,180,85],p=l*Math.log(Math.tan(Math.PI/2)),f=function(t){function e(e){return t.call(this,{code:e,units:o.ZP.METERS,extent:c,global:!0,worldExtent:h,getPointResolution:function(t,e){return t/(0,s.f9)(e[1]/l)}})||this}return a(e,t),e}(r.Z),d=[new f("EPSG:3857"),new f("EPSG:102100"),new f("EPSG:102113"),new f("EPSG:900913"),new f("http://www.opengis.net/def/crs/EPSG/0/3857"),new f("http://www.opengis.net/gml/srs/epsg.xml#3857")];function g(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;sp?a=p:a<-p&&(a=-p),o[s+1]=a}return o}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{"use strict";n.d(e,{IH:()=>s,Od:()=>a,U2:()=>l,ZH:()=>o});var i=n(9374),r={};function o(){r={}}function s(t,e,n){var i=t.getCode(),o=e.getCode();i in r||(r[i]={}),r[i][o]=n}function a(t,e){var n=t.getCode(),o=e.getCode(),s=r[n][o];return delete r[n][o],(0,i.xb)(r[n])&&delete r[n],s}function l(t,e){var n;return t in r&&e in r[t]&&(n=r[t][e]),n}},7380:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i,r=n(291),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,n,i,r){var o=t.call(this,e)||this;return o.inversePixelTransform=n,o.frameState=i,o.context=r,o}return o(e,t),e}(r.ZP)},8771:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},147:(t,e,n)=>{"use strict";n.d(e,{Df:()=>u,He:()=>f,Kd:()=>I,PH:()=>y,Qx:()=>O,Tx:()=>_,V4:()=>g,X9:()=>p,Zw:()=>L,_f:()=>M,bL:()=>c,mb:()=>h,oB:()=>m,rc:()=>d,ru:()=>v,sG:()=>E,yC:()=>x});var i=n(2971),r=n(208),o=n(177),s=n(9374),a=n(8326),l=n(245),u="10px sans-serif",c="#000",h="round",p=[],f=0,d="round",g=10,_="#000",y="center",v="middle",m=[0,0,0,0],x=1,E=new i.Z;(new r.Z).setSize=function(){console.warn("labelCache is deprecated.")};var C,w,T=null,S={},O=function(){var t,e,n="32px ",i=["monospace","serif"],r=i.length,o="wmytzilWMYTZIL@#/&?$%10";function a(t,s,a){for(var l=!0,u=0;u{"use strict";n.d(e,{Z:()=>x});var i,r=n(5487),o=n(553),s=n(2706),a=n(4562),l=n(4187),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 c=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 u(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){t.target.getState()===o.Z.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=o.Z.LOADED&&e!=o.Z.ERROR&&t.addEventListener(r.Z.CHANGE,this.boundHandleImageChange_),e==o.Z.IDLE&&(t.load(),e=t.getState()),e==o.Z.LOADED},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}(s.default);var h=n(7380),p=n(8771),f=n(6101),d=n(9706),g=n(8641),_=n(8326),y=n(5537),v=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)}}(),m=null;const x=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=(0,f.Ue)(),n.pixelTransform=(0,f.Ue)(),n.inversePixelTransform=(0,f.Ue)(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return v(e,t),e.prototype.getImageData=function(t,e,n){var i,r;m||((i=document.createElement("canvas")).width=1,i.height=1,m=i.getContext("2d")),m.clearRect(0,0,1,1);try{m.drawImage(t,e,n,1,1,0,0,1,1),r=m.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,y.fS)((0,d._2)(t.style.backgroundColor),(0,d._2)(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,_.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.getTopLeft)(n),r=(0,g.getTopRight)(n),o=(0,g.getBottomRight)(n),s=(0,g.getBottomLeft)(n);(0,f.nn)(e.coordinateToPixelTransform,i),(0,f.nn)(e.coordinateToPixelTransform,r),(0,f.nn)(e.coordinateToPixelTransform,o),(0,f.nn)(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;(0,f.nn)(a,i),(0,f.nn)(a,r),(0,f.nn)(a,o),(0,f.nn)(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.Z(t,this.inversePixelTransform,n,e);i.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_(p.Z.PRERENDER,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(p.Z.POSTRENDER,t,e)},e.prototype.getRenderTransform=function(t,e,n,i,r,o,s){var a=r/2,l=o/2,u=i/e,c=-u,h=-t[0]+s,p=-t[1];return(0,f.qC)(this.tempTransform,a,l,u,c,-n,h,p)},e.prototype.getDataAtPixel=function(t,e,n){var i=(0,f.nn)(this.inversePixelTransform,t.slice()),r=this.context,o=this.getLayer().getExtent();if(o){var s=(0,f.nn)(e.pixelToCoordinateTransform,t.slice());if(!(0,g.containsCoordinate)(o,s))return null}var a,l=Math.round(i[0]),u=Math.round(i[1]),c=this.pixelContext_;if(!c){var h=document.createElement("canvas");h.width=1,h.height=1,c=h.getContext("2d"),this.pixelContext_=c}c.clearRect(0,0,1,1);try{c.drawImage(r.canvas,l,u,1,1,0,0,1,1),a=c.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}(c)},4307:(t,e,n)=>{"use strict";function i(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]+2*e,n[1]=t[1]+2*e,n}function r(t){return t[0]>0&&t[1]>0}function o(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 s(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}n.d(e,{Pq:()=>s,bA:()=>o,f3:()=>i,py:()=>r})},8458:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i,r=n(2971),o=n(4562),s=n(4187),a=n(2290),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)});function u(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const c=function(t){function e(e){var n=t.call(this)||this;n.projection=(0,a.get)(e.projection),n.attributions_=u(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:o.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 l(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,s.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_=u(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(r.Z)},4562:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},933:(t,e,n)=>{"use strict";n.r(e),n.d(e,{VectorSourceEvent:()=>w,default:()=>S});var i=n(8714),r=n(2071),o=n(291),s=n(5487),a=n(5990),l=n(9781),u=n(8458),c=n(4562),h=n(2796),p=n(6885);function f(t,e){return[[-1/0,-1/0,1/0,1/0]]}n(2290);var d,g=n(9515),_=n(8641),y=n(5537),v=n(4187),m=n(9374),x=n(5818),E=n(7537),C=(d=function(t,e){return d=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])},d(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}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),w=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.feature=n,r.features=i,r}return C(e,t),e}(o.ZP),T=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{attributions:r.attributions,interpolate:!0,projection:void 0,state:c.Z.READY,wrapX:void 0===r.wrapX||r.wrapX})||this).on,n.once,n.un,n.loader_=p.Zn,n.format_=r.format,n.overlaps_=void 0===r.overlaps||r.overlaps,n.url_=r.url,void 0!==r.loader?n.loader_=r.loader:void 0!==n.url_&&((0,g.h)(n.format_,7),n.loader_=(0,E.Be)(n.url_,n.format_)),n.strategy_=void 0!==r.strategy?r.strategy:f;var o,s,a=void 0===r.useSpatialIndex||r.useSpatialIndex;return n.featuresRtree_=a?new l.Z:null,n.loadedExtentsRtree_=new l.Z,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(r.features)?s=r.features:r.features&&(s=(o=r.features).getArray()),a||void 0!==o||(o=new i.Z(s)),void 0!==s&&n.addFeaturesInternal(s),void 0!==o&&n.bindFeaturesCollection_(o),n}return C(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=(0,v.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 w(h.Z.ADDFEATURE,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[(0,x.oL)(e,s.Z.CHANGE,this.handleFeatureChange_,this),(0,x.oL)(e,a.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,g.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;r0},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,_.equals)(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=(0,v.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,v.sq)(t),n=this.featureChangeKeys_[e];if(n){n.forEach(x.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 w(h.Z.REMOVEFEATURE,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,g.h)(this.format_,7),this.url_=t,this.setLoader((0,E.Be)(t,this.format_))},e}(u.Z);const S=T},2796:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},7580:(t,e,n)=>{"use strict";n.r(e),n.d(e,{DEFAULT_RADIUS:()=>o,getArea:()=>c,getDistance:()=>s,getLength:()=>l,offset:()=>h});var i=n(4754),r=n(3983),o=6371008.8;function s(t,e,n){var i=n||o,s=(0,r.Yr)(t[1]),a=(0,r.Yr)(e[1]),l=(a-s)/2,u=(0,r.Yr)(e[0]-t[0])/2,c=Math.sin(l)*Math.sin(l)+Math.sin(u)*Math.sin(u)*Math.cos(s)*Math.cos(a);return 2*i*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))}function a(t,e){for(var n=0,i=0,r=t.length;i{"use strict";n.d(e,{Z:()=>a});var i=n(2582),r=n(8641),o=n(4187),s=n(9374);const a=function(){function t(t){this.rbush_=new i(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,o.sq)(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),i=0,r=e.length;i{"use strict";n.d(e,{Z:()=>s});var i,r=n(5393),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=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 o(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}(r.Z)},1345:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=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}()},4115:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y});var i=n(5487),r=n(4698);const o="bottom-left",s="bottom-right",a="top-left",l="top-right";var u,c=n(553),h=n(8443),p=n(9706),f=n(9515),d=n(3713),g=n(4187),_=(u=function(t,e){return u=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])},u(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}u(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const y=function(t){function e(e){var n=this,i=e||{},o=void 0!==i.opacity?i.opacity:1,s=void 0!==i.rotation?i.rotation:0,l=void 0!==i.scale?i.scale:1,u=void 0!==i.rotateWithView&&i.rotateWithView;(n=t.call(this,{opacity:o,rotation:s,scale:l,displacement:void 0!==i.displacement?i.displacement:[0,0],rotateWithView:u})||this).anchor_=void 0!==i.anchor?i.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:a,n.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:r.Z.FRACTION,n.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:r.Z.FRACTION,n.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var h=void 0!==i.img?i.img:null;n.imgSize_=i.imgSize;var _=i.src;(0,f.h)(!(void 0!==_&&h),4),(0,f.h)(!h||h&&n.imgSize_,5),void 0!==_&&0!==_.length||!h||(_=h.src||(0,g.sq)(h)),(0,f.h)(void 0!==_&&_.length>0,6);var y=void 0!==i.src?c.Z.IDLE:c.Z.LOADED;return n.color_=void 0!==i.color?(0,p._2)(i.color):null,n.iconImage_=(0,d.U)(h,_,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,y,n.color_),n.offset_=void 0!==i.offset?i.offset:[0,0],n.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:a,n.origin_=null,n.size_=void 0!==i.size?i.size:null,n}return _(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_==r.Z.FRACTION||this.anchorYUnits_==r.Z.FRACTION){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==r.Z.FRACTION&&(t[0]*=e[0]),this.anchorYUnits_==r.Z.FRACTION&&(t[1]*=e[1])}if(this.anchorOrigin_!=a){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=l&&this.anchorOrigin_!=s||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=o&&this.anchorOrigin_!=s||(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_!=a){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=l&&this.offsetOrigin_!=s||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=o&&this.offsetOrigin_!=s||(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(i.Z.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(i.Z.CHANGE,t)},e}(h.Z)},4698:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={FRACTION:"fraction",PIXELS:"pixels"}},3713:(t,e,n)=>{"use strict";n.d(e,{U:()=>d,Z:()=>g});var i,r=n(208),o=n(5487),s=n(553),a=n(9706),l=n(8326),u=n(2710),c=n(9807),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)}),p=null,f=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 h(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===s.Z.LOADED){p||(p=(0,l.E4)(1,1)),p.drawImage(this.image_,0,0);try{p.getImageData(0,0,1,1),this.tainted_=!1}catch(t){p=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(o.Z.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=s.Z.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=s.Z.LOADED,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,l.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(this.imageState_==s.Z.IDLE){this.imageState_=s.Z.LOADING;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=(0,c.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===s.Z.LOADED){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=(0,a.XC)(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,l=this.color_[1]/255,u=this.color_[2]/255,c=this.color_[3],h=0,p=r.length;h{"use strict";n.d(e,{c:()=>o});var i=n(9706);function r(t,e,n){return e+":"+t+":"+(n?(0,i.XC)(n):"null")}var o=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=r(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var o=r(t,e,n);this.cache_[o]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}())},8443:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(4187),r=n(4307);const o=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,r.Pq)(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,i.O3)()},t.prototype.getImage=function(t){return(0,i.O3)()},t.prototype.getHitDetectionImage=function(){return(0,i.O3)()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return(0,i.O3)()},t.prototype.getImageSize=function(){return(0,i.O3)()},t.prototype.getOrigin=function(){return(0,i.O3)()},t.prototype.getSize=function(){return(0,i.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_=(0,r.Pq)(t)},t.prototype.listenImageChange=function(t){(0,i.O3)()},t.prototype.load=function(){(0,i.O3)()},t.prototype.unlistenImageChange=function(t){(0,i.O3)()},t}()},5393:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i,r=n(553),o=n(8443),s=n(9706),a=n(6620),l=n(8326),u=n(147),c=(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=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 c(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,l.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 r.Z.LOADED},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{"use strict";n.d(e,{Z:()=>i});const i=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}()},7539:(t,e,n)=>{"use strict";n.r(e),n.d(e,{createDefaultStyle:()=>h,createEditingStyle:()=>p,default:()=>d,toFunction:()=>u});var i=n(283),r=n(1345),o=n(4754),s=n(8958),a=n(9515),l=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=f,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_=f,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();function u(t){var e,n;"function"==typeof t?e=t:(Array.isArray(t)?n=t:((0,a.h)("function"==typeof t.getZIndex,41),n=[t]),e=function(){return n});return e}var c=null;function h(t,e){if(!c){var n=new r.Z({color:"rgba(255,255,255,0.4)"}),o=new s.Z({color:"#3399CC",width:1.25});c=[new l({image:new i.Z({fill:n,stroke:o,radius:5}),fill:n,stroke:o})]}return c}function p(){var t={},e=[255,255,255,1],n=[0,153,255,1];return t[o.Z.POLYGON]=[new l({fill:new r.Z({color:[255,255,255,.5]})})],t[o.Z.MULTI_POLYGON]=t[o.Z.POLYGON],t[o.Z.LINE_STRING]=[new l({stroke:new s.Z({color:e,width:5})}),new l({stroke:new s.Z({color:n,width:3})})],t[o.Z.MULTI_LINE_STRING]=t[o.Z.LINE_STRING],t[o.Z.CIRCLE]=t[o.Z.POLYGON].concat(t[o.Z.LINE_STRING]),t[o.Z.POINT]=[new l({image:new i.Z({radius:6,fill:new r.Z({color:n}),stroke:new s.Z({color:e,width:1.5})}),zIndex:1/0})],t[o.Z.MULTI_POINT]=t[o.Z.POINT],t[o.Z.GEOMETRY_COLLECTION]=t[o.Z.POLYGON].concat(t[o.Z.LINE_STRING],t[o.Z.POINT]),t}function f(t){return t.getGeometry()}const d=l},6313:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={POINT:"point",LINE:"line"}},6101:(t,e,n)=>{"use strict";n.d(e,{BB:()=>p,Ue:()=>s,lk:()=>a,n3:()=>u,nb:()=>h,nn:()=>l,qC:()=>c});var i,r=n(177),o=n(9515);function s(){return[1,0,0,1,0,0]}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function l(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 u(t,e,n){return r=e,o=0,s=0,a=n,l=0,u=0,(i=t)[0]=r,i[1]=o,i[2]=s,i[3]=a,i[4]=l,i[5]=u,i;var i,r,o,s,a,l,u}function c(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 h(t,e){var n,i=(n=e)[0]*n[3]-n[1]*n[2];(0,o.h)(0!==i,32);var r=e[0],s=e[1],a=e[2],l=e[3],u=e[4],c=e[5];return t[0]=l/i,t[1]=-s/i,t[2]=-a/i,t[3]=r/i,t[4]=(a*c-l*u)/i,t[5]=-(r*c-s*u)/i,t}function p(t){var e="matrix("+t.join(", ")+")";if(r.Id)return e;var n=i||(i=document.createElement("div"));return n.style.transform=e,n.style.transform}new Array(6)},4187:(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"}},o={};function s(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return r[t].call(n.exports,n,n.exports,s),n.exports}s.m=r,s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>"farmOS-map-chunk-"+{32:"523d68545e1a25157d7e",92:"bdd7313a963b396ca199",103:"dffc051dc4c0acb240b9",243:"c702eaf281b7eac4d74e",285:"e523d7899d834aa50e13",330:"ec4351c3926539fbaa91",395:"3b1d019eda73aaeb836b",412:"c83055136ca34590b1b8",553:"354c79fb56309c47e3db",663:"bc0127d89e31210003b4",687:"aa66783b9d2178503f6e",723:"2a6cb9e43ffc9d5d324d",807:"8825ee1b86645c38d8b1"}[t]+".js",s.miniCssF=t=>179===t?"farmOS-map.css":"farmOS-map-chunk-"+{92:"012d94c887bd9ea68319",103:"fd0e93dfff61960387d7",285:"3e8212879c613f957eb8",330:"3c7891839457615dbf3b",395:"f3968751da4833031510",412:"012d94c887bd9ea68319",553:"3e8212879c613f957eb8",663:"73306e8efbcf8e8e4e83",687:"3c7891839457615dbf3b",723:"4e78a2d2d641fb6fb527"}[t]+".css",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@farmos.org/farmos-map:",s.l=(n,i,r,o)=>{if(t[n])t[n].push(i);else{var a,l;if(void 0!==r)for(var u=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(f);var r=t[n];if(delete t[n],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(i))),e)return e(i)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&!t;)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),n=t=>new Promise(((e,n)=>{var i=s.miniCssF(t),r=s.p+i;if(((t,e)=>{for(var n=document.getElementsByTagName("link"),i=0;i{var r=document.createElement("link");r.rel="stylesheet",r.type="text/css",r.onerror=r.onload=o=>{if(r.onerror=r.onload=null,"load"===o.type)n();else{var s=o&&("load"===o.type?"missing":o.type),a=o&&o.target&&o.target.href||e,l=new Error("Loading CSS chunk "+t+" failed.\n("+a+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=s,l.request=a,r.parentNode.removeChild(r),i(l)}},r.href=e,document.head.appendChild(r)})(t,r,e,n)})),i={179:0},s.f.miniCss=(t,e)=>{i[t]?e.push(i[t]):0!==i[t]&&{92:1,103:1,285:1,330:1,395:1,412:1,553:1,663:1,687:1,723:1}[t]&&e.push(i[t]=n(t).then((()=>{i[t]=0}),(e=>{throw delete i[t],e})))},(()=>{var t={179:0};s.f.j=(e,n)=>{var i=s.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,r)=>i=t[e]=[n,r]));n.push(i[2]=r);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}}),"chunk-"+e,e)}};var e=(e,n)=>{var i,r,[o,a,l]=n,u=0;if(o.some((e=>0!==t[e]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);l&&l(s)}for(e&&e(n);u{"use strict";var t={};s.r(t),s.d(t,{Circle:()=>_i.Z,Fill:()=>yi.Z,Icon:()=>vi.default,IconImage:()=>mi.Z,Image:()=>xi.Z,RegularShape:()=>Ei.Z,Stroke:()=>Ci.Z,Style:()=>wi.default,Text:()=>Si}),s(5037);var e,n=s(5431),i=s(6885),r=s(4187),o=s(6101),a=s(8641),l=s(2710),u=s(1295),c=s(1900),h=(e=function(t,n){return e=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])},e(t,n)},function(t,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=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),p=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return h(e,t),e.prototype.dispatchRenderEvent=function(t,e){(0,r.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;(0,o.qC)(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,o.nb)(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r,o,s,l){var h,p=e.viewState;function f(t,e,n,i){return r.call(o,e,t?n:null,i)}var d=p.projection,g=(0,c.Cf)(t.slice(),d),_=[[0,0]];if(d.canWrapX()&&i){var y=d.getExtent(),v=(0,a.getWidth)(y);_.push([-v,0],[v,0])}for(var m=e.layerStatesArray,x=m.length,E=[],C=[],w=0;w<_.length;w++)for(var T=x-1;T>=0;--T){var S=m[T],O=S.layer;if(O.hasRenderer()&&(0,u.j)(S,p)&&s.call(l,O)){var b=O.getRenderer(),R=O.getSource();if(b&&R){var P=R.getWrapX()?g:t,I=f.bind(null,S.managed);C[0]=P[0]+_[w][0],C[1]=P[1]+_[w][1],h=b.forEachFeatureAtCoordinate(C,e,n,I,E)}if(h)return h}}if(0!==E.length){var L=1/E.length;return E.forEach((function(t,e){return t.distanceSq+=e*L})),E.sort((function(t,e){return t.distanceSq-e.distanceSq})),E.some((function(t){return h=t.callback(t.feature,t.layer,t.geometry)})),h}},e.prototype.forEachLayerAtPixel=function(t,e,n,i,o){return(0,r.O3)()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,r,o,s){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,r,i.uX,this,o,s)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,r.O3)()},e.prototype.scheduleExpireIconCache=function(t){l.c.canExpireCache()&&t.postRenderFunctions.push(f)},e}(n.Z);function f(t,e){l.c.expire()}const d=p;var g=s(5990),_=s(7380),y=s(8771),v=s(4562),m=s(245),x=s(147),E=s(5818),C=s(8326),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)}}();const T=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=(0,E.oL)(x.sG,g.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=m.XV+" ol-layers";var r=e.getViewport();return r.insertBefore(n.element_,r.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return w(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var i=new _.Z(t,void 0,e);n.dispatchEvent(i)}},e.prototype.disposeInternal=function(){(0,E.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(y.Z.PRECOMPOSE,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=0;--o)i[o].renderDeclutter(t);(0,C.hF)(this.element_,this.children_),this.dispatchRenderEvent(y.Z.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],c=l.layer;if(c.hasRenderer()&&(0,u.j)(l,o)&&r(c)){var h=c.getRenderer().getDataAtPixel(t,e,n);if(h){var p=i(c,h);if(p)return p}}}},e}(d);var S=s(2971),O=s(8714),b=s(2071),R=s(5487),P=s(8734),I=s(8630),L=s(2217);const M="pointerdown";var A=s(208),Z=s(177),F=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 N=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,E.oL)(r,M,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=(0,E.oL)(r,"pointermove",i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(R.Z.TOUCHMOVE,i.boundHandleTouchMove_,!!Z.bM&&{passive:!1}),i}return F(e,t),e.prototype.emulateClick_=function(t){var e=new I.Z(L.Z.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new I.Z(L.Z.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new I.Z(L.Z.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==L.Z.POINTERUP||e.type==L.Z.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==L.Z.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new I.Z(L.Z.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(E.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 I.Z(L.Z.POINTERDOWN,this.map_,t);for(var n in this.dispatchEvent(e),this.down_={},t){var r=t[n];this.down_[n]="function"==typeof r?i.Zn:r}if(0===this.dragListenerKeys_.length){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,E.oL)(o,L.Z.POINTERMOVE,this.handlePointerMove_,this),(0,E.oL)(o,L.Z.POINTERUP,this.handlePointerUp_,this),(0,E.oL)(this.element_,L.Z.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push((0,E.oL)(this.element_.getRootNode(),L.Z.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new I.Z(L.Z.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 I.Z(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,E.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(R.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,E.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(E.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(A.Z);var k=s(3536),D=s(2126);const j="layergroup",G="size",X="target",Y="view";var U=s(9515),W=s(9374),z=1/0;const B=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,W.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,U.h)(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=z&&(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>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=lt;){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;e0;)i=(n=this.dequeue()[0]).getKey(),0!==n.getState()||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++r,n.load())},e}(B);var q=s(4754),H=s(8375),$=s(7755);const J={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var Q=42,tt=256,et=s(2290),nt=s(3983);function it(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,c=a?a[0]:0,h=a?a[1]:0,p=t[0]+l/2+c,f=t[2]-l/2+c,d=t[1]+u/2+h,g=t[3]-u/2+h;p>f&&(f=p=(f+p)/2),d>g&&(g=d=(g+d)/2);var _=(0,nt.uZ)(i[0],p,f),y=(0,nt.uZ)(i[1],d,g);if(s&&n&&r){var v=30*r;_+=-v*Math.log(1+Math.max(0,p-i[0])/v)+v*Math.log(1+Math.max(0,i[0]-f)/v),y+=-v*Math.log(1+Math.max(0,d-i[1])/v)+v*Math.log(1+Math.max(0,i[1]-g)/v)}return[_,y]}}}function rt(t){return t}var ot=s(5537);function st(t,e,n,i){var r=(0,a.getWidth)(e)/n[0],o=(0,a.getHeight)(e)/n[1];return i?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function at(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,nt.uZ)(i,n/2,2*e)}function lt(t,e,n,i,r){return function(o,s,a,l){if(void 0!==o){var u=i?st(t,i,a,r):t;return(void 0===n||n)&&l?at(o,u,e):(0,nt.uZ)(o,e,u)}}}function ut(t){return void 0!==t?0:void 0}function ct(t){return void 0!==t?t:void 0}var ht=s(1015),pt=s(2033),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)}}(),dt=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=(0,W.f0)({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=(0,et.createProjection)(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&&(0,et.disableCoordinateWarning)(),i.center&&(i.center=(0,et.fromUserCoordinate)(i.center,n.projection_)),i.extent&&(i.extent=(0,et.fromUserExtent)(i.extent,n.projection_)),n.applyOptions_(i),n}return ft(e,t),e.prototype.applyOptions_=function(t){var e=(0,W.f0)({},t);for(var n in J)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,l=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,h=(0,et.createProjection)(t.projection,"EPSG:3857"),p=h.getExtent(),f=t.constrainOnlyCenter,d=t.extent;if(l||d||!h.isGlobal()||(f=!1,d=p),void 0!==t.resolutions){var g=t.resolutions;n=g[r],i=void 0!==g[o]?g[o]:g[g.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],c=n?st(l,n,s,i):l;if(a)return void 0===e||e?at(r,c,u):(0,nt.uZ)(r,u,c);var h=Math.min(c,r),p=Math.floor((0,ot.h7)(t,h,o));return t[p]>c&&p1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var i=0;i0},e.prototype.getInteracting=function(){return this.hints_[$.Z.INTERACTING]>0},e.prototype.cancelAnimations=function(){var t;this.setHint($.Z.ANIMATING,-this.hints_[$.Z.ANIMATING]);for(var e=0,n=this.animations_.length;e=0;--n){for(var i=this.animations_[n],r=!0,o=0,s=i.length;o0?l/a.duration:1;u>=1?(a.complete=!0,u=1):r=!1;var c=a.easing(u);if(a.sourceCenter){var h=a.sourceCenter[0],p=a.sourceCenter[1],f=a.targetCenter[0],d=a.targetCenter[1];this.nextCenter_=a.targetCenter;var g=h+c*(f-h),_=p+c*(d-p);this.targetCenter_=[g,_]}if(a.sourceResolution&&a.targetResolution){var y=1===c?a.targetResolution:a.sourceResolution+c*(a.targetResolution-a.sourceResolution);if(a.anchor){var v=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(y,0,v,!0);this.targetCenter_=this.calculateCenterZoom(m,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=y,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var x=1===c?(0,nt.$W)(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+c*(a.targetRotation-a.sourceRotation);if(a.anchor){var E=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(E,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[n]=null,this.setHint($.Z.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var C=i[0].callback;C&>(C,!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=this.getCenterInternal();return void 0!==i&&(n=[i[0]-e[0],i[1]-e[1]],(0,c.U1)(n,t-this.getRotation()),(0,c.IH)(n,e)),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?(0,et.toUserCoordinate)(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(J.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){var e=this.calculateExtentInternal(t);return(0,et.toUserExtent)(e,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();(0,U.h)(n,1);var i=this.getResolution();(0,U.h)(void 0!==i,2);var r=this.getRotation();return(0,U.h)(void 0!==r,3),(0,a.getForViewAndSize)(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(J.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal((0,et.fromUserExtent)(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),i=(0,a.getWidth)(t)/n[0],r=(0,a.getHeight)(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(J.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=yt(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,ot.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,nt.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,nt.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,U.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){(0,U.h)(!(0,a.isEmpty)(t),25);var i=(0,et.fromUserExtent)(t,this.getProjection());n=(0,pt.oJ)(i)}else if(t.getType()===q.Z.CIRCLE)i=(0,et.fromUserExtent)(t.getExtent(),this.getProjection()),(n=(0,pt.oJ)(i)).rotate(this.getRotation(),(0,a.getCenter)(i));else{var r=(0,et.getUserProjection)();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,c=0,h=r.length;c=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[$.Z.ANIMATING]||r[$.Z.INTERACTING]){var o=Date.now()-t.time>8;n=o?0:8,i=o?0:2}}e.getTilesLoading()0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!(0,ot.fS)(e,this.renderedAttributions_)){(0,C.ep)(this.ulElement_);for(var i=0,r=e.length;i0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:ht.Vv}):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(m.oj);r||0!==n?r&&0!==n&&this.element.classList.remove(m.oj):this.element.classList.add(m.oj)}this.label_.style.transform=i}this.rotation_=n}},e}(Tt.default);const Pt=Rt;var It=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 Lt=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:"–",c=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",h=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=c,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(R.Z.CLICK,n.handleClick_.bind(n,o),!1);var f=document.createElement("button");f.className=a,f.setAttribute("type","button"),f.title=h,f.appendChild("string"==typeof u?document.createTextNode(u):u),f.addEventListener(R.Z.CLICK,n.handleClick_.bind(n,-o),!1);var d=r+" "+m.XV+" "+m.hg,g=n.element;return g.className=d,g.appendChild(p),g.appendChild(f),n.duration_=void 0!==i.duration?i.duration:250,n}return It(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:ht.Vv})):e.setZoom(i)}}},e}(Tt.default);function Mt(t){var e=t||{},n=new O.Z;return(void 0===e.zoom||e.zoom)&&n.push(new Lt(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new Pt(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new Ot(e.attributionOptions)),n}var At=s(7182),Zt=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 Ft=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 Zt(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==L.Z.DBLCLICK){var n=t.originalEvent,i=t.map,r=t.coordinate,o=n.shiftKey?-this.delta_:this.delta_,s=i.getView();(0,At.zoomByDelta)(s,o,r,this.duration_),n.preventDefault(),e=!0}return!e},e}(At.default);var Nt=s(4515),kt=s(8683),Dt=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 jt=function(t){function e(e){var n=t.call(this,{stopDown:i.Dv})||this,r=e||{};n.kinetic_=r.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var o=r.condition?r.condition:(0,kt.$6)(kt.rM,kt.Xp);return n.condition_=r.onFocusOnly?(0,kt.$6)(kt.yZ,o):o,n.noKinetic_=!1,n}return Dt(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,n=(0,Nt.S)(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var i=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],r=t.map.getView();(0,c.bA)(i,r.getResolution()),(0,c.U1)(i,r.getRotation()),r.adjustCenterInternal(i)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.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:ht.Vv})}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}(Nt.Z);var Gt=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 Xt=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,{stopDown:i.Dv})||this).condition_=r.condition?r.condition:kt.aj,n.lastAngle_=void 0,n.duration_=void 0!==r.duration?r.duration:250,n}return Gt(e,t),e.prototype.handleDragEvent=function(t){if((0,kt.QL)(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==ut){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!(0,kt.QL)(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!(0,kt.QL)(t)||!(0,kt.v8)(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(Nt.Z);var Yt=s(291),Ut=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 Wt=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 Ut(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 pt.ZP([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(n.Z);var zt=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)}}(),Bt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.coordinate=n,r.mapBrowserEvent=i,r}return zt(e,t),e}(Yt.ZP);const Vt=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new Wt(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:kt.v8,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return zt(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 Bt("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 Bt(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 Bt("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(Nt.Z);var Kt=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){var n=this,i=e||{},r=i.condition?i.condition:kt.vY;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 Kt(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:ht.Vv})},e}(Vt);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 $t=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.defaultCondition_=function(t){return(0,kt.rM)(t)&&(0,kt.TN)(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 Ht(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==R.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];(0,c.U1)(l,r.getRotation()),(0,At.pan)(r,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(At.default);var Jt=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){var n=t.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:kt.TN,n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:100,n}return Jt(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==R.Z.KEYDOWN||t.type==R.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_,s=r.getView();(0,At.zoomByDelta)(s,o,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(At.default),te=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]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 ee=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)}}(),ne="trackpad";const ie=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:kt.Bx;return n.condition_=i.onFocusOnly?(0,kt.$6)(kt.yZ,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 ee(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!==R.Z.WHEEL)return!0;var e,n=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==R.Z.WHEEL&&(e=i.deltaY,Z.V&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=Z.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?ne:"wheel");var o=n.getView();if(this.mode_===ne&&!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,nt.uZ)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),(0,At.zoomByDelta)(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}(At.default);var re=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 oe=function(t){function e(e){var n=this,r=e||{},o=r;return o.stopDown||(o.stopDown=i.Dv),(n=t.call(this,o)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==r.threshold?r.threshold:.3,n.duration_=void 0!==r.duration?r.duration:250,n}return re(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!==ut){var l=s.getViewport().getBoundingClientRect(),u=(0,Nt.S)(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}(Nt.Z);var se=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 ae=function(t){function e(e){var n=this,r=e||{},o=r;return o.stopDown||(o.stopDown=i.Dv),(n=t.call(this,o)||this).anchor_=null,n.duration_=void 0!==r.duration?r.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return se(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(),c=(0,Nt.S)(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(c),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}(Nt.Z);function le(t){var e=t||{},n=new O.Z,i=new te(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new Xt),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new Ft({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new jt({onFocusOnly:e.onFocusOnly,kinetic:i})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new oe),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new ae({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new $t),n.push(new Qt({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new ie({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new qt({duration:e.zoomDuration})),n}var ue=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)}}(),ce=function(t){function e(e){return(e=(0,W.f0)({},e)).controls||(e.controls=Mt()),e.interactions||(e.interactions=le({onFocusOnly:!0})),t.call(this,e)||this}return ue(e,t),e.prototype.createRenderer=function(){return new T(this)},e}(wt);const he=ce,pe="preload",fe="useInterimTilesOnError";var de=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 ge=function(t){function e(e){var n=this,i=e||{},r=(0,W.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 de(e,t),e.prototype.getPreload=function(){return this.get(pe)},e.prototype.setPreload=function(t){this.set(pe,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(fe)},e.prototype.setUseInterimTilesOnError=function(t){this.set(fe,t)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(u.Z);var _e=s(8015),ye=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 ve=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 ye(e,t),e.prototype.changed=function(){this.dispatchEvent(R.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,r.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:(0,ht.YQ)(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}(A.Z);var me=s(9807),xe=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 Ee=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 xe(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,C.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_=(0,me.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(ve),Ce=function(){function t(t,e,n,i,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},l=(0,et.getTransform)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=l(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,a.getWidth)(i)==(0,a.getWidth)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,a.getWidth)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,a.getWidth)(this.targetProj_.getExtent()):null;var u=(0,a.getTopLeft)(n),c=(0,a.getTopRight)(n),h=(0,a.getBottomRight)(n),p=(0,a.getBottomLeft)(n),f=this.transformInv_(u),d=this.transformInv_(c),g=this.transformInv_(h),_=this.transformInv_(p),y=10+(o?Math.max(0,Math.ceil((0,nt.k3)((0,a.getArea)(n)/(o*o*256*256)))):0);if(this.addQuad_(u,c,h,p,f,d,g,_,y),this.wrapsXInSource_){var v=1/0;this.triangles_.forEach((function(t,e,n){v=Math.min(v,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])-v>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]-v>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-v>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-v>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.5&&h<1,d=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var g=(0,a.boundingExtent)([t,e,n,i]);d=(0,a.getWidth)(g)/this.targetWorldWidth_>.25||d}!f&&this.sourceProj_.isGlobal()&&h&&(d=h>.25||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||(0,a.intersects)(c,this.maxSourceExtent_)){var _=0;if(!(d||isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(l[0])&&isFinite(l[1])))if(u>0)d=!0;else if(1!=(_=(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(l[0])&&isFinite(l[1])?0:1))&&2!=_&&4!=_&&8!=_)return;if(u>0){if(!d){var y=[(t[0]+n[0])/2,(t[1]+n[1])/2],v=this.transformInv_(y),m=void 0;m=f?((0,nt.$W)(r[0],p)+(0,nt.$W)(s[0],p))/2-(0,nt.$W)(v[0],p):(r[0]+s[0])/2-v[0];var x=(r[1]+s[1])/2-v[1];d=m*m+x*x>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var E=[(e[0]+n[0])/2,(e[1]+n[1])/2],C=this.transformInv_(E),w=[(i[0]+t[0])/2,(i[1]+t[1])/2],T=this.transformInv_(w);this.addQuad_(t,e,E,w,r,o,C,T,u-1),this.addQuad_(w,E,n,i,T,C,s,l,u-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],O=this.transformInv_(S),b=[(n[0]+i[0])/2,(n[1]+i[1])/2],R=this.transformInv_(b);this.addQuad_(t,S,b,i,r,O,R,l,u-1),this.addQuad_(S,e,n,b,O,o,s,R,u-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&_)&&this.addTriangle_(t,n,i,r,s,l),0==(14&_)&&this.addTriangle_(t,n,e,r,s,o),_&&(0==(13&_)&&this.addTriangle_(e,i,t,o,l,r),0==(7&_)&&this.addTriangle_(e,i,n,o,l,s))}},t.prototype.calculateSourceExtent=function(){var t=(0,a.createEmpty)();return this.triangles_.forEach((function(e,n,i){var r=e.source;(0,a.extendCoordinate)(t,r[0]),(0,a.extendCoordinate)(t,r[1]),(0,a.extendCoordinate)(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();var we,Te={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Se={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0};function Oe(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 be(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Re(t,e,n,i){var r=(0,et.transform)(n,e,t),o=(0,et.getPointResolution)(e,i,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var l=t.getMetersPerUnit();void 0!==l&&(o/=l);var u=t.getExtent();if(!u||(0,a.containsCoordinate)(u,r)){var c=(0,et.getPointResolution)(t,o,r)/o;isFinite(c)&&c>0&&(o/=c)}return o}var Pe=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 Ie=function(t){function e(e,n,i,r,o,s,l,u,c,h,p,f){var d=t.call(this,o,0,{interpolate:!!f})||this;d.renderEdges_=void 0!==p&&p,d.pixelRatio_=l,d.gutter_=u,d.canvas_=null,d.sourceTileGrid_=n,d.targetTileGrid_=r,d.wrappedTileCoord_=s||o,d.sourceTiles_=[],d.sourcesListenerKeys_=null,d.sourceZ_=0;var g=r.getTileCoordExtent(d.wrappedTileCoord_),_=d.targetTileGrid_.getExtent(),y=d.sourceTileGrid_.getExtent(),v=_?(0,a.getIntersection)(g,_):g;if(0===(0,a.getArea)(v))return d.state=4,d;var m=e.getExtent();m&&(y=y?(0,a.getIntersection)(y,m):m);var x=r.getResolution(d.wrappedTileCoord_[0]),E=function(t,e,n,i){var r=(0,a.getCenter)(n),o=Re(t,e,r,i);return(!isFinite(o)||o<=0)&&(0,a.forEachCorner)(n,(function(n){return o=Re(t,e,n,i),isFinite(o)&&o>0})),o}(e,i,v,x);if(!isFinite(E)||E<=0)return d.state=4,d;var C=void 0!==h?h:.5;if(d.triangulation_=new Ce(e,i,v,y,E*C,x),0===d.triangulation_.getTriangles().length)return d.state=4,d;d.sourceZ_=n.getZForResolution(E);var w=d.triangulation_.calculateSourceExtent();if(y&&(e.canWrapX()?(w[1]=(0,nt.uZ)(w[1],y[1],y[3]),w[3]=(0,nt.uZ)(w[3],y[1],y[3])):w=(0,a.getIntersection)(w,y)),(0,a.getArea)(w)){for(var T=n.getTileRangeForExtentAndZ(w,d.sourceZ_),S=T.minX;S<=T.maxX;S++)for(var O=T.minY;O<=T.maxY;O++){var b=c(d.sourceZ_,S,O,l);b&&d.sourceTiles_.push(b)}0===d.sourceTiles_.length&&(d.state=4)}else d.state=4;return d}return Pe(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_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,n,i,r,o,s,l,u,c,h,p){var f=(0,C.E4)(Math.round(n*t),Math.round(n*e));if(p||(0,W.f0)(f,Te),0===u.length)return f.canvas;function d(t){return Math.round(t*n)/n}f.scale(n,n),f.globalCompositeOperation="lighter";var g=(0,a.createEmpty)();u.forEach((function(t,e,n){(0,a.extend)(g,t.extent)}));var _=(0,a.getWidth)(g),y=(0,a.getHeight)(g),v=(0,C.E4)(Math.round(n*_/i),Math.round(n*y/i));p||(0,W.f0)(v,Te);var m=n/i;u.forEach((function(t,e,n){var i=t.extent[0]-g[0],r=-(t.extent[3]-g[3]),o=(0,a.getWidth)(t.extent),s=(0,a.getHeight)(t.extent);t.image.width>0&&t.image.height>0&&v.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,i*m,r*m,o*m,s*m)}));var x=(0,a.getTopLeft)(s);return l.getTriangles().forEach((function(t,e,r){var s=t.source,a=t.target,l=s[0][0],u=s[0][1],c=s[1][0],h=s[1][1],_=s[2][0],y=s[2][1],m=d((a[0][0]-x[0])/o),E=d(-(a[0][1]-x[1])/o),C=d((a[1][0]-x[0])/o),w=d(-(a[1][1]-x[1])/o),T=d((a[2][0]-x[0])/o),S=d(-(a[2][1]-x[1])/o),O=l,b=u;l=0,u=0;var R=[[c-=O,h-=b,0,0,C-m],[_-=O,y-=b,0,0,T-m],[0,0,c,h,w-E],[0,0,_,y,S-E]],P=(0,nt.SV)(R);if(P){if(f.save(),f.beginPath(),function(){if(void 0===we){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Oe(t,4,5,4,0),Oe(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;we=be(e,0)||be(e,4)||be(e,8)}return we}()||!p){f.moveTo(C,w);for(var I=m-C,L=E-w,M=0;M<4;M++)f.lineTo(C+d((M+1)*I/4),w+d(M*L/3)),3!=M&&f.lineTo(C+d((M+1)*I/4),w+d((M+1)*L/3));f.lineTo(T,S)}else f.moveTo(C,w),f.lineTo(m,E),f.lineTo(T,S);f.clip(),f.transform(P[0],P[2],P[1],P[3],m,E),f.translate(g[0]-O,g[3]-b),f.scale(i/n,-i/n),f.drawImage(v.canvas,0,0),f.restore()}})),h&&(f.save(),f.globalCompositeOperation="source-over",f.strokeStyle="black",f.lineWidth=1,l.getTriangles().forEach((function(t,e,n){var i=t.target,r=(i[0][0]-x[0])/o,s=-(i[0][1]-x[1])/o,a=(i[1][0]-x[0])/o,l=-(i[1][1]-x[1])/o,u=(i[2][0]-x[0])/o,c=-(i[2][1]-x[1])/o;f.beginPath(),f.moveTo(a,l),f.lineTo(r,s),f.lineTo(u,c),f.closePath(),f.stroke()})),f.restore()),f.canvas}(i,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,l,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,E.oL)(e,R.Z.CHANGE,(function(n){var i=e.getState();2!=i&&3!=i&&4!=i||((0,E.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(E.bN),this.sourcesListenerKeys_=null},e}(ve);var Le=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.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.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 Me(t,e,n,i,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=n,r.maxY=i,r):new Le(t,e,n,i)}const Ae=Le;var Ze=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)}}(),Fe=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,a.createEmpty)(),n.tmpTileRange_=new Ae(0,0,0,0),n}return Ze(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=(0,o.nn)(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!(0,a.containsCoordinate)(r,i))return null;for(var s=e.pixelRatio,l=e.viewState.projection,u=e.viewState,c=n.getRenderSource(),h=c.getTileGridForProjection(u.projection),p=c.getTilePixelRatio(e.pixelRatio),f=h.getZForResolution(u.resolution);f>=h.getMinZoom();--f){var d=h.getTileCoordForCoordAndZ(i,f),g=c.getTile(f,d[1],d[2],s,l);if(!(g instanceof Ee||g instanceof Ie))return null;if(2===g.getState()){var _=h.getOrigin(f),y=(0,mt.Pq)(h.getTileSize(f)),v=h.getResolution(f),m=Math.floor(p*((i[0]-_[0])/v-d[1]*y[0])),x=Math.floor(p*((_[1]-i[1])/v-d[2]*y[1]));return this.getImageData(g.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,s=i.projection,l=i.resolution,u=i.center,c=i.rotation,h=t.pixelRatio,p=this.getLayer(),f=p.getSource(),d=f.getRevision(),g=f.getTileGridForProjection(s),_=g.getZForResolution(l,f.zDirection),y=g.getResolution(_),v=t.extent,x=n.extent&&(0,et.fromUserExtent)(n.extent,s);x&&(v=(0,a.getIntersection)(v,(0,et.fromUserExtent)(n.extent,s)));var E=f.getTilePixelRatio(h),C=Math.round(t.size[0]*E),w=Math.round(t.size[1]*E);if(c){var T=Math.round(Math.sqrt(C*C+w*w));C=T,w=T}var S=y*C/2/E,O=y*w/2/E,b=[u[0]-S,u[1]-O,u[0]+S,u[1]+O],R=g.getTileRangeForExtentAndZ(v,_),P={};P[_]={};var I=this.createLoadedTileFinder(f,s,P),L=this.tmpExtent,M=this.tmpTileRange_;this.newTiles_=!1;for(var A=R.minX;A<=R.maxX;++A)for(var Z=R.minY;Z<=R.maxY;++Z){var F=this.getTile(_,A,Z,t);if(this.isDrawableTile(F)){var N=(0,r.sq)(this);if(2==F.getState()){P[_][F.tileCoord.toString()]=F;var k=F.inTransition(N);this.newTiles_||!k&&-1!==this.renderedTiles.indexOf(F)||(this.newTiles_=!0)}if(1===F.getAlpha(N,t.time))continue}var D=g.getTileCoordChildTileRange(F.tileCoord,M,L),j=!1;D&&(j=I(_+1,D)),j||g.forEachTileCoordParentTileRange(F.tileCoord,I,M,L)}var G=y/l;(0,o.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/E,1/E,c,-C/2,-w/2);var X=(0,o.BB)(this.pixelTransform);this.useContainer(e,X,n.opacity,this.getBackground(t));var Y=this.context,U=Y.canvas;(0,o.nb)(this.inversePixelTransform,this.pixelTransform),(0,o.qC)(this.tempTransform,C/2,w/2,G,G,0,-C/2,-w/2),U.width!=C||U.height!=w?(U.width=C,U.height=w):this.containerReused||Y.clearRect(0,0,C,w),x&&this.clipUnrotated(Y,t,x),f.getInterpolate()||(0,W.f0)(Y,Te),this.preRender(Y,t),this.renderedTiles.length=0;var z,B,V,K=Object.keys(P).map(Number);K.sort(ot.kK),1!==n.opacity||this.containerReused&&!f.getOpaque(t.viewState.projection)?(z=[],B=[]):K=K.reverse();for(var q=K.length-1;q>=0;--q){var H=K[q],$=f.getTilePixelSize(H,h,s),J=g.getResolution(H)/y,Q=$[0]*J*G,tt=$[1]*J*G,nt=g.getTileCoordForCoordAndZ((0,a.getTopLeft)(b),H),it=g.getTileCoordExtent(nt),rt=(0,o.nn)(this.tempTransform,[E*(it[0]-b[0])/y,E*(b[3]-it[3])/y]),st=E*f.getGutterForProjection(s),at=P[H];for(var lt in at){var ut=(F=at[lt]).tileCoord,ct=nt[1]-ut[1],ht=Math.round(rt[0]-(ct-1)*Q),pt=nt[2]-ut[2],ft=Math.round(rt[1]-(pt-1)*tt),dt=ht-(A=Math.round(rt[0]-ct*Q)),gt=ft-(Z=Math.round(rt[1]-pt*tt)),_t=_===H,yt=!1;if(!(k=_t&&1!==F.getAlpha((0,r.sq)(this),t.time)))if(z){V=[A,Z,A+dt,Z,A+dt,Z+gt,A,Z+gt];for(var vt=0,mt=z.length;vt0&&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,U.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,U.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,U.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 Ge(t,e,n,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function Xe(t,e,n){return t+"/"+e+"/"+n}function Ye(t){return Xe(t[0],t[1],t[2])}function Ue(t){return(t[1]<=this.minZoom;){if(e(a,2===this.zoomFactor_?Me(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||e0?i:Math.max(s/l[0],o/l[1]),c=r+1,h=new Array(c),p=0;pn||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}(Be.Z),en=function(t){function e(e,n){var i=t.call(this,e)||this;return i.tile=n,i}return Qe(e,t),e}(Yt.ZP);const nn=tn;function rn(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,U.h)(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}var on=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 sn=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 on(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,r.sq)(n),o=n.getState();1==o?(this.tileLoadingKeys_[i]=!0,e="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=3==o?"tileloaderror":2==o?"tileloadend":void 0),null!=e&&this.dispatchEvent(new en(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;rOpenStreetMap 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 dn(e,t),e}(fn);var _n=s(6421),yn=s.n(_n),vn=s(3965),mn=s.n(vn),xn=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)}}(),En=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"];function Cn(t){var e=t.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&t.msFullscreenEnabled||e.requestFullscreen&&t.fullscreenEnabled)}function wn(t){return!!(t.webkitIsFullScreen||t.msFullscreenElement||t.fullscreenElement)}function Tn(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}const Sn=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(R.Z.CLICK,n.handleClick_.bind(n),!1),n.setClassName_(n.button_,n.isInFullscreen_),n.element.className="".concat(n.cssClassName_," ").concat(m.XV," ").concat(m.hg),n.element.appendChild(n.button_),n}return xn(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(Cn(e))if(wn(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():Tn(t)}(n):Tn(n)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var e=this.isInFullscreen_;this.isInFullscreen_=wn(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,C.$H)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,C.$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(X,this.boundHandleMapTargetChange_),t.prototype.setMap.call(this,e),this.handleMapTargetChange_(),e&&e.addChangeListener(X,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,e=0,n=t.length;e=s)break;++d}f=this.scaleBar_?this.createScaleBar(h,c,l):c.toFixed(p<0?-p:0)+" "+l,this.renderedHTML_!=f&&(this.innerElement_.innerHTML=f,this.renderedHTML_=f),this.renderedWidth_!=h&&(this.innerElement_.style.width=h+"px",this.renderedWidth_=h),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,n){for(var i="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),r=[],o=t/this.scaleBarSteps_,s="#ffffff",a=0;a
'+this.createMarker("relative",a)+(a%2==0||2===this.scaleBarSteps_?this.createStepText(a,t,!1,e,n):"")+""),a===this.scaleBarSteps_-1&&r.push(this.createStepText(a+1,t,!0,e,n)),s="#ffffff"===s?"#000000":"#ffffff";return'
'+(this.scaleBarText_?'
'+i+"
":"")+r.join("")+"
"},e.prototype.createMarker=function(t,e){return'
'},e.prototype.createStepText=function(t,e,n,i,r){var o=(0===t?0:Math.round(i/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return'
'+o+"
"},e.prototype.getScaleForResolution=function(){var t=(0,et.getPointResolution)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,H.ZP.METERS),e=this.dpi_||Ln;return parseFloat(t.toString())*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(Tt.default);const An=Mn;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)}}();const Fn=function(t){function e(e){var n=this,i=e||{};return(n=t.call(this,i)||this).condition_=i.condition?i.condition:kt.vY,n.lastAngle_=void 0,n.lastMagnitude_=void 0,n.lastScaleDelta_=0,n.duration_=void 0!==i.duration?i.duration:400,n}return Zn(e,t),e.prototype.handleDragEvent=function(t){if((0,kt.QL)(t)){var e=t.map,n=e.getSize(),i=t.pixel,r=i[0]-n[0]/2,o=n[1]/2-i[1],s=Math.atan2(o,r),a=Math.sqrt(r*r+o*o),l=e.getView();if(void 0!==this.lastAngle_){var u=this.lastAngle_-s;l.adjustRotationInternal(u)}this.lastAngle_=s,void 0!==this.lastMagnitude_&&l.adjustResolutionInternal(this.lastMagnitude_/a),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/a),this.lastMagnitude_=a}},e.prototype.handleUpEvent=function(t){if(!(0,kt.QL)(t))return!0;var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!(0,kt.QL)(t)&&!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0)},e}(Nt.Z);var Nn=s(1090),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="accuracy",jn="accuracyGeometry",Gn="altitude",Xn="altitudeAccuracy",Yn="heading",Un="position",Wn="projection",zn="speed",Bn="tracking",Vn="trackingOptions",Kn=function(t){function e(e){var n=t.call(this,R.Z.ERROR)||this;return n.code=e.code,n.message=e.message,n}return kn(e,t),e}(Yt.ZP),qn=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.position_=null,n.transform_=et.identityTransform,n.watchId_=void 0,n.addChangeListener(Wn,n.handleProjectionChanged_),n.addChangeListener(Bn,n.handleTrackingChanged_),void 0!==i.projection&&n.setProjection(i.projection),void 0!==i.trackingOptions&&n.setTrackingOptions(i.trackingOptions),n.setTracking(void 0!==i.tracking&&i.tracking),n}return kn(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=(0,et.getTransformFromProjections)((0,et.get)("EPSG:4326"),t),this.position_&&this.set(Un,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set(Dn,e.accuracy),this.set(Gn,null===e.altitude?void 0:e.altitude),this.set(Xn,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(Yn,null===e.heading?void 0:(0,nt.Yr)(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var n=this.transform_(this.position_);this.set(Un,n),this.set(zn,null===e.speed?void 0:e.speed);var i=(0,pt.iu)(this.position_,e.accuracy);i.applyTransform(this.transform_),this.set(jn,i),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Kn(t))},e.prototype.getAccuracy=function(){return this.get(Dn)},e.prototype.getAccuracyGeometry=function(){return this.get(jn)||null},e.prototype.getAltitude=function(){return this.get(Gn)},e.prototype.getAltitudeAccuracy=function(){return this.get(Xn)},e.prototype.getHeading=function(){return this.get(Yn)},e.prototype.getPosition=function(){return this.get(Un)},e.prototype.getProjection=function(){return this.get(Wn)},e.prototype.getSpeed=function(){return this.get(zn)},e.prototype.getTracking=function(){return this.get(Bn)},e.prototype.getTrackingOptions=function(){return this.get(Vn)},e.prototype.setProjection=function(t){this.set(Wn,(0,et.get)(t))},e.prototype.setTracking=function(t){this.set(Bn,t)},e.prototype.setTrackingOptions=function(t){this.set(Vn,t)},e}(S.Z);const Hn=qn;var $n=s(188),Jn=s(9271),Qn=s(933);class ti extends Tt.default{constructor(t){const e=t||{};super({element:document.createElement("div"),target:e.target});const n=e.className||"ol-geolocate",i=e.label||'',r=e.tooltip||"Geolocate",o=document.createElement("button");o.innerHTML=i,o.title=r,o.className=n,o.type="button",o.addEventListener(R.Z.CLICK,this.handleClick.bind(this),!1);const{element:s}=this;s.className=`${n} ${m.XV} ${m.hg}`,s.appendChild(o)}handleClick(t){t.preventDefault(),this.active=this.active||!1,this.active?this.deactivate():this.activate()}activate(){this.active=!0,this.element.classList.add("active");const t=this.getMap();this.geolocation=this.geolocation||new Hn({trackingOptions:{enableHighAccuracy:!0},projection:t.getView().getProjection()}),this.positionFeature=this.positionFeature||new Nn.default,this.accuracyFeature=this.accuracyFeature||new Nn.default,this.geolocateLayer=this.geolocateLayer||new Jn.default({map:t,source:new Qn.default({features:[this.positionFeature,this.accuracyFeature]})}),this.geolocation.setTracking(!0),this.geolocation.on("change:position",(()=>{this.updateFeatures()})),this.geolocation.on("change:accuracyGeometry",(()=>{this.updateFeatures()})),this.geolocation.once("change:position",(()=>{this.updateView()}))}deactivate(){this.active=!1,this.element.classList.remove("active"),this.geolocation.setTracking(!1),this.positionFeature.setGeometry(),this.accuracyFeature.setGeometry()}updateFeatures(){this.coordinates=this.geolocation.getPosition(),this.positionFeature.setGeometry(new $n.default(this.coordinates)),this.accuracyFeature.setGeometry(this.geolocation.getAccuracyGeometry())}updateView(){const t=this.getMap();t.getView().setCenter(this.coordinates),t.getView().setZoom(18)}}const ei=ti,ni={layers:()=>[new P.default({title:"Base layers",fold:"close",layers:[new De({title:"OpenStreetMap",type:"base",source:new gn})]})],controls(t){const e=[new(yn())(t.layerSwitcher),new Sn,new Pt({autoHide:!1}),new An({units:t.units}),new ei,new(mn())("nominatim",{provider:"osm",placeholder:"Search for address...",limit:5,autoComplete:!0})];return!1===t.controls?[]:Array.isArray(t.controls)?t.controls:"object"==typeof t.controls?Mt(t.controls).extend(e):"function"==typeof t.controls?t.controls(Mt().extend(e).getArray()):Mt().extend(e)},interactions(t){const e=[new Fn,new oe];return!1===t.interactions?[]:Array.isArray(t.interactions)?t.interactions:"object"==typeof t.interactions?le(t.interactions).extend(e):"function"==typeof t.interactions?t.interactions(le().extend(e).getArray()):le().extend(e)}};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)}}(),ri=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,wrapX:e.wrapX})||this;return n.resolution=void 0,n.distance=void 0!==e.distance?e.distance:20,n.minDistance=e.minDistance||0,n.interpolationRatio=0,n.features=[],n.geometryFunction=e.geometryFunction||function(t){var e=t.getGeometry();return(0,U.h)(e.getType()==q.Z.POINT,10),e},n.createCustomCluster_=e.createCluster,n.source=null,n.boundRefresh_=n.refresh.bind(n),n.updateDistance(n.distance,n.minDistance),n.setSource(e.source||null),n}return ii(e,t),e.prototype.clear=function(e){this.features.length=0,t.prototype.clear.call(this,e)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,e,n){this.source.loadFeatures(t,e,n),e!==this.resolution&&(this.resolution=e,this.refresh())},e.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},e.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},e.prototype.getMinDistance=function(){return this.minDistance},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(R.Z.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(R.Z.CHANGE,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.updateDistance=function(t,e){var n=0===t?0:Math.min(e,t)/t,i=t!==this.distance||this.interpolationRatio!==n;this.distance=t,this.minDistance=e,this.interpolationRatio=n,i&&this.refresh()},e.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=(0,a.createEmpty)(),e=this.distance*this.resolution,n=this.source.getFeatures(),i={},o=0,s=n.length;o=0;--i){var r=this.geometryFunction(t[i]);r?(0,c.IH)(n,r.getCoordinates()):t.splice(i,1)}(0,c.bA)(n,1/t.length);var o=(0,a.getCenter)(e),s=this.interpolationRatio,l=new $n.default([n[0]*(1-s)+o[0]*s,n[1]*(1-s)+o[1]*s]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new Nn.default({geometry:l,features:t})},e}(Qn.default);const oi=ri;function si(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 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)}}(),li=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,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:r,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,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).params_=i.params||{},n.hidpi_=void 0===i.hidpi||i.hidpi,n.tmpExtent_=(0,a.createEmpty)(),n.setKey(n.getKeyForParams_()),n}return ai(e,t),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.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,n,i,r,o){var s=this.urls;if(s){var a=r.getCode().split(/:(?=\d+$)/).pop();return o.SIZE=e[0]+","+e[1],o.BBOX=n.join(","),o.BBOXSR=a,o.IMAGESR=a,o.DPI=Math.round(o.DPI?o.DPI*i:90*i),si((1==s.length?s[0]:s[(0,nt.$W)(Ue(t),s.length)]).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_?t:1},e.prototype.updateParams=function(t){(0,W.f0)(this.params_,t),this.setKey(this.getKeyForParams_())},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_||(e=1);var r=i.getTileCoordExtent(t,this.tmpExtent_),o=(0,mt.Pq)(i.getTileSize(t[0]),this.tmpSize);1!=e&&(o=(0,mt.bA)(o,e,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return(0,W.f0)(s,this.params_),this.getRequestUrl_(t,o,r,e,n,s)}},e}(cn);const ui=li;var ci="1.3.0";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)}}(),pi=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,a.createEmpty)(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return hi(e,t),e.prototype.getFeatureInfoUrl=function(t,e,n,i){var r=(0,et.get)(n),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(r));var l=s.getZForResolution(e,this.zDirection),u=s.getTileCoordForCoordAndZ(t,l);if(!(s.getResolutions().length<=u[0])){var c=s.getResolution(u[0]),h=s.getTileCoordExtent(u,this.tmpExtent_),p=(0,mt.Pq)(s.getTileSize(u[0]),this.tmpSize),f=this.gutter_;0!==f&&(p=(0,mt.f3)(p,f,this.tmpSize),h=(0,a.buffer)(h,c*f,h)),o&&o!==r&&(c=Re(o,r,t,c),h=(0,et.transformExtent)(h,r,o),t=(0,et.transform)(t,r,o));var d={SERVICE:"WMS",VERSION:ci,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};(0,W.f0)(d,this.params_,i);var g=Math.floor((t[0]-h[0])/c),_=Math.floor((h[3]-t[1])/c);return d[this.v13_?"I":"X"]=g,d[this.v13_?"J":"Y"]=_,this.getRequestUrl_(u,p,h,1,o||r,d)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var n={SERVICE:"WMS",VERSION:ci,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,W.f0)(n,e),si(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,U.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(","),si(1==s.length?s[0]:s[(0,nt.$W)(Ue(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,W.f0)(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||ci;this.v13_=function(t,e){for(var n=(""+t).split("."),i="1.3".split("."),r=0;rs)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=(0,mt.Pq)(i.getTileSize(t[0]),this.tmpSize),l=this.gutter_;0!==l&&(s=(0,mt.f3)(s,l,this.tmpSize),o=(0,a.buffer)(o,r*l,o)),1!=e&&(s=(0,mt.bA)(s,e,this.tmpSize));var u={SERVICE:"WMS",VERSION:ci,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return(0,W.f0)(u,this.params_),this.getRequestUrl_(t,s,o,e,n,u)}},e}(cn);const fi=pi;var di=s(9466),gi=s(7537),_i=s(283),yi=s(1345),vi=s(4115),mi=s(3713),xi=s(8443),Ei=s(5393),Ci=s(8958),wi=s(7539),Ti=s(6313);const Si=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=(0,mt.Pq)(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new yi.Z({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:Ti.Z.POINT,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},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.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=(0,mt.Pq)(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}(),Oi={blue:"rgba(51,153,255,1)",green:"rgba(51,153,51,1)",darkgreen:"rgba(51,153,51,1)",grey:"rgba(204,204,204,0.7)",orange:"rgba(255,153,51,1)",red:"rgba(204,0,0,1)",purple:"rgba(204,51,102,1)",yellow:"rgba(255,255,51,1)"},bi=t=>{let e;e=t?Oi[t]?Oi[t]:t:Oi.yellow;const n=new Ci.Z({color:e,width:2}),i=new yi.Z({color:"rgba(0,0,0,0)"}),r=new _i.Z({stroke:n,fill:i,radius:4});return new wi.default({stroke:n,fill:i,image:r})},Ri={};function Pi(t){const e=t.get("features").length;let n=Ri[e];return n||(n=new wi.default({image:new _i.Z({radius:14,stroke:new Ci.Z({color:"rgba(255,255,255,1)"}),fill:new yi.Z({color:"green"})}),text:new Si({text:e.toString(),fill:new yi.Z({color:"rgba(255,255,255,1)"})})}),Ri[e]=n),n}var Ii=s(5289),Li=s(8813);function Mi(t,e){return"geojson"===t.toLowerCase()?(n=e,(new di.Z).readFeatures(n,Li.Z)):"wkt"===t.toLowerCase()?(i=e).includes("MULTIPOINT")||i.includes("MULTILINESTRING")||i.includes("MULTIPOLYGON")||i.includes("GEOMETRYCOLLECTION")?new Ii.Z({splitCollection:!0}).readFeatures(i,Li.Z):[(new Ii.Z).readFeature(i,Li.Z)]:void 0;var n,i}function Ai(t,e=null){const n=e||this.map.getLayers().getArray();for(let e=0;ei(e,n,t):bi(n),a=[o],l=new Qn.default({attributions:a});return new Jn.default({title:e,source:l,style:s,visible:r})}(n)),"cluster"===e.toLowerCase()){if(!n.url)throw new Error("Missing a Cluster GeoJSON url.");i=function({title:e="cluster",url:n,styleFunction:i=Pi,visible:r=!0,attribution:o=""}){const s=new di.Z,a=[o],l=new Qn.default({url:n,format:s,attributions:a}),u=new oi({distance:50,source:l});return new Jn.default({title:e,source:u,style:(e,n)=>i(e,n,t),visible:r})}(n)}if("geojson"===e.toLowerCase()){if(!n.url&&!n.geojson)throw new Error("Missing a GeoJSON url or object.");i=function({title:e="geojson",url:n="",geojson:i={},color:r="orange",styleFunction:o=null,visible:s=!0,attribution:a=""}){const l=o?(e,n)=>o(e,n,t):bi(r),u=new di.Z,c=[a];let h;return h=n?new Qn.default({url:n,format:u,attributions:c}):new Qn.default({features:Mi("geojson",i),format:u,attributions:c}),new Jn.default({title:e,source:h,style:l,visible:s})}(n)}if("arcgis-tile"===e.toLowerCase()){if(!n.url)throw new Error("Missing a ArcGIS MapServer url.");i=function({title:t="arcgis-tile",url:e,params:n,visible:i=!0,base:r=!1,attribution:o=""}){const s=new ui({url:e,params:n,attributions:[o]});return new De({title:t,source:s,visible:i,type:r?"base":"normal"})}(n)}if("wkt"===e.toLowerCase()){if(!n.wkt)throw new Error("Missing a WKT string.");i=function({title:e="wkt",wkt:n,color:i="orange",styleFunction:r=null,visible:o=!0,attribution:s=""}){const a=r?(e,n)=>r(e,n,t):bi(i),l=Mi("wkt",n),u=[s],c=new Qn.default({features:l,attributions:u});return new Jn.default({title:e,source:c,style:a,visible:o})}(n)}if("wms"===e.toLowerCase()){if(!n.url)throw new Error("Missing a WMS url.");i=function({title:t="wms",url:e,params:n,visible:i=!0,base:r=!1,attribution:o=""}){const s=new fi({url:e,params:n,attributions:[o]});return new De({title:t,source:s,visible:i,type:r?"base":"normal"})}(n)}if("xyz"===e.toLowerCase()){if(!n.url)throw new Error("Missing an XYZ url.");i=function({title:t="xyz",url:e,tileSize:n=256,visible:i=!0,base:r=!1,attribution:o=""}){const s=new fn({url:e,tileSize:n,attributions:[o]});return new De({title:t,source:s,visible:i,type:r?"base":"normal"})}(n)}if(i){if(n.group){let t;t=this.getLayerByName(n.group),t||(t=new P.default({title:n.group}),this.map.addLayer(t)),t.getLayers().push(i)}else this.map.addLayer(i);return this.map.dispatchEvent("farmOS-map.layer",i),i}throw new Error("Invalid layer type.")}(0,gi.Nn)(!0);var Fi=s(3437),Ni=s.n(Fi);function ki(t){const e=new(Ni());return this.map.addOverlay(e),this.map.on("singleclick",(n=>{const i=t(n);i&&(e.show(n.coordinate,i),e.dispatchEvent("farmOS-map.popup"))})),e}var Di=s(7673);function ji(t=null){const e=(0,a.createEmpty)(),n=t||this.map.getLayerGroup();(0,Di.Z)(n,(t=>{if("function"==typeof t.getSource){const n=t.getSource();if("null"!==n&&n instanceof Qn.default&&"ready"===n.getState()&&n.getFeatures().length>0){(0,a.extend)(e,n.getExtent());const t={size:this.map.getSize(),padding:[20,20,20,20],maxZoom:20};this.map.getView().fit(e,t)}}}))}function Gi(t){const e=(0,a.createEmpty)(),n=t.getSource();if("null"!==n&&n instanceof Qn.default&&"ready"===n.getState()&&n.getFeatures().length>0){(0,a.extend)(e,n.getExtent());const t={size:this.map.getSize(),padding:[20,20,20,20],maxZoom:20};this.map.getView().fit(e,t)}}async function Xi(t,e={}){return this.attachBehavior(this.instanceManager.namedBehaviors[t],e)}async function Yi(t,e={}){return await this.defaultBehaviorsAttached.finally(),t.attach(this,e)}async function Ui(t){const e=t.reduce(((t,e)=>{const n=e.weight||0;return t[n]=t[n]||[],t[n].push(e),t}),{});return Object.keys(e).sort(((t,e)=>tt.then((()=>{const t=e[n];return Promise.all(t.map((t=>t.attach(this))))}))),Promise.resolve())}var Wi=s(3945);var zi=s(3126);const Bi=class{constructor(){this.instances=[],this.namedBehaviors={...zi.default},this.behaviors={loading:zi.default.loading,rememberLayer:zi.default.rememberLayer}}create(t,e){const n=(({target:t,options:e={}})=>{const n="us"===e.units?"us":"metric";return e.units=n,{units:n,target:t,options:e,map:new he({target:t,layers:ni.layers(),controls:ni.controls(e),interactions:ni.interactions(e),view:new vt({center:[0,0],zoom:2})}),addLayer:Zi,addPopup:ki,getLayerByName:Ai,readFeatures:Mi,zoomToVectors:ji,zoomToLayer:Gi,addBehavior:Xi,attachBehavior:Yi,attachBehaviorsByWeight:Ui,measureGeometry:Wi.Yt}})({target:t,options:e});return n.instanceManager=this,this.instances.push(n),n.defaultBehaviorsAttached=n.attachBehaviorsByWeight(Object.values(this.behaviors)),n}destroy(t){const e=this.targetIndex(t);e>-1&&(this.instances[e].map.setTarget(null),this.instances.splice(e,1))}targetIndex(t){return this.instances.findIndex((e=>e.target===t))}};void 0===window.farmOS&&(window.farmOS={});const Vi=new Bi;window.farmOS.map=Vi,window.farmOS.map.MapInstanceManager=Bi,window.farmOS.map.projection=Li.Z})()})();