(()=>{const{application:n,Stimulus:a}=window;if(!n)return null;n.register("sfn-map",class extends a.Controller{static get values(){return{nodesUrl:String,nodes:Array,instances:Array,mapKitReady:Boolean,mapConfigs:Object,jwt:String}}static get targets(){return["container"]}connect(){window.mapInstances={},window.mapConfigs={Americas:{cameraDistance:6e8}}}jwtValueChanged(){this.mapKitReadyValue=!0}mapKitReadyValueChanged(){fetch(this.nodesUrlValue).then((n=>n.json())).then((n=>{this.nodesValue=n,this.instancesValue=["Americas"]}))}instancesValueChanged(){const n=this.nodesValue,a=this.jwtValue;(async()=>this.instancesValue.reduce(((e,t)=>`\n ${e}\n ${((n,e)=>{const t=e;return window.mapInstances[n]=t,`\n
\n `})(t,n)}\n `),""))().then((n=>{this.containerTarget.innerHTML=n}))}})})();; /*! For license information please see map-instance.js.LICENSE.txt */ (()=>{var t={4096:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(1601),i=r.n(n),o=r(6314),a=r.n(o)()(i());a.push([t.id,'.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid rgb(179,197,219);\n background-color: rgba(255,255,255,0.4);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: rgba(0,60,136,0.3);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n.ol-scale-line-inner {\n border: 1px solid #eee;\n border-top: none;\n color: #eee;\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: #000000;\n float: right;\n z-index: 10;\n}\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 12px;\n z-index: 11;\n color: #000000;\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-text {\n position: absolute;\n font-size: 14px;\n text-align: center;\n bottom: 25px;\n color: #000000;\n text-shadow: -2px 0 #FFFFFF, 0 2px #FFFFFF, 2px 0 #FFFFFF, 0 -2px #FFFFFF;\n}\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid black;\n}\n\n.ol-unsupported {\n display: none;\n}\n.ol-viewport, .ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n.ol-viewport canvas {\n all: unset;\n}\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n.ol-control {\n position: absolute;\n background-color: rgba(255,255,255,0.4);\n border-radius: 4px;\n padding: 2px;\n}\n.ol-control:hover {\n background-color: rgba(255,255,255,0.6);\n}\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: white;\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: rgba(0,60,136,0.5);\n border: none;\n border-radius: 2px;\n}\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n.ol-compass {\n display: block;\n font-weight: normal;\n font-size: 1.2em;\n will-change: transform;\n}\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n background-color: rgba(0,60,136,0.7);\n}\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n.ol-attribution a {\n color: rgba(0,60,136,0.7);\n text-decoration: none;\n}\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: #000;\n text-shadow: 0 0 2px #fff;\n font-size: 12px;\n}\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n.ol-attribution button {\n flex-shrink: 0;\n}\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n.ol-attribution:not(.ol-collapsed) {\n background: rgba(255,255,255,0.8);\n}\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid #7b98bc;\n height: 150px;\n margin: 2px;\n width: 150px;\n}\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 2px;\n left: 2px;\n position: absolute;\n}\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n.ol-overviewmap:not(.ol-collapsed) {\n background: rgba(255,255,255,0.8);\n}\n.ol-overviewmap-box {\n border: 2px dotted rgba(0,60,136,0.7);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const s=a},6314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=o),r&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=r):p[2]=r),i&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=i):p[4]="".concat(i)),e.push(p))}},e}},1601:t=>{"use strict";t.exports=function(t){return t[1]}},251:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,p=-7,h=r?i-1:0,c=r?-1:1,f=t[e+h];for(h+=c,o=f&(1<<-p)-1,f>>=-p,p+=s;p>0;o=256*o+t[e+h],h+=c,p-=8);for(a=o&(1<<-p)-1,o>>=-p,p+=n;p>0;a=256*a+t[e+h],h+=c,p-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,u=8*o-i-1,p=(1<>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=p):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?c/l:c*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=p?(s=0,a=p):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=d,s/=256,i-=8);for(a=a<0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*y}},5335:(t,e,r)=>{"use strict";t.exports=i;var n=r(251);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o=4294967296,a=1/o,s="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function u(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function p(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function h(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+x(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+w(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,o=r.buf;if(n=(112&(i=o[r.pos++]))>>4,i<128)return u(t,n,e);if(n|=(127&(i=o[r.pos++]))<<3,i<128)return u(t,n,e);if(n|=(127&(i=o[r.pos++]))<<10,i<128)return u(t,n,e);if(n|=(127&(i=o[r.pos++]))<<17,i<128)return u(t,n,e);if(n|=(127&(i=o[r.pos++]))<<24,i<128)return u(t,n,e);if(n|=(1&(i=o[r.pos++]))<<31,i<128)return u(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&s?function(t,e,r){return s.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var n="",i=e;i239?4:l>223?3:l>191?2:1;if(i+p>r)break;1===p?l<128&&(u=l):2===p?128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===p?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===p&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,p=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),i+=p}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var r=l(this);for(t=t||[];this.pos127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,o=0;o55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&p(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&p(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},5341:function(t){t.exports=function(){"use strict";function t(t,n,i,o,a){!function t(r,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=n-i+1,u=Math.log(s),p=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*p*(s-p)/s)*(l-s/2<0?-1:1);t(r,n,Math.max(i,Math.floor(n-l*p/s+h)),Math.min(o,Math.floor(n+(s-l)*p/s+h)),a)}var c=r[n],f=i,d=o;for(e(r,i,n),a(r[o],c)>0&&e(r,i,o);f0;)d--}0===a(r[i],c)?e(r,i,d):e(r,++d,o),d<=n&&(i=d+1),n<=d&&(o=d-1)}}(t,n,i||0,o||t.length-1,a||r)}function e(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function r(t,e){return te?1:0}var n=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 i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n=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 y(e,r,n,i,o){for(var a=[r,n];a.length;)if(!((n=a.pop())-(r=a.pop())<=i)){var s=r+Math.ceil((n-r)/i/2)*i;t(e,s,r,n,o),a.push(r,s,s,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,r=[];if(!f(t,e))return r;for(var n=this.toBBox,i=[];e;){for(var o=0;o=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(n,i,e)},n.prototype._split=function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var a=this._chooseSplitIndex(r,i,n),s=d(r.children.splice(a,r.children.length-a));s.height=r.height,s.leaf=r.leaf,o(r,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(r,s)},n.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)},n.prototype._chooseSplitIndex=function(t,e,r){for(var n,i,o,s,l,u,h,c=1/0,f=1/0,d=e;d<=r-e;d++){var y=a(t,0,d,this.toBBox),g=a(t,d,r,this.toBBox),v=(i=y,o=g,void 0,void 0,void 0,void 0,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,h-l)),m=p(y)+p(g);v=e;f--){var d=t.children[f];s(l,t.leaf?i(d):d),u+=h(l)}return u},n.prototype._adjustParentBBoxes=function(t,e,r){for(var n=r;n>=0;n--)s(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,r=void 0;e>=0;e--)0===t[e].children.length?e>0?(r=t[e-1].children).splice(r.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}()},5072:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n{"use strict";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},5056:(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},7825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},1113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.nc=void 0,(()=>{"use strict";var t=r(5072),e=r.n(t),n=r(7825),i=r.n(n),o=r(7659),a=r.n(o),s=r(5056),l=r.n(s),u=r(540),p=r.n(u),h=r(1113),c=r.n(h),f=r(4096),d={};d.styleTagTransform=c(),d.setAttributes=l(),d.insert=a().bind(null,"head"),d.domAPI=i(),d.insertStyleElement=p(),e()(f.A,d),f.A&&f.A.locals&&f.A.locals;const y=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function g(t,e){return t>e?1:t0){for(i=1;i0?i-1:i:t[i-1]-e=0||R.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==R.indexOf("webkit")&&-1==R.indexOf("edge")),F=-1!==R.indexOf("macintosh"),k="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,M="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,A="undefined"!=typeof Image&&Image.prototype.decode,L=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}(),j=(O=function(t,e){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},O(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const z=function(t){function e(e){var r=this,n="Assertion failed. See https://openlayers.org/en/v"+"6.14.1".split("-")[0]+"/doc/errors/#"+e+" for details.";return(r=t.call(this,n)||this).code=e,r.name="AssertionError",r.message=n,r}return j(e,t),e}(Error);function D(t,e){if(!t)throw new z(e)}var G,N=new Array(6);function W(t){return q(t,1,0,0,1,0,0)}function X(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=e[0],u=e[1],p=e[2],h=e[3],c=e[4],f=e[5];return t[0]=r*l+i*u,t[1]=n*l+o*u,t[2]=r*p+i*h,t[3]=n*p+o*h,t[4]=r*c+i*f+a,t[5]=n*c+o*f+s,t}function q(t,e,r,n,i,o,a){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=a,t}function B(t,e){var r=e[0],n=e[1];return e[0]=t[0]*r+t[2]*n+t[4],e[1]=t[1]*r+t[3]*n+t[5],e}function V(t,e,r){return X(t,q(N,e,0,0,r,0,0))}function Y(t,e,r,n,i,o,a,s){var l=Math.sin(o),u=Math.cos(o);return t[0]=n*u,t[1]=i*l,t[2]=-n*l,t[3]=i*u,t[4]=a*n*u-s*n*l+e,t[5]=a*i*l+s*i*u+r,t}function Z(t,e){var r,n=(r=e)[0]*r[3]-r[1]*r[2];D(0!==n,32);var i=e[0],o=e[1],a=e[2],s=e[3],l=e[4],u=e[5];return t[0]=s/n,t[1]=-o/n,t[2]=-a/n,t[3]=i/n,t[4]=(a*u-s*l)/n,t[5]=-(i*u-o*l)/n,t}function K(t){var e="matrix("+t.join(", ")+")";if(M)return e;var r=G||(G=document.createElement("div"));return r.style.transform=e,r.style.transform}const U="top-left";function H(t){for(var e=[1/0,1/0,-1/0,-1/0],r=0,n=t.length;ri&&(l|=4),so&&(l|=2),0===l&&(l=1),l}function it(t,e,r,n,i){return i?(i[0]=t,i[1]=e,i[2]=r,i[3]=n,i):[t,e,r,n]}function ot(t){return it(1/0,1/0,-1/0,-1/0,t)}function at(t,e){var r=t[0],n=t[1];return it(r,n,r,n,e)}function st(t,e,r,n,i){return ht(ot(i),t,e,r,n)}function lt(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function ut(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function pt(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function ht(t,e,r,n,i){for(;re[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Et(t){return t[2]1)for(var o=t[2]-t[0],a=t[3]-t[1],s=0;s1?(r=i,n=o):l>0&&(r+=a*l,n+=s*l)}return kt(t,e,r,n)}function kt(t,e,r,n){var i=r-t,o=n-e;return i*i+o*o}function Mt(t){return t*Math.PI/180}function At(t,e){var r=t%e;return r*e<0?r+e:r}function Lt(t,e,r){return t+r*(e-t)}function jt(t,e){var r=Math.pow(10,e);return Math.round(t*r)/r}function zt(t,e){return Math.floor(jt(t,e))}function Dt(t,e){return Math.ceil(jt(t,e))}var Gt=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Nt=/^([a-z]*)$|^hsla?\(.*\)$/i;function Wt(t){return"string"==typeof t?t:Vt(t)}var Xt=function(){var t={},e=0;return function(r){var n;if(t.hasOwnProperty(r))n=t[r];else{if(e>=1024){var i=0;for(var o in t)3&i++||(delete t[o],--e)}n=function(t){var e,r,n,i,o;if(Nt.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var r=getComputedStyle(e).color;return document.body.removeChild(e),r}return""}(t)),Gt.exec(t)){var a,s=t.length-1;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),r=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),i=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,r=(r<<4)+r,n=(n<<4)+n,l&&(i=(i<<4)+i)),o=[e,r,n,i/255]}else 0==t.indexOf("rgba(")?Bt(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Bt(o)):D(!1,14);return o}(r),t[r]=n,++e}return n}}();function qt(t){return Array.isArray(t)?t:Xt(t)}function Bt(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 Vt(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var r=t[1];r!=(0|r)&&(r=r+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+r+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Yt(t,e,r){return e+":"+t+":"+(r?Wt(r):"null")}var Zt=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 r=this.cache_[e];3&t++||r.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,r){var n=Yt(t,e,r);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,r,n){var i=Yt(t,e,r);this.cache_[i]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}());const Kt=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}(),Ut="propertychange";var Ht="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),n=1,i=arguments.length;n0)},e.prototype.removeEventListener=function(t,e){var r=this.listeners_&&this.listeners_[t];if(r){var n=r.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(r[n]=C,++this.pendingRemovals_[t]):(r.splice(n,1),0===r.length&&delete this.listeners_[t]))}},e}(y),re="change",ne="contextmenu",ie="click",oe="keydown",ae="keypress",se="touchmove",le="wheel";function ue(t,e,r,n,i){if(n&&n!==t&&(r=r.bind(n)),i){var o=r;r=function(){t.removeEventListener(e,r),o.apply(this,arguments)}}var a={target:t,type:e,listener:r};return t.addEventListener(e,r),a}function pe(t,e,r,n){return ue(t,e,r,n,!0)}function he(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Jt(t))}var ce=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fe=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 ce(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(re)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var r=t.length,n=new Array(r),i=0;i=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const ze=Le;function De(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Ge(t,e){for(var r=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){r=!1;break}return r}function Ne(t,e){var r=Math.cos(e),n=Math.sin(e),i=t[0]*r-t[1]*n,o=t[1]*r+t[0]*n;return t[0]=i,t[1]=o,t}function We(t,e){return t[0]*=e,t[1]*=e,t}function Xe(t,e){if(e.canWrapX()){var r=St(e.getExtent()),n=function(t,e,r){var n=e.getExtent(),i=0;if(e.canWrapX()&&(t[0]n[2])){var o=r||St(n);i=Math.floor((t[0]-n[0])/o)}return i}(t,e,r);n&&(t[0]-=n*r)}return t}var qe=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Be=function(t){function e(e){var r=t.call(this)||this;return r.map_=e,r}return qe(e,t),e.prototype.dispatchRenderEvent=function(t,e){S()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,r=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;Y(r,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Z(n,r)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i,o,a,s){var l,u=e.viewState;function p(t,e,r,n){return i.call(o,e,t?r:null,n)}var h=u.projection,c=Xe(t.slice(),h),f=[[0,0]];if(h.canWrapX()&&n){var d=St(h.getExtent());f.push([-d,0],[d,0])}for(var y=e.layerStatesArray,g=y.length,v=[],m=[],_=0;_=0;--x){var b=y[x],w=b.layer;if(w.hasRenderer()&&je(b,u)&&a.call(s,w)){var C=w.getRenderer(),S=w.getSource();if(C&&S){var T=S.getWrapX()?c:t,E=p.bind(null,b.managed);m[0]=T[0]+f[_][0],m[1]=T[1]+f[_][1],l=C.forEachFeatureAtCoordinate(m,e,r,E,v)}if(l)return l}}if(0!==v.length){var O=1/v.length;return v.forEach((function(t,e){return t.distanceSq+=e*O})),v.sort((function(t,e){return t.distanceSq-e.distanceSq})),v.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,r,n,i){return S()},e.prototype.hasFeatureAtCoordinate=function(t,e,r,n,i,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,r,n,b,this,i,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){S()},e.prototype.scheduleExpireIconCache=function(t){Zt.canExpireCache()&&t.postRenderFunctions.push(Ve)},e}(y);function Ve(t,e){Zt.expire()}const Ye=Be;var Ze=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const Ke=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.inversePixelTransform=r,o.frameState=n,o.context=i,o}return Ze(e,t),e}(Kt);var Ue="ol-hidden",He="ol-unselectable",Je="ol-control",$e="ol-collapsed",Qe=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"),tr=["style","variant","weight","size","lineHeight","family"],er=function(t){var e=t.match(Qe);if(!e)return null;for(var r={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=tr.length;n=0;--o)n[o].renderDeclutter(t);!function(t,e){for(var r=t.childNodes,n=0;;++n){var i=r[n],o=e[n];if(!i&&!o)break;i!==o&&(i?o?t.insertBefore(o,i):(t.removeChild(i),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,r,n,i){for(var o=e.viewState,a=e.layerStatesArray,s=a.length-1;s>=0;--s){var l=a[s],u=l.layer;if(u.hasRenderer()&&je(l,o)&&i(u)){var p=u.getRenderer().getDataAtPixel(t,e,r);if(p){var h=n(u,p);if(h)return h}}}},e}(Ye),Or="add",Rr="remove";var Pr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ir="length",Fr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.element=r,i.index=n,i}return Pr(e,t),e}(Kt),kr=function(t){function e(e,r){var n=t.call(this)||this;n.on,n.once,n.un;var i=r||{};if(n.unique_=!!i.unique,n.array_=e||[],n.unique_)for(var o=0,a=n.array_.length;o0;)this.pop()},e.prototype.extend=function(t){for(var e=0,r=t.length;ethis.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(he(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(se,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(he(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(he),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(ee),Zr="postrender",Kr="loadstart",Ur="loadend",Hr="layergroup",Jr="size",$r="target",Qr="view";var tn=1/0;const en=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,Jt(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,r=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(r);return delete this.queuedElements_[n],r},t.prototype.enqueue=function(t){D(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=tn&&(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_,r=this.priorities_,n=e.length,i=e[t],o=r[t],a=t;t>1;){var s=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=lt;){var a=this.getParentIndex_(e);if(!(n[a]>o))break;r[e]=r[a],n[e]=n[a],e=a}r[e]=i,n[e]=o},t.prototype.reprioritize=function(){var t,e,r,n=this.priorityFunction_,i=this.elements_,o=this.priorities_,a=0,s=i.length;for(e=0;e0;)n=(r=this.dequeue()[0]).getKey(),0!==r.getState()||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++i,r.load())},e}(en);const on=nn,an="Point",sn="LineString",ln="Polygon",un="MultiPoint",pn="MultiLineString",hn="MultiPolygon",cn="GeometryCollection",fn="Circle";var dn={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},yn={};yn[dn.RADIANS]=6370997/(2*Math.PI),yn[dn.DEGREES]=2*Math.PI*6370997/360,yn[dn.FEET]=.3048,yn[dn.METERS]=1,yn[dn.USFEET]=1200/3937;const gn=dn,vn={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var mn=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_||yn[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();const _n=mn;var xn=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bn=6378137,wn=Math.PI*bn,Cn=[-wn,-wn,wn,wn],Sn=[-180,-85,180,85],Tn=bn*Math.log(Math.tan(Math.PI/2)),En=function(t){function e(e){return t.call(this,{code:e,units:gn.METERS,extent:Cn,global:!0,worldExtent:Sn,getPointResolution:function(t,e){return t/Pt(e[1]/bn)}})||this}return xn(e,t),e}(_n),On=[new En("EPSG:3857"),new En("EPSG:102100"),new En("EPSG:102113"),new En("EPSG:900913"),new En("http://www.opengis.net/def/crs/EPSG/0/3857"),new En("http://www.opengis.net/gml/srs/epsg.xml#3857")];var Rn=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pn=[-180,-90,180,90],In=6378137*Math.PI/180,Fn=function(t){function e(e,r){return t.call(this,{code:e,units:gn.DEGREES,extent:Pn,axisOrientation:r,global:!0,metersPerUnit:In,worldExtent:Pn})||this}return Rn(e,t),e}(_n),kn=[new Fn("CRS:84"),new Fn("EPSG:4326","neu"),new Fn("urn:ogc:def:crs:OGC:1.3:CRS84"),new Fn("urn:ogc:def:crs:OGC:2:84"),new Fn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Fn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Fn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],Mn={},An={};function Ln(t,e,r){var n=t.getCode(),i=e.getCode();n in An||(An[n]={}),An[n][i]=r}function jn(t,e,r){var n=r||6371008.8,i=Mt(t[1]),o=Mt(e[1]),a=(o-i)/2,s=Mt(e[0]-t[0])/2,l=Math.sin(a)*Math.sin(a)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var zn=!0;function Dn(t){zn=!(void 0===t||t)}function Gn(t,e,r){var n;if(void 0!==e){for(var i=0,o=t.length;i=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(zn=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function ii(t,e){return t}function oi(t,e){return t}function ai(t,e){return t}function si(t,e,r){return function(n,i,o,a,s){if(n){if(!i&&!e)return n;var l=e?0:o[0]*i,u=e?0:o[1]*i,p=s?s[0]:0,h=s?s[1]:0,c=t[0]+l/2+p,f=t[2]-l/2+p,d=t[1]+u/2+h,y=t[3]-u/2+h;c>f&&(f=c=(f+c)/2),d>y&&(y=d=(y+d)/2);var g=Rt(n[0],c,f),v=Rt(n[1],d,y);if(a&&r&&i){var m=30*i;g+=-m*Math.log(1+Math.max(0,c-n[0])/m)+m*Math.log(1+Math.max(0,n[0]-f)/m),v+=-m*Math.log(1+Math.max(0,d-n[1])/m)+m*Math.log(1+Math.max(0,n[1]-y)/m)}return[g,v]}}}function li(t){return t}function ui(t,e,r,n){var i=St(e)/r[0],o=xt(e)/r[1];return n?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function pi(t,e,r){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,r&&(n=Math.max(n,r),n/=Math.log(1+50*Math.max(0,r/t-1))/50+1),Rt(n,r/2,2*e)}function hi(t,e,r,n,i){return function(o,a,s,l){if(void 0!==o){var u=n?ui(t,n,s,i):t;return(void 0===r||r)&&l?pi(o,u,e):Rt(o,e,u)}}}function ci(t){return void 0!==t?0:void 0}function fi(t){return void 0!==t?t:void 0}function di(t){return Math.pow(t,3)}function yi(t){return 1-di(1-t)}function gi(t){return 3*t*t-2*t*t*t}function vi(t){return t}Bn(On),Bn(kn),Jn=On,$n=function(t,e,r){var n=t.length,i=r>1?r:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(n));for(var a=0;aTn?s=Tn:s<-Tn&&(s=-Tn),o[a+1]=s}return o},Qn=function(t,e,r){var n=t.length,i=r>1?r:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(n));for(var a=0;a1)s=r;else{if(c>0){for(var f=0;fi&&(i=u),o=s,a=l}return i}function Mi(t,e,r,n,i){for(var o=0,a=r.length;o0;){for(var h=u.pop(),c=u.pop(),f=0,d=t[c],y=t[c+1],g=t[h],v=t[h+1],m=c+n;mf&&(p=m,f=_)}f>i&&(l[(p-e)/n]=1,c+n0&&y>f)&&(d<0&&g0&&g>d)?(s=h,l=c):(o[a++]=s,o[a++]=l,u=s,p=l,s=h,l=c)}}return o[a++]=s,o[a++]=l,a}function Wi(t,e,r,n,i,o,a,s){for(var l=0,u=r.length;lo&&(u-s)*(o-l)-(i-s)*(p-l)>0&&a++:p<=o&&(u-s)*(o-l)-(i-s)*(p-l)<0&&a--,s=u,l=p}return 0!==a}function eo(t,e,r,n,i,o){if(0===r.length)return!1;if(!to(t,e,r[0],n,i,o))return!1;for(var a=1,s=r.length;ab&&eo(t,e,r,n,u=(p+h)/2,d)&&(x=u,b=w),p=h}return isNaN(x)&&(x=i[o]),a?(a.push(x,d,b),a):[x,d,b]}function no(t,e,r,n,i){for(var o=[],a=0,s=r.length;a=i[0]&&o[2]<=i[2]||o[1]>=i[1]&&o[3]<=i[3]||io(t,e,r,n,(function(t,e){return function(t,e,r){var n=!1,i=nt(t,e),o=nt(t,r);if(1===i||1===o)n=!0;else{var a=t[0],s=t[1],l=t[2],u=t[3],p=e[0],h=e[1],c=r[0],f=r[1],d=(f-h)/(c-p),y=void 0,g=void 0;2&o&&!(2&i)&&(n=(y=c-(f-u)/d)>=a&&y<=l),n||!(4&o)||4&i||(n=(g=f-(c-l)*d)>=s&&g<=u),n||!(8&o)||8&i||(n=(y=c-(f-s)/d)>=a&&y<=l),n||!(16&o)||16&i||(n=(g=f-(c-a)*d)>=s&&g<=u)}return n}(i,t,e)})))}function ao(t,e,r,n,i){if(!function(t,e,r,n,i){return!!(oo(t,e,r,n,i)||to(t,e,r,n,i[0],i[1])||to(t,e,r,n,i[0],i[3])||to(t,e,r,n,i[2],i[1])||to(t,e,r,n,i[2],i[3]))}(t,e,r[0],n,i))return!1;if(1===r.length)return!0;for(var o=1,a=r.length;o0}function uo(t,e,r,n,i){for(var o=void 0!==i&&i,a=0,s=r.length;ap&&c1&&"function"==typeof arguments[r-1]&&(e=arguments[r-1],--r);for(var n=0;n0},e.prototype.getInteracting=function(){return this.hints_[1]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(0,-this.hints_[0]);for(var e=0,r=this.animations_.length;e=0;--r){for(var n=this.animations_[r],i=!0,o=0,a=n.length;o0?l/s.duration:1;u>=1?(s.complete=!0,u=1):i=!1;var p=s.easing(u);if(s.sourceCenter){var h=s.sourceCenter[0],c=s.sourceCenter[1],f=s.targetCenter[0],d=s.targetCenter[1];this.nextCenter_=s.targetCenter;var y=h+p*(f-h),g=c+p*(d-c);this.targetCenter_=[y,g]}if(s.sourceResolution&&s.targetResolution){var v=1===p?s.targetResolution:s.sourceResolution+p*(s.targetResolution-s.sourceResolution);if(s.anchor){var m=this.getViewportSize_(this.getRotation()),_=this.constraints_.resolution(v,0,m,!0);this.targetCenter_=this.calculateCenterZoom(_,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=v,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){var x=1===p?At(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+p*(s.targetRotation-s.sourceRotation);if(s.anchor){var b=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(b,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),e=!0,!s.complete)break}}if(i){this.animations_[r]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var w=n[0].callback;w&&_o(w,!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 r,n=this.getCenterInternal();return void 0!==n&&(Ne(r=[n[0]-e[0],n[1]-e[1]],t-this.getRotation()),De(r,e)),r},e.prototype.calculateCenterZoom=function(t,e){var r,n=this.getCenterInternal(),i=this.getResolution();return void 0!==n&&void 0!==i&&(r=[e[0]-t*(e[0]-n[0])/i,e[1]-t*(e[1]-n[1])/i]),r},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var r=e[0],n=e[1];return[Math.abs(r*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(r*Math.sin(t))+Math.abs(n*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?ri(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(vn.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return ii(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),r=this.getCenterInternal();D(r,1);var n=this.getResolution();D(void 0!==n,2);var i=this.getRotation();return D(void 0!==i,3),_t(r,n,i,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(vn.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(oi(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var r=e||this.getViewportSizeMinusPadding_(),n=St(t)/r[0],i=xt(t)/r[1];return Math.max(n,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,r=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(r/n)/Math.log(e);return function(t){return r/Math.pow(e,t*i)}},e.prototype.getRotation=function(){return this.get(vn.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),r=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(r/n)/e;return function(t){return Math.log(r/t)/e/i}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),r=this.padding_;return r&&(e=[e[0]-r[1]-r[3],e[1]-r[0]-r[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),r=this.getRotation(),n=this.getCenterInternal(),i=this.padding_;if(i){var o=this.getViewportSizeMinusPadding_();n=bo(n,this.getViewportSize_(),[o[0]/2+i[3],o[1]/2+i[0]],e,r)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:r,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,r,n=this.minZoom_||0;if(this.resolutions_){var i=v(this.resolutions_,t,1);n=i,e=this.resolutions_[i],r=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,r=this.zoomFactor_;return n+Math.log(e/t)/Math.log(r)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Rt(Math.floor(t),0,this.resolutions_.length-2),r=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(r,Rt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var r;if(D(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))D(!Et(t),25),r=go(n=oi(t,this.getProjection()));else if(t.getType()===fn){var n;(r=go(n=oi(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),vt(n))}else{var i=ei();r=i?t.clone().transform(i,this.getProjection()):t}this.fitInternal(r,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),r=Math.cos(e),n=Math.sin(-e),i=t.getFlatCoordinates(),o=t.getStride(),a=1/0,s=1/0,l=-1/0,u=-1/0,p=0,h=i.length;p0&&t[1]>0}function So(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var To=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Eo(t){t instanceof ze?t.setMapInternal(null):t instanceof Dr&&t.getLayers().forEach(Eo)}function Oo(t,e){if(t instanceof ze)t.setMapInternal(e);else if(t instanceof Dr)for(var r=t.getLayers().getArray(),n=0,i=r.length;n=0;s--){var l=a[s];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 r=this.maxTilesLoading_,n=r;if(t){var i=t.viewHints;if(i[0]||i[1]){var o=Date.now()-t.time>8;r=o?0:8,n=o?0:2}}e.getTilesLoading()0;if(this.renderedVisible_!=r&&(this.element.style.display=r?"":"none",this.renderedVisible_=r),!x(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(var n=0,i=e.length;n0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:yi}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var r=e.viewState.rotation;if(r!=this.rotation_){var n="rotate("+r+"rad)";if(this.autoHide_){var i=this.element.classList.contains(Ue);i||0!==r?i&&0!==r&&this.element.classList.remove(Ue):this.element.classList.add(Ue)}this.label_.style.transform=n}this.rotation_=r}},e}(ko);const Do=zo;var Go=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),No=function(t){function e(e){var r=this,n=e||{};r=t.call(this,{element:document.createElement("div"),target:n.target})||this;var i=void 0!==n.className?n.className:"ol-zoom",o=void 0!==n.delta?n.delta:1,a=void 0!==n.zoomInClassName?n.zoomInClassName:i+"-in",s=void 0!==n.zoomOutClassName?n.zoomOutClassName:i+"-out",l=void 0!==n.zoomInLabel?n.zoomInLabel:"+",u=void 0!==n.zoomOutLabel?n.zoomOutLabel:"–",p=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",h=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=a,c.setAttribute("type","button"),c.title=p,c.appendChild("string"==typeof l?document.createTextNode(l):l),c.addEventListener(ie,r.handleClick_.bind(r,o),!1);var f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=h,f.appendChild("string"==typeof u?document.createTextNode(u):u),f.addEventListener(ie,r.handleClick_.bind(r,-o),!1);var d=i+" "+He+" "+Je,y=r.element;return y.className=d,y.appendChild(c),y.appendChild(f),r.duration_=void 0!==n.duration?n.duration:250,r}return Go(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 r=e.getZoom();if(void 0!==r){var n=e.getConstrainedZoom(r+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:yi})):e.setZoom(n)}}},e}(ko);const Wo=No,Xo="active";var qo=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Bo(t,e,r,n){var i=t.getZoom();if(void 0!==i){var o=t.getConstrainedZoom(i+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:r,duration:void 0!==n?n:250,easing:yi})}}const Vo=function(t){function e(e){var r=t.call(this)||this;return r.on,r.once,r.un,e&&e.handleEvent&&(r.handleEvent=e.handleEvent),r.map_=null,r.setActive(!0),r}return qo(e,t),e.prototype.getActive=function(){return this.get(Xo)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Xo,t)},e.prototype.setMap=function(t){this.map_=t},e}(ve);var Yo=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zo=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.delta_=n.delta?n.delta:1,r.duration_=void 0!==n.duration?n.duration:250,r}return Yo(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==qr.DBLCLICK){var r=t.originalEvent,n=t.map,i=t.coordinate,o=r.shiftKey?-this.delta_:this.delta_;Bo(n.getView(),o,i,this.duration_),r.preventDefault(),e=!0}return!e},e}(Vo);const Ko=Zo;var Uo=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ho=function(t){function e(e){var r=this,n=e||{};return r=t.call(this,n)||this,n.handleDownEvent&&(r.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(r.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(r.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(r.handleUpEvent=n.handleUpEvent),n.stopDown&&(r.stopDown=n.stopDown),r.handlingDownUpSequence=!1,r.trackedPointers_={},r.targetPointers=[],r}return Uo(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==qr.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==qr.POINTERUP){var r=this.handleUpEvent(t);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(t.type==qr.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==qr.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===qr.POINTERDOWN||e===qr.POINTERDRAG||e===qr.POINTERUP}(t)){var e=t.originalEvent,r=e.pointerId.toString();t.type==qr.POINTERUP?delete this.trackedPointers_[r]:(t.type==qr.POINTERDOWN||r in this.trackedPointers_)&&(this.trackedPointers_[r]=e),this.targetPointers=$t(this.trackedPointers_)}},e}(Vo);function Jo(t){for(var e=t.length,r=0,n=0,i=0;i0&&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}($o);const ha=pa;var ca=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fa=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{stopDown:w})||this).condition_=n.condition?n.condition:ta,r.lastAngle_=void 0,r.duration_=void 0!==n.duration?n.duration:250,r}return ca(e,t),e.prototype.handleDragEvent=function(t){if(sa(t)){var e=t.map,r=e.getView();if(r.getConstraints().rotation!==ci){var n=e.getSize(),i=t.pixel,o=Math.atan2(n[1]/2-i[1],i[0]-n[0]/2);if(void 0!==this.lastAngle_){var a=o-this.lastAngle_;r.adjustRotationInternal(-a)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!sa(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!sa(t)||!na(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}($o);const da=fa;var ya=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ga=function(t){function e(e){var r=t.call(this)||this;return r.geometry_=null,r.element_=document.createElement("div"),r.element_.style.position="absolute",r.element_.style.pointerEvents="auto",r.element_.className="ol-box "+e,r.map_=null,r.startPixel_=null,r.endPixel_=null,r}return ya(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,r="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+r,n.top=Math.min(t[1],e[1])+r,n.width=Math.abs(e[0]-t[0])+r,n.height=Math.abs(e[1]-t[1])+r},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_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new yo([r])},e.prototype.getGeometry=function(){return this.geometry_},e}(y);const va=ga;var ma=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_a=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.coordinate=r,i.mapBrowserEvent=n,i}return ma(e,t),e}(Kt),xa=function(t){function e(e){var r=t.call(this)||this;r.on,r.once,r.un;var n=e||{};return r.box_=new va(n.className||"ol-dragbox"),r.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(r.onBoxEnd=n.onBoxEnd),r.startPixel_=null,r.condition_=n.condition?n.condition:na,r.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:r.defaultBoxEndCondition,r}return ma(e,t),e.prototype.defaultBoxEndCondition=function(t,e,r){var n=r[0]-e[0],i=r[1]-e[1];return n*n+i*i>=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 _a("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 _a(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 _a("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}($o);const ba=xa;var wa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ca=function(t){function e(e){var r=this,n=e||{},i=n.condition?n.condition:oa;return(r=t.call(this,{condition:i,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,r.out_=void 0!==n.out&&n.out,r}return wa(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),r=this.getGeometry();if(this.out_){var n=e.rotatedExtentForGeometry(r),i=e.getResolutionForExtentInternal(n),o=e.getResolution()/i;(r=r.clone()).scale(o*o)}e.fitInternal(r,{duration:this.duration_,easing:yi})},e}(ba);const Sa=Ca;var Ta=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ea=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.defaultCondition_=function(t){return ia(t)&&aa(t)},r.condition_=void 0!==n.condition?n.condition:r.defaultCondition_,r.duration_=void 0!==n.duration?n.duration:100,r.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,r}return Ta(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==oe){var r=t.originalEvent,n=r.keyCode;if(this.condition_(t)&&(40==n||37==n||39==n||38==n)){var i=t.map.getView(),o=i.getResolution()*this.pixelDelta_,a=0,s=0;40==n?s=-o:37==n?a=-o:39==n?a=o:s=o;var l=[a,s];Ne(l,i.getRotation()),function(t,e,r){var n=t.getCenterInternal();if(n){var i=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==r?r:250,easing:vi,center:t.getConstrainedCenter(i)})}}(i,l,this.duration_),r.preventDefault(),e=!0}}return!e},e}(Vo);const Oa=Ea;var Ra=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pa=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.condition_=n.condition?n.condition:aa,r.delta_=n.delta?n.delta:1,r.duration_=void 0!==n.duration?n.duration:100,r}return Ra(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==oe||t.type==ae){var r=t.originalEvent,n=r.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){var i=t.map,o=n=="+".charCodeAt(0)?this.delta_:-this.delta_;Bo(i.getView(),o,void 0,this.duration_),r.preventDefault(),e=!0}}return!e},e}(Vo);const Ia=Pa,Fa=function(){function t(t,e,r){this.decay_=t,this.minVelocity_=e,this.delay_=r,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_[r+2]>t;)r-=3;var n=this.points_[e+2]-this.points_[r+2];if(n<1e3/60)return!1;var i=this.points_[e]-this.points_[r],o=this.points_[e+1]-this.points_[r+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();var ka=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ma="trackpad",Aa=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,n)||this).totalDelta_=0,r.lastDelta_=0,r.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,r.duration_=void 0!==n.duration?n.duration:250,r.timeout_=void 0!==n.timeout?n.timeout:80,r.useAnchor_=void 0===n.useAnchor||n.useAnchor,r.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var i=n.condition?n.condition:ra;return r.condition_=n.onFocusOnly?Qo(ea,i):i,r.lastAnchor_=null,r.startTime_=void 0,r.timeoutId_,r.mode_=void 0,r.trackpadEventGap_=400,r.trackpadTimeoutId_,r.deltaPerZoom_=300,r}return ka(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!==le)return!0;var e,r=t.map,n=t.originalEvent;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==le&&(e=n.deltaY,P&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=k),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var i=Date.now();void 0===this.startTime_&&(this.startTime_=i),(!this.mode_||i-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?Ma:"wheel");var o=r.getView();if(this.mode_===Ma&&!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_=i,!1;this.totalDelta_+=e;var a=Math.max(this.timeout_-(i-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),a),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var r=-Rt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(r=r?r>0?1:-1:0),Bo(e,r,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}(Vo);const La=Aa;var ja=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),za=function(t){function e(e){var r=this,n=e||{},i=n;return i.stopDown||(i.stopDown=w),(r=t.call(this,i)||this).anchor_=null,r.lastAngle_=void 0,r.rotating_=!1,r.rotationDelta_=0,r.threshold_=void 0!==n.threshold?n.threshold:.3,r.duration_=void 0!==n.duration?n.duration:250,r}return ja(e,t),e.prototype.handleDragEvent=function(t){var e=0,r=this.targetPointers[0],n=this.targetPointers[1],i=Math.atan2(n.clientY-r.clientY,n.clientX-r.clientX);if(void 0!==this.lastAngle_){var o=i-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=i;var a=t.map,s=a.getView();if(s.getConstraints().rotation!==ci){var l=a.getViewport().getBoundingClientRect(),u=Jo(this.targetPointers);u[0]-=l.left,u[1]-=l.top,this.anchor_=a.getCoordinateFromPixelInternal(u),this.rotating_&&(a.render(),s.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}($o);const Da=za;var Ga=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Na=function(t){function e(e){var r=this,n=e||{},i=n;return i.stopDown||(i.stopDown=w),(r=t.call(this,i)||this).anchor_=null,r.duration_=void 0!==n.duration?n.duration:400,r.lastDistance_=void 0,r.lastScaleDelta_=1,r}return Ga(e,t),e.prototype.handleDragEvent=function(t){var e=1,r=this.targetPointers[0],n=this.targetPointers[1],i=r.clientX-n.clientX,o=r.clientY-n.clientY,a=Math.sqrt(i*i+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;var s=t.map,l=s.getView();1!=e&&(this.lastScaleDelta_=e);var u=s.getViewport().getBoundingClientRect(),p=Jo(this.targetPointers);p[0]-=u.left,p[1]-=u.top,this.anchor_=s.getCoordinateFromPixelInternal(p),s.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),!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}($o);const Wa=Na;var Xa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qa=function(t){function e(e){return(e=Ht({},e)).controls||(e.controls=function(){var t={},e=new Mr;return(void 0===t.zoom||t.zoom)&&e.push(new Wo(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new Do(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new Lo(t.attributionOptions)),e}()),e.interactions||(e.interactions=function(){var t={onFocusOnly:!0}||{},e=new Mr,r=new Fa(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new da),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new Ko({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new ha({onFocusOnly:t.onFocusOnly,kinetic:r})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new Da),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new Wa({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new Oa),e.push(new Ia({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new La({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new Sa({duration:t.zoomDuration})),e}()),t.call(this,e)||this}return Xa(e,t),e.prototype.createRenderer=function(){return new Er(this)},e}(Po);const Ba=qa;var Va=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=So(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 S()},t.prototype.getImage=function(t){return S()},t.prototype.getHitDetectionImage=function(){return S()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return S()},t.prototype.getImageSize=function(){return S()},t.prototype.getOrigin=function(){return S()},t.prototype.getSize=function(){return S()},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_=So(t)},t.prototype.listenImageChange=function(t){S()},t.prototype.load=function(){S()},t.prototype.unlistenImageChange=function(t){S()},t}();const Ya=Va;function Za(t){return Array.isArray(t)?Vt(t):t}var Ka=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ua=function(t){function e(e){var r=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(r=t.call(this,{opacity:1,rotateWithView:n,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,r.hitDetectionCanvas_=null,r.fill_=void 0!==e.fill?e.fill:null,r.origin_=[0,0],r.points_=e.points,r.radius_=void 0!==e.radius?e.radius:e.radius1,r.radius2_=e.radius2,r.angle_=void 0!==e.angle?e.angle:0,r.stroke_=void 0!==e.stroke?e.stroke:null,r.size_=null,r.renderOptions_=null,r.render(),r}return Ka(e,t),e.prototype.clone=function(){var t=this.getScale(),r=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 r.setOpacity(this.getOpacity()),r},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 r=this.renderOptions_,n=nr(r.size*t,r.size*t);this.draw_(r,n,t),e=n.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return 2},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,r){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var n=this.radius_,i=void 0===this.radius2_?n:this.radius2_;if(n0,6);var p=void 0!==n.src?0:2;return r.color_=void 0!==n.color?qt(n.color):null,r.iconImage_=function(t,e,r,n,i,o){var a=Zt.get(e,n,o);return a||(a=new ds(t,e,r,n,i,o),Zt.set(e,n,o,a)),a}(l,u,void 0!==r.imgSize_?r.imgSize_:null,r.crossOrigin_,p,r.color_),r.offset_=void 0!==n.offset?n.offset:[0,0],r.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:as,r.origin_=null,r.size_=void 0!==n.size?n.size:null,r}return ys(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_==rs||this.anchorYUnits_==rs){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==rs&&(t[0]*=e[0]),this.anchorYUnits_==rs&&(t[1]*=e[1])}if(this.anchorOrigin_!=as){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=ss&&this.anchorOrigin_!=os||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=is&&this.anchorOrigin_!=os||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var r=this.getDisplacement();return[t[0]-r[0],t[1]+r[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_!=as){var e=this.getSize(),r=this.iconImage_.getSize();if(!e||!r)return null;t=t.slice(),this.offsetOrigin_!=ss&&this.offsetOrigin_!=os||(t[0]=r[0]-e[0]-t[0]),this.offsetOrigin_!=is&&this.offsetOrigin_!=os||(t[1]=r[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(re,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(re,t)},e}(Ya);const vs=gs;function ms(t,e,r,n,i,o,a){var s,l,u=(r-e)/n;if(1===u)s=e;else if(2===u)s=e,l=i;else if(0!==u){for(var p=t[e],h=t[e+1],c=0,f=[0],d=e+n;d>1)],e))<0?o=r+1:(a=r,s=!n);return s?o:~o}(f,m);_<0?(l=(m-f[-_-2])/(f[-_-1]-f[-_-2]),s=e+(-_-2)*n):s=e+_*n}var x=a>1?a:2,b=o||new Array(x);for(d=0;d>1;i>3}a--,1===o||2===o?(s+=t.readSVarint(),l+=t.readSVarint(),1===o&&u>p&&(n.push(u),p=u),r.push(s,l),u+=2):7===o?u>p&&(r.push(r[p],r[p+1]),u+=2):D(!1,59)}u>p&&(n.push(u),p=u)},e.prototype.createFeature_=function(t,e,r){var n,i=e.type;if(0===i)return null;var o,a=e.properties;this.idProperty_?(o=a[this.idProperty_],delete a[this.idProperty_]):o=e.id,a[this.layerName_]=e.layer.name;var s=[],l=[];this.readRawGeometry_(t,e,s,l);var u=function(t,e){var r;return 1===t?r=1===e?an:un:2===t?r=1===e?sn:pn:3===t&&(r=ln),r}(i,l.length);if(this.featureClass_===Cs)(n=new this.featureClass_(u,s,l,a,o)).transform(r.dataProjection);else{var p=void 0;if(u==ln){var h=function(t,e){for(var r=[],n=0,i=0,o=0,a=e.length;o1?new ol(s,mi,h):new yo(s,mi,l)}else p=u===an?new $i(s,mi):u===sn?new Hs(s,mi):u===ln?new yo(s,mi,l):u===un?new rl(s,mi):u===pn?new Qs(s,mi,l):null;n=new(0,this.featureClass_),this.geometryName_&&n.setGeometryName(this.geometryName_);var c=Ws(p,!1,r);n.setGeometry(c),void 0!==o&&n.setId(o),n.setProperties(a,!0)}return n},e.prototype.getType=function(){return Xs},e.prototype.readFeatures=function(t,e){var r=this.layers_,n=this.adaptOptions(e),i=Xn(n.dataProjection);i.setWorldExtent(n.extent),n.dataProjection=i;var o=new hl(t),a=o.readFields(dl,{}),s=[];for(var l in a)if(!r||-1!=r.indexOf(l)){var u=a[l],p=u?[0,0,u.extent,u.extent]:null;i.setExtent(p);for(var h=0,c=u.length;h>3)?r.readString():2===t?r.readFloat():3===t?r.readDouble():4===t?r.readVarint64():5===t?r.readVarint():6===t?r.readSVarint():7===t?r.readBoolean():null;e.values.push(n)}}function gl(t,e,r){if(1==t)e.id=r.readVarint();else if(2==t)for(var n=r.readVarint()+r.pos;r.posthis.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 xl(t,e,r,n,i){return void 0!==i?(i.minX=t,i.maxX=e,i.minY=r,i.maxY=n,i):new _l(t,e,r,n)}const bl=_l;function wl(t,e,r,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=r,n):[t,e,r]}function Cl(t,e,r){return t+"/"+e+"/"+r}function Sl(t){return Cl(t[0],t[1],t[2])}function Tl(t){return t.split("/").map(Number)}var El=[0,0,0],Ol=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,D(function(t){var e=function(t,e){return e-t}||g;return t.every((function(r,n){if(0===n)return!0;var i=e(t[n-1],r);return!(i>0||0===i)}))}(this.resolutions_),17),!t.origins)for(var r=0,n=this.resolutions_.length-1;r=this.minZoom;){if(e(s,2===this.zoomFactor_?xl(i=Math.floor(i/2),i,o=Math.floor(o/2),o,r):this.getTileRangeForExtentAndZ(a,s,r)))return!0;--s}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,r){if(t[0]this.maxZoom||et)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){S()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var r=this.transitionStarts_[t];if(r){if(-1===r)return 1}else r=e,this.transitionStarts_[t]=r;var n=e-r+1e3/60;return n>=this.transition_?1:di(n/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}(ee);const Fl=Il;var kl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const Ml=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r,a)||this;return s.crossOrigin_=i,s.src_=n,s.key=n,s.image_=new Image,null!==i&&(s.image_.crossOrigin=i),s.unlisten_=null,s.tileLoadFunction_=o,s}return kl(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=nr(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_=hs(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Fl),Al=function(){function t(t,e,r,n,i,o){this.sourceProj_=t,this.targetProj_=e;var a={},s=Un(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return a[e]||(a[e]=s(t)),a[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&St(n)==St(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?St(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?St(this.targetProj_.getExtent()):null;var l=wt(r),u=Ct(r),p=gt(r),h=yt(r),c=this.transformInv_(l),f=this.transformInv_(u),d=this.transformInv_(p),y=this.transformInv_(h),g=10+(o?Math.max(0,Math.ceil(It(dt(r)/(o*o*256*256)))):0);if(this.addQuad_(l,u,p,h,c,f,d,y,g),this.wrapsXInSource_){var v=1/0;this.triangles_.forEach((function(t,e,r){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 r=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-r.5&&p<1,f=!1;if(l>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(f=St(H([t,e,r,n]))/this.targetWorldWidth_>.25||f),!c&&this.sourceProj_.isGlobal()&&p&&(f=p>.25||f)),!(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3]))||Tt(u,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1])))if(l>0)f=!0;else if(1!=(d=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(a[0])&&isFinite(a[1])?0:2)+(isFinite(s[0])&&isFinite(s[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(l>0){if(!f){var y=[(t[0]+r[0])/2,(t[1]+r[1])/2],g=this.transformInv_(y),v=void 0;v=c?(At(i[0],h)+At(a[0],h))/2-At(g[0],h):(i[0]+a[0])/2-g[0];var m=(i[1]+a[1])/2-g[1];f=v*v+m*m>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-r[0])<=Math.abs(t[1]-r[1])){var _=[(e[0]+r[0])/2,(e[1]+r[1])/2],x=this.transformInv_(_),b=[(n[0]+t[0])/2,(n[1]+t[1])/2],w=this.transformInv_(b);this.addQuad_(t,e,_,b,i,o,x,w,l-1),this.addQuad_(b,_,r,n,w,x,a,s,l-1)}else{var C=[(t[0]+e[0])/2,(t[1]+e[1])/2],S=this.transformInv_(C),T=[(r[0]+n[0])/2,(r[1]+n[1])/2],E=this.transformInv_(T);this.addQuad_(t,C,T,n,i,S,E,s,l-1),this.addQuad_(C,e,r,T,S,o,a,E,l-1)}return}}if(c){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&d||this.addTriangle_(t,r,n,i,a,s),14&d||this.addTriangle_(t,r,e,i,a,o),d&&(13&d||this.addTriangle_(e,n,t,o,s,i),7&d||this.addTriangle_(e,n,r,o,s,a))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,r,n){var i=e.source;pt(t,i[0]),pt(t,i[1]),pt(t,i[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();var Ll,jl={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},zl={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0};function Dl(t,e,r,n,i){t.beginPath(),t.moveTo(0,0),t.lineTo(e,r),t.lineTo(n,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(r,i)),t.restore()}function Gl(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Nl(t,e,r,n){var i=Hn(r,e,t),o=qn(e,n,r),a=e.getMetersPerUnit();void 0!==a&&(o*=a);var s=t.getMetersPerUnit();void 0!==s&&(o/=s);var l=t.getExtent();if(!l||tt(l,i)){var u=qn(t,o,i)/o;isFinite(u)&&u>0&&(o/=u)}return o}var Wl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xl=function(t){function e(e,r,n,i,o,a,s,l,u,p,h,c){var f=t.call(this,o,0,{interpolate:!!c})||this;f.renderEdges_=void 0!==h&&h,f.pixelRatio_=s,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=r,f.targetTileGrid_=i,f.wrappedTileCoord_=a||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=i.getTileCoordExtent(f.wrappedTileCoord_),y=f.targetTileGrid_.getExtent(),g=f.sourceTileGrid_.getExtent(),v=y?bt(d,y):d;if(0===dt(v))return f.state=4,f;var m=e.getExtent();m&&(g=g?bt(g,m):m);var _=i.getResolution(f.wrappedTileCoord_[0]),x=function(t,e,r,n){var i=vt(r),o=Nl(t,e,i,n);return(!isFinite(o)||o<=0)&&ft(r,(function(r){return o=Nl(t,e,r,n),isFinite(o)&&o>0})),o}(e,n,v,_);if(!isFinite(x)||x<=0)return f.state=4,f;var b=void 0!==p?p:.5;if(f.triangulation_=new Al(e,n,v,g,x*b,_),0===f.triangulation_.getTriangles().length)return f.state=4,f;f.sourceZ_=r.getZForResolution(x);var w=f.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(w[1]=Rt(w[1],g[1],g[3]),w[3]=Rt(w[3],g[1],g[3])):w=bt(w,g)),dt(w)){for(var C=r.getTileRangeForExtentAndZ(w,f.sourceZ_),S=C.minX;S<=C.maxX;S++)for(var T=C.minY;T<=C.maxY;T++){var E=u(f.sourceZ_,S,T,s);E&&f.sourceTiles_.push(E)}0===f.sourceTiles_.length&&(f.state=4)}else f.state=4;return f}return Wl(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,r,n){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],r=this.targetTileGrid_.getTileSize(e),n="number"==typeof r?r:r[0],i="number"==typeof r?r:r[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,r,n,i,o,a,s,l,u,p,h){var c=nr(Math.round(r*t),Math.round(r*e));if(h||Ht(c,jl),0===l.length)return c.canvas;function f(t){return Math.round(t*r)/r}c.scale(r,r),c.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,r){ut(d,t.extent)}));var y=St(d),g=xt(d),v=nr(Math.round(r*y/n),Math.round(r*g/n));h||Ht(v,jl);var m=r/n;l.forEach((function(t,e,r){var n=t.extent[0]-d[0],i=-(t.extent[3]-d[3]),o=St(t.extent),a=xt(t.extent);t.image.width>0&&t.image.height>0&&v.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,n*m,i*m,o*m,a*m)}));var _=wt(a);return s.getTriangles().forEach((function(t,e,i){var a=t.source,s=t.target,l=a[0][0],u=a[0][1],p=a[1][0],y=a[1][1],g=a[2][0],m=a[2][1],x=f((s[0][0]-_[0])/o),b=f(-(s[0][1]-_[1])/o),w=f((s[1][0]-_[0])/o),C=f(-(s[1][1]-_[1])/o),S=f((s[2][0]-_[0])/o),T=f(-(s[2][1]-_[1])/o),E=l,O=u;l=0,u=0;var R=function(t){for(var e=t.length,r=0;ri&&(i=a,n=o)}if(0===i)return null;var s=t[n];t[n]=t[r],t[r]=s;for(var l=r+1;l=0;c--){h[c]=t[c][e]/t[c][c];for(var f=c-1;f>=0;f--)t[f][e]-=t[f][c]*h[c]}return h}([[p-=E,y-=O,0,0,w-x],[g-=E,m-=O,0,0,S-x],[0,0,p,y,C-b],[0,0,g,m,T-b]]);if(R){if(c.save(),c.beginPath(),function(){if(void 0===Ll){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Dl(t,4,5,4,0),Dl(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;Ll=Gl(e,0)||Gl(e,4)||Gl(e,8)}return Ll}()||!h){c.moveTo(w,C);for(var P=x-w,I=b-C,F=0;F<4;F++)c.lineTo(w+f((F+1)*P/4),C+f(F*I/3)),3!=F&&c.lineTo(w+f((F+1)*P/4),C+f((F+1)*I/3));c.lineTo(S,T)}else c.moveTo(w,C),c.lineTo(x,b),c.lineTo(S,T);c.clip(),c.transform(R[0],R[2],R[1],R[3],x,b),c.translate(d[0]-E,d[3]-O),c.scale(n/r,-n/r),c.drawImage(v.canvas,0,0),c.restore()}})),p&&(c.save(),c.globalCompositeOperation="source-over",c.strokeStyle="black",c.lineWidth=1,s.getTriangles().forEach((function(t,e,r){var n=t.target,i=(n[0][0]-_[0])/o,a=-(n[0][1]-_[1])/o,s=(n[1][0]-_[0])/o,l=-(n[1][1]-_[1])/o,u=(n[2][0]-_[0])/o,p=-(n[2][1]-_[1])/o;c.beginPath(),c.moveTo(s,l),c.lineTo(i,a),c.lineTo(u,p),c.closePath(),c.stroke()})),c.restore()),c.canvas}(n,i,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,s,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,r,n){var i=e.getState();if(0==i||1==i){t++;var o=ue(e,re,(function(r){var n=e.getState();2!=n&&3!=n&&4!=n||(he(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,r){0==t.getState()&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(he),this.sourcesListenerKeys_=null},e}(Fl);const ql=Xl,Bl=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var r=this.entries_[t];return D(void 0!==r,15),r===this.newest_||(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r),r.value_},t.prototype.remove=function(t){var e=this.entries_[t];return D(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_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=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){D(!(t in this.entries_),16);var r={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[t]=r,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();var Vl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vl(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Tl(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Sl(e.tileCoord)),e.release())}.bind(this))}},e}(Bl);const Zl=Yl;var Kl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ul=function(t){function e(e){var r=t.call(this)||this;r.projection=Xn(e.projection),r.attributions_=Hl(e.attributions),r.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,r.loading=!1,r.state_=void 0!==e.state?e.state:Me,r.wrapX_=void 0!==e.wrapX&&e.wrapX,r.interpolate_=!!e.interpolate,r.viewResolver=null,r.viewRejector=null;var n=r;return r.viewPromise_=new Promise((function(t,e){n.viewResolver=t,n.viewRejector=e})),r}return Kl(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 S()},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_=Hl(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(ve);function Hl(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const Jl=Ul;function $l(t){var e=t.getDefaultTileGrid();return e||(e=eu(t),t.setDefaultTileGrid(e)),e}function Ql(t){var e=t||{},r=e.extent||Xn("EPSG:3857").getExtent(),n={extent:r,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:tu(r,e.maxZoom,e.tileSize,e.maxResolution)};return new Rl(n)}function tu(t,e,r,n){for(var i=void 0!==e?e:42,o=xt(t),a=St(t),s=So(void 0!==r?r:256),l=n>0?n:Math.max(a/s[0],o/s[1]),u=i+1,p=new Array(u),h=0;hr||r>e.getMaxZoom())return!1;var o=e.getFullTileRange(r);return!o||o.containsXY(n,i)}(t,n)?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 r=this.getTileCacheForProjection(e);t>r.highWaterMark&&(r.highWaterMark=t)},e.prototype.useTile=function(t,e,r,n){},e}(Jl),ou=function(t){function e(e,r){var n=t.call(this,e)||this;return n.tile=r,n}return nu(e,t),e}(Kt);const au=iu;function su(t,e){var r=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(a,s,l){return a?t.replace(r,a[0].toString()).replace(n,a[1].toString()).replace(i,a[2].toString()).replace(o,(function(){var t=a[0],r=e.getFullTileRange(t);return D(r,55),(r.getHeight()-a[2]-1).toString()})):void 0}}function lu(t,e){for(var r=t.length,n=new Array(r),i=0;i=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,r=Xn("EPSG:4326"),n=this.getProjection();if(void 0!==t.bounds){var i=Kn(r,n);e=Ot(t.bounds,i)}var o=ru(n),a=t.minzoom||0,s=Ql({extent:o,maxZoom:t.maxzoom||22,minZoom:a,tileSize:this.tileSize_});if(this.tileGrid=s,this.tileUrlFunction=lu(t.tiles,s),void 0!==t.attribution&&!this.getAttributions()){var l=void 0!==e?e:o;this.setAttributions((function(e){return Tt(l,e.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState(Me)},e.prototype.handleTileJSONError=function(){this.setState("error")},e}(yu);const xu=_u,bu="preload",wu="useInterimTilesOnError";var Cu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Su=function(t){function e(e){var r=this,n=e||{},i=Ht({},n);return delete i.preload,delete i.useInterimTilesOnError,(r=t.call(this,i)||this).on,r.once,r.un,r.setPreload(void 0!==n.preload?n.preload:0),r.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),r}return Cu(e,t),e.prototype.getPreload=function(){return this.get(bu)},e.prototype.setPreload=function(t){this.set(bu,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(wu)},e.prototype.setUseInterimTilesOnError=function(t){this.set(wu,t)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(ze);const Tu=Su;var Eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ou=function(t){function e(e){var r=t.call(this)||this;return r.ready=!0,r.boundHandleImageChange_=r.handleImageChange_.bind(r),r.layer_=e,r.declutterExecutorGroup=null,r}return Eu(e,t),e.prototype.getFeatures=function(t){return S()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return S()},e.prototype.renderFrame=function(t,e){return S()},e.prototype.loadedTileCallback=function(t,e,r){t[e]||(t[e]={}),t[e][r.tileCoord.toString()]=r},e.prototype.createLoadedTileFinder=function(t,e,r){return function(n,i){var o=this.loadedTileCallback.bind(this,r,n);return t.forEachLoadedTile(e,n,i,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){},e.prototype.getDataAtPixel=function(t,e,r){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){2===t.target.getState()&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return 2!=e&&3!=e&&t.addEventListener(re,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Me&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(de);const Ru=Ou;var Pu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Iu=null,Fu=function(t){function e(e){var r=t.call(this,e)||this;return r.container=null,r.renderedResolution,r.tempTransform=[1,0,0,1,0,0],r.pixelTransform=[1,0,0,1,0,0],r.inversePixelTransform=[1,0,0,1,0,0],r.context=null,r.containerReused=!1,r.pixelContext_=null,r.frameState=null,r}return Pu(e,t),e.prototype.getImageData=function(t,e,r){var n,i;Iu||((n=document.createElement("canvas")).width=1,n.height=1,Iu=n.getContext("2d")),Iu.clearRect(0,0,1,1);try{Iu.drawImage(t,e,r,1,1,0,0,1,1),i=Iu.getImageData(0,0,1,1).data}catch(t){return null}return i},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,r,n){var i,o,a=this.getLayer().getClassName();if(t&&t.className===a&&""===t.style.opacity&&1===r&&(!n||t.style.backgroundColor&&x(qt(t.style.backgroundColor),qt(n)))&&(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){(i=document.createElement("div")).className=a;var s=i.style;s.position="absolute",s.width="100%",s.height="100%",n&&(s.backgroundColor=n);var l=(o=nr()).canvas;i.appendChild(l),(s=l.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=i,this.context=o}},e.prototype.clipUnrotated=function(t,e,r){var n=wt(r),i=Ct(r),o=gt(r),a=yt(r);B(e.coordinateToPixelTransform,n),B(e.coordinateToPixelTransform,i),B(e.coordinateToPixelTransform,o),B(e.coordinateToPixelTransform,a);var s=this.inversePixelTransform;B(s,n),B(s,i),B(s,o),B(s,a),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,r){var n=this.getLayer();if(n.hasListener(t)){var i=new Ke(t,this.inversePixelTransform,r,e);n.dispatchEvent(i)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_("prerender",t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_("postrender",t,e)},e.prototype.getRenderTransform=function(t,e,r,n,i,o,a){var s=i/2,l=o/2,u=n/e,p=-u,h=-t[0]+a,c=-t[1];return Y(this.tempTransform,s,l,u,p,-r,h,c)},e.prototype.getDataAtPixel=function(t,e,r){var n=B(this.inversePixelTransform,t.slice()),i=this.context,o=this.getLayer().getExtent();if(o&&!tt(o,B(e.pixelToCoordinateTransform,t.slice())))return null;var a,s=Math.round(n[0]),l=Math.round(n[1]),u=this.pixelContext_;if(!u){var p=document.createElement("canvas");p.width=1,p.height=1,u=p.getContext("2d"),this.pixelContext_=u}u.clearRect(0,0,1,1);try{u.drawImage(i.canvas,s,l,1,1,0,0,1,1),a=u.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}(Ru);const ku=Fu;var Mu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Au=function(t){function e(e){var r=t.call(this,e)||this;return r.extentChanged=!0,r.renderedExtent_=null,r.renderedPixelRatio,r.renderedProjection=null,r.renderedRevision,r.renderedTiles=[],r.newTiles_=!1,r.tmpExtent=[1/0,1/0,-1/0,-1/0],r.tmpTileRange_=new bl(0,0,0,0),r}return Mu(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),r=t.getState(),n=e.getUseInterimTilesOnError();return 2==r||4==r||3==r&&!n},e.prototype.getTile=function(t,e,r,n){var i=n.pixelRatio,o=n.viewState.projection,a=this.getLayer(),s=a.getSource().getTile(t,e,r,i,o);return 3==s.getState()&&(a.getUseInterimTilesOnError()?a.getPreload()>0&&(this.newTiles_=!0):s.setState(2)),this.isDrawableTile(s)||(s=s.getInterimTile()),s},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var r=this.getLayer(),n=B(e.pixelToCoordinateTransform,t.slice()),i=r.getExtent();if(i&&!tt(i,n))return null;for(var o=e.pixelRatio,a=e.viewState.projection,s=e.viewState,l=r.getRenderSource(),u=l.getTileGridForProjection(s.projection),p=l.getTilePixelRatio(e.pixelRatio),h=u.getZForResolution(s.resolution);h>=u.getMinZoom();--h){var c=u.getTileCoordForCoordAndZ(n,h),f=l.getTile(h,c[1],c[2],o,a);if(!(f instanceof Ml||f instanceof ql))return null;if(2===f.getState()){var d=u.getOrigin(h),y=So(u.getTileSize(h)),g=u.getResolution(h),v=Math.floor(p*((n[0]-d[0])/g-c[1]*y[0])),m=Math.floor(p*((d[1]-n[1])/g-c[2]*y[1]));return this.getImageData(f.getImage(),v,m)}}return null},e.prototype.loadedTileCallback=function(e,r,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,r,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var r=t.layerStatesArray[t.layerIndex],n=t.viewState,i=n.projection,o=n.resolution,a=n.center,s=n.rotation,l=t.pixelRatio,u=this.getLayer(),p=u.getSource(),h=p.getRevision(),c=p.getTileGridForProjection(i),f=c.getZForResolution(o,p.zDirection),d=c.getResolution(f),y=t.extent,v=r.extent&&oi(r.extent);v&&(y=bt(y,oi(r.extent)));var m=p.getTilePixelRatio(l),_=Math.round(t.size[0]*m),x=Math.round(t.size[1]*m);if(s){var b=Math.round(Math.sqrt(_*_+x*x));_=b,x=b}var w=d*_/2/m,C=d*x/2/m,S=[a[0]-w,a[1]-C,a[0]+w,a[1]+C],T=c.getTileRangeForExtentAndZ(y,f),O={};O[f]={};var R=this.createLoadedTileFinder(p,i,O),P=this.tmpExtent,I=this.tmpTileRange_;this.newTiles_=!1;for(var F=T.minX;F<=T.maxX;++F)for(var k=T.minY;k<=T.maxY;++k){var M=this.getTile(f,F,k,t);if(this.isDrawableTile(M)){var A=E(this);if(2==M.getState()){O[f][M.tileCoord.toString()]=M;var L=M.inTransition(A);this.newTiles_||!L&&-1!==this.renderedTiles.indexOf(M)||(this.newTiles_=!0)}if(1===M.getAlpha(A,t.time))continue}var j=c.getTileCoordChildTileRange(M.tileCoord,I,P),z=!1;j&&(z=R(f+1,j)),z||c.forEachTileCoordParentTileRange(M.tileCoord,R,I,P)}var D=d/o;Y(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,s,-_/2,-x/2);var G=K(this.pixelTransform);this.useContainer(e,G,r.opacity,this.getBackground(t));var N=this.context,W=N.canvas;Z(this.inversePixelTransform,this.pixelTransform),Y(this.tempTransform,_/2,x/2,D,D,0,-_/2,-x/2),W.width!=_||W.height!=x?(W.width=_,W.height=x):this.containerReused||N.clearRect(0,0,_,x),v&&this.clipUnrotated(N,t,v),p.getInterpolate()||Ht(N,jl),this.preRender(N,t),this.renderedTiles.length=0;var X,q,V,U=Object.keys(O).map(Number);U.sort(g),1!==r.opacity||this.containerReused&&!p.getOpaque(t.viewState.projection)?(X=[],q=[]):U=U.reverse();for(var H=U.length-1;H>=0;--H){var J=U[H],$=p.getTilePixelSize(J,l,i),Q=c.getResolution(J)/d,tt=$[0]*Q*D,et=$[1]*Q*D,rt=c.getTileCoordForCoordAndZ(wt(S),J),nt=c.getTileCoordExtent(rt),it=B(this.tempTransform,[m*(nt[0]-S[0])/d,m*(S[3]-nt[3])/d]),ot=m*p.getGutterForProjection(i),at=O[J];for(var st in at){var ut=(M=at[st]).tileCoord,pt=rt[1]-ut[1],ht=Math.round(it[0]-(pt-1)*tt),ct=rt[2]-ut[2],ft=Math.round(it[1]-(ct-1)*et),dt=ht-(F=Math.round(it[0]-pt*tt)),yt=ft-(k=Math.round(it[1]-ct*et)),gt=f===J,vt=!1;if(!(L=gt&&1!==M.getAlpha(E(this),t.time)))if(X){V=[F,k,F+dt,k,F+dt,k+yt,F,k+yt];for(var mt=0,_t=X.length;mt<_t;++mt)if(f!==J&&Jh&&(this.instructions.push([Ku.CUSTOM,h,o,t,r,Xi]),this.hitDetectionInstructions.push([Ku.CUSTOM,h,o,t,n||r,Xi]));break;case an:i=t.getFlatCoordinates(),this.coordinates.push(i[0],i[1]),o=this.coordinates.length,this.instructions.push([Ku.CUSTOM,h,o,t,r]),this.hitDetectionInstructions.push([Ku.CUSTOM,h,o,t,n||r])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[Ku.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ku.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 r,n,i=e.length,o=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=r.lineWidth,this.bufferedMaxExtent_=null)}else r.strokeStyle=void 0,r.lineCap=void 0,r.lineDash=null,r.lineDashOffset=void 0,r.lineJoin=void 0,r.lineWidth=void 0,r.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,r=[Ku.SET_FILL_STYLE,e];return"string"!=typeof e&&r.push(!0),r},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Ku.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 r=t.fillStyle;"string"==typeof r&&t.currentFillStyle==r||(void 0!==r&&this.instructions.push(e.call(this,t)),t.currentFillStyle=r)},e.prototype.updateStrokeStyle=function(t,e){var r=t.strokeStyle,n=t.lineCap,i=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=r||t.currentLineCap!=n||i!=t.currentLineDash&&!x(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=l)&&(void 0!==r&&e.call(this,t),t.currentStrokeStyle=r,t.currentLineCap=n,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=s,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=[Ku.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=$(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;J(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Uu);const $u=Ju;var Qu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const tp=function(t){function e(e,r,n,i){var o=t.call(this,e,r,n,i)||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 Qu(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var r=t.getFlatCoordinates(),n=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(r,n);this.instructions.push([Ku.DRAW_IMAGE,i,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([Ku.DRAW_IMAGE,i,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 r=t.getFlatCoordinates(),n=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(r,n);this.instructions.push([Ku.DRAW_IMAGE,i,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([Ku.DRAW_IMAGE,i,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 r=t.getAnchor(),n=t.getSize(),i=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),a=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=r[0],this.anchorY_=r[1],this.hitDetectionImage_=i,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=a[0]*this.imagePixelRatio_,this.originY_=a[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterImageWithText_=e},e}($u);var ep=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rp=function(t){function e(e,r,n,i){return t.call(this,e,r,n,i)||this}return ep(e,t),e.prototype.drawFlatCoordinates_=function(t,e,r,n){var i=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,r,n,!1,!1),a=[Ku.MOVE_TO_LINE_TO,i,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),r},e.prototype.drawLineString=function(t,e){var r=this.state,n=r.strokeStyle,i=r.lineWidth;if(void 0!==n&&void 0!==i){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Ku.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,ur,0],Yu);var o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(Vu),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var r=this.state,n=r.strokeStyle,i=r.lineWidth;if(void 0!==n&&void 0!==i){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Ku.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Yu);for(var o=t.getEnds(),a=t.getFlatCoordinates(),s=t.getStride(),l=0,u=0,p=o.length;ut&&(v>g&&(g=v,d=m,y=o),v=0,m=o-i)),a=s,p=c,h=f),l=_,u=x}return(v+=s)>g?[m,o]:[d,y]}var lp=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),up={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},pp=function(t){function e(e,r,n,i){var o=t.call(this,e,r,n,i)||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 lp(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 r=this.textFillState_,n=this.textStrokeState_,i=this.textState_;if(""!==this.text_&&i&&(r||n)){var o=this.coordinates,a=o.length,s=t.getType(),l=null,u=t.getStride();if("line"!==i.placement||s!=sn&&s!=pn&&s!=ln&&s!=hn){var p=i.overflow?null:[];switch(s){case an:case un:l=t.getFlatCoordinates();break;case sn:l=t.getFlatMidpoint();break;case fn:l=t.getCenter();break;case pn:l=t.getFlatMidpoints(),u=2;break;case ln:l=t.getFlatInteriorPoint(),i.overflow||p.push(l[2]/this.resolution),u=3;break;case hn:var h=t.getFlatInteriorPoints();for(l=[],w=0,C=h.length;wR[2]}else T=x>E;var P,I=Math.PI,F=[],k=w+n===e;if(g=0,v=C,c=t[e=w],f=t[e+1],k){m(),P=Math.atan2(f-y,c-d),T&&(P+=P>0?-I:I);var M=(E+x)/2,A=(O+b)/2;return F[0]=[M,A,(S-o)/2,P,i],F}for(var L=0,j=i.length;L0?-I:I),void 0!==P){var D=z-P;if(D+=D>I?-2*I:D<-I?2*I:0,Math.abs(D)>a)return null}P=z;for(var G=L,N=0;L0&&t.push("\n",""),t.push(e,""),t}var Pp=function(){function t(t,e,r,n){this.overlaps=r,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,r,n){var i=t+e+r+n;if(this.labels_[i])return this.labels_[i];var o=n?this.strokeStates[n]:null,a=r?this.fillStates[r]:null,s=this.textStates[e],l=this.pixelRatio,u=[s.scale[0]*l,s.scale[1]*l],p=Array.isArray(t),h=Op(p?t[0]:t,s.textAlign||cr),c=n&&o.lineWidth?o.lineWidth:0,f=p?t:t.split("\n").reduce(Rp,[]),d=function(t,e){for(var r=[],n=[],i=[],o=0,a=0,s=0,l=0,u=0,p=e.length;u<=p;u+=2){var h=e[u];if("\n"!==h&&u!==p){var c=e[u+1]||t.font,f=Cr(c,h);r.push(f),a+=f;var d=br(c);n.push(d),l=Math.max(l,d)}else o=Math.max(o,a),i.push(a),a=0,s+=l}return{width:o,height:s,widths:r,heights:n,lineWidths:i}}(s,f),y=d.width,g=d.height,v=d.widths,m=d.heights,_=d.lineWidths,x=y+c,b=[],w=(x+2)*u[0],C=(g+c)*u[1],S={width:w<0?Math.floor(w):Math.ceil(w),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:b};1==u[0]&&1==u[1]||b.push("scale",u),n&&(b.push("strokeStyle",o.strokeStyle),b.push("lineWidth",c),b.push("lineCap",o.lineCap),b.push("lineJoin",o.lineJoin),b.push("miterLimit",o.miterLimit),(M?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(b.push("setLineDash",[o.lineDash]),b.push("lineDashOffset",o.lineDashOffset))),r&&b.push("fillStyle",a.fillStyle),b.push("textBaseline","middle"),b.push("textAlign","center");for(var T,E=.5-h,O=h*x+E*c,R=[],P=[],I=0,F=0,k=0,A=0,L=0,j=f.length;Lt?t-l:i,x=o+u>e?e-u:o,b=f[3]+_*h[0]+f[1],w=f[0]+x*h[1]+f[2],C=v-f[3],S=m-f[0];return(d||0!==p)&&(bp[0]=C,Sp[0]=C,bp[1]=S,wp[1]=S,wp[0]=C+b,Cp[0]=wp[0],Cp[1]=S+w,Sp[1]=Cp[1]),0!==p?(B(g=Y([1,0,0,1,0,0],r,n,1,1,p,-r,-n),bp),B(g,wp),B(g,Cp),B(g,Sp),it(Math.min(bp[0],wp[0],Cp[0],Sp[0]),Math.min(bp[1],wp[1],Cp[1],Sp[1]),Math.max(bp[0],wp[0],Cp[0],Sp[0]),Math.max(bp[1],wp[1],Cp[1],Sp[1]),xp)):it(Math.min(C,C+b),Math.min(S,S+w),Math.max(C,C+b),Math.max(S,S+w),xp),c&&(v=Math.round(v),m=Math.round(m)),{drawImageX:v,drawImageY:m,drawImageW:_,drawImageH:x,originX:l,originY:u,declutterBox:{minX:xp[0],minY:xp[1],maxX:xp[2],maxY:xp[3],value:y},canvasTransform:g,scale:h}},t.prototype.replayImageOrLabel_=function(t,e,r,n,i,o,a){var s=!(!o&&!a),l=n.declutterBox,u=t.canvas,p=a?a[2]*n.scale[0]/2:0;return l.minX-p<=u.width/e&&l.maxX+p>=0&&l.minY-p<=u.height/e&&l.maxY+p>=0&&(s&&this.replayTextBackground_(t,bp,wp,Cp,Sp,o,a),function(t,e,r,n,i,o,a,s,l,u,p){t.save(),1!==r&&(t.globalAlpha*=r),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,u),t.scale(p[0],p[1]),function(t,e){for(var r=t.contextInstructions,n=0,i=r.length;nG&&(this.fill_(t),F=0),k>G&&(t.stroke(),k=0),F||k||(t.beginPath(),d=NaN,y=NaN),++R;break;case Ku.CIRCLE:var W=l[I=N[1]],X=l[I+1],q=l[I+2]-W,B=l[I+3]-X,V=Math.sqrt(q*q+B*B);t.moveTo(W+V,X),t.arc(W,X,V,0,2*Math.PI,!0),++R;break;case Ku.CLOSE_PATH:t.closePath(),++R;break;case Ku.CUSTOM:I=N[1],h=N[2];var Y=N[3],Z=N[4],K=6==N.length?N[5]:void 0;D.geometry=Y,D.feature=S,R in L||(L[R]=[]);var U=L[R];K?K(l,I,h,2,U):(U[0]=l[I],U[1]=l[I+1],U.length=2),Z(U,D),++R;break;case Ku.DRAW_IMAGE:I=N[1],h=N[2],m=N[3],c=N[4],f=N[5];var H=N[6],J=N[7],$=N[8],Q=N[9],tt=N[10],et=N[11],rt=N[12],nt=N[13],it=N[14];if(!m&&N.length>=19){_=N[18],b=N[19],w=N[20],C=N[21];var ot=this.drawLabelWithPointPlacement_(_,b,w,C);m=ot.label,N[3]=m;var at=N[22];c=(ot.anchorX-at)*this.pixelRatio,N[4]=c;var st=N[23];f=(ot.anchorY-st)*this.pixelRatio,N[5]=f,H=m.height,N[6]=H,nt=m.width,N[13]=nt}var lt=void 0;N.length>24&&(lt=N[24]);var ut=void 0,pt=void 0,ht=void 0;N.length>16?(ut=N[15],pt=N[16],ht=N[17]):(ut=dr,pt=!1,ht=!1),tt&&z?et+=j:tt||z||(et-=j);for(var ct=0;Ir)break;var s=n[a];s||(s=[],n[a]=s),s.push(4*((t+i)*e+(t+o))+3),i>0&&s.push(4*((t-i)*e+(t+o))+3),o>0&&(s.push(4*((t+i)*e+(t-o))+3),i>0&&s.push(4*((t-i)*e+(t-o))+3))}for(var l=[],u=(i=0,n.length);i0){if(!o||h!==yp&&h!==mp||-1!==o.indexOf(t)){var u=(c[s]-3)/4,f=n-u%a,d=n-(u/a|0),y=i(t,e,f*f+d*d);if(y)return y}p.clearRect(0,0,a,a);break}}var d,y,v,m,_,x=Object.keys(this.executorsByZIndex_).map(Number);for(x.sort(g),d=x.length-1;d>=0;--d){var b=x[d].toString();for(v=this.executorsByZIndex_[b],y=Fp.length-1;y>=0;--y)if(void 0!==(m=v[h=Fp[y]])&&(_=m.executeHitDetection(p,s,r,f,u)))return _}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var r=e[0],n=e[1],i=e[2],o=e[3],a=[r,n,r,o,i,o,i,n];return bi(a,0,8,2,t,a),a},t.prototype.isEmpty=function(){return Qt(this.executorsByZIndex_)},t.prototype.execute=function(t,e,r,n,i,o,a){var s=Object.keys(this.executorsByZIndex_).map(Number);s.sort(g),this.maxExtent_&&(t.save(),this.clip(t,r));var l,u,p,h,c,f,d=o||Fp;for(a&&s.reverse(),l=0,u=s.length;lf[2];)v=y*++g,u.push(this.getRenderTransform(n,i,o,Dp,p,h,v).slice()),d-=y}this.hitDetectionImageData_=Gp(r,u,this.renderedFeatures_,l.getStyleFunction(),s,i,o)}e(Np(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){var o=this;if(this.replayGroup_){var a,s=e.viewState.resolution,l=e.viewState.rotation,u=this.getLayer(),p={},h=function(t,e,r){var o=E(t),a=p[o];if(a){if(!0!==a&&r=r[2])){var i=St(r),o=Math.floor((n[0]-r[0])/i)*i;t[0]-=o,t[2]-=o}return t}(m[0],u);C[0]<_[0]&&C[2]<_[2]?m.push([C[0]+b,C[1],C[2]+b,C[3]]):C[0]>_[0]&&C[2]>_[2]&&m.push([C[0]-b,C[1],C[2]-b,C[3]])}if(!this.dirty_&&this.renderedResolution_==p&&this.renderedRevision_==c&&this.renderedRenderOrder_==d&&et(this.wrappedRenderedExtent_,g))return x(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=y,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var S,T=new cp(Bp(p,h),g,p,h);this.getLayer().getDeclutter()&&(S=new cp(Bp(p,h),g,p,h));var E,O=ei();if(O){for(var R=0,P=m.length;R=200&&s.status<300){var n=e.getType(),l=void 0;n==qs||"text"==n?l=s.responseText:"xml"==n?(l=s.responseXML)||(l=(new DOMParser).parseFromString(s.responseText,"application/xml")):n==Xs&&(l=s.response),l?o(e.readFeatures(l,{extent:r,featureProjection:i}),e.readProjection(l)):a()}else a()},s.onerror=a,s.send()}function nh(t,e){return function(r,n,i,o,a){var s=this;rh(t,e,r,n,i,(function(t,e){s.addFeatures(t),void 0!==o&&o(t)}),a||C)}}var ih=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),oh=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.feature=r,i.features=n,i}return ih(e,t),e}(Kt),ah=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{attributions:n.attributions,interpolate:!0,projection:void 0,state:Me,wrapX:void 0===n.wrapX||n.wrapX})||this).on,r.once,r.un,r.loader_=C,r.format_=n.format,r.overlaps_=void 0===n.overlaps||n.overlaps,r.url_=n.url,void 0!==n.loader?r.loader_=n.loader:void 0!==r.url_&&(D(r.format_,7),r.loader_=nh(r.url_,r.format_)),r.strategy_=void 0!==n.strategy?n.strategy:eh;var i,o,a=void 0===n.useSpatialIndex||n.useSpatialIndex;return r.featuresRtree_=a?new $p:null,r.loadedExtentsRtree_=new $p,r.loadingExtentsCount_=0,r.nullGeometryFeatures_={},r.idIndex_={},r.uidIndex_={},r.featureChangeKeys_={},r.featuresCollection_=null,Array.isArray(n.features)?o=n.features:n.features&&(o=(i=n.features).getArray()),a||void 0!==i||(i=new Mr(o)),void 0!==o&&r.addFeaturesInternal(o),void 0!==i&&r.bindFeaturesCollection_(i),r}return ih(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=E(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var r=t.getGeometry();if(r){var n=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new oh(Qp,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[ue(e,re,this.handleFeatureChange_,this),ue(e,Ut,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var r=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?r=!1:this.idIndex_[n.toString()]=e),r&&(D(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),r},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],r=[],n=[],i=0,o=t.length;i0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,r=this.loadedExtentsRtree_;r.forEachInExtent(t,(function(r){if(lt(r.extent,t))return e=r,!0})),e&&r.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=E(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=E(t),r=this.featureChangeKeys_[e];if(r){r.forEach(he),delete this.featureChangeKeys_[e];var n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new oh(th,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var r in this.idIndex_)if(this.idIndex_[r]===t){delete this.idIndex_[r],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){D(this.format_,7),this.url_=t,this.setLoader(nh(t,this.format_))},e}(Jl);const sh=ah,lh="hybrid",uh="vector";var ph=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hh={image:[vp,fp,gp,yp,mp],hybrid:[vp,gp],vector:[]},ch={hybrid:[yp,mp,dp],vector:[vp,fp,gp,yp,mp,dp]},fh=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.dirty_=!1,r.renderedLayerRevision_,r.renderedPixelToCoordinateTransform_=null,r.renderedRotation_,r.tmpTransform_=[1,0,0,1,0,0],r}return ph(e,t),e.prototype.prepareTile=function(t,e,r){var n,i=t.getState();return 2!==i&&3!==i||(this.updateExecutorGroup_(t,e,r),this.tileImageNeedsRender_(t)&&(n=!0)),n},e.prototype.getTile=function(e,r,n,i){var o=i.pixelRatio,a=i.viewState,s=a.resolution,l=a.projection,u=this.getLayer(),p=u.getSource().getTile(e,r,n,o,l),h=i.viewHints,c=!(h[0]||h[1]);return!c&&p.wantedResolution||(p.wantedResolution=s),this.prepareTile(p,o,l)&&(c||Date.now()-i.time<8)&&u.getRenderMode()!==uh&&this.renderTileImage_(p,i),t.prototype.getTile.call(this,e,r,n,i)},e.prototype.isDrawableTile=function(e){var r=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&(r.getRenderMode()===uh?E(r)in e.executorGroups:e.hasContext(r))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var r=this.getLayer().getRevision();return this.renderedLayerRevision_!=r&&(this.renderedTiles.length=0),this.renderedLayerRevision_=r,t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,r){var n=this.getLayer(),i=n.getRevision(),o=n.getRenderOrder()||null,a=t.wantedResolution,s=t.getReplayState(n);if(s.dirty||s.renderedResolution!==a||s.renderedRevision!=i||s.renderedRenderOrder!=o){var l=n.getSource(),u=n.getDeclutter(),p=l.getTileGrid(),h=l.getTileGridForProjection(r).getTileCoordExtent(t.wrappedTileCoord),c=l.getSourceTiles(e,r,t),f=E(n);delete t.hitDetectionImageData[f],t.executorGroups[f]=[],u&&(t.declutterExecutorGroups[f]=[]);for(var d=function(r,i){var d=c[r];if(2!=d.getState())return"continue";var g=d.tileCoord,v=p.getTileCoordExtent(g),m=bt(h,v),_=J(m,n.getRenderBuffer()*a,y.tmpExtent),x=lt(v,m)?null:_;s.dirty=!1;var b=new cp(0,_,a,e),w=u?new cp(0,m,a,e):void 0,C=qp(a,e),S=function(t){var e,r=t.getStyleFunction()||n.getStyleFunction();if(r&&(e=r(t,a)),e){var i=this.renderFeature(t,C,e,b,w);this.dirty_=this.dirty_||i,s.dirty=s.dirty||i}},T=d.getFeatures();o&&o!==s.renderedRenderOrder&&T.sort(o);for(var E=0,O=T.length;E0)e([]);else{var g=wt(p.getTileCoordExtent(n.wrappedTileCoord)),v=[(h[0]-g[0])/u,(g[1]-h[1])/u],m=n.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]),_=n.hitDetectionImageData[o];if(!_&&!this.animatingOrInteracting_){var x=So(p.getTileSize(p.getZForResolution(u))),b=this.renderedRotation_;_=Gp(x,[this.getRenderTransform(p.getTileCoordCenter(n.wrappedTileCoord),u,0,Dp,x[0]*Dp,x[1]*Dp,0)],m,i.getStyleFunction(),p.getTileCoordExtent(n.wrappedTileCoord),n.getReplayState(i).renderedResolution,b),n.hitDetectionImageData[o]=_}e(Np(v,m,_))}}.bind(this))},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var e=this.context,r=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();for(var n=t.viewHints,i=!(n[0]||n[1]),o=this.renderedTiles,a=0,s=o.length;a=0;--p)u[p].execute(this.context,1,this.getTileRenderTransform(l,t),t.viewState.rotation,i,void 0,t.declutterTree)}e.globalAlpha=r},e.prototype.getTileRenderTransform=function(t,e){var r=e.pixelRatio,n=e.viewState,i=n.center,o=n.resolution,a=n.rotation,s=e.size,l=Math.round(s[0]*r),u=Math.round(s[1]*r),p=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),h=t.tileCoord,c=p.getTileCoordExtent(t.wrappedTileCoord),f=p.getTileCoordExtent(h,this.tmpExtent)[0]-c[0];return X(V(this.inversePixelTransform.slice(),1/r,1/r),this.getRenderTransform(i,o,a,r,l,u,f))},e.prototype.renderFrame=function(e,r){var n=e.viewHints,i=!(n[0]||n[1]);t.prototype.renderFrame.call(this,e,r),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var o=this.getLayer(),a=o.getRenderMode(),s=this.context,l=s.globalAlpha;s.globalAlpha=o.getOpacity();for(var u=ch[a],p=e.viewState,h=p.rotation,c=o.getSource(),f=c.getTileGridForProjection(p.projection).getZForResolution(p.resolution,c.zDirection),d=this.renderedTiles,y=[],g=[],v=d.length-1;v>=0;--v){var m=d[v],_=m.executorGroups[E(o)].filter((function(t){return t.hasExecutors(u)}));if(0!==_.length){for(var x=this.getTileRenderTransform(m,e),b=m.tileCoord[0],w=!1,C=_[0].getClipCoords(x),S=0,T=y.length;S255?255:t}function Fh(t){return t<0?0:t>1?1:t}function kh(t){return"%"===t[t.length-1]?Ih(parseFloat(t)/100*255):Ih(parseInt(t))}function Mh(t){return"%"===t[t.length-1]?Fh(parseFloat(t)/100):Fh(parseFloat(t))}function Ah(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{Rh={}.parseCSSColor=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in Ph)return Ph[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var n=r.indexOf("("),i=r.indexOf(")");if(-1!==n&&i+1===r.length){var o=r.substr(0,n),a=r.substr(n+1,i-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=Mh(a.pop());case"rgb":return 3!==a.length?null:[kh(a[0]),kh(a[1]),kh(a[2]),s];case"hsla":if(4!==a.length)return null;s=Mh(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=Mh(a[1]),p=Mh(a[2]),h=p<=.5?p*(u+1):p+u-p*u,c=2*p-h;return[Ih(255*Ah(c,h,l+1/3)),Ih(255*Ah(c,h,l)),Ih(255*Ah(c,h,l-1/3)),s];default:return null}}return null}}catch(t){}var Lh=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};function jh(t){return"object"==typeof t?["literal",t]:t}function zh(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Dh(t,e){var r,n,i=jh((r=t.default,n=e.default,void 0!==r?r:void 0!==n?n:void 0));return void 0===i&&"resolvedImage"===e.type?"":i}function Gh(t,e,r){var n=Xh(t,e),i=["get",t.property];if("categorical"===n&&"boolean"==typeof r[0][0]){for(var o=["case"],a=0,s=r;a3&&e===t[t.length-2]||(n&&2===t.length||t.push(e),t.push(r))}function Xh(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function qh(t){for(var e=["concat"],r=/{([^{}]+)}/g,n=0,i=r.exec(t);null!==i;i=r.exec(t)){var o=t.slice(n,r.lastIndex-i[0].length);n=r.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(1===e.length)return t;if(n":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var ic=[Yh,Zh,Kh,Uh,Hh,tc,Jh,rc($h),ec];function oc(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!oc(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=ic;r=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function fc(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof Lh)return!0;if(t instanceof lc)return!0;if(t instanceof pc)return!0;if(t instanceof hc)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if("string"!=typeof s||!(s in mc)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=mc[s],n++}else o=$h;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],n++}r=rc(o,a)}else r=mc[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var xc=function(t){this.type=tc,this.sections=t};xc.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,o=1;o<=t.length-1;++o){var a=t[o];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,Zh)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,rc(Kh))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,Hh)))return null;var p=n[n.length-1];p.scale=s,p.font=l,p.textColor=u}else{var h=e.parse(t[o],1,$h);if(!h)return null;var c=h.type.kind;if("string"!==c&&"value"!==c&&"null"!==c&&"resolvedImage"!==c)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new xc(n)},xc.prototype.evaluate=function(t){return new pc(this.sections.map((function(e){var r=e.content.evaluate(t);return dc(r)===ec?new uc("",r,null,null,null):new uc(yc(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},xc.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},bc.prototype.eachChild=function(t){t(this.input)},bc.prototype.outputDefined=function(){return!1},bc.prototype.serialize=function(){return["image",this.input.serialize()]};var wc={"to-boolean":Uh,"to-color":Hh,"to-number":Zh,"to-string":Kh},Cc=function(t,e){this.type=t,this.args=e};Cc.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=wc[r],i=[],o=1;o4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":cc(e[0],e[1],e[2],e[3])))return new Lh(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new vc(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Fc(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),o=Math.pow(2,e.z);return[Math.round(n*o*Rc),Math.round(i*o*Rc)]}function kc(t,e,r){var n=t[0]-e[0],i=t[1]-e[1],o=t[0]-r[0],a=t[1]-r[1];return n*a-o*i==0&&n*o<=0&&i*a<=0}function Mc(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Ac(t,e){for(var r=!1,n=0,i=e.length;n0&&h<0||p<0&&h>0}function zc(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,o=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===o&&(o=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=o}Pc(e,t)}function qc(t,e,r,n){var i=Math.pow(2,n.z)*Rc,o=[n.x*Rc,n.y*Rc],a=[];if(!t)return a;for(var s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Kc(t,e)&&(r=!1)})),r}Vc.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(fc(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;ne))throw new vc("Input is not a number.");a=s-1}return 0}Hc.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},Hc.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new _c(e,[t]):"coerce"===r?new Cc(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof gc)&&"resolvedImage"!==o.type.kind&&Jc(o)){var l=new Tc;try{o=new gc(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Hc.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new Hc(this.registry,n,e||null,i,this.errors)},Hc.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Bh(n,t))},Hc.prototype.checkSubtype=function(t,e){var r=oc(t,e);return r&&this.error(r),r};var Qc=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var p=e.parse(s,u,i);if(!p)return null;i=i||p.type,n.push([a,p])}return new Qc(i,r,n)},Qc.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[$c(e,n)].evaluate(t)},Qc.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var tf=ef;function ef(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}function rf(t,e,r){return t*(1-r)+e*r}ef.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},ef.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},ef.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},ef.prototype.solveCurveX=function(t,e){var r,n,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)(n=1))return n;for(;ro?r=i:n=i,i=.5*(n-r)+r}return i},ef.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var nf=Object.freeze({__proto__:null,number:rf,color:function(t,e,r){return new Lh(rf(t.r,e.r,r),rf(t.g,e.g,r),rf(t.b,e.b,r),rf(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return rf(t,e[n],r)}))}}),of=.95047,af=1.08883,sf=4/29,lf=6/29,uf=3*lf*lf,pf=lf*lf*lf,hf=Math.PI/180,cf=180/Math.PI;function ff(t){return t>pf?Math.pow(t,1/3):t/uf+sf}function df(t){return t>lf?t*t*t:uf*(t-sf)}function yf(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function gf(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function vf(t){var e=gf(t.r),r=gf(t.g),n=gf(t.b),i=ff((.4124564*e+.3575761*r+.1804375*n)/of),o=ff((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-ff((.0193339*e+.119192*r+.9503041*n)/af)),alpha:t.a}}function mf(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*df(e),r=of*df(r),n=af*df(n),new Lh(yf(3.2404542*r-1.5371385*e-.4985314*n),yf(-.969266*r+1.8760108*e+.041556*n),yf(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function _f(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var xf={forward:vf,reverse:mf,interpolate:function(t,e,r){return{l:rf(t.l,e.l,r),a:rf(t.a,e.a,r),b:rf(t.b,e.b,r),alpha:rf(t.alpha,e.alpha,r)}}},bf=function(t){var e=vf(t),r=e.l,n=e.a,i=e.b,o=Math.atan2(i,n)*cf;return{h:o<0?o+360:o,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},wf=function(t){var e=t.h*hf,r=t.c;return mf({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},Cf=function(t,e,r){return{h:_f(t.h,e.h,r),c:rf(t.c,e.c,r),l:rf(t.l,e.l,r),alpha:rf(t.alpha,e.alpha,r)}},Sf=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=i;o1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,Zh)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=Hh:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var p=0;p=h)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var y=e.parse(c,d,u);if(!y)return null;u=u||y.type,l.push([h,y])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Sf(u,r,n,i,l):e.error("Type "+nc(u)+" is not interpolatable.")},Sf.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var o=$c(e,n),a=e[o],s=e[o+1],l=Sf.interpolationFactor(this.interpolation,n,a,s),u=r[o].evaluate(t),p=r[o+1].evaluate(t);return"interpolate"===this.operator?nf[this.type.kind.toLowerCase()](u,p,l):"interpolate-hcl"===this.operator?wf(Cf(bf(u),bf(p),l)):xf.reverse(xf.interpolate(xf.forward(u),xf.forward(p),l))},Sf.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new vc("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new vc("Array index must be an integer, but found "+e+" instead.");return r[e]},Rf.prototype.eachChild=function(t){t(this.index),t(this.input)},Rf.prototype.outputDefined=function(){return!1},Rf.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Pf=function(t,e){this.type=Uh,this.needle=t,this.haystack=e};Pf.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,$h),n=e.parse(t[2],2,$h);return r&&n?ac(r.type,[Uh,Kh,Zh,Yh,$h])?new Pf(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+nc(r.type)+" instead"):null},Pf.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(null==r)return!1;if(!sc(e,["boolean","string","number","null"]))throw new vc("Expected first argument to be of type boolean, string, number or null, but found "+nc(dc(e))+" instead.");if(!sc(r,["string","array"]))throw new vc("Expected second argument to be of type array or string, but found "+nc(dc(r))+" instead.");return r.indexOf(e)>=0},Pf.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},Pf.prototype.outputDefined=function(){return!0},Pf.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var If=function(t,e,r){this.type=Zh,this.needle=t,this.haystack=e,this.fromIndex=r};If.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,$h),n=e.parse(t[2],2,$h);if(!r||!n)return null;if(!ac(r.type,[Uh,Kh,Zh,Yh,$h]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+nc(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Zh);return i?new If(r,n,i):null}return new If(r,n)},If.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!sc(e,["boolean","string","number","null"]))throw new vc("Expected first argument to be of type boolean, string, number or null, but found "+nc(dc(e))+" instead.");if(!sc(r,["string","array"]))throw new vc("Expected second argument to be of type array or string, but found "+nc(dc(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},If.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},If.prototype.outputDefined=function(){return!1},If.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ff=function(t,e,r,n,i,o){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o};Ff.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof c&&Math.floor(c)!==c)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,dc(c)))return null}else r=dc(c);if(void 0!==i[String(c)])return u.error("Branch labels must be unique.");i[String(c)]=o.length}var f=e.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var d=e.parse(t[1],1,$h);if(!d)return null;var y=e.parse(t[t.length-1],t.length-1,n);return y?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new Ff(r,n,d,i,o,y):null},Ff.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(dc(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Ff.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Ff.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},Ff.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();i=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,$h),n=e.parse(t[2],2,Zh);if(!r||!n)return null;if(!ac(r.type,[rc($h),Kh,$h]))return e.error("Expected first argument to be of type array or string, but found "+nc(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Zh);return i?new Mf(r.type,r,n,i):null}return new Mf(r.type,r,n)},Mf.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!sc(e,["string","array"]))throw new vc("Expected first argument to be of type array or string, but found "+nc(dc(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},Mf.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Mf.prototype.outputDefined=function(){return!1},Mf.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var zf=jf("==",(function(t,e,r){return e===r}),Lf),Df=jf("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!Lf(0,e,r,n)})),Gf=jf("<",(function(t,e,r){return e",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Wf=jf("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),Xf=jf(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),qf=function(t,e,r,n,i){this.type=Kh,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};qf.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Zh);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Kh)))return null;var o=null;if(n.currency&&!(o=e.parse(n.currency,1,Kh)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=e.parse(n["min-fraction-digits"],1,Zh)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Zh))?null:new qf(r,i,o,a,s)},qf.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},qf.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},qf.prototype.outputDefined=function(){return!1},qf.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Bf=function(t){this.type=Zh,this.input=t};Bf.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+nc(r.type)+" instead."):new Bf(r):null},Bf.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new vc("Expected value to be of type string or array, but found "+nc(dc(e))+" instead.")},Bf.prototype.eachChild=function(t){t(this.input)},Bf.prototype.outputDefined=function(){return!1},Bf.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Vf={"==":zf,"!=":Df,">":Nf,"<":Gf,">=":Xf,"<=":Wf,array:_c,at:Rf,boolean:_c,case:kf,coalesce:Ef,collator:Oc,format:xc,image:bc,in:Pf,"index-of":If,interpolate:Sf,"interpolate-hcl":Sf,"interpolate-lab":Sf,length:Bf,let:Of,literal:gc,match:Ff,number:_c,"number-format":qf,object:_c,slice:Mf,step:Qc,string:_c,"to-boolean":Cc,"to-color":Cc,"to-number":Cc,"to-string":Cc,var:Uc,within:Vc};function Yf(t,e){var r=e[0],n=e[1],i=e[2],o=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=cc(r,n,i,a);if(s)throw new vc(s);return new Lh(r/255*a,n/255*a,i/255*a,a)}function Zf(t,e){return t in e}function Kf(t,e){var r=e[t];return void 0===r?null:r}function Uf(t){return{type:t}}function Hf(t){return{result:"success",value:t}}function Jf(t){return{result:"error",value:t}}function $f(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}Ec.register(Vf,{error:[{kind:"error"},[Kh],function(t,e){var r=e[0];throw new vc(r.evaluate(t))}],typeof:[Kh,[$h],function(t,e){return nc(dc(e[0].evaluate(t)))}],"to-rgba":[rc(Zh,4),[Hh],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Hh,[Zh,Zh,Zh],Yf],rgba:[Hh,[Zh,Zh,Zh,Zh],Yf],has:{type:Uh,overloads:[[[Kh],function(t,e){return Zf(e[0].evaluate(t),t.properties())}],[[Kh,Jh],function(t,e){var r=e[0],n=e[1];return Zf(r.evaluate(t),n.evaluate(t))}]]},get:{type:$h,overloads:[[[Kh],function(t,e){return Kf(e[0].evaluate(t),t.properties())}],[[Kh,Jh],function(t,e){var r=e[0],n=e[1];return Kf(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[$h,[Kh],function(t,e){return Kf(e[0].evaluate(t),t.featureState||{})}],properties:[Jh,[],function(t){return t.properties()}],"geometry-type":[Kh,[],function(t){return t.geometryType()}],id:[$h,[],function(t){return t.id()}],zoom:[Zh,[],function(t){return t.globals.zoom}],pitch:[Zh,[],function(t){return t.globals.pitch||0}],"distance-from-center":[Zh,[],function(t){return t.distanceFromCenter()}],"heatmap-density":[Zh,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Zh,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[Zh,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[$h,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Zh,Uf(Zh),function(t,e){for(var r=0,n=0,i=e;n":[Uh,[Kh,$h],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>o}],"filter-id->":[Uh,[$h],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[Uh,[Kh,$h],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[Uh,[$h],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[Uh,[Kh,$h],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[Uh,[$h],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[Uh,[$h],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Uh,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Uh,[rc(Kh)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Uh,[rc($h)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Uh,[Kh,rc($h)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Uh,[Kh,rc($h)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Uh,overloads:[[[Uh,Uh],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Uf(Uh),function(t,e){for(var r=0,n=e;r-1}(e))return Jf([new Bh("","zoom expressions not supported")]);var o=id(r);if(!o&&!i)return Jf([new Bh("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof Bh)return Jf([o]);if(o instanceof Sf&&!function(t){return!!t.expression&&t.expression.interpolated}(e))return Jf([new Bh("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Hf(new ed(n?"constant":"source",t.value));var a=o instanceof Sf?o.interpolation:void 0;return Hf(new rd(n?"camera":"composite",t.value,o.labels,a))}function id(t){var e=null;if(t instanceof Of)e=id(t.result);else if(t instanceof Ef)for(var r=0,n=t.args;r":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function sd(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e",">=","<","<=","to-boolean"]);function fd(t,e){return te?1:0}function dd(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var e=1;e"===r||"<="===r||">="===r?gd(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(yd))):"all"===r?["all"].concat(t.slice(1).map(yd)):"none"===r?["all"].concat(t.slice(1).map(yd).map(_d)):"in"===r?vd(t[1],t.slice(2)):"!in"===r?_d(vd(t[1],t.slice(2))):"has"===r?md(t[1]):"!has"===r?_d(md(t[1])):"within"!==r||t}function gd(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function vd(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(fd)]]:["filter-in-small",t,["literal",e]]}}function md(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function _d(t){return["!",t]}var xd=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function bd(t,e){var r={};for(var n in t)"ref"!==n&&(r[n]=t[n]);return xd.forEach((function(t){t in e&&(r[t]=e[t])})),r}var wd={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},Cd=" ",Sd=/(italic|oblique)$/i,Td={},Ed=function(t,e,r){var n=Td[t];if(!n){Array.isArray(t)||(t=[t]);for(var i=400,o="normal",a=[],s=0,l=t.length;s1?u[u.length-2].toLowerCase():"";if(p==h||p==h.replace("-","")||c+"-"+p==h){i=wd[h],u.pop(),c&&h.startsWith(c)&&u.pop();break}}"number"==typeof p&&(i=p);var f=u.join(Cd).replace("Klokantech Noto Sans","Noto Sans");-1!==f.indexOf(Cd)&&(f='"'+f+'"'),a.push(f)}n=Td[t]=[o,i,a]}return n[0]+Cd+n[1]+Cd+e+"px"+(r?"/"+r:"")+Cd+n[2]},Od="https://api.mapbox.com";function Rd(t){return 0!==t.indexOf("mapbox://")?"":t.slice(9)}function Pd(t,e){var r=Rd(t);if(!r)return decodeURI(new URL(t,location.href).href);if(0!==r.indexOf("styles/"))throw new Error("unexpected style url: "+t);var n=r.slice(7);return Od+"/styles/v1/"+n+"?&access_token="+e}function Id(t,e,r,n){var i=new URL(t,n),o=Rd(t);return o?"https://{a-d}.tiles.mapbox.com/v4/"+o+"/{z}/{x}/{y}.vector.pbf?access_token="+e:e?(i.searchParams.set(r,e),decodeURI(i.href)):decodeURI(i.href)}function Fd(t){return t*Math.PI/180}var kd=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function Md(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var r=document.createElement("canvas");return r.width=t,r.height=e,r}var Ad={};function Ld(t,e,r){if(void 0===r&&(r={}),e in Ad)return Ad[e];var n=r.transformRequest&&r.transformRequest(e,t)||new Request(e);n.headers.get("Accept")||n.headers.set("Accept","application/json");var i=fetch(n).then((function(t){return delete Ad[e],t.ok?t.json():Promise.reject(new Error("Error fetching source "+e))})).catch((function(t){return delete Ad[e],Promise.reject(new Error("Error fetching source "+e))}));return Ad[e]=i,i}function jd(t,e){if("string"!=typeof t)return Promise.resolve(t);if(!t.trim().startsWith("{"))return Ld("Style",t=Pd(t,e.accessToken),e);try{var r=JSON.parse(t);return Promise.resolve(r)}catch(t){return Promise.reject(t)}}var zd={};function Dd(t,e,r){void 0===r&&(r={});var n=[e,JSON.stringify(t)].toString(),i=zd[n];if(!i||r.transformRequest){var o=t.url;if(o&&!t.tiles){var a=Id(o,r.accessToken,r.accessTokenParam||"access_token",e||location.href);i=o.startsWith("mapbox://")?Promise.resolve(Object.assign({},t,{url:void 0,tiles:a})):Ld("Source",a,r).then((function(t){for(var e=0,n=t.tiles.length;e=.05){for(var r="",n=t.split("\n"),i=Nd.slice(0,Math.round(e/.1)),o=0,a=n.length;o0&&(r+="\n"),r+=n[o].split("").join(i);return r}return t}function Xd(){return Gd||(Gd=Md(1,1).getContext("2d")),Gd}function qd(t,e){return Xd().measureText(t).width+(t.length-1)*e}var Bd={};function Vd(t,e,r,n){if(-1!==t.indexOf("\n")){for(var i=t.split("\n"),o=[],a=0,s=i.length;a1){var h=Xd();h.font=e;for(var c=h.measureText("M").width*r,f="",d=[],y=0,g=p.length;y1;++_){var b=d[_];if(qd(b,n)<.35*c){var w=_>0?qd(d[_-1],n):1/0,C=_.7*c&&qd(O,n)<.6*c){var R=E.split(" "),P=R.pop();qd(P,n)<.2*c&&(d[S]=R.join(" "),d[S+1]=P+" "+O),T-=1}}u=d.join("\n")}else u=t;u=Wd(u,n),Bd[l]=u}return u}var Yd,Zd=/font-family: ?([^;]*);/,Kd=/("|')/g;function Ud(t){if(!Yd){Yd={};for(var e=document.styleSheets,r=0,n=e.length;r0&&"string"==typeof l[0]&&l[0]in Vf);if(!c&&$f(p)&&(p=function(t,e){var r=t.stops;if(!r)return function(t,e){var r=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",r]:r;if("enum"===e.type)return["match",r,Object.keys(e.values),r,t.default];var n=["color"===e.type?"to-color":e.type,r,jh(t.default)];return"array"===e.type&&n.splice(1,0,e.value,e.length||null),n}(t,e);var n=r&&"object"==typeof r[0][0],i=n||void 0!==t.property,o=n||!i;return r=r.map((function(t){return!i&&e.tokens&&"string"==typeof t[1]?[t[0],qh(t[1])]:[t[0],jh(t[1])]})),n?function(t,e,r){for(var n={},i={},o=[],a=0;a=C.maxzoom)){var I=C.filter;if(!I||ay(S,I,c,p,m)){var F=void 0,k=void 0,M=void 0,A=void 0,L=void 0,j=void 0,z=w.index;if(3==h&&("fill"==C.type||"fill-extrusion"==C.type))if(k=iy(C,"paint",C.type+"-opacity",p,c,v,d),C.type+"-pattern"in E){var D=iy(C,"paint",C.type+"-pattern",p,c,v,d);if(D){var G="string"==typeof D?uy(D,o):D.toString();if(s&&i&&i[G]){++_,(j=P[_])&&j.getFill()&&!j.getStroke()&&!j.getText()||(j=new Is({fill:new es}),P[_]=j),M=j.getFill(),j.setZIndex(z);var N=G+"."+k,W=g[N];if(!W){var X=i[G],q=Md(X.width,X.height),B=q.getContext("2d");B.globalAlpha=k,B.drawImage(s,X.x,X.y,X.width,X.height,0,0,X.width,X.height),W=B.createPattern(q,"repeat"),g[N]=W}M.setColor(W)}}}else F=sy(iy(C,"paint",C.type+"-color",p,c,v,d),k),C.type+"-outline-color"in E&&(L=sy(iy(C,"paint",C.type+"-outline-color",p,c,v,d),k)),L||(L=F),(F||L)&&(++_,(!(j=P[_])||F&&!j.getFill()||!F&&j.getFill()||L&&!j.getStroke()||!L&&j.getStroke()||j.getText())&&(j=new Is({fill:F?new es:void 0,stroke:L?new Ts:void 0}),P[_]=j),F&&(M=j.getFill()).setColor(F),L&&((A=j.getStroke()).setColor(L),A.setWidth(.5)),j.setZIndex(z));if(1!=h&&"line"==C.type){F=!("line-pattern"in E)&&"line-color"in E?sy(iy(C,"paint","line-color",p,c,v,d),iy(C,"paint","line-opacity",p,c,v,d)):void 0;var V=iy(C,"paint","line-width",p,c,v,d);F&&V>0&&(++_,(j=P[_])&&j.getStroke()&&!j.getFill()&&!j.getText()||(j=new Is({stroke:new Ts}),P[_]=j),(A=j.getStroke()).setLineCap(iy(C,"layout","line-cap",p,c,v,d)),A.setLineJoin(iy(C,"layout","line-join",p,c,v,d)),A.setMiterLimit(iy(C,"layout","line-miter-limit",p,c,v,d)),A.setColor(F),A.setWidth(V),A.setLineDash(E["line-dasharray"]?iy(C,"paint","line-dasharray",p,c,v,d).map((function(t){return t*V})):null),j.setZIndex(z))}var Y=!1,Z=null,K=0,U=void 0,H=void 0,J=void 0;if((1==h||2==h)&&"icon-image"in T){var $=iy(C,"layout","icon-image",p,c,v,d);if($){U="string"==typeof $?uy($,o):$.toString();var Q=void 0;if(s&&i&&i[U]){var tt=iy(C,"layout","icon-rotation-alignment",p,c,v,d);if(2==h){var et=e.getGeometry();if(et.getFlatMidpoint||et.getFlatMidpoints){var rt=et.getExtent();if(Math.sqrt(Math.max(Math.pow((rt[2]-rt[0])/r,2),Math.pow((rt[3]-rt[1])/r,2)))>150){var nt="MultiLineString"===et.getType()?et.getFlatMidpoints():et.getFlatMidpoint();if(Qd||(Qd=new Cs("Point",$d=[NaN,NaN],[],{},null)),Q=Qd,$d[0]=nt[0],$d[1]=nt[1],"line"===iy(C,"layout","symbol-placement",p,c,v,d)&&"map"===tt)for(var it=et.getStride(),ot=et.getFlatCoordinates(),at=0,st=ot.length-it;at=ct&&nt[0]<=dt&&nt[1]>=ft&&nt[1]<=yt){K=Math.atan2(ut-ht,pt-lt);break}}}}}if(2!==h||Q){var gt=iy(C,"layout","icon-size",p,c,v,d),vt=void 0!==E["icon-color"]?iy(C,"paint","icon-color",p,c,v,d):null;if(!vt||0!==vt.a){var mt=U+"."+gt;if(null!==vt&&(mt+="."+vt),!(H=y[mt])){var _t=i[U],xt=oy(C,p,c,v);H=new vs({color:vt?[255*vt.r,255*vt.g,255*vt.b,vt.a]:void 0,img:s,imgSize:l,size:[_t.width,_t.height],offset:[_t.x,_t.y],rotateWithView:"map"===tt,scale:gt/_t.pixelRatio,displacement:"icon-offset"in T?iy(C,"layout","icon-offset",p,c,v,d).map((function(t){return-t*_t.pixelRatio})):void 0,declutterMode:xt}),y[mt]=H}}H&&(++_,(j=P[_])&&j.getImage()&&!j.getFill()&&!j.getStroke()||(j=new Is,P[_]=j),j.setGeometry(Q),H.setRotation(K+Fd(iy(C,"layout","icon-rotate",p,c,v,d))),H.setOpacity(iy(C,"paint","icon-opacity",p,c,v,d)),H.setAnchor(ey[iy(C,"layout","icon-anchor",p,c,v,d)]),j.setImage(H),Z=j.getText(),j.setText(void 0),j.setZIndex(z),Y=!0,J=!1)}else J=!0}}}if(1==h&&"circle"===C.type){++_,(j=P[_])&&j.getImage()&&!j.getFill()&&!j.getStroke()||(j=new Is,P[_]=j);var bt="circle-radius"in E?iy(C,"paint","circle-radius",p,c,v,d):5,wt=sy(iy(C,"paint","circle-stroke-color",p,c,v,d),iy(C,"paint","circle-stroke-opacity",p,c,v,d)),Ct=sy(iy(C,"paint","circle-color",p,c,v,d),iy(C,"paint","circle-opacity",p,c,v,d)),St=iy(C,"paint","circle-stroke-width",p,c,v,d),Tt=bt+"."+wt+"."+Ct+"."+St;(H=y[Tt])||(H=new Qa({radius:bt,stroke:wt&&St>0?new Ts({width:St,color:wt}):void 0,fill:Ct?new es({color:Ct}):void 0,declutterMode:"none"}),y[Tt]=H),j.setImage(H),Z=j.getText(),j.setText(void 0),j.setGeometry(void 0),j.setZIndex(z),Y=!0}var Et=void 0,Ot=void 0,Rt=void 0,Pt=void 0,It=void 0,Ft=void 0;if("text-field"in T){Pt=Math.round(iy(C,"layout","text-size",p,c,v,d));var kt=iy(C,"layout","text-font",p,c,v,d);Rt=iy(C,"layout","text-line-height",p,c,v,d),(Ot=Ed(a?a(kt):kt,Pt,Rt)).includes("sans-serif")||(Ot+=",sans-serif"),It=iy(C,"layout","text-letter-spacing",p,c,v,d),Ft=iy(C,"layout","text-max-width",p,c,v,d);var Mt=iy(C,"layout","text-field",p,c,v,d);Et="object"==typeof Mt&&Mt.sections?1===Mt.sections.length?Mt.toString():Mt.sections.reduce((function(t,e,r){var n=e.fontStack?e.fontStack.split(","):kt,i=Ed(a?a(n):n,Pt*(e.scale||1),Rt),o=e.text;if("\n"===o)return t.push("\n",""),t;if(2!=h){for(var s=0,l=(o=Vd(o,i,Ft,It).split("\n")).length;s0&&t.push("\n",""),t.push(o[s],i);return t}t.push(Wd(o,It),i)}),[]):uy(Mt,o).trim(),k=iy(C,"paint","text-opacity",p,c,v,d)}if(Et&&k&&!J){Y||(++_,(j=P[_])&&j.getText()&&!j.getFill()&&!j.getStroke()||(j=new Is,P[_]=j),j.setImage(void 0),j.setGeometry(void 0)),j.getText()||j.setText(Z||new ks({padding:[2,2,2,2]})),Z=j.getText();var At=T["text-transform"];"uppercase"==At?Et=Array.isArray(Et)?Et.map((function(t,e){return e%2?t:t.toUpperCase()})):Et.toUpperCase():"lowercase"==At&&(Et=Array.isArray(Et)?Et.map((function(t,e){return e%2?t:t.toLowerCase()})):Et.toLowerCase());var Lt=Array.isArray(Et)?Et:2==h?Wd(Et,It):Vd(Et,Ot,Ft,It);Z.setText(Lt),Z.setFont(Ot),Z.setRotation(Fd(iy(C,"layout","text-rotate",p,c,v,d)));var jt=iy(C,"layout","text-anchor",p,c,v,d),zt=Y||1==h?"point":iy(C,"layout","symbol-placement",p,c,v,d);Z.setPlacement(zt),Z.setOverflow("point"===zt);var Dt=iy(C,"paint","text-halo-width",p,c,v,d),Gt=iy(C,"layout","text-offset",p,c,v,d),Nt=iy(C,"paint","text-translate",p,c,v,d),Wt=0,Xt=0;if("point"==zt){var qt="center";-1!==jt.indexOf("left")?(qt="left",Xt=Dt):-1!==jt.indexOf("right")&&(qt="right",Xt=-Dt),Z.setTextAlign(qt);var Bt=iy(C,"layout","text-rotation-alignment",p,c,v,d);Z.setRotateWithView("map"==Bt)}else Z.setMaxAngle(Fd(iy(C,"layout","text-max-angle",p,c,v,d))*Et.length/Lt.length),Z.setTextAlign(),Z.setRotateWithView(!1);var Vt="middle";0==jt.indexOf("bottom")?(Vt="bottom",Wt=-Dt-.5*(Rt-1)*Pt):0==jt.indexOf("top")&&(Vt="top",Wt=Dt+.5*(Rt-1)*Pt),Z.setTextBaseline(Vt),Z.setOffsetX(Gt[0]*Pt+Xt+Nt[0]),Z.setOffsetY(Gt[1]*Pt+Wt+Nt[1]),R.setColor(sy(iy(C,"paint","text-color",p,c,v,d),k)),Z.setFill(R);var Yt=sy(iy(C,"paint","text-halo-color",p,c,v,d),k);if(Yt){O.setColor(Yt),Dt*=2;var Zt=.5*Pt;O.setWidth(Dt<=Zt?Dt:Zt),Z.setStroke(O)}else Z.setStroke(void 0);var Kt=iy(C,"layout","text-padding",p,c,v,d),Ut=Z.getPadding();Kt!==Ut[0]&&(Ut[0]=Kt,Ut[1]=Kt,Ut[2]=Kt,Ut[3]=Kt),j.setZIndex(z)}}}}return _>-1?(P.length=_+1,P):void 0}};return t.setStyle(I),t.set("mapbox-source",h),t.set("mapbox-layers",d),t.set("mapbox-featurestate",{}),I}(t,e,r,i,u,p,Jd),t.getStyle()?f().then(n).catch(l):l(new Error("Nothing to show for source ["+a+"]")))}if(e.sprite){var y=new URL(function(t,e,r){var n=Rd(t);if(!n)return decodeURI(new URL(t,r).href);if(0!==n.indexOf("sprites/"))throw new Error("unexpected sprites url: "+t);var i=n.slice(8);return Od+"/styles/v1/"+i+"/sprite?access_token="+e}(e.sprite,s.accessToken,o||location.href)),g=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",v=y.origin+y.pathname+g+".json"+y.search;new Promise((function(t,e){Ld("Sprite",v,s).then(t).catch((function(r){Ld("Sprite",v=y.origin+y.pathname+".json"+y.search,s).then(t).catch(e)}))})).then((function(t){if(void 0===t&&l(new Error("No sprites found.")),u=t,p=y.origin+y.pathname+g+".png"+y.search,s.transformRequest){var e=s.transformRequest(p,"SpriteImage");e instanceof Request&&(p=encodeURI(e.url))}d()})).catch((function(t){l(new Error("Sprites cannot be loaded: "+v+": "+t.message))}))}else d()})).catch(l)}))}var cy={};function fy(t,e){var r={id:e.id,type:e.type},n={};function i(i){var o=e.layout||{},a=e.paint||{};r.paint=a;var s,l,u="function"==typeof t.getSource?t.getSource().getTileGrid().getZForResolution(i):t.getView().getZoom(),p="function"==typeof t.getTargetElement?t.getTargetElement():void 0;if(void 0!==a["background-color"]&&(s=iy(r,"paint","background-color",u,cy,n),p&&(p.style.background=Lh.parse(s).toString())),void 0!==a["background-opacity"]&&(l=iy(r,"paint","background-opacity",u,cy,n),p&&(p.style.opacity=l)),"none"!=o.visibility)return sy(s,l);p&&(p.style.backgroundColor="",p.style.opacity="")}if("function"==typeof t.getTargetElement)t.getTargetElement()&&i(),t.on(["change:resolution","change:target"],i);else{if("function"!=typeof t.setBackground)throw new Error("Unable to apply background.");t.setBackground(i)}}function dy(t,e){var r;return t.some((function(t){if(t.id==e)return r=t.source,!0})),r}function yy(t){var e=t.bounds;if(e){var r=Yn([e[0],e[1]]),n=Yn([e[2],e[3]]);return[r[0],r[1],n[0],n[1]]}}function gy(t,e,r){return new Promise((function(n,i){Dd(t,e,r).then((function(t){var e=new xu({tileJSON:t}),r=e.getTileJSON(),i=e.getTileGrid(),o=yy(r),a=r.minzoom||0,s=r.maxzoom||22,l={attributions:e.getAttributions(),format:new ml,tileGrid:new Rl({origin:i.getOrigin(0),extent:o||i.getExtent(),minZoom:a,resolutions:kd.slice(0,s+1),tileSize:512})};Array.isArray(r.tiles)?l.urls=r.tiles:l.url=r.tiles,t.olSourceOptions&&Object.assign(l,t.olSourceOptions),n(new Eh(l))})).catch(i)}))}function vy(t,e,r){var n=new vh({declutter:!0,visible:!1});return gy(t,e,r).then((function(e){e.set("mapbox-source",t),n.setSource(e)})).catch((function(t){n.setSource(void 0)})),n}function my(t,e,r){var n=new zu;return Dd(t,e,r).then((function(e){var r=new xu({transition:0,crossOrigin:"anonymous",tileJSON:e}),i=yy(e),o=r.getTileGrid(),a=t.tileSize||e.tileSize||512,s=e.minzoom||0,l=e.maxzoom||22;r.tileGrid=new Rl({origin:o.getOrigin(0),extent:i||o.getExtent(),minZoom:s,resolutions:Ql({maxZoom:l,tileSize:a}).getResolutions(),tileSize:a});var u=r.getTileUrlFunction();r.setTileUrlFunction((function(t,e,n){var i=u(t,e,n);if(-1!=i.indexOf("{bbox-epsg-3857}")){var o=r.getTileGrid().getTileCoordExtent(t);i=i.replace("{bbox-epsg-3857}",o.toString())}return i})),r.set("mapbox-source",t),n.setSource(r)})).catch((function(t){n.setSource(void 0)})),n}var _y=new pl;function xy(t,e,r){var n=t.data,i={};if("string"==typeof n){var o=Id(n,r.accessToken,r.accessTokenParam||"access_token",e||location.href);if(r.transformRequest){var a=r.transformRequest(o,"GeoJSON");a instanceof Request&&(o=encodeURI(a.url))}i.url=o}else i.features=_y.readFeatures(n,{featureProjection:ei()||"EPSG:3857"});var s=new sh(Object.assign({attributions:t.attribution,format:_y},i));return s.set("mapbox-source",t),s}function by(t,e,r){return new Jp({declutter:!0,source:xy(t,e,r),visible:!1})}function wy(t,e,r,n){var i=iy(t,"paint","raster-opacity",r.getZoom(),cy,n);e.setOpacity(i)}function Cy(t,e,r,n){var i=[],o=e.getView();o.isDef()||o.getRotation()||o.getResolutions()||(o=new wo(Object.assign(o.getProperties(),{maxResolution:kd[0]})),e.setView(o)),"center"in t&&!o.getCenter()&&o.setCenter(Yn(t.center)),"zoom"in t&&void 0===o.getZoom()&&o.setResolution(kd[0]/Math.pow(2,t.zoom)),o.getCenter()&&void 0!==o.getZoom()||o.fit(o.getProjection().getExtent(),{nearest:!0,size:e.getSize()});for(var a,s,l,u,p,h=t.layers,c=[],f=0,d=h.length;f0||h>0)&&t.setMaxResolution(Math.min(kd[a],p.getResolution(h))+1e-9),s<24&&t.setMinResolution(kd[s]+1e-9)}}i instanceof sh||i instanceof Eh?hy(t,r,e,Object.assign({styleUrl:n},o)).then((function(){t.setVisible(!0),l()})).catch(u):l()}else u(new Error("Error accessing data for source "+t.get("mapbox-source")))};t.set("mapbox-layers",e),-1===i.getLayers().getArray().indexOf(t)&&i.addLayer(t),t.getSource()?p():t.once("change:source",p)}))}var Ty=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ey=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,wrapX:e.wrapX})||this;return r.resolution=void 0,r.distance=void 0!==e.distance?e.distance:20,r.minDistance=e.minDistance||0,r.interpolationRatio=0,r.features=[],r.geometryFunction=e.geometryFunction||function(t){var e=t.getGeometry();return D(e.getType()==an,10),e},r.createCustomCluster_=e.createCluster,r.source=null,r.boundRefresh_=r.refresh.bind(r),r.updateDistance(r.distance,r.minDistance),r.setSource(e.source||null),r}return Ty(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,r){this.source.loadFeatures(t,e,r),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(re,this.boundRefresh_),this.source=t,t&&t.addEventListener(re,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.updateDistance=function(t,e){var r=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==r;this.distance=t,this.minDistance=e,this.interpolationRatio=r,n&&this.refresh()},e.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],e=this.distance*this.resolution,r=this.source.getFeatures(),n={},i=0,o=r.length;i=0;--n){var i=this.geometryFunction(t[n]);i?De(r,i.getCoordinates()):t.splice(n,1)}We(r,1/t.length);var o=vt(e),a=this.interpolationRatio,s=new $i([r[0]*(1-a)+o[0]*a,r[1]*(1-a)+o[1]*a]);return this.createCustomCluster_?this.createCustomCluster_(s,t):new Ls({geometry:s,features:t})},e}(sh);const Oy=Ey;(()=>{const{application:t,Stimulus:e}=window;if(!t)return null;t.register("map-instance",class extends e.Controller{static get values(){return{instance:String,nodes:Array,token:String}}connect(){this.nodesValue=window.mapInstances?window.mapInstances[this.instanceValue]:[]}nodesValueChanged(){this.element.innerHTML="";const t=this.nodesValue;if(!t||t.length<1)return null;(function(t,e,r){void 0===r&&(r={}),("string"==typeof t||t instanceof HTMLElement)&&(t=new Ba({target:t}));var n=e.startsWith("data:")?location.href:Pd(e,r.accessToken);return r=py(n,r),new Promise((function(i,o){jd(e,r).then((function(e){Cy(e,t,n,r).then((function(){i(t)})).catch(o)})).catch((function(t){o(new Error("Could not load "+e+": "+t.message))}))}))})(new Ba({target:this.element.id}),"https://api.maptiler.com/maps/908dbadb-b4a9-47c6-a3a6-583ade513792/style.json?key=Ouis01B3GajK3e6iqCI4").then((e=>{e.setView(new wo({center:Yn([0,22]),zoom:1}));const r=new Jp({source:new Oy({distance:20,minDistance:20,source:new sh({features:t.map((t=>new Ls({geometry:new $i(Yn([t.lng,t.lat])),name:t.name})))})}),style:t=>{const e=t.get("features"),r=e.length;if(1==e.length){const t=e[0].get("name");return new Is({image:new Qa({radius:6,stroke:new Ts({color:"rgba(23,92,255, 0.2)",width:12}),fill:new es({color:"#175CFF"})}),text:new ks({text:[t,'bold 12px "Neurial Grotesk", Roboto, system, -apple-system, BlinkMacSystemFont, ".SFNSDisplay-Regular", "Helvetica Neue", Helvetica, Arial, sans-serif'],fill:new es({color:"#0a083b"}),offsetY:-30,stroke:new Ts({color:"#fff",width:3})})})}return new Is({image:new Qa({radius:12,stroke:new Ts({color:"rgba(23,92,255, 0.2)",width:4}),fill:new es({color:"#175CFF"})}),text:new ks({text:r.toString(),scale:1.25,fill:new es({color:"#fff"})})})}});e.addLayer(r)}))}})})()})()})();;