netlify-cms-widget-map
Version:
Widget for editing spatial data in Netlify CMS.
1 lines • 345 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@emotion/core"),require("prop-types"),require("react"),require("netlify-cms-ui-default")):"function"==typeof define&&define.amd?define("NetlifyCmsWidgetMap",["@emotion/core","prop-types","react","netlify-cms-ui-default"],e):"object"==typeof exports?exports.NetlifyCmsWidgetMap=e(require("@emotion/core"),require("prop-types"),require("react"),require("netlify-cms-ui-default")):t.NetlifyCmsWidgetMap=e(t.NetlifyCmsDefaultExports.EmotionCore,t.NetlifyCmsDefaultExports.PropTypes,t.React,t.NetlifyCmsUiDefault)}(window,(function(t,e,n,i){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=21)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e,n){t.exports=function(){"use strict";function t(t,i,o,r,s){!function t(n,i,o,r,s){for(;r>o;){if(r-o>600){var a=r-o+1,l=i-o+1,h=Math.log(a),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(o,Math.floor(i-l*u/a+c)),Math.min(r,Math.floor(i+(a-l)*u/a+c)),s)}var p=n[i],f=o,d=r;for(e(n,o,i),s(n[r],p)>0&&e(n,o,r);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[o],p)?e(n,o,d):e(n,++d,r),d<=i&&(o=d+1),i<=d&&(r=d-1)}}(t,i,o||0,r||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function r(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,o){o||(o=d(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var r=e;r<n;r++){var s=t.children[r];a(o,t.leaf?i(s):s)}return o}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(e,n,i,o,r){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=o)){var a=n+Math.ceil((i-n)/o/2)*o;t(e,a,n,i,r),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,o=[];e;){for(var r=0;r<e.children.length;r++){var s=e.children[r],a=e.leaf?i(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):o.push(s))}e=o.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var i=0;i<e.children.length;i++){var o=e.children[i],r=e.leaf?this.toBBox(o):o;if(f(t,r)){if(e.leaf||p(t,r))return!0;n.push(o)}}e=n.pop()}return!1},i.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=d([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,i,r,s=this.data,a=this.toBBox(t),l=[],h=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=h.pop(),r=!0),s.leaf){var u=o(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}r||s.leaf||!p(s,a)?i?(n++,s=i.children[n],r=!1):s=null:(l.push(s),h.push(n),n=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,i){var o,s=n-e+1,a=this._maxEntries;if(s<=a)return r(o=d(t.slice(e,n+1)),this.toBBox),o;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(o=d([])).leaf=!1,o.height=i;var l=Math.ceil(s/a),h=l*Math.ceil(Math.sqrt(a));_(t,e,n,h,this.compareMinX);for(var u=e;u<=n;u+=h){var c=Math.min(u+h-1,n);_(t,u,c,l,this.compareMinY);for(var p=u;p<=c;p+=l){var f=Math.min(p+l-1,c);o.children.push(this._build(t,p,f,i-1))}}return r(o,this.toBBox),o},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var o=1/0,r=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],h=u(l),c=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-h);c<r?(r=c,o=h<o?h:o,s=l):c===r&&h<o&&(o=h,s=l)}e=s||e.children[0]}var p,f;return e},i.prototype._insert=function(t,e,n){var i=n?t:this.toBBox(t),o=[],r=this._chooseSubtree(i,this.data,e,o);for(r.children.push(t),a(r,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var s=this._chooseSplitIndex(n,o,i),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,r(n,this.toBBox),r(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,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,o,r,a,l,h,c,p=1/0,f=1/0,d=e;d<=n-e;d++){var _=s(t,0,d,this.toBBox),g=s(t,d,n,this.toBBox),y=(o=_,r=g,a=Math.max(o.minX,r.minX),l=Math.max(o.minY,r.minY),h=Math.min(o.maxX,r.maxX),c=Math.min(o.maxY,r.maxY),Math.max(0,h-a)*Math.max(0,c-l)),v=u(_)+u(g);y<p?(p=y,i=d,f=v<f?v:f):y===p&&v<f&&(f=v,i=d)}return i||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var i=t.leaf?this.compareMinX:l,o=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,o)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var o=this.toBBox,r=s(t,0,e,o),l=s(t,n-e,n,o),h=c(r)+c(l),u=e;u<n-e;u++){var p=t.children[u];a(r,t.leaf?o(p):p),h+=c(r)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?o(d):d),h+=c(l)}return h},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():r(t[e],this.toBBox)},i}()},function(t,e,n){var i=n(19);i&&i.__esModule&&(i=i.default),t.exports="string"==typeof i?i:i.toString()},function(t,e){t.exports=i},,,,,,,,,,,,,,function(t,e,n){(e=n(20)(!1)).push([t.i,'.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid rgb(179,197,219);\n background-color: rgba(255,255,255,0.4);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: rgba(0,60,136,0.3);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n.ol-scale-line-inner {\n border: 1px solid #eee;\n border-top: none;\n color: #eee;\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: #000000;\n float: right;\n z-Index: 10;\n}\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 12px;\n z-Index: 11;\n color: #000000;\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-text {\n position: absolute;\n font-size: 14px;\n text-align: center;\n bottom: 25px;\n color: #000000;\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-Index: 9;\n box-sizing: border-box;\n border: 1px solid black;\n}\n\n.ol-unsupported {\n display: none;\n}\n.ol-viewport, .ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n.ol-control {\n position: absolute;\n background-color: rgba(255,255,255,0.4);\n border-radius: 4px;\n padding: 2px;\n}\n.ol-control:hover {\n background-color: rgba(255,255,255,0.6);\n}\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: white;\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: rgba(0,60,136,0.5);\n border: none;\n border-radius: 2px;\n}\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n.ol-compass {\n display: block;\n font-weight: normal;\n font-size: 1.2em;\n will-change: transform;\n}\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n background-color: rgba(0,60,136,0.7);\n}\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n.ol-attribution a {\n color: rgba(0,60,136,0.7);\n text-decoration: none;\n}\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: #000;\n text-shadow: 0 0 2px #fff;\n font-size: 12px;\n}\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n.ol-attribution button {\n flex-shrink: 0;\n}\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n.ol-attribution:not(.ol-collapsed) {\n background: rgba(255,255,255,0.8);\n}\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid #7b98bc;\n height: 150px;\n margin: 2px;\n width: 150px;\n}\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 2px;\n left: 2px;\n position: absolute;\n}\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n.ol-overviewmap:not(.ol-collapsed) {\n background: rgba(255,255,255,0.8);\n}\n.ol-overviewmap-box {\n border: 2px dotted rgba(0,60,136,0.7);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]),t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=(s=i,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(l," */")),r=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[n].concat(r).concat([o]).join("\n")}var s,a,l;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(i)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(o[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);i&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},function(t,e,n){"use strict";n.r(e),n.d(e,"NetlifyCmsWidgetMap",(function(){return Mu}));var i=n(2),o=n.n(i),r=n(1),s=n.n(r),a=n(0),l=n(4),h=n.n(l),u=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function c(t,e){return t>e?1:t<e?-1:0}function p(t,e,n){var i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;var o=void 0;if(n>0){for(o=1;o<i;++o)if(t[o]<e)return o-1}else if(n<0){for(o=1;o<i;++o)if(t[o]<=e)return o}else for(o=1;o<i;++o){if(t[o]==e)return o;if(t[o]<e)return"function"==typeof n?n(e,t[o-1],t[o])>0?o-1:o:t[o-1]-e<e-t[o]?o-1:o}return i-1}function f(t,e,n){for(;e<n;){var i=t[e];t[e]=t[n],t[n]=i,++e,--n}}function d(t,e){for(var n=Array.isArray(e)?e:[e],i=n.length,o=0;o<i;o++)t[t.length]=n[o]}function _(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function g(){return!0}function y(){return!1}function v(){}function m(){return function(){throw new Error("Unimplemented abstract method.")}()}var x=0;function C(t){return t.ol_uid||(t.ol_uid=String(++x))}var w,S="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",b=-1!==S.indexOf("firefox"),E=(-1!==S.indexOf("safari")&&S.indexOf("chrom"),-1!==S.indexOf("webkit")&&-1==S.indexOf("edge")),O=-1!==S.indexOf("macintosh"),T="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,R="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,P="undefined"!=typeof Image&&Image.prototype.decode,I=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}(),F=(w=function(t,e){return(w=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)},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}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),M=function(t){function e(e){var n=this,i="Assertion failed. See https://openlayers.org/en/"+("v"+"6.9.0".split("-")[0])+"/doc/errors/#"+e+" for details.";return(n=t.call(this,i)||this).code=e,n.name="AssertionError",n.message=i,n}return F(e,t),e}(Error);function k(t,e){if(!t)throw new M(e)}var L;new Array(6);function D(t,e,n,i,o,r,s){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t[4]=r,t[5]=s,t}function A(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 j(t,e,n,i,o,r,s,a){var l=Math.sin(r),h=Math.cos(r);return t[0]=i*h,t[1]=o*l,t[2]=-i*l,t[3]=o*h,t[4]=s*i*h-a*i*l+e,t[5]=s*o*l+a*o*h+n,t}function G(t,e){var n,i=(n=e)[0]*n[3]-n[1]*n[2];k(0!==i,32);var o=e[0],r=e[1],s=e[2],a=e[3],l=e[4],h=e[5];return t[0]=a/i,t[1]=-r/i,t[2]=-s/i,t[3]=o/i,t[4]=(s*h-a*l)/i,t[5]=-(o*h-r*l)/i,t}function z(t){var e="matrix("+t.join(", ")+")";if(R)return e;var n=L||(L=document.createElement("div"));return n.style.transform=e,n.style.transform}var N="bottom-left",W="bottom-right",X="top-left",Y="top-right",K=0,Z=1,B=2,V=4,U=8,q=16;function H(t){for(var e=ot(),n=0,i=t.length;n<i;++n)ut(e,t[n]);return e}function J(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Q(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function $(t,e,n){var i,o;return(i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*i+(o=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0)*o}function tt(t,e){return nt(t,e[0],e[1])}function et(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function nt(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function it(t,e){var n=t[0],i=t[1],o=t[2],r=t[3],s=e[0],a=e[1],l=K;return s<n?l|=q:s>o&&(l|=V),a<i?l|=U:a>r&&(l|=B),l===K&&(l=Z),l}function ot(){return[1/0,1/0,-1/0,-1/0]}function rt(t,e,n,i,o){return o?(o[0]=t,o[1]=e,o[2]=n,o[3]=i,o):[t,e,n,i]}function st(t){return rt(1/0,1/0,-1/0,-1/0,t)}function at(t,e,n,i,o){return ct(st(o),t,e,n,i)}function lt(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function ht(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function ut(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function ct(t,e,n,i,o){for(;n<i;n+=o)pt(t,e[n],e[n+1]);return t}function pt(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function ft(t,e){var n;return(n=e(_t(t)))||(n=e(gt(t)))||(n=e(St(t)))?n:(n=e(wt(t)))||!1}function dt(t){var e=0;return Ot(t)||(e=bt(t)*xt(t)),e}function _t(t){return[t[0],t[1]]}function gt(t){return[t[2],t[1]]}function yt(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function vt(t,e){var n;return e===N?n=_t(t):e===W?n=gt(t):e===X?n=wt(t):e===Y?n=St(t):k(!1,13),n}function mt(t,e,n,i,o){var r=e*i[0]/2,s=e*i[1]/2,a=Math.cos(n),l=Math.sin(n),h=r*a,u=r*l,c=s*a,p=s*l,f=t[0],d=t[1],_=f-h+p,g=f-h-p,y=f+h-p,v=f+h+p,m=d-u-c,x=d-u+c,C=d+u+c,w=d+u-c;return rt(Math.min(_,g,y,v),Math.min(m,x,C,w),Math.max(_,g,y,v),Math.max(m,x,C,w),o)}function xt(t){return t[3]-t[1]}function Ct(t,e,n){var i=n||[1/0,1/0,-1/0,-1/0];return Et(t,e)?(t[0]>e[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]<e[2]?i[2]=t[2]:i[2]=e[2],t[3]<e[3]?i[3]=t[3]:i[3]=e[3]):st(i),i}function wt(t){return[t[0],t[3]]}function St(t){return[t[2],t[3]]}function bt(t){return t[2]-t[0]}function Et(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Ot(t){return t[2]<t[0]||t[3]<t[1]}function Tt(t,e,n,i){var o=[];if(i>1)for(var r=t[2]-t[0],s=t[3]-t[1],a=0;a<i;++a)o.push(t[0]+r*a/i,t[1],t[2],t[1]+s*a/i,t[2]-r*a/i,t[3],t[0],t[3]-s*a/i);else o=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(o,o,2);for(var l=[],h=[],u=(a=0,o.length);a<u;a+=2)l.push(o[a]),h.push(o[a+1]);return function(t,e,n){return rt(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),n)}(l,h,n)}function Rt(t,e,n){return Math.min(Math.max(t,e),n)}var Pt="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},It="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Ft(t,e,n,i,o,r){var s=o-n,a=r-i;if(0!==s||0!==a){var l=((t-n)*s+(e-i)*a)/(s*s+a*a);l>1?(n=o,i=r):l>0&&(n+=s*l,i+=a*l)}return Mt(t,e,n,i)}function Mt(t,e,n,i){var o=n-t,r=i-e;return o*o+r*r}function kt(t){return t*Math.PI/180}function Lt(t,e){var n=t%e;return n*e<0?n+e:n}function Dt(t,e,n){return t+n*(e-t)}var At=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,jt=/^([a-z]*)$|^hsla?\(.*\)$/i;function Gt(t){return"string"==typeof t?t:Zt(t)}function zt(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""}var Nt,Wt,Xt=(Nt={},Wt=0,function(t){var e;if(Nt.hasOwnProperty(t))e=Nt[t];else{if(Wt>=1024){var n=0;for(var i in Nt)0==(3&n++)&&(delete Nt[i],--Wt)}e=function(t){var e,n,i,o,r;if(jt.exec(t)&&(t=zt(t)),At.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),n=parseInt(t.substr(1+1*a,a),16),i=parseInt(t.substr(1+2*a,a),16),o=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,l&&(o=(o<<4)+o)),r=[e,n,i,o/255]}else 0==t.indexOf("rgba(")?Kt(r=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((r=t.slice(4,-1).split(",").map(Number)).push(1),Kt(r)):k(!1,14);return r}(t),Nt[t]=e,++Wt}return e});function Yt(t){return Array.isArray(t)?t:Xt(t)}function Kt(t){return t[0]=Rt(t[0]+.5|0,0,255),t[1]=Rt(t[1]+.5|0,0,255),t[2]=Rt(t[2]+.5|0,0,255),t[3]=Rt(t[3],0,1),t}function Zt(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:t[3])+")"}var Bt=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=Vt(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var o=Vt(t,e,n);this.cache_[o]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function Vt(t,e,n){return e+":"+t+":"+(n?Gt(n):"null")}var Ut=new Bt;var qt=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}(),Ht="propertychange",Jt="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,o=arguments.length;i<o;++i){var r=arguments[i];if(null!=r)for(var s in r)r.hasOwnProperty(s)&&(n[s]=r[s])}return n};function Qt(t){for(var e in t)delete t[e]}var $t="function"==typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e};function te(t){var e;for(e in t)return!1;return!e}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])})(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=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 ee(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?new qt(t):t,n=e.type;e.target||(e.target=this.eventTarget_||this);var i,o=this.listeners_&&this.listeners_[n];if(o){var r=this.dispatching_||(this.dispatching_={}),s=this.pendingRemovals_||(this.pendingRemovals_={});n in r||(r[n]=0,s[n]=0),++r[n];for(var a=0,l=o.length;a<l;++a)if(!1===(i="handleEvent"in o[a]?o[a].handleEvent(e):o[a].call(this,e))||e.propagationStopped){i=!1;break}if(--r[n],0===r[n]){var h=s[n];for(delete s[n];h--;)this.removeEventListener(n,v);delete r[n]}return i}},e.prototype.disposeInternal=function(){this.listeners_&&Qt(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var i=n.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=v,++this.pendingRemovals_[t]):(n.splice(i,1),0===n.length&&delete this.listeners_[t]))}},e}(u),ie="change",oe="error",re="contextmenu",se="click",ae="dblclick",le="keydown",he="keypress",ue="load",ce="resize",pe="touchmove",fe="wheel";function de(t,e,n,i,o){if(i&&i!==t&&(n=n.bind(i)),o){var r=n;n=function(){t.removeEventListener(e,n),r.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function _e(t,e,n,i){return de(t,e,n,i,!0)}function ge(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Qt(t))}var 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])})(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)}}(),ve=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 ye(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(ie)},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),o=0;o<n;++o)i[o]=de(this,t[o],e);return i}return de(this,t,e)},e.prototype.onceInternal=function(t,e){var n;if(Array.isArray(t)){var i=t.length;n=new Array(i);for(var o=0;o<i;++o)n[o]=_e(this,t[o],e)}else n=_e(this,t,e);return e.ol_key=n,n},e.prototype.unInternal=function(t,e){var n=e.ol_key;if(n)!function(t){if(Array.isArray(t))for(var e=0,n=t.length;e<n;++e)ge(t[e]);else ge(t)}(n);else if(Array.isArray(t))for(var i=0,o=t.length;i<o;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(ne);ve.prototype.on,ve.prototype.once,ve.prototype.un;var me=ve,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])})(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,n,i){var o=t.call(this,e)||this;return o.key=n,o.oldValue=i,o}return xe(e,t),e}(qt),we=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,C(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return xe(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_&&Jt({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:"+t,this.dispatchEvent(new Ce(n,t,e)),n=Ht,this.dispatchEvent(new Ce(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:"+t,e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:"+t,e)},e.prototype.set=function(t,e,n){var i=this.values_||(this.values_={});if(n)i[t]=e;else{var o=i[t];i[t]=e,o!==e&&this.notify(t,o)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&Jt(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],te(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(me),Se="opacity",be="visible",Ee="extent",Oe="zIndex",Te="maxResolution",Re="minResolution",Pe="maxZoom",Ie="minZoom",Fe="source",Me=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(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)}}(),ke=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=Jt({},e);return"object"==typeof e.properties&&(delete i.properties,Jt(i,e.properties)),i[Se]=void 0!==e.opacity?e.opacity:1,k("number"==typeof i[Se],64),i[be]=void 0===e.visible||e.visible,i[Oe]=e.zIndex,i[Te]=void 0!==e.maxResolution?e.maxResolution:1/0,i[Re]=void 0!==e.minResolution?e.minResolution:0,i[Ie]=void 0!==e.minZoom?e.minZoom:-1/0,i[Pe]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==i.className?e.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return Me(e,t),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=Rt(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),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 m()},e.prototype.getLayerStatesArray=function(t){return m()},e.prototype.getExtent=function(){return this.get(Ee)},e.prototype.getMaxResolution=function(){return this.get(Te)},e.prototype.getMinResolution=function(){return this.get(Re)},e.prototype.getMinZoom=function(){return this.get(Ie)},e.prototype.getMaxZoom=function(){return this.get(Pe)},e.prototype.getOpacity=function(){return this.get(Se)},e.prototype.getSourceState=function(){return m()},e.prototype.getVisible=function(){return this.get(be)},e.prototype.getZIndex=function(){return this.get(Oe)},e.prototype.setExtent=function(t){this.set(Ee,t)},e.prototype.setMaxResolution=function(t){this.set(Te,t)},e.prototype.setMinResolution=function(t){this.set(Re,t)},e.prototype.setMaxZoom=function(t){this.set(Pe,t)},e.prototype.setMinZoom=function(t){this.set(Ie,t)},e.prototype.setOpacity=function(t){k("number"==typeof t,64),this.set(Se,t)},e.prototype.setVisible=function(t){this.set(be,t)},e.prototype.setZIndex=function(t){this.set(Oe,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(we),Le="prerender",De="postrender",Ae="precompose",je="postcompose",Ge="rendercomplete",ze="undefined",Ne="ready",We=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])})(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 Xe(t,e){if(!t.visible)return!1;var n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}var Ye=function(t){function e(e){var n=this,i=Jt({},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,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(Fe,n.handleSourcePropertyChange_);var o=e.source?e.source:null;return n.setSource(o),n}return We(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(Fe)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():ze},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(ge(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=de(t,ie,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.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return n.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(ge(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(ge(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=de(t,Ae,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);k(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=de(this,ie,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Fe,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}(ke);function Ke(t,e){for(var n=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function Ze(t,e){var n=Math.cos(e),i=Math.sin(e),o=t[0]*n-t[1]*i,r=t[1]*n+t[0]*i;return t[0]=o,t[1]=r,t}function Be(t,e){var n=t[0]-e[0],i=t[1]-e[1];return n*n+i*i}function Ve(t,e){if(e.canWrapX()){var n=bt(e.getExtent()),i=Ue(t,e,n);i&&(t[0]-=i*n)}return t}function Ue(t,e,n){var i=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){var r=n||bt(i);o=Math.floor((t[0]-i[0])/r)}return o}var qe=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])})(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 He(t,e){Ut.expire()}var Je=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return qe(e,t),e.prototype.dispatchRenderEvent=function(t,e){m()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;j(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),G(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o,r,s,a){var l,h=e.viewState;function u(t,e,n,i){return o.call(r,e,t?n:null,i)}var c=h.projection,p=Ve(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&i){var d=bt(c.getExtent());f.push([-d,0],[d,0])}for(var _=e.layerStatesArray,g=_.length,y=[],v=[],m=0;m<f.length;m++)for(var x=g-1;x>=0;--x){var C=_[x],w=C.layer;if(w.hasRenderer()&&Xe(C,h)&&s.call(a,w)){var S=w.getRenderer(),b=w.getSource();if(S&&b){var E=b.getWrapX()?p:t,O=u.bind(null,C.managed);v[0]=E[0]+f[m][0],v[1]=E[1]+f[m][1],l=S.forEachFeatureAtCoordinate(v,e,n,O,y)}if(l)return l}}if(0!==y.length){var T=1/y.length;return y.forEach((function(t,e){return t.distanceSq+=e*T})),y.sort((function(t,e){return t.distanceSq-e.distanceSq})),y.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,n,i,o){return m()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,i,o,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,i,g,this,o,r)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){m()},e.prototype.scheduleExpireIconCache=function(t){Ut.canExpireCache()&&t.postRenderFunctions.push(He)},e}(u),Qe=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])})(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=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.inversePixelTransform=n,r.frameState=i,r.context=o,r}return Qe(e,t),e}(qt),tn=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"),en=["style","variant","weight","size","lineHeight","family"],nn=function(t){var e=t.match(tn);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,o=en.length;i<o;++i){var r=e[i+1];void 0!==r&&(n[en[i]]=r)}return n.families=n.family.split(/,\s?/),n};function on(t){return 1===t?"":String(Math.round(100*t)/100)}function rn(t,e,n,i){var o;return n&&n.length?o=n.shift():R?o=new OffscreenCanvas(t||300,e||300):(o=document.createElement("canvas")).style.all="unset",t&&(o.width=t),e&&(o.height=e),o.getContext("2d",i)}function sn(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function an(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}var ln=[],hn=[0,0,0,0],un=new we;(new ne).setSize=function(){console.warn("labelCache is deprecated.")};var cn,pn,fn=null,dn={},_n=function(){var t,e,n=["monospace","serif"],i=n.length,o="wmytzilWMYTZIL@#/&?$%10";function r(t,r,s){for(var a=!0,l=0;l<i;++l){var h=n[l];if(e=vn(t+" "+r+" 32px "+h,o),s!=h){var u=vn(t+" "+r+" 32px "+s+","+h,o);a=a&&u!=e}}return!!a}function s(){for(var e=!0,n=un.getKeys(),i=0,o=n.length;i<o;++i){var s=n[i];un.get(s)<100&&(r.apply(this,s.split("\n"))?(Qt(dn),fn=null,cn=void 0,un.set(s,100)):(un.set(s,un.get(s)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var n=nn(e);if(n)for(var i=n.families,o=0,a=i.length;o<a;++o){var l=i[o],h=n.style+"\n"+n.weight+"\n"+l;void 0===un.get(h)&&(un.set(h,100,!0),r(n.style,n.weight,l)||(un.set(h,0,!0),void 0===t&&(t=setInterval(s,32))))}}}(),gn=function(t){var e=dn[t];if(null==e){if(R){var n=nn(t),i=yn(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else pn||((pn=document.createElement("div")).innerHTML="M",pn.style.minHeight="0",pn.style.maxHeight="none",pn.style.height="auto",pn.style.padding="0",pn.style.border="none",pn.style.position="absolute",pn.style.display="block",pn.style.left="-99999px"),pn.style.font=t,document.body.appendChild(pn),e=pn.offsetHeight,document.body.removeChild(pn);dn[t]=e}return e};function yn(t,e){return fn||(fn=rn(1,1)),t!=cn&&(fn.font=t,cn=fn.font),fn.measureText(e)}function vn(t,e){return yn(t,e).width}function mn(t,e,n){if(e in n)return n[e];var i=vn(t,e);return n[e]=i,i}function xn(t,e,n,i,o,r,s,a,l,h,u){t.save(),1!==n&&(t.globalAlpha*=n),e&&t.setTransform.apply(t,e),i.contextInstructions?(t.translate(l,h),t.scale(u[0],u[1]),function(t,e){for(var n=t.contextInstructions,i=0,o=n.length;i<o;i+=2)Array.isArray(n[i+1])?e[n[i]].apply(e,n[i+1]):e[n[i]]=n[i+1]}(i,t)):u[0]<0||u[1]<0?(t.translate(l,h),t.scale(u[0],u[1]),t.drawImage(i,o,r,s,a,0,0,s,a)):t.drawImage(i,o,r,s,a,l,h,s*u[0],a*u[1]),t.restore()}var Cn=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])})(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)}}(),wn=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=de(un,Ht,e.redrawText.bind(e)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className="ol-unselectable ol-layers";var o=e.getViewport();return o.insertBefore(n.element_,o.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return Cn(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var i=new $e(t,void 0,e);n.dispatchEvent(i)}},e.prototype.disposeInternal=function(){ge(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(Ae,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var i=[],o=null,r=0,s=e.length;r<s;++r){var a=e[r];if(t.layerIndex=r,Xe(a,n)&&(a.sourceState==Ne||a.sourceState==ze)){var l=a.layer,h=l.render(t,o);h&&(h!==o&&(this.children_.push(h),o=h),"getDeclutter"in l&&i.push(l))}}for(r=i.length-1;r>=0;--r)i[r].renderDeclutter(t);!function(t,e){for(var n=t.childNodes,i=0;;++i){var o=n[i],r=e[i];if(!o&&!r)break;o!==r&&(o?r?t.insertBefore(r,o):(t.removeChild(o),--i):t.appendChild(r))}}(this.element_,this.children_),this.dispatchRenderEvent(je,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,o){for(var r=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],h=l.layer;if(h.hasRenderer()&&Xe(l,r)&&o(h)){var u=h.getRenderer().getDataAtPixel(t,e,n);if(u){var c=i(h,u);if(c)return c}}}},e}(Je),Sn="add",bn="remove",En=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])})(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)}}(),On="length",Tn=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.element=n,o.index=i,o}return En(e,t),e}(qt),Rn=function(t){function e(e,n){var i=t.call(this)||this;i.on,i.once,i.un;var o=n||{};if(i.unique_=!!o.unique,i.array_=e||[],i.unique_)for(var r=0,s=i.array_.length;r<s;++r)i.assertUnique_(i.array_[r],r);return i.updateLength_(),i}return En(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e<n;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)t(e[n],n,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(On)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Tn(Sn,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)if(e[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Tn(bn,e,t)),e},e.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Tn(bn,i,t)),this.dispatchEvent(new Tn(Sn,e,t))}else{for(var o=n;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(On,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===t&&n!==e)throw new M(58)},e}(we),Pn=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])})(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)}}(),In="layers",Fn=function(t){function e(e){var n=this,i=e||{},o=Jt({},i);delete o.layers;var r=i.layers;return(n=t.call(this,o)||this).on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(In,n.handleLayersChanged_),r?Array.isArray(r)?r=new Rn(r.slice(),{unique:!0}):k("function"==typeof r.getArray,43):r=new Rn(void 0,{unique:!0}),n.setLayers(r),n}return Pn(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(ge),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(de(t,Sn,this.handleLayersAdd_,this),de(t,bn,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(ge);Qt(this.listenerKeys_);for(var n=t.getArray(),i=0,o=n.length;i<o;i++){var r=n[i];this.listenerKeys_[C(r)]=[de(r,Ht,this.handleLayerChange_,this),de(r,ie,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[C(e)]=[de(e,Ht,this.handleLayerChange_,this),de(e,ie,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=C(t.element);this.listenerKeys_[e].forEach(ge),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(In)},e.prototype.setLayers=function(t){this.set(In,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],n=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var i=this.getLayerState(),o=i.zIndex;t||void 0!==i.zIndex||(o=0);for(var r=n,s=e.length;r<s;r++){var a=e[r];a.opacity*=i.opacity,a.visible=a.visible&&i.visible,a.maxResolution=Math.min(a.maxResolution,i.maxResolution),a.minResolution=Math.max(a.minResolution,i.minResolution),a.minZoom=Math.max(a.minZoom,i.minZoom),a.maxZoom=Math.min(a.maxZoom,i.maxZoom),void 0!==i.extent&&(void 0!==a.extent?a.extent=Ct(a.extent,i.extent):a.extent=i.extent),void 0===a.zIndex&&(a.zIndex=o)}return e},e.prototype.getSourceState=function(){return Ne},e}(ke),Mn=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])})(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)}}(),kn=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.map=n,o.frameState=void 0!==i?i:null,o}return Mn(e,t),e}(qt),Ln=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])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not