additional_plugins/serendipity_event_osm/ressources/ol.js
2022-05-19 17:44:27 +02:00

3 lines
1.1 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see ol.js.LICENSE.txt */
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.ol=n():t.ol=n()}(self,(function(){return function(){var t,n={226:function(t,n){n.read=function(t,n,i,r,e){var o,s,a=8*e-r-1,u=(1<<a)-1,c=u>>1,h=-7,f=i?e-1:0,l=i?-1:1,v=t[n+f];for(f+=l,o=v&(1<<-h)-1,v>>=-h,h+=a;h>0;o=256*o+t[n+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[n+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(v?-1:1);s+=Math.pow(2,r),o-=c}return(v?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,n,i,r,e,o){var s,a,u,c=8*o-e-1,h=(1<<c)-1,f=h>>1,l=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,d=r?1:-1,p=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(a=isNaN(n)?1:0,s=h):(s=Math.floor(Math.log(n)/Math.LN2),n*(u=Math.pow(2,-s))<1&&(s--,u*=2),(n+=s+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(n*u-1)*Math.pow(2,e),s+=f):(a=n*Math.pow(2,f-1)*Math.pow(2,e),s=0));e>=8;t[i+v]=255&a,v+=d,a/=256,e-=8);for(s=s<<e|a,c+=e;c>0;t[i+v]=255&s,v+=d,s/=256,c-=8);t[i+v-d]|=128*p}},875:function(t,n,i){"use strict";function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}var s=i(692),a=Symbol("max"),u=Symbol("length"),c=Symbol("lengthCalculator"),h=Symbol("allowStale"),f=Symbol("maxAge"),l=Symbol("dispose"),v=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),y=Symbol("updateAgeOnGet"),m=function(){return 1},w=function(){function t(n){if(r(this,t),"number"==typeof n&&(n={max:n}),n||(n={}),n.max&&("number"!=typeof n.max||n.max<0))throw new TypeError("max must be a non-negative number");this[a]=n.max||1/0;var i=n.length||m;if(this[c]="function"!=typeof i?m:i,this[h]=n.stale||!1,n.maxAge&&"number"!=typeof n.maxAge)throw new TypeError("maxAge must be a number");this[f]=n.maxAge||0,this[l]=n.dispose,this[v]=n.noDisposeOnSet||!1,this[y]=n.updateAgeOnGet||!1,this.reset()}return o(t,[{key:"max",get:function(){return this[a]},set:function(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[a]=t||1/0,x(this)}},{key:"allowStale",get:function(){return this[h]},set:function(t){this[h]=!!t}},{key:"maxAge",get:function(){return this[f]},set:function(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[f]=t,x(this)}},{key:"lengthCalculator",get:function(){return this[c]},set:function(t){var n=this;"function"!=typeof t&&(t=m),t!==this[c]&&(this[c]=t,this[u]=0,this[d].forEach((function(t){t.length=n[c](t.value,t.key),n[u]+=t.length}))),x(this)}},{key:"length",get:function(){return this[u]}},{key:"itemCount",get:function(){return this[d].length}},{key:"rforEach",value:function(t,n){n=n||this;for(var i=this[d].tail;null!==i;){var r=i.prev;k(this,t,i,n),i=r}}},{key:"forEach",value:function(t,n){n=n||this;for(var i=this[d].head;null!==i;){var r=i.next;k(this,t,i,n),i=r}}},{key:"keys",value:function(){return this[d].toArray().map((function(t){return t.key}))}},{key:"values",value:function(){return this[d].toArray().map((function(t){return t.value}))}},{key:"reset",value:function(){var t=this;this[l]&&this[d]&&this[d].length&&this[d].forEach((function(n){return t[l](n.key,n.value)})),this[p]=new Map,this[d]=new s,this[u]=0}},{key:"dump",value:function(){var t=this;return this[d].map((function(n){return!g(t,n)&&{k:n.key,v:n.value,e:n.now+(n.maxAge||0)}})).toArray().filter((function(t){return t}))}},{key:"dumpLru",value:function(){return this[d]}},{key:"set",value:function(t,n,i){if((i=i||this[f])&&"number"!=typeof i)throw new TypeError("maxAge must be a number");var r=i?Date.now():0,e=this[c](n,t);if(this[p].has(t)){if(e>this[a])return j(this,this[p].get(t)),!1;var o=this[p].get(t).value;return this[l]&&(this[v]||this[l](t,o.value)),o.now=r,o.maxAge=i,o.value=n,this[u]+=e-o.length,o.length=e,this.get(t),x(this),!0}var s=new S(t,n,e,r,i);return s.length>this[a]?(this[l]&&this[l](t,n),!1):(this[u]+=s.length,this[d].unshift(s),this[p].set(t,this[d].head),x(this),!0)}},{key:"has",value:function(t){if(!this[p].has(t))return!1;var n=this[p].get(t).value;return!g(this,n)}},{key:"get",value:function(t){return b(this,t,!0)}},{key:"peek",value:function(t){return b(this,t,!1)}},{key:"pop",value:function(){var t=this[d].tail;return t?(j(this,t),t.value):null}},{key:"del",value:function(t){j(this,this[p].get(t))}},{key:"load",value:function(t){this.reset();for(var n=Date.now(),i=t.length-1;i>=0;i--){var r=t[i],e=r.e||0;if(0===e)this.set(r.k,r.v);else{var o=e-n;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var t=this;this[p].forEach((function(n,i){return b(t,i,!1)}))}}]),t}(),b=function(t,n,i){var r=t[p].get(n);if(r){var e=r.value;if(g(t,e)){if(j(t,r),!t[h])return}else i&&(t[y]&&(r.value.now=Date.now()),t[d].unshiftNode(r));return e.value}},g=function(t,n){if(!n||!n.maxAge&&!t[f])return!1;var i=Date.now()-n.now;return n.maxAge?i>n.maxAge:t[f]&&i>t[f]},x=function(t){if(t[u]>t[a])for(var n=t[d].tail;t[u]>t[a]&&null!==n;){var i=n.prev;j(t,n),n=i}},j=function(t,n){if(n){var i=n.value;t[l]&&t[l](i.key,i.value),t[u]-=i.length,t[p].delete(i.key),t[d].removeNode(n)}},S=o((function t(n,i,e,o,s){r(this,t),this.key=n,this.value=i,this.length=e,this.now=o,this.maxAge=s||0})),k=function(t,n,i,r){var e=i.value;g(t,e)&&(j(t,i),t[h]||(e=void 0)),e&&n.call(r,e.value,e.key,t)};t.exports=w},63:function(t){var n={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},i=" ",r=/(italic|oblique)$/i,e={};t.exports=function(t,o,s){var a=e[t];if(!a){Array.isArray(t)||(t=[t]);for(var u=400,c="normal",h=[],f=0,l=t.length;f<l;++f){var v=t[f].split(" "),d=v[v.length-1].toLowerCase();for(var p in"normal"==d||"italic"==d||"oblique"==d?(c=d,v.pop(),d=v[v.length-1].toLowerCase()):r.test(d)&&(d=d.replace(r,""),c=v[v.length-1].replace(d,"")),n){var y=v.length>1?v[v.length-2].toLowerCase():"";if(d==p||d==p.replace("-","")||y+"-"+d==p){u=n[p],v.pop(),y&&p.startsWith(y)&&v.pop();break}}"number"==typeof d&&(u=d);var m=v.join(i).replace("Klokantech Noto Sans","Noto Sans");-1!==m.indexOf(i)&&(m='"'+m+'"'),h.push(m)}a=e[t]=[c,u,h]}return a[0]+i+a[1]+i+o+"px"+(s?"/"+s:"")+i+a[2]}},98:function(t,n,i){"use strict";t.exports=e;var r=i(226);function e(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}e.Varint=0,e.Fixed64=1,e.Bytes=2,e.Fixed32=5;var o=4294967296,s=1/o,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function u(t){return t.type===e.Bytes?t.readVarint()+t.pos:t.pos+1}function c(t,n,i){return i?4294967296*n+(t>>>0):4294967296*(n>>>0)+(t>>>0)}function h(t,n,i){var r=n<=16383?1:n<=2097151?2:n<=268435455?3:Math.floor(Math.log(n)/(7*Math.LN2));i.realloc(r);for(var e=i.pos-1;e>=t;e--)i.buf[e+r]=i.buf[e]}function f(t,n){for(var i=0;i<t.length;i++)n.writeVarint(t[i])}function l(t,n){for(var i=0;i<t.length;i++)n.writeSVarint(t[i])}function v(t,n){for(var i=0;i<t.length;i++)n.writeFloat(t[i])}function d(t,n){for(var i=0;i<t.length;i++)n.writeDouble(t[i])}function p(t,n){for(var i=0;i<t.length;i++)n.writeBoolean(t[i])}function y(t,n){for(var i=0;i<t.length;i++)n.writeFixed32(t[i])}function m(t,n){for(var i=0;i<t.length;i++)n.writeSFixed32(t[i])}function w(t,n){for(var i=0;i<t.length;i++)n.writeFixed64(t[i])}function b(t,n){for(var i=0;i<t.length;i++)n.writeSFixed64(t[i])}function g(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+16777216*t[n+3]}function x(t,n,i){t[i]=n,t[i+1]=n>>>8,t[i+2]=n>>>16,t[i+3]=n>>>24}function j(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+(t[n+3]<<24)}e.prototype={destroy:function(){this.buf=null},readFields:function(t,n,i){for(i=i||this.length;this.pos<i;){var r=this.readVarint(),e=r>>3,o=this.pos;this.type=7&r,t(e,n,this),this.pos===o&&this.skip(r)}return n},readMessage:function(t,n){return this.readFields(t,n,this.readVarint()+this.pos)},readFixed32:function(){var t=g(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=j(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=g(this.buf,this.pos)+g(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=g(this.buf,this.pos)+j(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var n,i,r=this.buf;return n=127&(i=r[this.pos++]),i<128?n:(n|=(127&(i=r[this.pos++]))<<7,i<128?n:(n|=(127&(i=r[this.pos++]))<<14,i<128?n:(n|=(127&(i=r[this.pos++]))<<21,i<128?n:function(t,n,i){var r,e,o=i.buf;if(e=o[i.pos++],r=(112&e)>>4,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(127&e)<<3,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(127&e)<<10,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(127&e)<<17,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(127&e)<<24,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(1&e)<<31,e<128)return c(t,r,n);throw new Error("Expected varint not more than 10 bytes")}(n|=(15&(i=r[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,n=this.pos;return this.pos=t,t-n>=12&&a?function(t,n,i){return a.decode(t.subarray(n,i))}(this.buf,n,t):function(t,n,i){var r="",e=n;for(;e<i;){var o,s,a,u=t[e],c=null,h=u>239?4:u>223?3:u>191?2:1;if(e+h>i)break;1===h?u<128&&(c=u):2===h?128==(192&(o=t[e+1]))&&(c=(31&u)<<6|63&o)<=127&&(c=null):3===h?(o=t[e+1],s=t[e+2],128==(192&o)&&128==(192&s)&&((c=(15&u)<<12|(63&o)<<6|63&s)<=2047||c>=55296&&c<=57343)&&(c=null)):4===h&&(o=t[e+1],s=t[e+2],a=t[e+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,h=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),e+=h}return r}(this.buf,n,t)},readBytes:function(){var t=this.readVarint()+this.pos,n=this.buf.subarray(this.pos,t);return this.pos=t,n},readPackedVarint:function(t,n){if(this.type!==e.Bytes)return t.push(this.readVarint(n));var i=u(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(n));return t},readPackedSVarint:function(t){if(this.type!==e.Bytes)return t.push(this.readSVarint());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==e.Bytes)return t.push(this.readBoolean());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==e.Bytes)return t.push(this.readFloat());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==e.Bytes)return t.push(this.readDouble());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==e.Bytes)return t.push(this.readFixed32());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==e.Bytes)return t.push(this.readSFixed32());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==e.Bytes)return t.push(this.readFixed64());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==e.Bytes)return t.push(this.readSFixed64());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readSFixed64());return t},skip:function(t){var n=7&t;if(n===e.Varint)for(;this.buf[this.pos++]>127;);else if(n===e.Bytes)this.pos=this.readVarint()+this.pos;else if(n===e.Fixed32)this.pos+=4;else{if(n!==e.Fixed64)throw new Error("Unimplemented type: "+n);this.pos+=8}},writeTag:function(t,n){this.writeVarint(t<<3|n)},realloc:function(t){for(var n=this.length||16;n<this.pos+t;)n*=2;if(n!==this.length){var i=new Uint8Array(n);i.set(this.buf),this.buf=i,this.length=n}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),x(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),x(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),x(this.buf,-1&t,this.pos),x(this.buf,Math.floor(t*s),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),x(this.buf,-1&t,this.pos),x(this.buf,Math.floor(t*s),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,n){var i,r;t>=0?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");n.realloc(10),function(t,n,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,n),function(t,n){var i=(7&t)<<4;if(n.buf[n.pos++]|=i|((t>>>=3)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;n.buf[n.pos++]=127&t}(r,n)}(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 n=this.pos;this.pos=function(t,n,i){for(var r,e,o=0;o<n.length;o++){if((r=n.charCodeAt(o))>55295&&r<57344){if(!e){r>56319||o+1===n.length?(t[i++]=239,t[i++]=191,t[i++]=189):e=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,e=r;continue}r=e-55296<<10|r-56320|65536,e=null}else e&&(t[i++]=239,t[i++]=191,t[i++]=189,e=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);var i=this.pos-n;i>=128&&h(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var n=t.length;this.writeVarint(n),this.realloc(n);for(var i=0;i<n;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,n){this.pos++;var i=this.pos;t(n,this);var r=this.pos-i;r>=128&&h(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,n,i){this.writeTag(t,e.Bytes),this.writeRawMessage(n,i)},writePackedVarint:function(t,n){n.length&&this.writeMessage(t,f,n)},writePackedSVarint:function(t,n){n.length&&this.writeMessage(t,l,n)},writePackedBoolean:function(t,n){n.length&&this.writeMessage(t,p,n)},writePackedFloat:function(t,n){n.length&&this.writeMessage(t,v,n)},writePackedDouble:function(t,n){n.length&&this.writeMessage(t,d,n)},writePackedFixed32:function(t,n){n.length&&this.writeMessage(t,y,n)},writePackedSFixed32:function(t,n){n.length&&this.writeMessage(t,m,n)},writePackedFixed64:function(t,n){n.length&&this.writeMessage(t,w,n)},writePackedSFixed64:function(t,n){n.length&&this.writeMessage(t,b,n)},writeBytesField:function(t,n){this.writeTag(t,e.Bytes),this.writeBytes(n)},writeFixed32Field:function(t,n){this.writeTag(t,e.Fixed32),this.writeFixed32(n)},writeSFixed32Field:function(t,n){this.writeTag(t,e.Fixed32),this.writeSFixed32(n)},writeFixed64Field:function(t,n){this.writeTag(t,e.Fixed64),this.writeFixed64(n)},writeSFixed64Field:function(t,n){this.writeTag(t,e.Fixed64),this.writeSFixed64(n)},writeVarintField:function(t,n){this.writeTag(t,e.Varint),this.writeVarint(n)},writeSVarintField:function(t,n){this.writeTag(t,e.Varint),this.writeSVarint(n)},writeStringField:function(t,n){this.writeTag(t,e.Bytes),this.writeString(n)},writeFloatField:function(t,n){this.writeTag(t,e.Fixed32),this.writeFloat(n)},writeDoubleField:function(t,n){this.writeTag(t,e.Fixed64),this.writeDouble(n)},writeBooleanField:function(t,n){this.writeVarintField(t,Boolean(n))}}},72:function(t,n,i){var r,e,o;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t,r,e,o,s){!function t(i,r,e,o,s){for(;o>e;){if(o-e>600){var a=o-e+1,u=r-e+1,c=Math.log(a),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(a-h)/a)*(u-a/2<0?-1:1);t(i,r,Math.max(e,Math.floor(r-u*h/a+f)),Math.min(o,Math.floor(r+(a-u)*h/a+f)),s)}var l=i[r],v=e,d=o;for(n(i,e,r),s(i[o],l)>0&&n(i,e,o);v<d;){for(n(i,v,d),v++,d--;s(i[v],l)<0;)v++;for(;s(i[d],l)>0;)d--}0===s(i[e],l)?n(i,e,d):n(i,++d,o),d<=r&&(e=d+1),r<=d&&(o=d-1)}}(t,r,e||0,o||t.length-1,s||i)}function n(t,n,i){var r=t[n];t[n]=t[i],t[i]=r}function i(t,n){return t<n?-1:t>n?1:0}var r=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 e(t,n,i){if(!i)return n.indexOf(t);for(var r=0;r<n.length;r++)if(i(t,n[r]))return r;return-1}function o(t,n){s(t,0,t.children.length,n,t)}function s(t,n,i,r,e){e||(e=d(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var o=n;o<i;o++){var s=t.children[o];a(e,t.leaf?r(s):s)}return e}function a(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function u(t,n){return t.minX-n.minX}function c(t,n){return t.minY-n.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function v(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.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 p(n,i,r,e,o){for(var s=[i,r];s.length;)if(!((r=s.pop())-(i=s.pop())<=e)){var a=i+Math.ceil((r-i)/e/2)*e;t(n,a,i,r,o),s.push(i,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,i=[];if(!v(t,n))return i;for(var r=this.toBBox,e=[];n;){for(var o=0;o<n.children.length;o++){var s=n.children[o],a=n.leaf?r(s):s;v(t,a)&&(n.leaf?i.push(s):l(t,a)?this._all(s,i):e.push(s))}n=e.pop()}return i},r.prototype.collides=function(t){var n=this.data;if(!v(t,n))return!1;for(var i=[];n;){for(var r=0;r<n.children.length;r++){var e=n.children[r],o=n.leaf?this.toBBox(e):e;if(v(t,o)){if(n.leaf||l(t,o))return!0;i.push(e)}}n=i.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var n=0;n<t.length;n++)this.insert(t[n]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,n){if(!t)return this;for(var i,r,o,s=this.data,a=this.toBBox(t),u=[],c=[];s||u.length;){if(s||(s=u.pop(),r=u[u.length-1],i=c.pop(),o=!0),s.leaf){var h=e(t,s.children,n);if(-1!==h)return s.children.splice(h,1),u.push(s),this._condense(u),this}o||s.leaf||!l(s,a)?r?(i++,s=r.children[i],o=!1):s=null:(u.push(s),c.push(i),i=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,n){return t.minX-n.minX},r.prototype.compareMinY=function(t,n){return t.minY-n.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,n){for(var i=[];t;)t.leaf?n.push.apply(n,t.children):i.push.apply(i,t.children),t=i.pop();return n},r.prototype._build=function(t,n,i,r){var e,s=i-n+1,a=this._maxEntries;if(s<=a)return o(e=d(t.slice(n,i+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(e=d([])).leaf=!1,e.height=r;var u=Math.ceil(s/a),c=u*Math.ceil(Math.sqrt(a));p(t,n,i,c,this.compareMinX);for(var h=n;h<=i;h+=c){var f=Math.min(h+c-1,i);p(t,h,f,u,this.compareMinY);for(var l=h;l<=f;l+=u){var v=Math.min(l+u-1,f);e.children.push(this._build(t,l,v,r-1))}}return o(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,n,i,r){for(;r.push(n),!n.leaf&&r.length-1!==i;){for(var e=1/0,o=1/0,s=void 0,a=0;a<n.children.length;a++){var u=n.children[a],c=h(u),f=(l=t,v=u,(Math.max(v.maxX,l.maxX)-Math.min(v.minX,l.minX))*(Math.max(v.maxY,l.maxY)-Math.min(v.minY,l.minY))-c);f<o?(o=f,e=c<e?c:e,s=u):f===o&&c<e&&(e=c,s=u)}n=s||n.children[0]}var l,v;return n},r.prototype._insert=function(t,n,i){var r=i?t:this.toBBox(t),e=[],o=this._chooseSubtree(r,this.data,n,e);for(o.children.push(t),a(o,r);n>=0&&e[n].children.length>this._maxEntries;)this._split(e,n),n--;this._adjustParentBBoxes(r,e,n)},r.prototype._split=function(t,n){var i=t[n],r=i.children.length,e=this._minEntries;this._chooseSplitAxis(i,e,r);var s=this._chooseSplitIndex(i,e,r),a=d(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(i,a)},r.prototype._splitRoot=function(t,n){this.data=d([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,i){for(var r,e,o,a,u,c,f,l=1/0,v=1/0,d=n;d<=i-n;d++){var p=s(t,0,d,this.toBBox),y=s(t,d,i,this.toBBox),m=(e=p,o=y,a=Math.max(e.minX,o.minX),u=Math.max(e.minY,o.minY),c=Math.min(e.maxX,o.maxX),f=Math.min(e.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,f-u)),w=h(p)+h(y);m<l?(l=m,r=d,v=w<v?w:v):m===l&&w<v&&(v=w,r=d)}return r||i-n},r.prototype._chooseSplitAxis=function(t,n,i){var r=t.leaf?this.compareMinX:u,e=t.leaf?this.compareMinY:c;this._allDistMargin(t,n,i,r)<this._allDistMargin(t,n,i,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,n,i,r){t.children.sort(r);for(var e=this.toBBox,o=s(t,0,n,e),u=s(t,i-n,i,e),c=f(o)+f(u),h=n;h<i-n;h++){var l=t.children[h];a(o,t.leaf?e(l):l),c+=f(o)}for(var v=i-n-1;v>=n;v--){var d=t.children[v];a(u,t.leaf?e(d):d),c+=f(u)}return c},r.prototype._adjustParentBBoxes=function(t,n,i){for(var r=i;r>=0;r--)a(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,i=void 0;n>=0;n--)0===t[n].children.length?n>0?(i=t[n-1].children).splice(i.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r},"object"==s(n)?t.exports=o():void 0===(e="function"==typeof(r=o)?r.call(n,i,n,t):r)||(t.exports=e)},760:function(t,n,i){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e=function(t){"use strict";var n,i=Object.prototype,e=i.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,n,i){return Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,i){return t[n]=i}}function h(t,n,i,r){var e=n&&n.prototype instanceof m?n:m,o=Object.create(e.prototype),s=new E(r||[]);return o._invoke=function(t,n,i){var r=l;return function(e,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===e)throw o;return C()}for(i.method=e,i.arg=o;;){var s=i.delegate;if(s){var a=_(s,i);if(a){if(a===y)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===l)throw r=p,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=d;var u=f(t,n,i);if("normal"===u.type){if(r=i.done?p:v,u.arg===y)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(r=p,i.method="throw",i.arg=u.arg)}}}(t,i,s),o}function f(t,n,i){try{return{type:"normal",arg:t.call(n,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var l="suspendedStart",v="suspendedYield",d="executing",p="completed",y={};function m(){}function w(){}function b(){}var g={};c(g,s,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(A([])));j&&j!==i&&e.call(j,s)&&(g=j);var S=b.prototype=m.prototype=Object.create(g);function k(t){["next","throw","return"].forEach((function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function M(t,n){function i(o,s,a,u){var c=f(t[o],t,s);if("throw"!==c.type){var h=c.arg,l=h.value;return l&&"object"===r(l)&&e.call(l,"__await")?n.resolve(l.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):n.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function e(){return new n((function(n,e){i(t,r,n,e)}))}return o=o?o.then(e,e):e()}}function _(t,i){var r=t.iterator[i.method];if(r===n){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=n,_(t,i),"throw"===i.method))return y;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var e=f(r,t.iterator,i.arg);if("throw"===e.type)return i.method="throw",i.arg=e.arg,i.delegate=null,y;var o=e.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=n),i.delegate=null,y):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function T(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(t){if(t){var i=t[s];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function i(){for(;++r<t.length;)if(e.call(t,r))return i.value=t[r],i.done=!1,i;return i.value=n,i.done=!0,i};return o.next=o}}return{next:C}}function C(){return{value:n,done:!0}}return w.prototype=b,c(S,"constructor",b),c(b,"constructor",w),w.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===w||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},k(M.prototype),c(M.prototype,a,(function(){return this})),t.AsyncIterator=M,t.async=function(n,i,r,e,o){void 0===o&&(o=Promise);var s=new M(h(n,i,r,e),o);return t.isGeneratorFunction(i)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},k(S),c(S,u,"Generator"),c(S,s,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var n=[];for(var i in t)n.push(i);return n.reverse(),function i(){for(;n.length;){var r=n.pop();if(r in t)return i.value=r,i.done=!1,i}return i.done=!0,i}},t.values=A,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var i in this)"t"===i.charAt(0)&&e.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function r(r,e){return a.type="throw",a.arg=t,i.next=r,e&&(i.method="next",i.arg=n),!!e}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=e.call(s,"catchLoc"),c=e.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(t,n){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&e.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=n,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(s)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),y},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),T(i),y}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc===t){var r=i.completion;if("throw"===r.type){var e=r.arg;T(i)}return e}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:A(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=n),y}},t}("object"===r(t=i.nmd(t))?t.exports:{});try{regeneratorRuntime=e}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},338:function(t){(function(){var n;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return n},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},n=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},617:function(t,n,i){var r=i(279);t.exports=function(t,n,i){var e=i&&i.debug||!1,o=i&&i.startIndex||0;e&&console.log("starting findTagByName with",n," and ",i);var s=r(t,"<".concat(n,"[ >]"),o);if(e&&console.log("start:",s),-1!==s){var a=t.slice(s+n.length),u=r(a,"[ /]"+n+">",0),c=-1===u;c&&(u=r(a,"[ /]>",0));var h=s+n.length+u+1+(c?0:n.length)+1;if(e&&console.log("end:",h),-1!==h){var f=t.slice(s,h);return{inner:c?null:f.slice(f.indexOf(">")+1,f.lastIndexOf("<")),outer:f,start:s,end:h}}}}},51:function(t,n,i){var r=i(617);t.exports=function(t,n,i){for(var e,o=[],s=i&&i.debug||!1,a=i&&i.startIndex||0;e=r(t,n,{debug:s,startIndex:a});)a=e.end,o.push(e);return s&&console.log("findTagsByName found",o.length,"tags"),o}},802:function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t,i,r){var e=r&&r.debug||!1;e&&console.log("getting "+i+" in "+t);var o="object"===n(t)?t.outer:t,s="".concat(i,'\\="([^"]*)"');e&&console.log("pattern:",s);var a=new RegExp(s).exec(o);if(e&&console.log("match:",a),a)return a[1]}},279:function(t){t.exports=function(t,n,i){var r=new RegExp(n).exec(t.slice(i));return r?i+r.index:-1}},518:function(t){"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.head;case 1:if(!n){t.next=7;break}return t.next=4,n.value;case 4:n=n.next,t.next=1;break;case 7:case"end":return t.stop()}}),t,this)}))}},692:function(t,n,i){"use strict";function r(t){var n=this;if(n instanceof r||(n=new r),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){n.push(t)}));else if(arguments.length>0)for(var i=0,e=arguments.length;i<e;i++)n.push(arguments[i]);return n}function e(t,n,i){var r=n===t.head?new a(i,null,n,t):new a(i,n,n.next,t);return null===r.next&&(t.tail=r),null===r.prev&&(t.head=r),t.length++,r}function o(t,n){t.tail=new a(n,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function s(t,n){t.head=new a(n,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function a(t,n,i,r){if(!(this instanceof a))return new a(t,n,i,r);this.list=r,this.value=t,n?(n.next=this,this.prev=n):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}t.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var n=t.next,i=t.prev;return n&&(n.prev=i),i&&(i.next=n),t===this.head&&(this.head=n),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,n},r.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var n=this.head;t.list=this,t.next=n,n&&(n.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},r.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var n=this.tail;t.list=this,t.prev=n,n&&(n.next=t),this.tail=t,this.head||(this.head=t),this.length++}},r.prototype.push=function(){for(var t=0,n=arguments.length;t<n;t++)o(this,arguments[t]);return this.length},r.prototype.unshift=function(){for(var t=0,n=arguments.length;t<n;t++)s(this,arguments[t]);return this.length},r.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},r.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},r.prototype.forEach=function(t,n){n=n||this;for(var i=this.head,r=0;null!==i;r++)t.call(n,i.value,r,this),i=i.next},r.prototype.forEachReverse=function(t,n){n=n||this;for(var i=this.tail,r=this.length-1;null!==i;r--)t.call(n,i.value,r,this),i=i.prev},r.prototype.get=function(t){for(var n=0,i=this.head;null!==i&&n<t;n++)i=i.next;if(n===t&&null!==i)return i.value},r.prototype.getReverse=function(t){for(var n=0,i=this.tail;null!==i&&n<t;n++)i=i.prev;if(n===t&&null!==i)return i.value},r.prototype.map=function(t,n){n=n||this;for(var i=new r,e=this.head;null!==e;)i.push(t.call(n,e.value,this)),e=e.next;return i},r.prototype.mapReverse=function(t,n){n=n||this;for(var i=new r,e=this.tail;null!==e;)i.push(t.call(n,e.value,this)),e=e.prev;return i},r.prototype.reduce=function(t,n){var i,r=this.head;if(arguments.length>1)i=n;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,i=this.head.value}for(var e=0;null!==r;e++)i=t(i,r.value,e),r=r.next;return i},r.prototype.reduceReverse=function(t,n){var i,r=this.tail;if(arguments.length>1)i=n;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,i=this.tail.value}for(var e=this.length-1;null!==r;e--)i=t(i,r.value,e),r=r.prev;return i},r.prototype.toArray=function(){for(var t=new Array(this.length),n=0,i=this.head;null!==i;n++)t[n]=i.value,i=i.next;return t},r.prototype.toArrayReverse=function(){for(var t=new Array(this.length),n=0,i=this.tail;null!==i;n++)t[n]=i.value,i=i.prev;return t},r.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var i=new r;if(n<t||n<0)return i;t<0&&(t=0),n>this.length&&(n=this.length);for(var e=0,o=this.head;null!==o&&e<t;e++)o=o.next;for(;null!==o&&e<n;e++,o=o.next)i.push(o.value);return i},r.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var i=new r;if(n<t||n<0)return i;t<0&&(t=0),n>this.length&&(n=this.length);for(var e=this.length,o=this.tail;null!==o&&e>n;e--)o=o.prev;for(;null!==o&&e>t;e--,o=o.prev)i.push(o.value);return i},r.prototype.splice=function(t,n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,r=this.head;null!==r&&i<t;i++)r=r.next;var o=[];for(i=0;r&&i<n;i++)o.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(i=0;i<(arguments.length<=2?0:arguments.length-2);i++)r=e(this,r,i+2<2||arguments.length<=i+2?void 0:arguments[i+2]);return o},r.prototype.reverse=function(){for(var t=this.head,n=this.tail,i=t;null!==i;i=i.prev){var r=i.prev;i.prev=i.next,i.next=r}return this.head=n,this.tail=t,this};try{i(518)(r)}catch(t){}},752:function(){},640:function(){},630:function(){},920:function(t,n,i){"use strict";function r(){return function(){throw new Error("Unimplemented abstract method.")}()}i.d(n,{default:function(){return dL}});var e=0;function o(t){return t.ol_uid||(t.ol_uid=String(++e))}var s,a="6.13.1-dev",u=(s=function(t,n){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),c=function(t){function n(n){var i=this,r="Assertion failed. See https://openlayers.org/en/"+("v"+a.split("-")[0])+"/doc/errors/#"+n+" for details.";return(i=t.call(this,r)||this).code=n,i.name="AssertionError",i.message=r,i}return u(n,t),n}(Error);function h(t){t.stopPropagation()}var f=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}(),l="propertychange",v=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function d(t,n,i){for(var r,e,o=i||p,s=0,a=t.length,u=!1;s<a;)(e=+o(t[r=s+(a-s>>1)],n))<0?s=r+1:(a=r,u=!e);return u?s:~s}function p(t,n){return t>n?1:t<n?-1:0}function y(t,n){return t.indexOf(n)>=0}function m(t,n,i){var r=t.length;if(t[0]<=n)return 0;if(n<=t[r-1])return r-1;var e=void 0;if(i>0){for(e=1;e<r;++e)if(t[e]<n)return e-1}else if(i<0){for(e=1;e<r;++e)if(t[e]<=n)return e}else for(e=1;e<r;++e){if(t[e]==n)return e;if(t[e]<n)return"function"==typeof i?i(n,t[e-1],t[e])>0?e-1:e:t[e-1]-n<n-t[e]?e-1:e}return r-1}function w(t,n,i){for(;n<i;){var r=t[n];t[n]=t[i],t[i]=r,++n,--i}}function b(t,n){for(var i=Array.isArray(n)?n:[n],r=i.length,e=0;e<r;e++)t[t.length]=i[e]}function g(t,n){for(var i,r=t.length>>>0,e=0;e<r;e++)if(n(i=t[e],e,t))return i;return null}function x(t,n){var i=t.length;if(i!==n.length)return!1;for(var r=0;r<i;r++)if(t[r]!==n[r])return!1;return!0}function j(t,n){var i;return!t.every((function(r,e){return i=e,!n(r,e,t)}))?i:-1}function S(t,n,i){var r=n||p;return t.every((function(n,e){if(0===e)return!0;var o=r(t[e-1],n);return!(o>0||i&&0===o)}))}function k(){return!0}function M(){return!1}function _(){}function O(t){var n,i,r,e=!1;return function(){var o=Array.prototype.slice.call(arguments);return e&&this===r&&x(o,i)||(e=!0,r=this,i=o,n=t.apply(this,arguments)),n}}function T(t){return function(){var n;try{n=t()}catch(t){return Promise.reject(t)}return n instanceof Promise?n:Promise.resolve(n)}()}var E="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),r=1,e=arguments.length;r<e;++r){var o=arguments[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(i[s]=o[s])}return i};function A(t){for(var n in t)delete t[n]}var C="function"==typeof Object.values?Object.values:function(t){var n=[];for(var i in t)n.push(t[i]);return n};function R(t){var n;for(n in t)return!1;return!n}var P=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),I=function(t){function n(n){var i=t.call(this)||this;return i.t=n,i.S=null,i._=null,i.O=null,i}return P(n,t),n.prototype.addEventListener=function(t,n){if(t&&n){var i=this.O||(this.O={}),r=i[t]||(i[t]=[]);-1===r.indexOf(n)&&r.push(n)}},n.prototype.dispatchEvent=function(t){var n="string"==typeof t,i=n?t:t.type,r=this.O&&this.O[i];if(r){var e=n?new f(t):t;e.target||(e.target=this.t||this);var o,s=this._||(this._={}),a=this.S||(this.S={});i in s||(s[i]=0,a[i]=0),++s[i];for(var u=0,c=r.length;u<c;++u)if(!1===(o="handleEvent"in r[u]?r[u].handleEvent(e):r[u].call(this,e))||e.propagationStopped){o=!1;break}if(0==--s[i]){var h=a[i];for(delete a[i];h--;)this.removeEventListener(i,_);delete s[i]}return o}},n.prototype.disposeInternal=function(){this.O&&A(this.O)},n.prototype.getListeners=function(t){return this.O&&this.O[t]||void 0},n.prototype.hasListener=function(t){return!!this.O&&(t?t in this.O:Object.keys(this.O).length>0)},n.prototype.removeEventListener=function(t,n){var i=this.O&&this.O[t];if(i){var r=i.indexOf(n);-1!==r&&(this.S&&t in this.S?(i[r]=_,++this.S[t]):(i.splice(r,1),0===i.length&&delete this.O[t]))}},n}(v),N="change",z="error",F="clear",L="contextmenu",G="click",D="dblclick",U="dragenter",q="dragover",B="drop",W="keydown",V="keypress",X="load",H="resize",J="touchmove",K="wheel";function Y(t,n,i,r,e){if(r&&r!==t&&(i=i.bind(r)),e){var o=i;i=function(){t.removeEventListener(n,i),o.apply(this,arguments)}}var s={target:t,type:n,listener:i};return t.addEventListener(n,i),s}function Z(t,n,i,r){return Y(t,n,i,r,!0)}function $(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),A(t))}var Q=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),tt=function(t){function n(){var n=t.call(this)||this;return n.on=n.onInternal,n.once=n.onceInternal,n.un=n.unInternal,n.T=0,n}return Q(n,t),n.prototype.changed=function(){++this.T,this.dispatchEvent(N)},n.prototype.getRevision=function(){return this.T},n.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var i=t.length,r=new Array(i),e=0;e<i;++e)r[e]=Y(this,t[e],n);return r}return Y(this,t,n)},n.prototype.onceInternal=function(t,n){var i;if(Array.isArray(t)){var r=t.length;i=new Array(r);for(var e=0;e<r;++e)i[e]=Z(this,t[e],n)}else i=Z(this,t,n);return n.ol_key=i,i},n.prototype.unInternal=function(t,n){var i=n.ol_key;if(i)nt(i);else if(Array.isArray(t))for(var r=0,e=t.length;r<e;++r)this.removeEventListener(t[r],n);else this.removeEventListener(t,n)},n}(I);function nt(t){if(Array.isArray(t))for(var n=0,i=t.length;n<i;++n)$(t[n]);else $(t)}tt.prototype.on,tt.prototype.once,tt.prototype.un;var it=tt,rt=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),et=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.key=i,e.oldValue=r,e}return rt(n,t),n}(f),ot=function(t){function n(n){var i=t.call(this)||this;return i.on,i.once,i.un,o(i),i.A=null,void 0!==n&&i.setProperties(n),i}return rt(n,t),n.prototype.get=function(t){var n;return this.A&&this.A.hasOwnProperty(t)&&(n=this.A[t]),n},n.prototype.getKeys=function(){return this.A&&Object.keys(this.A)||[]},n.prototype.getProperties=function(){return this.A&&E({},this.A)||{}},n.prototype.hasProperties=function(){return!!this.A},n.prototype.notify=function(t,n){var i;i="change:".concat(t),this.hasListener(i)&&this.dispatchEvent(new et(i,t,n)),i=l,this.hasListener(i)&&this.dispatchEvent(new et(i,t,n))},n.prototype.addChangeListener=function(t,n){this.addEventListener("change:".concat(t),n)},n.prototype.removeChangeListener=function(t,n){this.removeEventListener("change:".concat(t),n)},n.prototype.set=function(t,n,i){var r=this.A||(this.A={});if(i)r[t]=n;else{var e=r[t];r[t]=n,e!==n&&this.notify(t,e)}},n.prototype.setProperties=function(t,n){for(var i in t)this.set(i,t[i],n)},n.prototype.applyProperties=function(t){t.A&&E(this.A||(this.A={}),t.A)},n.prototype.unset=function(t,n){if(this.A&&t in this.A){var i=this.A[t];delete this.A[t],R(this.A)&&(this.A=null),n||this.notify(t,i)}},n}(it),st="add",at="remove",ut=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ct="length",ht=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.element=i,e.index=r,e}return ut(n,t),n}(f),ft=function(t){function n(n,i){var r=t.call(this)||this;r.on,r.once,r.un;var e=i||{};if(r.C=!!e.unique,r.R=n||[],r.C)for(var o=0,s=r.R.length;o<s;++o)r.P(r.R[o],o);return r.G(),r}return ut(n,t),n.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},n.prototype.extend=function(t){for(var n=0,i=t.length;n<i;++n)this.push(t[n]);return this},n.prototype.forEach=function(t){for(var n=this.R,i=0,r=n.length;i<r;++i)t(n[i],i,n)},n.prototype.getArray=function(){return this.R},n.prototype.item=function(t){return this.R[t]},n.prototype.getLength=function(){return this.get(ct)},n.prototype.insertAt=function(t,n){this.C&&this.P(n),this.R.splice(t,0,n),this.G(),this.dispatchEvent(new ht(st,n,t))},n.prototype.pop=function(){return this.removeAt(this.getLength()-1)},n.prototype.push=function(t){this.C&&this.P(t);var n=this.getLength();return this.insertAt(n,t),this.getLength()},n.prototype.remove=function(t){for(var n=this.R,i=0,r=n.length;i<r;++i)if(n[i]===t)return this.removeAt(i)},n.prototype.removeAt=function(t){var n=this.R[t];return this.R.splice(t,1),this.G(),this.dispatchEvent(new ht(at,n,t)),n},n.prototype.setAt=function(t,n){var i=this.getLength();if(t<i){this.C&&this.P(n,t);var r=this.R[t];this.R[t]=n,this.dispatchEvent(new ht(at,r,t)),this.dispatchEvent(new ht(st,n,t))}else{for(var e=i;e<t;++e)this.insertAt(e,void 0);this.insertAt(t,n)}},n.prototype.G=function(){this.set(ct,this.R.length)},n.prototype.P=function(t,n){for(var i=0,r=this.R.length;i<r;++i)if(this.R[i]===t&&i!==n)throw new c(58)},n}(ot),lt=0,vt=1,dt=2,pt=3,yt=4;function mt(t){return Math.pow(t,3)}function wt(t){return 1-mt(1-t)}function bt(t){return 3*t*t-2*t*t*t}function gt(t){return t}var xt=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jt=function(t){function n(n,i,r){var e=t.call(this)||this,o=r||{};return e.tileCoord=n,e.state=i,e.interimTile=null,e.key="",e.D=void 0===o.transition?250:o.transition,e.U={},e.interpolate=!!o.interpolate,e}return xt(n,t),n.prototype.changed=function(){this.dispatchEvent(N)},n.prototype.release=function(){},n.prototype.getKey=function(){return this.key+"/"+this.tileCoord},n.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==dt)return this.D=0,t;t=t.interimTile}while(t);return this},n.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,n=this;do{if(t.getState()==dt){t.interimTile=null;break}t.getState()==vt?n=t:t.getState()==lt?n.interimTile=t.interimTile:n=t,t=n.interimTile}while(t)}},n.prototype.getTileCoord=function(){return this.tileCoord},n.prototype.getState=function(){return this.state},n.prototype.setState=function(t){if(this.state!==pt&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},n.prototype.load=function(){r()},n.prototype.getAlpha=function(t,n){if(!this.D)return 1;var i=this.U[t];if(i){if(-1===i)return 1}else i=n,this.U[t]=i;var r=n-i+1e3/60;return r>=this.D?1:mt(r/this.D)},n.prototype.inTransition=function(t){return!!this.D&&-1!==this.U[t]},n.prototype.endTransition=function(t){this.D&&(this.U[t]=-1)},n}(I),St=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kt=function(t){function n(n){var i=this,r=lt;return(i=t.call(this,n.tileCoord,r,{transition:n.transition,interpolate:n.interpolate})||this).q=n.loader,i.B=null,i.W=null,i}return St(n,t),n.prototype.getData=function(){return this.B},n.prototype.getError=function(){return this.W},n.prototype.load=function(){this.state=vt,this.changed();var t=this;this.q().then((function(n){t.B=n,t.state=dt,t.changed()})).catch((function(n){t.W=n,t.state=pt,t.changed()}))},n}(jt);function Mt(t,n){if(!t)throw new c(n)}var _t=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Ot(t){return"function"==typeof t?t:(Array.isArray(t)?n=t:(Mt("function"==typeof t.getZIndex,41),n=[t]),function(){return n});var n}var Tt=function(t){function n(n){var i=t.call(this)||this;if(i.on,i.once,i.un,i.V=void 0,i.H="geometry",i.K=null,i.tt=void 0,i.nt=null,i.addChangeListener(i.H,i.it),n)if("function"==typeof n.getSimplifiedGeometry){var r=n;i.setGeometry(r)}else{var e=n;i.setProperties(e)}return i}return _t(n,t),n.prototype.clone=function(){var t=new n(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var r=this.getStyle();return r&&t.setStyle(r),t},n.prototype.getGeometry=function(){return this.get(this.H)},n.prototype.getId=function(){return this.V},n.prototype.getGeometryName=function(){return this.H},n.prototype.getStyle=function(){return this.K},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.rt=function(){this.changed()},n.prototype.it=function(){this.nt&&($(this.nt),this.nt=null);var t=this.getGeometry();t&&(this.nt=Y(t,N,this.rt,this)),this.changed()},n.prototype.setGeometry=function(t){this.set(this.H,t)},n.prototype.setStyle=function(t){this.K=t,this.tt=t?Ot(t):void 0,this.changed()},n.prototype.setId=function(t){this.V=t,this.changed()},n.prototype.setGeometryName=function(t){this.removeChangeListener(this.H,this.it),this.H=t,this.addChangeListener(this.H,this.it),this.it()},n}(ot),Et="XY",At="XYZ",Ct="XYM",Rt="XYZM",Pt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},It={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Nt={9001:It.METERS,9002:It.FEET,9003:It.USFEET,9101:It.RADIANS,9102:It.DEGREES};function zt(t){return Nt[t]}var Ft={};Ft[It.RADIANS]=6370997/(2*Math.PI),Ft[It.DEGREES]=2*Math.PI*6370997/360,Ft[It.FEET]=.3048,Ft[It.METERS]=1,Ft[It.USFEET]=1200/3937;var Lt,Gt=It,Dt="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Ut=-1!==Dt.indexOf("firefox"),qt=-1!==Dt.indexOf("safari")&&-1==Dt.indexOf("chrom"),Bt=-1!==Dt.indexOf("webkit")&&-1==Dt.indexOf("edge"),Wt=-1!==Dt.indexOf("macintosh"),Vt="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Xt="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Ht="undefined"!=typeof Image&&Image.prototype.decode,Jt=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,n),window.removeEventListener("_",null,n)}catch(t){}return t}(),Kt=new Array(6);function Yt(){return[1,0,0,1,0,0]}function Zt(t){return Qt(t,1,0,0,1,0,0)}function $t(t,n){var i=t[0],r=t[1],e=t[2],o=t[3],s=t[4],a=t[5],u=n[0],c=n[1],h=n[2],f=n[3],l=n[4],v=n[5];return t[0]=i*u+e*c,t[1]=r*u+o*c,t[2]=i*h+e*f,t[3]=r*h+o*f,t[4]=i*l+e*v+s,t[5]=r*l+o*v+a,t}function Qt(t,n,i,r,e,o,s){return t[0]=n,t[1]=i,t[2]=r,t[3]=e,t[4]=o,t[5]=s,t}function tn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function nn(t,n){var i=n[0],r=n[1];return n[0]=t[0]*i+t[2]*r+t[4],n[1]=t[1]*i+t[3]*r+t[5],n}function rn(t,n){var i=Math.cos(n),r=Math.sin(n);return $t(t,Qt(Kt,i,r,-r,i,0,0))}function en(t,n,i){return $t(t,Qt(Kt,n,0,0,i,0,0))}function on(t,n,i){return Qt(t,n,0,0,i,0,0)}function sn(t,n,i){return $t(t,Qt(Kt,1,0,0,1,n,i))}function an(t,n,i,r,e,o,s,a){var u=Math.sin(o),c=Math.cos(o);return t[0]=r*c,t[1]=e*u,t[2]=-r*u,t[3]=e*c,t[4]=s*r*c-a*r*u+n,t[5]=s*e*u+a*e*c+i,t}function un(t,n){var i=cn(n);Mt(0!==i,32);var r=n[0],e=n[1],o=n[2],s=n[3],a=n[4],u=n[5];return t[0]=s/i,t[1]=-e/i,t[2]=-o/i,t[3]=r/i,t[4]=(o*u-s*a)/i,t[5]=-(r*u-e*a)/i,t}function cn(t){return t[0]*t[3]-t[1]*t[2]}function hn(t){var n="matrix("+t.join(", ")+")";if(Xt)return n;var i=Lt||(Lt=document.createElement("div"));return i.style.transform=n,i.style.transform}var fn="bottom-left",ln="bottom-right",vn="top-left",dn="top-right",pn=0,yn=1,mn=2,wn=4,bn=8,gn=16;function xn(t){for(var n=En(),i=0,r=t.length;i<r;++i)Fn(n,t[i]);return n}function jn(t,n,i){return i?(i[0]=t[0]-n,i[1]=t[1]-n,i[2]=t[2]+n,i[3]=t[3]+n,i):[t[0]-n,t[1]-n,t[2]+n,t[3]+n]}function Sn(t,n){return n?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):t.slice()}function kn(t,n,i){var r,e;return(r=n<t[0]?t[0]-n:t[2]<n?n-t[2]:0)*r+(e=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*e}function Mn(t,n){return On(t,n[0],n[1])}function _n(t,n){return t[0]<=n[0]&&n[2]<=t[2]&&t[1]<=n[1]&&n[3]<=t[3]}function On(t,n,i){return t[0]<=n&&n<=t[2]&&t[1]<=i&&i<=t[3]}function Tn(t,n){var i=t[0],r=t[1],e=t[2],o=t[3],s=n[0],a=n[1],u=pn;return s<i?u|=gn:s>e&&(u|=wn),a<r?u|=bn:a>o&&(u|=mn),u===pn&&(u=yn),u}function En(){return[1/0,1/0,-1/0,-1/0]}function An(t,n,i,r,e){return e?(e[0]=t,e[1]=n,e[2]=i,e[3]=r,e):[t,n,i,r]}function Cn(t){return An(1/0,1/0,-1/0,-1/0,t)}function Rn(t,n){var i=t[0],r=t[1];return An(i,r,i,r,n)}function Pn(t,n,i,r,e){return Gn(Cn(e),t,n,i,r)}function In(t,n){return t[0]==n[0]&&t[2]==n[2]&&t[1]==n[1]&&t[3]==n[3]}function Nn(t,n,i){return Math.abs(t[0]-n[0])<i&&Math.abs(t[2]-n[2])<i&&Math.abs(t[1]-n[1])<i&&Math.abs(t[3]-n[3])<i}function zn(t,n){return n[0]<t[0]&&(t[0]=n[0]),n[2]>t[2]&&(t[2]=n[2]),n[1]<t[1]&&(t[1]=n[1]),n[3]>t[3]&&(t[3]=n[3]),t}function Fn(t,n){n[0]<t[0]&&(t[0]=n[0]),n[0]>t[2]&&(t[2]=n[0]),n[1]<t[1]&&(t[1]=n[1]),n[1]>t[3]&&(t[3]=n[1])}function Ln(t,n){for(var i=0,r=n.length;i<r;++i)Fn(t,n[i]);return t}function Gn(t,n,i,r,e){for(;i<r;i+=e)Un(t,n[i],n[i+1]);return t}function Dn(t,n){for(var i=0,r=n.length;i<r;++i)Ln(t,n[i]);return t}function Un(t,n,i){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],n),t[3]=Math.max(t[3],i)}function qn(t,n){var i;return(i=n(Wn(t)))||(i=n(Vn(t)))||(i=n($n(t)))?i:(i=n(Zn(t)))||!1}function Bn(t){var n=0;return ni(t)||(n=Qn(t)*Kn(t)),n}function Wn(t){return[t[0],t[1]]}function Vn(t){return[t[2],t[1]]}function Xn(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Hn(t,n){var i;return n===fn?i=Wn(t):n===ln?i=Vn(t):n===vn?i=Zn(t):n===dn?i=$n(t):Mt(!1,13),i}function Jn(t,n,i,r,e){var o=n*r[0]/2,s=n*r[1]/2,a=Math.cos(i),u=Math.sin(i),c=o*a,h=o*u,f=s*a,l=s*u,v=t[0],d=t[1],p=v-c+l,y=v-c-l,m=v+c-l,w=v+c+l,b=d-h-f,g=d-h+f,x=d+h+f,j=d+h-f;return An(Math.min(p,y,m,w),Math.min(b,g,x,j),Math.max(p,y,m,w),Math.max(b,g,x,j),e)}function Kn(t){return t[3]-t[1]}function Yn(t,n,i){var r=i||[1/0,1/0,-1/0,-1/0];return ti(t,n)?(t[0]>n[0]?r[0]=t[0]:r[0]=n[0],t[1]>n[1]?r[1]=t[1]:r[1]=n[1],t[2]<n[2]?r[2]=t[2]:r[2]=n[2],t[3]<n[3]?r[3]=t[3]:r[3]=n[3]):Cn(r),r}function Zn(t){return[t[0],t[3]]}function $n(t){return[t[2],t[3]]}function Qn(t){return t[2]-t[0]}function ti(t,n){return t[0]<=n[2]&&t[2]>=n[0]&&t[1]<=n[3]&&t[3]>=n[1]}function ni(t){return t[2]<t[0]||t[3]<t[1]}function ii(t,n){return n?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):t}function ri(t,n){var i=(t[2]-t[0])/2*(n-1),r=(t[3]-t[1])/2*(n-1);t[0]-=i,t[2]+=i,t[1]-=r,t[3]+=r}function ei(t,n,i){var r=!1,e=Tn(t,n),o=Tn(t,i);if(e===yn||o===yn)r=!0;else{var s=t[0],a=t[1],u=t[2],c=t[3],h=n[0],f=n[1],l=i[0],v=i[1],d=(v-f)/(l-h),p=void 0,y=void 0;o&mn&&!(e&mn)&&(r=(p=l-(v-c)/d)>=s&&p<=u),r||!(o&wn)||e&wn||(r=(y=v-(l-u)*d)>=a&&y<=c),r||!(o&bn)||e&bn||(r=(p=l-(v-a)/d)>=s&&p<=u),r||!(o&gn)||e&gn||(r=(y=v-(l-s)*d)>=a&&y<=c)}return r}function oi(t,n,i,r){var e=[];if(r>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<r;++a)e.push(t[0]+o*a/r,t[1],t[2],t[1]+s*a/r,t[2]-o*a/r,t[3],t[0],t[3]-s*a/r);else e=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];n(e,e,2);for(var u=[],c=[],h=(a=0,e.length);a<h;a+=2)u.push(e[a]),c.push(e[a+1]);return function(t,n,i){return An(Math.min.apply(null,t),Math.min.apply(null,n),Math.max.apply(null,t),Math.max.apply(null,n),i)}(u,c,i)}function si(t,n){var i=n.getExtent(),r=Xn(t);if(n.canWrapX()&&(r[0]<i[0]||r[0]>=i[2])){var e=Qn(i),o=Math.floor((r[0]-i[0])/e)*e;t[0]-=o,t[2]-=o}return t}var ai=function(){function t(t){this.et=t.code,this.ot=t.units,this.st=void 0!==t.extent?t.extent:null,this.ut=void 0!==t.worldExtent?t.worldExtent:null,this.ct=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.ht=void 0!==t.global&&t.global,this.ft=!(!this.ht||!this.st),this.lt=t.getPointResolution,this.vt=null,this.dt=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.ft},t.prototype.getCode=function(){return this.et},t.prototype.getExtent=function(){return this.st},t.prototype.getUnits=function(){return this.ot},t.prototype.getMetersPerUnit=function(){return this.dt||Ft[this.ot]},t.prototype.getWorldExtent=function(){return this.ut},t.prototype.getAxisOrientation=function(){return this.ct},t.prototype.isGlobal=function(){return this.ht},t.prototype.setGlobal=function(t){this.ht=t,this.ft=!(!t||!this.st)},t.prototype.getDefaultTileGrid=function(){return this.vt},t.prototype.setDefaultTileGrid=function(t){this.vt=t},t.prototype.setExtent=function(t){this.st=t,this.ft=!(!this.ht||!t)},t.prototype.setWorldExtent=function(t){this.ut=t},t.prototype.setGetPointResolution=function(t){this.lt=t},t.prototype.getPointResolutionFunc=function(){return this.lt},t}();function ui(t,n,i){return Math.min(Math.max(t,n),i)}var ci="cosh"in Math?Math.cosh:function(t){var n=Math.exp(t);return(n+1/n)/2},hi="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function fi(t,n,i,r,e,o){var s=e-i,a=o-r;if(0!==s||0!==a){var u=((t-i)*s+(n-r)*a)/(s*s+a*a);u>1?(i=e,r=o):u>0&&(i+=s*u,r+=a*u)}return li(t,n,i,r)}function li(t,n,i,r){var e=i-t,o=r-n;return e*e+o*o}function vi(t){for(var n=t.length,i=0;i<n;i++){for(var r=i,e=Math.abs(t[i][i]),o=i+1;o<n;o++){var s=Math.abs(t[o][i]);s>e&&(e=s,r=o)}if(0===e)return null;var a=t[r];t[r]=t[i],t[i]=a;for(var u=i+1;u<n;u++)for(var c=-t[u][i]/t[i][i],h=i;h<n+1;h++)i==h?t[u][h]=0:t[u][h]+=c*t[i][h]}for(var f=new Array(n),l=n-1;l>=0;l--){f[l]=t[l][n]/t[l][l];for(var v=l-1;v>=0;v--)t[v][n]-=t[v][l]*f[l]}return f}function di(t){return 180*t/Math.PI}function pi(t){return t*Math.PI/180}function yi(t,n){var i=t%n;return i*n<0?i+n:i}function mi(t,n,i){return t+i*(n-t)}function wi(t,n){var i=Math.pow(10,n);return Math.round(t*i)/i}function bi(t,n){return Math.round(wi(t,n))}function gi(t,n){return Math.floor(wi(t,n))}function xi(t,n){return Math.ceil(wi(t,n))}var ji=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Si=6378137,ki=Math.PI*Si,Mi=[-ki,-ki,ki,ki],_i=[-180,-85,180,85],Oi=Si*Math.log(Math.tan(Math.PI/2)),Ti=function(t){function n(n){return t.call(this,{code:n,units:Gt.METERS,extent:Mi,global:!0,worldExtent:_i,getPointResolution:function(t,n){return t/ci(n[1]/Si)}})||this}return ji(n,t),n}(ai),Ei=[new Ti("EPSG:3857"),new Ti("EPSG:102100"),new Ti("EPSG:102113"),new Ti("EPSG:900913"),new Ti("http://www.opengis.net/def/crs/EPSG/0/3857"),new Ti("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ai(t,n,i){var r=t.length,e=i>1?i:2,o=n;void 0===o&&(o=e>2?t.slice():new Array(r));for(var s=0;s<r;s+=e){o[s]=ki*t[s]/180;var a=Si*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>Oi?a=Oi:a<-Oi&&(a=-Oi),o[s+1]=a}return o}function Ci(t,n,i){var r=t.length,e=i>1?i:2,o=n;void 0===o&&(o=e>2?t.slice():new Array(r));for(var s=0;s<r;s+=e)o[s]=180*t[s]/ki,o[s+1]=360*Math.atan(Math.exp(t[s+1]/Si))/Math.PI-90;return o}var Ri=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Pi=6378137,Ii=[-180,-90,180,90],Ni=Math.PI*Pi/180,zi=function(t){function n(n,i){return t.call(this,{code:n,units:Gt.DEGREES,extent:Ii,axisOrientation:i,global:!0,metersPerUnit:Ni,worldExtent:Ii})||this}return Ri(n,t),n}(ai),Fi=[new zi("CRS:84"),new zi("EPSG:4326","neu"),new zi("urn:ogc:def:crs:OGC:1.3:CRS84"),new zi("urn:ogc:def:crs:OGC:2:84"),new zi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new zi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new zi("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],Li={};function Gi(){Li={}}function Di(t){return Li[t]||Li[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Ui(t,n){Li[t]=n}var qi={};function Bi(){qi={}}function Wi(t,n,i){var r=t.getCode(),e=n.getCode();r in qi||(qi[r]={}),qi[r][e]=i}function Vi(t,n){var i;return t in qi&&n in qi[t]&&(i=qi[t][n]),i}function Xi(t,n,i){var r=void 0!==i?t.toFixed(i):""+t,e=r.indexOf(".");return(e=-1===e?r.length:e)>n?r:new Array(1+n-e).join("0")+r}function Hi(t,n){for(var i=(""+t).split("."),r=(""+n).split("."),e=0;e<Math.max(i.length,r.length);e++){var o=parseInt(i[e]||"0",10),s=parseInt(r[e]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}function Ji(t,n){return t[0]+=+n[0],t[1]+=+n[1],t}function Ki(t,n){var i=n.getRadius(),r=n.getCenter(),e=r[0],o=r[1],s=t[0]-e,a=t[1]-o;0===s&&0===a&&(s=1);var u=Math.sqrt(s*s+a*a);return[e+i*s/u,o+i*a/u]}function Yi(t,n){var i,r,e=t[0],o=t[1],s=n[0],a=n[1],u=s[0],c=s[1],h=a[0],f=a[1],l=h-u,v=f-c,d=0===l&&0===v?0:(l*(e-u)+v*(o-c))/(l*l+v*v||0);return d<=0?(i=u,r=c):d>=1?(i=h,r=f):(i=u+d*l,r=c+d*v),[i,r]}function Zi(t,n,i){var r=yi(n+180,360)-180,e=Math.abs(3600*r),o=i||0,s=Math.pow(10,o),a=Math.floor(e/3600),u=Math.floor((e-3600*a)/60),c=e-3600*a-60*u;return(c=Math.ceil(c*s)/s)>=60&&(c=0,u+=1),u>=60&&(u=0,a+=1),a+"° "+Xi(u,2)+" "+Xi(c,2,o)+"″"+(0==r?"":" "+t.charAt(r<0?1:0))}function $i(t,n,i){return t?n.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function Qi(t,n){for(var i=!0,r=t.length-1;r>=0;--r)if(t[r]!=n[r]){i=!1;break}return i}function tr(t,n){var i=Math.cos(n),r=Math.sin(n),e=t[0]*i-t[1]*r,o=t[1]*i+t[0]*r;return t[0]=e,t[1]=o,t}function nr(t,n){return t[0]*=n,t[1]*=n,t}function ir(t,n){var i=t[0]-n[0],r=t[1]-n[1];return i*i+r*r}function rr(t,n){return Math.sqrt(ir(t,n))}function er(t,n){return ir(t,Yi(t,n))}function or(t,n){return $i(t,"{x}, {y}",n)}function sr(t,n){if(n.canWrapX()){var i=Qn(n.getExtent()),r=ar(t,n,i);r&&(t[0]-=r*i)}return t}function ar(t,n,i){var r=n.getExtent(),e=0;if(n.canWrapX()&&(t[0]<r[0]||t[0]>r[2])){var o=i||Qn(r);e=Math.floor((t[0]-r[0])/o)}return e}var ur=6371008.8;function cr(t,n,i){var r=i||ur,e=pi(t[1]),o=pi(n[1]),s=(o-e)/2,a=pi(n[0]-t[0])/2,u=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(e)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))}function hr(t,n){for(var i=0,r=0,e=t.length;r<e-1;++r)i+=cr(t[r],t[r+1],n);return i}function fr(t,n){for(var i=0,r=t.length,e=t[r-1][0],o=t[r-1][1],s=0;s<r;s++){var a=t[s][0],u=t[s][1];i+=pi(a-e)*(2+Math.sin(pi(o))+Math.sin(pi(u))),e=a,o=u}return i*n*n/2}function lr(t,n,i,r){var e=r||ur,o=pi(t[1]),s=pi(t[0]),a=n/e,u=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(i));return[di(s+Math.atan2(Math.sin(i)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(u))),di(u)]}var vr=!0;function dr(t){vr=!(void 0===t||t)}function pr(t,n,i){var r;if(void 0!==n){for(var e=0,o=t.length;e<o;++e)n[e]=t[e];r=n}else r=t.slice();return r}function yr(t,n,i){if(void 0!==n&&t!==n){for(var r=0,e=t.length;r<e;++r)n[r]=t[r];t=n}return t}function mr(t){Ui(t.getCode(),t),Wi(t,t,pr)}function wr(t){t.forEach(mr)}function br(t){return"string"==typeof t?Di(t):t||null}function gr(t,n,i,r){var e,o=(t=br(t)).getPointResolutionFunc();if(o){if(e=o(n,i),r&&r!==t.getUnits())(a=t.getMetersPerUnit())&&(e=e*a/Ft[r])}else{var s=t.getUnits();if(s==Gt.DEGREES&&!r||r==Gt.DEGREES)e=n;else{var a,u=Tr(t,br("EPSG:4326"));if(u===yr&&s!==Gt.DEGREES)e=n*t.getMetersPerUnit();else{var c=[i[0]-n/2,i[1],i[0]+n/2,i[1],i[0],i[1]-n/2,i[0],i[1]+n/2];e=(cr((c=u(c,c,2)).slice(0,2),c.slice(2,4))+cr(c.slice(4,6),c.slice(6,8)))/2}void 0!==(a=r?Ft[r]:t.getMetersPerUnit())&&(e/=a)}}return e}function xr(t){wr(t),t.forEach((function(n){t.forEach((function(t){n!==t&&Wi(n,t,pr)}))}))}function jr(t,n,i,r){t.forEach((function(t){n.forEach((function(n){Wi(t,n,i),Wi(n,t,r)}))}))}function Sr(t,n){return t?"string"==typeof t?br(t):t:br(n)}function kr(t){return function(n,i,r){for(var e=n.length,o=void 0!==r?r:2,s=void 0!==i?i:new Array(e),a=0;a<e;a+=o){var u=t([n[a],n[a+1]]);s[a]=u[0],s[a+1]=u[1];for(var c=o-1;c>=2;--c)s[a+c]=n[a+c]}return s}}function Mr(t,n,i,r){var e=br(t),o=br(n);Wi(e,o,kr(i)),Wi(o,e,kr(r))}function _r(t,n){return dr(),Ar(t,"EPSG:4326",void 0!==n?n:"EPSG:3857")}function Or(t,n){if(t===n)return!0;var i=t.getUnits()===n.getUnits();return(t.getCode()===n.getCode()||Tr(t,n)===pr)&&i}function Tr(t,n){var i=Vi(t.getCode(),n.getCode());return i||(i=yr),i}function Er(t,n){return Tr(br(t),br(n))}function Ar(t,n,i){return Er(n,i)(t,void 0,t.length)}function Cr(t,n,i,r){return oi(t,Er(n,i),void 0,r)}var Rr=null;function Pr(t){Rr=br(t)}function Ir(){return Rr}function Nr(t,n){return Rr?Ar(t,n,Rr):t}function zr(t,n){return Rr?Ar(t,Rr,n):(vr&&!Qi(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(vr=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Fr(t,n){return Rr?Cr(t,n,Rr):t}function Lr(t,n){return Rr?Cr(t,Rr,n):t}function Gr(t,n){if(!Rr)return t;var i=br(n).getUnits(),r=Rr.getUnits();return i&&r?t*Ft[i]/Ft[r]:t}function Dr(t,n){if(!Rr)return t;var i=br(n).getUnits(),r=Rr.getUnits();return i&&r?t*Ft[r]/Ft[i]:t}function Ur(t,n,i){return function(r){var e,o,s=r[0],a=r[1];if(t.canWrapX()){var u=t.getExtent(),c=Qn(u);(o=ar(r,t,c))&&(s-=o*c),s=ui(s,u[0],u[2]),a=ui(a,u[1],u[3]),e=i([s,a])}else e=i(r);return o&&n.canWrapX()&&(e[0]+=o*Qn(n.getExtent())),e}}function qr(){xr(Ei),xr(Fi),jr(Fi,Ei,Ai,Ci)}function Br(t,n,i,r,e,o){for(var s=o||[],a=0,u=n;u<i;u+=r){var c=t[u],h=t[u+1];s[a++]=e[0]*c+e[2]*h+e[4],s[a++]=e[1]*c+e[3]*h+e[5]}return o&&s.length!=a&&(s.length=a),s}function Wr(t,n,i,r,e,o,s){for(var a=s||[],u=Math.cos(e),c=Math.sin(e),h=o[0],f=o[1],l=0,v=n;v<i;v+=r){var d=t[v]-h,p=t[v+1]-f;a[l++]=h+d*u-p*c,a[l++]=f+d*c+p*u;for(var y=v+2;y<v+r;++y)a[l++]=t[y]}return s&&a.length!=l&&(a.length=l),a}function Vr(t,n,i,r,e,o,s,a){for(var u=a||[],c=s[0],h=s[1],f=0,l=n;l<i;l+=r){var v=t[l]-c,d=t[l+1]-h;u[f++]=c+e*v,u[f++]=h+o*d;for(var p=l+2;p<l+r;++p)u[f++]=t[p]}return a&&u.length!=f&&(u.length=f),u}function Xr(t,n,i,r,e,o,s){for(var a=s||[],u=0,c=n;c<i;c+=r){a[u++]=t[c]+e,a[u++]=t[c+1]+o;for(var h=c+2;h<c+r;++h)a[u++]=t[h]}return s&&a.length!=u&&(a.length=u),a}qr();var Hr=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jr=[1,0,0,1,0,0],Kr=function(t){function n(){var n=t.call(this)||this;return n.st=[1/0,1/0,-1/0,-1/0],n.yt=-1,n.simplifiedGeometryMaxMinSquaredTolerance=0,n.simplifiedGeometryRevision=0,n.simplifyTransformedInternal=O((function(t,n,i){if(!i)return this.getSimplifiedGeometry(n);var r=this.clone();return r.applyTransform(i),r.getSimplifiedGeometry(n)})),n}return Hr(n,t),n.prototype.simplifyTransformed=function(t,n){return this.simplifyTransformedInternal(this.getRevision(),t,n)},n.prototype.clone=function(){return r()},n.prototype.closestPointXY=function(t,n,i,e){return r()},n.prototype.containsXY=function(t,n){var i=this.getClosestPoint([t,n]);return i[0]===t&&i[1]===n},n.prototype.getClosestPoint=function(t,n){var i=n||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},n.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},n.prototype.computeExtent=function(t){return r()},n.prototype.getExtent=function(t){if(this.yt!=this.getRevision()){var n=this.computeExtent(this.st);(isNaN(n[0])||isNaN(n[1]))&&Cn(n),this.yt=this.getRevision()}return ii(this.st,t)},n.prototype.rotate=function(t,n){r()},n.prototype.scale=function(t,n,i){r()},n.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},n.prototype.getSimplifiedGeometry=function(t){return r()},n.prototype.getType=function(){return r()},n.prototype.applyTransform=function(t){r()},n.prototype.intersectsExtent=function(t){return r()},n.prototype.translate=function(t,n){r()},n.prototype.transform=function(t,n){var i=br(t),r=i.getUnits()==Gt.TILE_PIXELS?function(t,r,e){var o=i.getExtent(),s=i.getWorldExtent(),a=Kn(s)/Kn(o);return an(Jr,s[0],s[3],a,-a,0,0,0),Br(t,0,t.length,e,Jr,r),Er(i,n)(t,r,e)}:Er(i,n);return this.applyTransform(r),this},n}(ot),Yr=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Zr(t){var n;return t==Et?n=2:t==At||t==Ct?n=3:t==Rt&&(n=4),n}function $r(t,n,i){var r=t.getFlatCoordinates();if(r){var e=t.getStride();return Br(r,0,r.length,e,n,i)}return null}var Qr=function(t){function n(){var n=t.call(this)||this;return n.layout=Et,n.stride=2,n.flatCoordinates=null,n}return Yr(n,t),n.prototype.computeExtent=function(t){return Pn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.getCoordinates=function(){return r()},n.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},n.prototype.getFlatCoordinates=function(){return this.flatCoordinates},n.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},n.prototype.getLayout=function(){return this.layout},n.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var n=this.getSimplifiedGeometryInternal(t);return n.getFlatCoordinates().length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},n.prototype.getSimplifiedGeometryInternal=function(t){return this},n.prototype.getStride=function(){return this.stride},n.prototype.setFlatCoordinates=function(t,n){this.stride=Zr(t),this.layout=t,this.flatCoordinates=n},n.prototype.setCoordinates=function(t,n){r()},n.prototype.setLayout=function(t,n,i){var r;if(t)r=Zr(t);else{for(var e=0;e<i;++e){if(0===n.length)return this.layout=Et,void(this.stride=2);n=n[0]}t=function(t){var n;2==t?n=Et:3==t?n=At:4==t&&(n=Rt);return n}(r=n.length)}this.layout=t,this.stride=r},n.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},n.prototype.rotate=function(t,n){var i=this.getFlatCoordinates();if(i){var r=this.getStride();Wr(i,0,i.length,r,t,n,i),this.changed()}},n.prototype.scale=function(t,n,i){var r=n;void 0===r&&(r=t);var e=i;e||(e=Xn(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();Vr(o,0,o.length,s,t,r,e,o),this.changed()}},n.prototype.translate=function(t,n){var i=this.getFlatCoordinates();if(i){var r=this.getStride();Xr(i,0,i.length,r,t,n,i),this.changed()}},n}(Kr);function te(t,n,i,r,e,o,s){var a,u=t[n],c=t[n+1],h=t[i]-u,f=t[i+1]-c;if(0===h&&0===f)a=n;else{var l=((e-u)*h+(o-c)*f)/(h*h+f*f);if(l>1)a=i;else{if(l>0){for(var v=0;v<r;++v)s[v]=mi(t[n+v],t[i+v],l);return void(s.length=r)}a=n}}for(v=0;v<r;++v)s[v]=t[a+v];s.length=r}function ne(t,n,i,r,e){var o=t[n],s=t[n+1];for(n+=r;n<i;n+=r){var a=t[n],u=t[n+1],c=li(o,s,a,u);c>e&&(e=c),o=a,s=u}return e}function ie(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var a=i[o];e=ne(t,n,a,r,e),n=a}return e}function re(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var a=i[o];e=ie(t,n,a,r,e),n=a[a.length-1]}return e}function ee(t,n,i,r,e,o,s,a,u,c,h){if(n==i)return c;var f,l;if(0===e){if((l=li(s,a,t[n],t[n+1]))<c){for(f=0;f<r;++f)u[f]=t[n+f];return u.length=r,l}return c}for(var v=h||[NaN,NaN],d=n+r;d<i;)if(te(t,d-r,d,r,s,a,v),(l=li(s,a,v[0],v[1]))<c){for(c=l,f=0;f<r;++f)u[f]=v[f];u.length=r,d+=r}else d+=r*Math.max((Math.sqrt(l)-Math.sqrt(c))/e|0,1);if(o&&(te(t,i-r,n,r,s,a,v),(l=li(s,a,v[0],v[1]))<c)){for(c=l,f=0;f<r;++f)u[f]=v[f];u.length=r}return c}function oe(t,n,i,r,e,o,s,a,u,c,h){for(var f=h||[NaN,NaN],l=0,v=i.length;l<v;++l){var d=i[l];c=ee(t,n,d,r,e,o,s,a,u,c,f),n=d}return c}function se(t,n,i,r,e,o,s,a,u,c,h){for(var f=h||[NaN,NaN],l=0,v=i.length;l<v;++l){var d=i[l];c=oe(t,n,d,r,e,o,s,a,u,c,f),n=d[d.length-1]}return c}function ae(t,n,i,r){for(var e=0,o=i.length;e<o;++e)t[n++]=i[e];return n}function ue(t,n,i,r){for(var e=0,o=i.length;e<o;++e)for(var s=i[e],a=0;a<r;++a)t[n++]=s[a];return n}function ce(t,n,i,r,e){for(var o=e||[],s=0,a=0,u=i.length;a<u;++a){var c=ue(t,n,i[a],r);o[s++]=c,n=c}return o.length=s,o}function he(t,n,i,r,e){for(var o=e||[],s=0,a=0,u=i.length;a<u;++a){var c=ce(t,n,i[a],r,o[s]);o[s++]=c,n=c[c.length-1]}return o.length=s,o}function fe(t,n,i,r,e,o,s){var a=(i-n)/r;if(a<3){for(;n<i;n+=r)o[s++]=t[n],o[s++]=t[n+1];return s}var u=new Array(a);u[0]=1,u[a-1]=1;for(var c=[n,i-r],h=0;c.length>0;){for(var f=c.pop(),l=c.pop(),v=0,d=t[l],p=t[l+1],y=t[f],m=t[f+1],w=l+r;w<f;w+=r){var b=fi(t[w],t[w+1],d,p,y,m);b>v&&(h=w,v=b)}v>e&&(u[(h-n)/r]=1,l+r<h&&c.push(l,h),h+r<f&&c.push(h,f))}for(w=0;w<a;++w)u[w]&&(o[s++]=t[n+w*r],o[s++]=t[n+w*r+1]);return s}function le(t,n,i,r,e,o,s,a){for(var u=0,c=i.length;u<c;++u){var h=i[u];s=fe(t,n,h,r,e,o,s),a.push(s),n=h}return s}function ve(t,n,i,r,e,o,s){if(i<=n+r){for(;n<i;n+=r)o[s++]=t[n],o[s++]=t[n+1];return s}var a=t[n],u=t[n+1];o[s++]=a,o[s++]=u;var c=a,h=u;for(n+=r;n<i;n+=r)li(a,u,c=t[n],h=t[n+1])>e&&(o[s++]=c,o[s++]=h,a=c,u=h);return c==a&&h==u||(o[s++]=c,o[s++]=h),s}function de(t,n){return n*Math.round(t/n)}function pe(t,n,i,r,e,o,s){if(n==i)return s;var a,u,c=de(t[n],e),h=de(t[n+1],e);n+=r,o[s++]=c,o[s++]=h;do{if(a=de(t[n],e),u=de(t[n+1],e),(n+=r)==i)return o[s++]=a,o[s++]=u,s}while(a==c&&u==h);for(;n<i;){var f=de(t[n],e),l=de(t[n+1],e);if(n+=r,f!=a||l!=u){var v=a-c,d=u-h,p=f-c,y=l-h;v*y==d*p&&(v<0&&p<v||v==p||v>0&&p>v)&&(d<0&&y<d||d==y||d>0&&y>d)?(a=f,u=l):(o[s++]=a,o[s++]=u,c=a,h=u,a=f,u=l)}}return o[s++]=a,o[s++]=u,s}function ye(t,n,i,r,e,o,s,a){for(var u=0,c=i.length;u<c;++u){var h=i[u];s=pe(t,n,h,r,e,o,s),a.push(s),n=h}return s}function me(t,n,i,r,e,o,s,a){for(var u=0,c=i.length;u<c;++u){var h=i[u],f=[];s=ye(t,n,h,r,e,o,s,f),a.push(f),n=h[h.length-1]}return s}function we(t,n,i,r,e){for(var o=void 0!==e?e:[],s=0,a=n;a<i;a+=r)o[s++]=t.slice(a,a+r);return o.length=s,o}function be(t,n,i,r,e){for(var o=void 0!==e?e:[],s=0,a=0,u=i.length;a<u;++a){var c=i[a];o[s++]=we(t,n,c,r,o[s]),n=c}return o.length=s,o}function ge(t,n,i,r,e){for(var o=void 0!==e?e:[],s=0,a=0,u=i.length;a<u;++a){var c=i[a];o[s++]=be(t,n,c,r,o[s]),n=c[c.length-1]}return o.length=s,o}function xe(t,n,i,r){for(var e=0,o=t[i-r],s=t[i-r+1];n<i;n+=r){var a=t[n],u=t[n+1];e+=s*a-o*u,o=a,s=u}return e/2}function je(t,n,i,r){for(var e=0,o=0,s=i.length;o<s;++o){var a=i[o];e+=xe(t,n,a,r),n=a}return e}function Se(t,n,i,r){for(var e=0,o=0,s=i.length;o<s;++o){var a=i[o];e+=je(t,n,a,r),n=a[a.length-1]}return e}var ke=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Me=function(t){function n(n,i){var r=t.call(this)||this;return r.wt=-1,r.bt=-1,void 0===i||Array.isArray(n[0])?r.setCoordinates(n,i):r.setFlatCoordinates(i,n),r}return ke(n,t),n.prototype.clone=function(){return new n(this.flatCoordinates.slice(),this.layout)},n.prototype.closestPointXY=function(t,n,i,r){return r<kn(this.getExtent(),t,n)?r:(this.bt!=this.getRevision()&&(this.wt=Math.sqrt(ne(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.bt=this.getRevision()),ee(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.wt,!0,t,n,i,r))},n.prototype.getArea=function(){return xe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getCoordinates=function(){return we(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=fe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new n(i,Et)},n.prototype.getType=function(){return Pt.LINEAR_RING},n.prototype.intersectsExtent=function(t){return!1},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ue(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Qr),_e=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Oe=function(t){function n(n,i){var r=t.call(this)||this;return r.setCoordinates(n,i),r}return _e(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){var e=this.flatCoordinates,o=li(t,n,e[0],e[1]);if(o<r){for(var s=this.stride,a=0;a<s;++a)i[a]=e[a];return i.length=s,o}return r},n.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},n.prototype.computeExtent=function(t){return Rn(this.flatCoordinates,t)},n.prototype.getType=function(){return Pt.POINT},n.prototype.intersectsExtent=function(t){return On(t,this.flatCoordinates[0],this.flatCoordinates[1])},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ae(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Qr);function Te(t,n,i,r,e){return!qn(e,(function(e){return!Ee(t,n,i,r,e[0],e[1])}))}function Ee(t,n,i,r,e,o){for(var s=0,a=t[i-r],u=t[i-r+1];n<i;n+=r){var c=t[n],h=t[n+1];u<=o?h>o&&(c-a)*(o-u)-(e-a)*(h-u)>0&&s++:h<=o&&(c-a)*(o-u)-(e-a)*(h-u)<0&&s--,a=c,u=h}return 0!==s}function Ae(t,n,i,r,e,o){if(0===i.length)return!1;if(!Ee(t,n,i[0],r,e,o))return!1;for(var s=1,a=i.length;s<a;++s)if(Ee(t,i[s-1],i[s],r,e,o))return!1;return!0}function Ce(t,n,i,r,e,o){if(0===i.length)return!1;for(var s=0,a=i.length;s<a;++s){var u=i[s];if(Ae(t,n,u,r,e,o))return!0;n=u[u.length-1]}return!1}function Re(t,n,i,r,e,o,s){for(var a,u,c,h,f,l,v,d=e[o+1],y=[],m=0,w=i.length;m<w;++m){var b=i[m];for(h=t[b-r],l=t[b-r+1],a=n;a<b;a+=r)f=t[a],v=t[a+1],(d<=l&&v<=d||l<=d&&d<=v)&&(c=(d-l)/(v-l)*(f-h)+h,y.push(c)),h=f,l=v}var g=NaN,x=-1/0;for(y.sort(p),h=y[0],a=1,u=y.length;a<u;++a){f=y[a];var j=Math.abs(f-h);j>x&&Ae(t,n,i,r,c=(h+f)/2,d)&&(g=c,x=j),h=f}return isNaN(g)&&(g=e[o]),s?(s.push(g,d,x),s):[g,d,x]}function Pe(t,n,i,r,e){for(var o=[],s=0,a=i.length;s<a;++s){var u=i[s];o=Re(t,n,u,r,e,2*s,o),n=u[u.length-1]}return o}function Ie(t,n,i,r,e){var o;for(n+=r;n<i;n+=r)if(o=e(t.slice(n-r,n),t.slice(n,n+r)))return o;return!1}function Ne(t,n,i,r,e){var o=Gn([1/0,1/0,-1/0,-1/0],t,n,i,r);return!!ti(e,o)&&(!!_n(e,o)||(o[0]>=e[0]&&o[2]<=e[2]||(o[1]>=e[1]&&o[3]<=e[3]||Ie(t,n,i,r,(function(t,n){return ei(e,t,n)})))))}function ze(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){if(Ne(t,n,i[o],r,e))return!0;n=i[o]}return!1}function Fe(t,n,i,r,e){return!!Ne(t,n,i,r,e)||(!!Ee(t,n,i,r,e[0],e[1])||(!!Ee(t,n,i,r,e[0],e[3])||(!!Ee(t,n,i,r,e[2],e[1])||!!Ee(t,n,i,r,e[2],e[3]))))}function Le(t,n,i,r,e){if(!Fe(t,n,i[0],r,e))return!1;if(1===i.length)return!0;for(var o=1,s=i.length;o<s;++o)if(Te(t,i[o-1],i[o],r,e)&&!Ne(t,i[o-1],i[o],r,e))return!1;return!0}function Ge(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var a=i[o];if(Le(t,n,a,r,e))return!0;n=a[a.length-1]}return!1}function De(t,n,i,r){for(;n<i-r;){for(var e=0;e<r;++e){var o=t[n+e];t[n+e]=t[i-r+e],t[i-r+e]=o}n+=r,i-=r}}function Ue(t,n,i,r){for(var e=0,o=t[i-r],s=t[i-r+1];n<i;n+=r){var a=t[n],u=t[n+1];e+=(a-o)*(u+s),o=a,s=u}return 0===e?void 0:e>0}function qe(t,n,i,r,e){for(var o=void 0!==e&&e,s=0,a=i.length;s<a;++s){var u=i[s],c=Ue(t,n,u,r);if(0===s){if(o&&c||!o&&!c)return!1}else if(o&&!c||!o&&c)return!1;n=u}return!0}function Be(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var a=i[o];if(!qe(t,n,a,r,e))return!1;a.length&&(n=a[a.length-1])}return!0}function We(t,n,i,r,e){for(var o=void 0!==e&&e,s=0,a=i.length;s<a;++s){var u=i[s],c=Ue(t,n,u,r);(0===s?o&&c||!o&&!c:o&&!c||!o&&c)&&De(t,n,u,r),n=u}return n}function Ve(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o)n=We(t,n,i[o],r,e);return n}function Xe(t,n){for(var i=[],r=0,e=0,o=0,s=n.length;o<s;++o){var a=n[o];if(Ue(t,r,a,2)){if(0===i.length)continue;i[i.length-1].push(n[e])}else i.push(n.slice(e,o+1));e=o+1,r=a}return i}var He=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Je=function(t){function n(n,i,r){var e=t.call(this)||this;return e.gt=[],e.xt=-1,e.jt=null,e.wt=-1,e.bt=-1,e.St=-1,e.kt=null,void 0!==i&&r?(e.setFlatCoordinates(i,n),e.gt=r):e.setCoordinates(n,i),e}return He(n,t),n.prototype.appendLinearRing=function(t){this.flatCoordinates?b(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.gt.push(this.flatCoordinates.length),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout,this.gt.slice());return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){return r<kn(this.getExtent(),t,n)?r:(this.bt!=this.getRevision()&&(this.wt=Math.sqrt(ie(this.flatCoordinates,0,this.gt,this.stride,0)),this.bt=this.getRevision()),oe(this.flatCoordinates,0,this.gt,this.stride,this.wt,!0,t,n,i,r))},n.prototype.containsXY=function(t,n){return Ae(this.getOrientedFlatCoordinates(),0,this.gt,this.stride,t,n)},n.prototype.getArea=function(){return je(this.getOrientedFlatCoordinates(),0,this.gt,this.stride)},n.prototype.getCoordinates=function(t){var n;return void 0!==t?We(n=this.getOrientedFlatCoordinates().slice(),0,this.gt,this.stride,t):n=this.flatCoordinates,be(n,0,this.gt,this.stride)},n.prototype.getEnds=function(){return this.gt},n.prototype.getFlatInteriorPoint=function(){if(this.xt!=this.getRevision()){var t=Xn(this.getExtent());this.jt=Re(this.getOrientedFlatCoordinates(),0,this.gt,this.stride,t,0),this.xt=this.getRevision()}return this.jt},n.prototype.getInteriorPoint=function(){return new Oe(this.getFlatInteriorPoint(),Ct)},n.prototype.getLinearRingCount=function(){return this.gt.length},n.prototype.getLinearRing=function(t){return t<0||this.gt.length<=t?null:new Me(this.flatCoordinates.slice(0===t?0:this.gt[t-1],this.gt[t]),this.layout)},n.prototype.getLinearRings=function(){for(var t=this.layout,n=this.flatCoordinates,i=this.gt,r=[],e=0,o=0,s=i.length;o<s;++o){var a=i[o],u=new Me(n.slice(e,a),t);r.push(u),e=a}return r},n.prototype.getOrientedFlatCoordinates=function(){if(this.St!=this.getRevision()){var t=this.flatCoordinates;qe(t,0,this.gt,this.stride)?this.kt=t:(this.kt=t.slice(),this.kt.length=We(this.kt,0,this.gt,this.stride)),this.St=this.getRevision()}return this.kt},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=ye(this.flatCoordinates,0,this.gt,this.stride,Math.sqrt(t),i,0,r),new n(i,Et,r)},n.prototype.getType=function(){return Pt.POLYGON},n.prototype.intersectsExtent=function(t){return Le(this.getOrientedFlatCoordinates(),0,this.gt,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=ce(this.flatCoordinates,0,t,this.stride,this.gt);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},n}(Qr),Ke=Je;function Ye(t,n,i,r){for(var e=i||32,o=[],s=0;s<e;++s)b(o,lr(t,n,2*Math.PI*s/e,r));return o.push(o[0],o[1]),new Je(o,Et,[o.length])}function Ze(t){var n=t[0],i=t[1],r=t[2],e=t[3],o=[n,i,n,e,r,e,r,i,n,i];return new Je(o,Et,[o.length])}function $e(t,n,i){for(var r=n||32,e=t.getStride(),o=t.getLayout(),s=t.getCenter(),a=e*(r+1),u=new Array(a),c=0;c<a;c+=e){u[c]=0,u[c+1]=0;for(var h=2;h<e;h++)u[c+h]=s[h]}var f=[u.length],l=new Je(u,o,f);return Qe(l,s,t.getRadius(),i),l}function Qe(t,n,i,r){for(var e=t.getFlatCoordinates(),o=t.getStride(),s=e.length/o-1,a=r||0,u=0;u<=s;++u){var c=u*o,h=a+2*yi(u,s)*Math.PI/s;e[c]=n[0]+i*Math.cos(h),e[c+1]=n[1]+i*Math.sin(h)}t.changed()}var to=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),no="accuracy",io="accuracyGeometry",ro="altitude",eo="altitudeAccuracy",oo="heading",so="position",ao="projection",uo="speed",co="tracking",ho="trackingOptions",fo=function(t){function n(n){var i=t.call(this,z)||this;return i.code=n.code,i.message=n.message,i}return to(n,t),n}(f),lo=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};return i.Mt=null,i._t=yr,i.Ot=void 0,i.addChangeListener(ao,i.Tt),i.addChangeListener(co,i.Et),void 0!==r.projection&&i.setProjection(r.projection),void 0!==r.trackingOptions&&i.setTrackingOptions(r.trackingOptions),i.setTracking(void 0!==r.tracking&&r.tracking),i}return to(n,t),n.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},n.prototype.Tt=function(){var t=this.getProjection();t&&(this._t=Tr(br("EPSG:4326"),t),this.Mt&&this.set(so,this._t(this.Mt)))},n.prototype.Et=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.Ot?this.Ot=navigator.geolocation.watchPosition(this.At.bind(this),this.Ct.bind(this),this.getTrackingOptions()):t||void 0===this.Ot||(navigator.geolocation.clearWatch(this.Ot),this.Ot=void 0)}},n.prototype.At=function(t){var n=t.coords;this.set(no,n.accuracy),this.set(ro,null===n.altitude?void 0:n.altitude),this.set(eo,null===n.altitudeAccuracy?void 0:n.altitudeAccuracy),this.set(oo,null===n.heading?void 0:pi(n.heading)),this.Mt?(this.Mt[0]=n.longitude,this.Mt[1]=n.latitude):this.Mt=[n.longitude,n.latitude];var i=this._t(this.Mt);this.set(so,i),this.set(uo,null===n.speed?void 0:n.speed);var r=Ye(this.Mt,n.accuracy);r.applyTransform(this._t),this.set(io,r),this.changed()},n.prototype.Ct=function(t){this.dispatchEvent(new fo(t))},n.prototype.getAccuracy=function(){return this.get(no)},n.prototype.getAccuracyGeometry=function(){return this.get(io)||null},n.prototype.getAltitude=function(){return this.get(ro)},n.prototype.getAltitudeAccuracy=function(){return this.get(eo)},n.prototype.getHeading=function(){return this.get(oo)},n.prototype.getPosition=function(){return this.get(so)},n.prototype.getProjection=function(){return this.get(ao)},n.prototype.getSpeed=function(){return this.get(uo)},n.prototype.getTracking=function(){return this.get(co)},n.prototype.getTrackingOptions=function(){return this.get(ho)},n.prototype.setProjection=function(t){this.set(ao,br(t))},n.prototype.setTracking=function(t){this.set(co,t)},n.prototype.setTrackingOptions=function(t){this.set(ho,t)},n}(ot),vo=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),po=function(t){function n(n,i,r,e){var o=t.call(this)||this;return o.extent=n,o.Rt=r,o.resolution=i,o.state=e,o}return vo(n,t),n.prototype.changed=function(){this.dispatchEvent(N)},n.prototype.getExtent=function(){return this.extent},n.prototype.getImage=function(){return r()},n.prototype.getPixelRatio=function(){return this.Rt},n.prototype.getResolution=function(){return this.resolution},n.prototype.getState=function(){return this.state},n.prototype.load=function(){r()},n}(I),yo=0,mo=1,wo=2,bo=3,go=4,xo=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function jo(t,n,i){var r=t,e=!0,o=!1,s=!1,a=[Z(r,X,(function(){s=!0,o||n()}))];return r.src&&Ht?(o=!0,r.decode().then((function(){e&&n()})).catch((function(t){e&&(s?n():i())}))):a.push(Z(r,z,i)),function(){e=!1,a.forEach($)}}var So=function(t){function n(n,i,r,e,o,s){var a=t.call(this,n,i,r,yo)||this;return a.Pt=e,a.Nt=new Image,null!==o&&(a.Nt.crossOrigin=o),a.zt=null,a.state=yo,a.Ft=s,a}return xo(n,t),n.prototype.getImage=function(){return this.Nt},n.prototype.Lt=function(){this.state=bo,this.Gt(),this.changed()},n.prototype.Dt=function(){void 0===this.resolution&&(this.resolution=Kn(this.extent)/this.Nt.height),this.state=wo,this.Gt(),this.changed()},n.prototype.load=function(){this.state!=yo&&this.state!=bo||(this.state=mo,this.changed(),this.Ft(this,this.Pt),this.zt=jo(this.Nt,this.Dt.bind(this),this.Lt.bind(this)))},n.prototype.setImage=function(t){this.Nt=t,this.resolution=Kn(this.extent)/this.Nt.height},n.prototype.Gt=function(){this.zt&&(this.zt(),this.zt=null)},n}(po),ko=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mo=function(t){function n(n,i,r,e,o){var s=this,a=void 0!==o?yo:wo;return(s=t.call(this,n,i,r,a)||this).q=void 0!==o?o:null,s.Ut=e,s.W=null,s}return ko(n,t),n.prototype.getError=function(){return this.W},n.prototype.qt=function(t){t?(this.W=t,this.state=bo):this.state=wo,this.changed()},n.prototype.load=function(){this.state==yo&&(this.state=mo,this.changed(),this.q(this.qt.bind(this)))},n.prototype.getImage=function(){return this.Ut},n}(po);function _o(t,n,i,r){var e;return e=i&&i.length?i.shift():Xt?new OffscreenCanvas(t||300,n||300):document.createElement("canvas"),t&&(e.width=t),n&&(e.height=n),e.getContext("2d",r)}function Oo(t){var n=t.offsetWidth,i=getComputedStyle(t);return n+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}function To(t){var n=t.offsetHeight,i=getComputedStyle(t);return n+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)}function Eo(t,n){var i=n.parentNode;i&&i.replaceChild(t,n)}function Ao(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function Co(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function Ro(t,n){for(var i=t.childNodes,r=0;;++r){var e=i[r],o=n[r];if(!e&&!o)break;e!==o&&(e?o?t.insertBefore(o,e):(t.removeChild(e),--r):t.appendChild(o))}}var Po=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();var Io=function(t){function n(n,i,r,e,o,s){var a=t.call(this,n,i,s)||this;return a.Bt=e,a.Pt=r,a.key=r,a.Nt=new Image,null!==e&&(a.Nt.crossOrigin=e),a.zt=null,a.Wt=o,a}return Po(n,t),n.prototype.getImage=function(){return this.Nt},n.prototype.setImage=function(t){this.Nt=t,this.state=dt,this.Gt(),this.changed()},n.prototype.Lt=function(){var t;this.state=pt,this.Gt(),this.Nt=((t=_o(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},n.prototype.Dt=function(){var t=this.Nt;t.naturalWidth&&t.naturalHeight?this.state=dt:this.state=yt,this.Gt(),this.changed()},n.prototype.load=function(){this.state==pt&&(this.state=lt,this.Nt=new Image,null!==this.Bt&&(this.Nt.crossOrigin=this.Bt)),this.state==lt&&(this.state=vt,this.changed(),this.Wt(this,this.Pt),this.zt=jo(this.Nt,this.Dt.bind(this),this.Lt.bind(this)))},n.prototype.Gt=function(){this.zt&&(this.zt(),this.zt=null)},n}(jt),No=function(){function t(t,n,i){this.Vt=t,this.Xt=n,this.Ht=i,this.Jt=[],this.Kt=0,this.Yt=0}return t.prototype.begin=function(){this.Jt.length=0,this.Kt=0,this.Yt=0},t.prototype.update=function(t,n){this.Jt.push(t,n,Date.now())},t.prototype.end=function(){if(this.Jt.length<6)return!1;var t=Date.now()-this.Ht,n=this.Jt.length-3;if(this.Jt[n+2]<t)return!1;for(var i=n-3;i>0&&this.Jt[i+2]>t;)i-=3;var r=this.Jt[n+2]-this.Jt[i+2];if(r<1e3/60)return!1;var e=this.Jt[n]-this.Jt[i],o=this.Jt[n+1]-this.Jt[i+1];return this.Kt=Math.atan2(o,e),this.Yt=Math.sqrt(e*e+o*o)/r,this.Yt>this.Xt},t.prototype.getDistance=function(){return(this.Xt-this.Yt)/this.Vt},t.prototype.getAngle=function(){return this.Kt},t}(),zo=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Fo=/^([a-z]*)$|^hsla?\(.*\)$/i;function Lo(t){return"string"==typeof t?t:Bo(t)}function Go(t){var n=document.createElement("div");if(n.style.color=t,""!==n.style.color){document.body.appendChild(n);var i=getComputedStyle(n).color;return document.body.removeChild(n),i}return""}var Do=function(){var t={},n=0;return function(i){var r;if(t.hasOwnProperty(i))r=t[i];else{if(n>=1024){var e=0;for(var o in t)0==(3&e++)&&(delete t[o],--n)}r=function(t){var n,i,r,e,o;Fo.exec(t)&&(t=Go(t));if(zo.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var u=4===s||8===s;n=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),r=parseInt(t.substr(1+2*a,a),16),e=u?parseInt(t.substr(1+3*a,a),16):255,1==a&&(n=(n<<4)+n,i=(i<<4)+i,r=(r<<4)+r,u&&(e=(e<<4)+e)),o=[n,i,r,e/255]}else 0==t.indexOf("rgba(")?qo(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),qo(o)):Mt(!1,14);return o}(i),t[i]=r,++n}return r}}();function Uo(t){return Array.isArray(t)?t:Do(t)}function qo(t){return t[0]=ui(t[0]+.5|0,0,255),t[1]=ui(t[1]+.5|0,0,255),t[2]=ui(t[2]+.5|0,0,255),t[3]=ui(t[3],0,1),t}function Bo(t){var n=t[0];n!=(0|n)&&(n=n+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+n+","+i+","+r+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Wo(t){return Fo.test(t)&&(t=Go(t)),zo.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")}var Vo=function(){function t(){this.Zt={},this.$t=0,this.Qt=32}return t.prototype.clear=function(){this.Zt={},this.$t=0},t.prototype.canExpireCache=function(){return this.$t>this.Qt},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var n in this.Zt){var i=this.Zt[n];0!=(3&t++)||i.hasListener()||(delete this.Zt[n],--this.$t)}}},t.prototype.get=function(t,n,i){var r=Xo(t,n,i);return r in this.Zt?this.Zt[r]:null},t.prototype.set=function(t,n,i,r){var e=Xo(t,n,i);this.Zt[e]=r,++this.$t},t.prototype.setSize=function(t){this.Qt=t,this.expire()},t}();function Xo(t,n,i){return n+":"+t+":"+(i?Lo(i):"null")}var Ho=Vo,Jo=new Vo,Ko="opacity",Yo="visible",Zo="extent",$o="zIndex",Qo="maxResolution",ts="minResolution",ns="maxZoom",is="minZoom",rs="source",es="map";function os(t){return(os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ss=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),as=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un,i.tn=n.background;var r=E({},n);return"object"===os(n.properties)&&(delete r.properties,E(r,n.properties)),r[Ko]=void 0!==n.opacity?n.opacity:1,Mt("number"==typeof r[Ko],64),r[Yo]=void 0===n.visible||n.visible,r[$o]=n.zIndex,r[Qo]=void 0!==n.maxResolution?n.maxResolution:1/0,r[ts]=void 0!==n.minResolution?n.minResolution:0,r[is]=void 0!==n.minZoom?n.minZoom:-1/0,r[ns]=void 0!==n.maxZoom?n.maxZoom:1/0,i.nn=void 0!==r.className?r.className:"ol-layer",delete r.className,i.setProperties(r),i.rn=null,i}return ss(n,t),n.prototype.getBackground=function(){return this.tn},n.prototype.getClassName=function(){return this.nn},n.prototype.getLayerState=function(t){var n=this.rn||{layer:this,managed:void 0===t||t},i=this.getZIndex();return n.opacity=ui(Math.round(100*this.getOpacity())/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=void 0!==i||n.managed?i:1/0,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.rn=n,n},n.prototype.getLayersArray=function(t){return r()},n.prototype.getLayerStatesArray=function(t){return r()},n.prototype.getExtent=function(){return this.get(Zo)},n.prototype.getMaxResolution=function(){return this.get(Qo)},n.prototype.getMinResolution=function(){return this.get(ts)},n.prototype.getMinZoom=function(){return this.get(is)},n.prototype.getMaxZoom=function(){return this.get(ns)},n.prototype.getOpacity=function(){return this.get(Ko)},n.prototype.getSourceState=function(){return r()},n.prototype.getVisible=function(){return this.get(Yo)},n.prototype.getZIndex=function(){return this.get($o)},n.prototype.setBackground=function(t){this.tn=t,this.changed()},n.prototype.setExtent=function(t){this.set(Zo,t)},n.prototype.setMaxResolution=function(t){this.set(Qo,t)},n.prototype.setMinResolution=function(t){this.set(ts,t)},n.prototype.setMaxZoom=function(t){this.set(ns,t)},n.prototype.setMinZoom=function(t){this.set(is,t)},n.prototype.setOpacity=function(t){Mt("number"==typeof t,64),this.set(Ko,t)},n.prototype.setVisible=function(t){this.set(Yo,t)},n.prototype.setZIndex=function(t){this.set($o,t)},n.prototype.disposeInternal=function(){this.rn&&(this.rn.layer=null,this.rn=null),t.prototype.disposeInternal.call(this)},n}(ot),us="prerender",cs="postrender",hs="precompose",fs="postcompose",ls="rendercomplete",vs="undefined",ds="loading",ps="ready",ys="error",ms=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function ws(t,n){if(!t.visible)return!1;var i=n.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;var r=n.zoom;return r>t.minZoom&&r<=t.maxZoom}var bs=function(t){function n(n){var i=this,r=E({},n);delete r.source,(i=t.call(this,r)||this).on,i.once,i.un,i.en=null,i.sn=null,i.an=null,i.cn=null,i.rendered=!1,n.render&&(i.render=n.render),n.map&&i.setMap(n.map),i.addChangeListener(rs,i.hn);var e=n.source?n.source:null;return i.setSource(e),i}return ms(n,t),n.prototype.getLayersArray=function(t){var n=t||[];return n.push(this),n},n.prototype.getLayerStatesArray=function(t){var n=t||[];return n.push(this.getLayerState()),n},n.prototype.getSource=function(){return this.get(rs)||null},n.prototype.getRenderSource=function(){return this.getSource()},n.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():vs},n.prototype.fn=function(){this.changed()},n.prototype.hn=function(){this.an&&($(this.an),this.an=null);var t=this.getSource();t&&(this.an=Y(t,N,this.fn,this)),this.changed()},n.prototype.getFeatures=function(t){return this.cn?this.cn.getFeatures(t):new Promise((function(t){return t([])}))},n.prototype.getData=function(t){return this.cn&&this.rendered?this.cn.getData(t):null},n.prototype.render=function(t,n){var i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,n)},n.prototype.unrender=function(){this.rendered=!1},n.prototype.setMapInternal=function(t){t||this.unrender(),this.set(es,t)},n.prototype.getMapInternal=function(){return this.get(es)},n.prototype.setMap=function(t){this.en&&($(this.en),this.en=null),t||this.changed(),this.sn&&($(this.sn),this.sn=null),t&&(this.en=Y(t,hs,(function(t){var n=t.frameState.layerStatesArray,i=this.getLayerState(!1);Mt(!n.some((function(t){return t.layer===i.layer})),67),n.push(i)}),this),this.sn=Y(this,N,t.render,t),this.changed())},n.prototype.setSource=function(t){this.set(rs,t)},n.prototype.getRenderer=function(){return this.cn||(this.cn=this.createRenderer()),this.cn},n.prototype.hasRenderer=function(){return!!this.cn},n.prototype.createRenderer=function(){return null},n.prototype.disposeInternal=function(){this.cn&&(this.cn.dispose(),delete this.cn),this.setSource(null),t.prototype.disposeInternal.call(this)},n}(as),gs=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function xs(t,n){Jo.expire()}var js=function(t){function n(n){var i=t.call(this)||this;return i.vn=n,i}return gs(n,t),n.prototype.dispatchRenderEvent=function(t,n){r()},n.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;an(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),un(r,i)},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e,o,s,a){var u,c=n.viewState;function h(t,n,i,r){return e.call(o,n,t?i:null,r)}var f=c.projection,l=sr(t.slice(),f),v=[[0,0]];if(f.canWrapX()&&r){var d=Qn(f.getExtent());v.push([-d,0],[d,0])}for(var p=n.layerStatesArray,y=p.length,m=[],w=[],b=0;b<v.length;b++)for(var g=y-1;g>=0;--g){var x=p[g],j=x.layer;if(j.hasRenderer()&&ws(x,c)&&s.call(a,j)){var S=j.getRenderer(),k=j.getSource();if(S&&k){var M=k.getWrapX()?l:t,_=h.bind(null,x.managed);w[0]=M[0]+v[b][0],w[1]=M[1]+v[b][1],u=S.forEachFeatureAtCoordinate(w,n,i,_,m)}if(u)return u}}if(0!==m.length){var O=1/m.length;return m.forEach((function(t,n){return t.distanceSq+=n*O})),m.sort((function(t,n){return t.distanceSq-n.distanceSq})),m.some((function(t){return u=t.callback(t.feature,t.layer,t.geometry)})),u}},n.prototype.forEachLayerAtPixel=function(t,n,i,e,o){return r()},n.prototype.hasFeatureAtCoordinate=function(t,n,i,r,e,o){return void 0!==this.forEachFeatureAtCoordinate(t,n,i,r,k,this,e,o)},n.prototype.getMap=function(){return this.vn},n.prototype.renderFrame=function(t){r()},n.prototype.scheduleExpireIconCache=function(t){Jo.canExpireCache()&&t.postRenderFunctions.push(xs)},n}(v),Ss=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ks=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.inversePixelTransform=i,o.frameState=r,o.context=e,o}return Ss(n,t),n}(f),Ms="ol-hidden",_s="ol-selectable",Os="ol-unselectable",Ts="ol-unsupported",Es="ol-control",As="ol-collapsed",Cs=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"),Rs=["style","variant","weight","size","lineHeight","family"],Ps=function(t){var n=t.match(Cs);if(!n)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,e=Rs.length;r<e;++r){var o=n[r+1];void 0!==o&&(i[Rs[r]]=o)}return i.families=i.family.split(/,\s?/),i};function Is(t){return 1===t?"":String(Math.round(100*t)/100)}var Ns="10px sans-serif",zs="#000",Fs="round",Ls=[],Gs="round",Ds=10,Us="#000",qs="center",Bs="middle",Ws=[0,0,0,0],Vs=new ot,Xs=new I;Xs.setSize=function(){console.warn("labelCache is deprecated.")};var Hs,Js,Ks=null,Ys={},Zs=function(){var t,n,i="32px ",r=["monospace","serif"],e=r.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var u=!0,c=0;c<e;++c){var h=r[c];if(n=ta(t+" "+s+" "+i+h,o),a!=h){var f=ta(t+" "+s+" "+i+a+","+h,o);u=u&&f!=n}}return!!u}function a(){for(var n=!0,i=Vs.getKeys(),r=0,e=i.length;r<e;++r){var o=i[r];Vs.get(o)<100&&(s.apply(this,o.split("\n"))?(A(Ys),Ks=null,Hs=void 0,Vs.set(o,100)):(Vs.set(o,Vs.get(o)+1,!0),n=!1))}n&&(clearInterval(t),t=void 0)}return function(n){var i=Ps(n);if(i)for(var r=i.families,e=0,o=r.length;e<o;++e){var u=r[e],c=i.style+"\n"+i.weight+"\n"+u;void 0===Vs.get(c)&&(Vs.set(c,100,!0),s(i.style,i.weight,u)||(Vs.set(c,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),$s=function(t){var n=Ys[t];if(null==n){if(Xt){var i=Ps(t),r=Qs(t,"Žg");n=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else Js||((Js=document.createElement("div")).innerHTML="M",Js.style.minHeight="0",Js.style.maxHeight="none",Js.style.height="auto",Js.style.padding="0",Js.style.border="none",Js.style.position="absolute",Js.style.display="block",Js.style.left="-99999px"),Js.style.font=t,document.body.appendChild(Js),n=Js.offsetHeight,document.body.removeChild(Js);Ys[t]=n}return n};function Qs(t,n){return Ks||(Ks=_o(1,1)),t!=Hs&&(Ks.font=t,Hs=Ks.font),Ks.measureText(n)}function ta(t,n){return Qs(t,n).width}function na(t,n,i){if(n in i)return i[n];var r=ta(t,n);return i[n]=r,r}function ia(t,n){for(var i=[],r=[],e=[],o=0,s=0,a=0,u=0,c=0,h=n.length;c<=h;c+=2){var f=n[c];if("\n"!==f&&c!==h){var l=n[c+1]||t.font,v=ta(l,f);i.push(v),s+=v;var d=$s(l);r.push(d),u=Math.max(u,d)}else o=Math.max(o,s),e.push(s),s=0,a+=u}return{width:o,height:a,widths:i,heights:r,lineWidths:e}}function ra(t,n,i,r,e,o,s,a,u,c,h){t.save(),1!==i&&(t.globalAlpha*=i),n&&t.setTransform.apply(t,n),r.contextInstructions?(t.translate(u,c),t.scale(h[0],h[1]),function(t,n){for(var i=t.contextInstructions,r=0,e=i.length;r<e;r+=2)Array.isArray(i[r+1])?n[i[r]].apply(n,i[r+1]):n[i[r]]=i[r+1]}(r,t)):h[0]<0||h[1]<0?(t.translate(u,c),t.scale(h[0],h[1]),t.drawImage(r,e,o,s,a,0,0,s,a)):t.drawImage(r,e,o,s,a,u,c,s*h[0],a*h[1]),t.restore()}var ea=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),oa=function(t){function n(n){var i=t.call(this,n)||this;i.dn=Y(Vs,l,n.redrawText.bind(n)),i.pn=document.createElement("div");var r=i.pn.style;r.position="absolute",r.width="100%",r.height="100%",r.zIndex="0",i.pn.className="ol-unselectable ol-layers";var e=n.getViewport();return e.insertBefore(i.pn,e.firstChild||null),i.yn=[],i.mn=!0,i}return ea(n,t),n.prototype.dispatchRenderEvent=function(t,n){var i=this.getMap();if(i.hasListener(t)){var r=new ks(t,void 0,n);i.dispatchEvent(r)}},n.prototype.disposeInternal=function(){$(this.dn),this.pn.parentNode.removeChild(this.pn),t.prototype.disposeInternal.call(this)},n.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(hs,t);var n=t.layerStatesArray.sort((function(t,n){return t.zIndex-n.zIndex})),i=t.viewState;this.yn.length=0;for(var r=[],e=null,o=0,s=n.length;o<s;++o){var a=n[o];t.layerIndex=o;var u=a.layer,c=u.getSourceState();if(!ws(a,i)||c!=ps&&c!=vs)u.unrender();else{var h=u.render(t,e);h&&(h!==e&&(this.yn.push(h),e=h),"getDeclutter"in u&&r.push(u))}}for(o=r.length-1;o>=0;--o)r[o].renderDeclutter(t);Ro(this.pn,this.yn),this.dispatchRenderEvent(fs,t),this.mn||(this.pn.style.display="",this.mn=!0),this.scheduleExpireIconCache(t)}else this.mn&&(this.pn.style.display="none",this.mn=!1)},n.prototype.forEachLayerAtPixel=function(t,n,i,r,e){for(var o=n.viewState,s=n.layerStatesArray,a=s.length-1;a>=0;--a){var u=s[a],c=u.layer;if(c.hasRenderer()&&ws(u,o)&&e(c)){var h=c.getRenderer().getDataAtPixel(t,n,i);if(h){var f=r(c,h);if(f)return f}}}},n}(js),sa=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),aa=function(t){function n(n,i){var r=t.call(this,n)||this;return r.layer=i,r}return sa(n,t),n}(f),ua="layers",ca=function(t){function n(n){var i=this,r=n||{},e=E({},r);delete e.layers;var o=r.layers;return(i=t.call(this,e)||this).on,i.once,i.un,i.wn=[],i.bn={},i.addChangeListener(ua,i.gn),o?Array.isArray(o)?o=new ft(o.slice(),{unique:!0}):Mt("function"==typeof o.getArray,43):o=new ft(void 0,{unique:!0}),i.setLayers(o),i}return sa(n,t),n.prototype.xn=function(){this.changed()},n.prototype.gn=function(){this.wn.forEach($),this.wn.length=0;var t=this.getLayers();for(var n in this.wn.push(Y(t,st,this.jn,this),Y(t,at,this.Sn,this)),this.bn)this.bn[n].forEach($);A(this.bn);for(var i=t.getArray(),r=0,e=i.length;r<e;r++){var o=i[r];this.kn(o),this.dispatchEvent(new aa("addlayer",o))}this.changed()},n.prototype.kn=function(t){var i=[Y(t,l,this.xn,this),Y(t,N,this.xn,this)];t instanceof n&&i.push(Y(t,"addlayer",this.Mn,this),Y(t,"removelayer",this._n,this)),this.bn[o(t)]=i},n.prototype.Mn=function(t){this.dispatchEvent(new aa("addlayer",t.layer))},n.prototype._n=function(t){this.dispatchEvent(new aa("removelayer",t.layer))},n.prototype.jn=function(t){var n=t.element;this.kn(n),this.dispatchEvent(new aa("addlayer",n)),this.changed()},n.prototype.Sn=function(t){var n=t.element,i=o(n);this.bn[i].forEach($),delete this.bn[i],this.dispatchEvent(new aa("removelayer",n)),this.changed()},n.prototype.getLayers=function(){return this.get(ua)},n.prototype.setLayers=function(t){var n=this.getLayers();if(n)for(var i=n.getArray(),r=0,e=i.length;r<e;++r)this.dispatchEvent(new aa("removelayer",i[r]));this.set(ua,t)},n.prototype.getLayersArray=function(t){var n=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(n)})),n},n.prototype.getLayerStatesArray=function(t){var n=void 0!==t?t:[],i=n.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(n)}));var r=this.getLayerState(),e=r.zIndex;t||void 0!==r.zIndex||(e=0);for(var o=i,s=n.length;o<s;o++){var a=n[o];a.opacity*=r.opacity,a.visible=a.visible&&r.visible,a.maxResolution=Math.min(a.maxResolution,r.maxResolution),a.minResolution=Math.max(a.minResolution,r.minResolution),a.minZoom=Math.max(a.minZoom,r.minZoom),a.maxZoom=Math.min(a.maxZoom,r.maxZoom),void 0!==r.extent&&(void 0!==a.extent?a.extent=Yn(a.extent,r.extent):a.extent=r.extent),void 0===a.zIndex&&(a.zIndex=e)}return n},n.prototype.getSourceState=function(){return ps},n}(as),ha=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fa=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.map=i,e.frameState=void 0!==r?r:null,e}return ha(n,t),n}(f),la=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),va=function(t){function n(n,i,r,e,o){var s=t.call(this,n,i,o)||this;return s.originalEvent=r,s.On=null,s.Tn=null,s.dragging=void 0!==e&&e,s}return la(n,t),Object.defineProperty(n.prototype,"pixel",{get:function(){return this.On||(this.On=this.map.getEventPixel(this.originalEvent)),this.On},set:function(t){this.On=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"coordinate",{get:function(){return this.Tn||(this.Tn=this.map.getCoordinateFromPixel(this.pixel)),this.Tn},set:function(t){this.Tn=t},enumerable:!1,configurable:!0}),n.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},n.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},n}(fa),da={SINGLECLICK:"singleclick",CLICK:G,DBLCLICK:D,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},pa="pointermove",ya="pointerdown",ma="pointerup",wa="pointerout",ba=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ga=function(t){function n(n,i){var r=t.call(this,n)||this;r.vn=n,r.En,r.An=!1,r.Cn=!1,r.Rn=[],r.Pn=void 0===i?1:i,r.In=null;var e=r.vn.getViewport();return r.Nn=0,r.zn={},r.pn=e,r.Fn=Y(e,ya,r.Ln,r),r.Gn,r.Dn=Y(e,pa,r.Un,r),r.qn=r.Bn.bind(r),r.pn.addEventListener(J,r.qn,!!Jt&&{passive:!1}),r}return ba(n,t),n.prototype.Wn=function(t){var n=new va(da.CLICK,this.vn,t);this.dispatchEvent(n),void 0!==this.En?(clearTimeout(this.En),this.En=void 0,n=new va(da.DBLCLICK,this.vn,t),this.dispatchEvent(n)):this.En=setTimeout(function(){this.En=void 0;var n=new va(da.SINGLECLICK,this.vn,t);this.dispatchEvent(n)}.bind(this),250)},n.prototype.Vn=function(t){var n=t;n.type==da.POINTERUP||n.type==da.POINTERCANCEL?delete this.zn[n.pointerId]:n.type==da.POINTERDOWN&&(this.zn[n.pointerId]=!0),this.Nn=Object.keys(this.zn).length},n.prototype.Xn=function(t){this.Vn(t);var n=new va(da.POINTERUP,this.vn,t);this.dispatchEvent(n),this.An&&!n.defaultPrevented&&!this.Cn&&this.Hn(t)&&this.Wn(this.In),0===this.Nn&&(this.Rn.forEach($),this.Rn.length=0,this.Cn=!1,this.In=null)},n.prototype.Hn=function(t){return 0===t.button},n.prototype.Ln=function(t){this.An=0===this.Nn,this.Vn(t);var n=new va(da.POINTERDOWN,this.vn,t);for(var i in this.dispatchEvent(n),this.In={},t){var r=t[i];this.In[i]="function"==typeof r?_:r}if(0===this.Rn.length){var e=this.vn.getOwnerDocument();this.Rn.push(Y(e,da.POINTERMOVE,this.Jn,this),Y(e,da.POINTERUP,this.Xn,this),Y(this.pn,da.POINTERCANCEL,this.Xn,this)),this.pn.getRootNode&&this.pn.getRootNode()!==e&&this.Rn.push(Y(this.pn.getRootNode(),da.POINTERUP,this.Xn,this))}},n.prototype.Jn=function(t){if(this.Kn(t)){this.Cn=!0;var n=new va(da.POINTERDRAG,this.vn,t,this.Cn);this.dispatchEvent(n)}},n.prototype.Un=function(t){this.Gn=t;var n=!(!this.In||!this.Kn(t));this.dispatchEvent(new va(t.type,this.vn,t,n))},n.prototype.Bn=function(t){var n=this.Gn;n&&!n.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},n.prototype.Kn=function(t){return this.Cn||Math.abs(t.clientX-this.In.clientX)>this.Pn||Math.abs(t.clientY-this.In.clientY)>this.Pn},n.prototype.disposeInternal=function(){this.Dn&&($(this.Dn),this.Dn=null),this.pn.removeEventListener(J,this.qn),this.Fn&&($(this.Fn),this.Fn=null),this.Rn.forEach($),this.Rn.length=0,this.pn=null,t.prototype.disposeInternal.call(this)},n}(I),xa="postrender",ja="movestart",Sa="moveend",ka="layergroup",Ma="size",_a="target",Oa="view",Ta=1/0,Ea=function(){function t(t,n){this.Yn=t,this.Zn=n,this.$n=[],this.Qn=[],this.ti={}}return t.prototype.clear=function(){this.$n.length=0,this.Qn.length=0,A(this.ti)},t.prototype.dequeue=function(){var t=this.$n,n=this.Qn,i=t[0];1==t.length?(t.length=0,n.length=0):(t[0]=t.pop(),n[0]=n.pop(),this.ni(0));var r=this.Zn(i);return delete this.ti[r],i},t.prototype.enqueue=function(t){Mt(!(this.Zn(t)in this.ti),31);var n=this.Yn(t);return n!=Ta&&(this.$n.push(t),this.Qn.push(n),this.ti[this.Zn(t)]=!0,this.ii(0,this.$n.length-1),!0)},t.prototype.getCount=function(){return this.$n.length},t.prototype.ri=function(t){return 2*t+1},t.prototype.ei=function(t){return 2*t+2},t.prototype.oi=function(t){return t-1>>1},t.prototype.si=function(){var t;for(t=(this.$n.length>>1)-1;t>=0;t--)this.ni(t)},t.prototype.isEmpty=function(){return 0===this.$n.length},t.prototype.isKeyQueued=function(t){return t in this.ti},t.prototype.isQueued=function(t){return this.isKeyQueued(this.Zn(t))},t.prototype.ni=function(t){for(var n=this.$n,i=this.Qn,r=n.length,e=n[t],o=i[t],s=t;t<r>>1;){var a=this.ri(t),u=this.ei(t),c=u<r&&i[u]<i[a]?u:a;n[t]=n[c],i[t]=i[c],t=c}n[t]=e,i[t]=o,this.ii(s,t)},t.prototype.ii=function(t,n){for(var i=this.$n,r=this.Qn,e=i[n],o=r[n];n>t;){var s=this.oi(n);if(!(r[s]>o))break;i[n]=i[s],r[n]=r[s],n=s}i[n]=e,r[n]=o},t.prototype.reprioritize=function(){var t,n,i,r=this.Yn,e=this.$n,o=this.Qn,s=0,a=e.length;for(n=0;n<a;++n)(i=r(t=e[n]))==Ta?delete this.ti[this.Zn(t)]:(o[s]=i,e[s++]=t);e.length=s,o.length=s,this.si()},t}(),Aa=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ca=function(t){function n(n,i){var r=t.call(this,(function(t){return n.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return r.ai=r.handleTileChange.bind(r),r.ui=i,r.ci=0,r.hi={},r}return Aa(n,t),n.prototype.enqueue=function(n){var i=t.prototype.enqueue.call(this,n);i&&n[0].addEventListener(N,this.ai);return i},n.prototype.getTilesLoading=function(){return this.ci},n.prototype.handleTileChange=function(t){var n=t.target,i=n.getState();if(i===dt||i===pt||i===yt){n.removeEventListener(N,this.ai);var r=n.getKey();r in this.hi&&(delete this.hi[r],--this.ci),this.ui()}},n.prototype.loadMoreTiles=function(t,n){for(var i,r,e=0;this.ci<t&&e<n&&this.getCount()>0;)r=(i=this.dequeue()[0]).getKey(),i.getState()!==lt||r in this.hi||(this.hi[r]=!0,++this.ci,++e,i.load())},n}(Ea);function Ra(t,n,i,r,e){if(!t||!(i in t.wantedTiles))return Ta;if(!t.wantedTiles[i][n.getKey()])return Ta;var o=t.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(e)+Math.sqrt(s*s+a*a)/e}var Pa=0,Ia=1,Na={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},za=256;function Fa(t,n,i){return function(r,e,o,s,a){if(r){if(!e&&!n)return r;var u=n?0:o[0]*e,c=n?0:o[1]*e,h=a?a[0]:0,f=a?a[1]:0,l=t[0]+u/2+h,v=t[2]-u/2+h,d=t[1]+c/2+f,p=t[3]-c/2+f;l>v&&(v=l=(v+l)/2),d>p&&(p=d=(p+d)/2);var y=ui(r[0],l,v),m=ui(r[1],d,p);if(s&&i&&e){var w=30*e;y+=-w*Math.log(1+Math.max(0,l-r[0])/w)+w*Math.log(1+Math.max(0,r[0]-v)/w),m+=-w*Math.log(1+Math.max(0,d-r[1])/w)+w*Math.log(1+Math.max(0,r[1]-p)/w)}return[y,m]}}}function La(t){return t}function Ga(t,n,i,r){var e=Qn(n)/i[0],o=Kn(n)/i[1];return r?Math.min(t,Math.max(e,o)):Math.min(t,Math.min(e,o))}function Da(t,n,i){var r=Math.min(t,n);return r*=Math.log(1+50*Math.max(0,t/n-1))/50+1,i&&(r=Math.max(r,i),r/=Math.log(1+50*Math.max(0,i/t-1))/50+1),ui(r,i/2,2*n)}function Ua(t,n,i,r){return function(e,o,s,a){if(void 0!==e){var u=t[0],c=t[t.length-1],h=i?Ga(u,i,s,r):u;if(a)return void 0===n||n?Da(e,h,c):ui(e,c,h);var f=Math.min(h,e),l=Math.floor(m(t,f,o));return t[l]>h&&l<t.length-1?t[l+1]:t[l]}}}function qa(t,n,i,r,e,o){return function(s,a,u,c){if(void 0!==s){var h=e?Ga(n,e,u,o):n,f=void 0!==i?i:0;if(c)return void 0===r||r?Da(s,h,f):ui(s,f,h);var l=Math.ceil(Math.log(n/h)/Math.log(t)-1e-9),v=-a*(.5-1e-9)+.5,d=Math.min(h,s),p=Math.floor(Math.log(n/d)/Math.log(t)+v),y=Math.max(l,p);return ui(n/Math.pow(t,y),f,h)}}}function Ba(t,n,i,r,e){return function(o,s,a,u){if(void 0!==o){var c=r?Ga(t,r,a,e):t;return(void 0===i||i)&&u?Da(o,c,n):ui(o,n,c)}}}function Wa(t){return void 0!==t?0:void 0}function Va(t){return void 0!==t?t:void 0}function Xa(t){var n=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/n+.5)*n:void 0}}function Ha(t){var n=t||pi(5);return function(t,i){return i?t:void 0!==t?Math.abs(t)<=n?0:t:void 0}}var Ja=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Ka(t,n){setTimeout((function(){t(n)}),0)}function Ya(t){if(void 0!==t.extent){var n=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Fa(t.extent,t.constrainOnlyCenter,n)}var i=Sr(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&i.isGlobal()){var r=i.getExtent().slice();return r[0]=-1/0,r[2]=1/0,Fa(r,!1,!1)}return La}function Za(t){var n,i,r,e=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,h=Sr(t.projection,"EPSG:3857"),f=h.getExtent(),l=t.constrainOnlyCenter,v=t.extent;if(a||v||!h.isGlobal()||(l=!1,v=f),void 0!==t.resolutions){var d=t.resolutions;i=d[e],r=void 0!==d[o]?d[o]:d[d.length-1],n=t.constrainResolution?Ua(d,u,!l&&v,c):Ba(i,r,u,!l&&v,c)}else{var p=(f?Math.max(Qn(f),Kn(f)):360*Ft[Gt.DEGREES]/h.getMetersPerUnit())/za/Math.pow(2,0),y=p/Math.pow(2,28);void 0!==(i=t.maxResolution)?e=0:i=p/Math.pow(s,e),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(s,o):p/Math.pow(s,o):y),o=e+Math.floor(Math.log(i/r)/Math.log(s)),r=i/Math.pow(s,o-e),n=t.constrainResolution?qa(s,i,r,u,!l&&v,c):Ba(i,r,u,!l&&v,c)}return{constraint:n,maxResolution:i,minResolution:r,minZoom:e,zoomFactor:s}}function $a(t){if(void 0===t.enableRotation||t.enableRotation){var n=t.constrainRotation;return void 0===n||!0===n?Ha():!1===n?Va:"number"==typeof n?Xa(n):Va}return Wa}function Qa(t){return!(t.sourceCenter&&t.targetCenter&&!Qi(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function tu(t,n,i,r,e){var o=Math.cos(-e),s=Math.sin(-e),a=t[0]*o-t[1]*s,u=t[1]*o+t[0]*s;return[(a+=(n[0]/2-i[0])*r)*o-(u+=(i[1]-n[1]/2)*r)*(s=-s),u*o+a*s]}var nu=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=E({},n);return i.fi=[0,0],i.li=[],i.vi,i.di=Sr(r.projection,"EPSG:3857"),i.yi=[100,100],i.mi=null,i.wi,i.bi,i.gi=null,i.xi,i.ji,i.Si=void 0,r.projection&&dr(),r.center&&(r.center=zr(r.center,i.di)),r.extent&&(r.extent=Lr(r.extent,i.di)),i.ki(r),i}return Ja(n,t),n.prototype.ki=function(t){var n=E({},t);for(var i in Na)delete n[i];this.setProperties(n,!0);var r=Za(t);this.Mi=r.maxResolution,this._i=r.minResolution,this.Oi=r.zoomFactor,this.Ti=t.resolutions,this.Ei=t.padding,this.Ai=r.minZoom;var e=Ya(t),o=r.constraint,s=$a(t);this.Ci={center:e,resolution:o,rotation:s},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(n.prototype,"padding",{get:function(){return this.Ei},set:function(t){var n=this.Ei;this.Ei=t;var i=this.getCenter();if(i){var r=t||[0,0,0,0];n=n||[0,0,0,0];var e=this.getResolution(),o=e/2*(r[3]-n[3]+n[1]-r[1]),s=e/2*(r[0]-n[0]+n[2]-r[2]);this.setCenterInternal([i[0]+o,i[1]-s])}},enumerable:!1,configurable:!0}),n.prototype.Ri=function(t){var n=this.getProperties();return void 0!==n.resolution?n.resolution=this.getResolution():n.zoom=this.getZoom(),n.center=this.getCenterInternal(),n.rotation=this.getRotation(),E({},n,t)},n.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var n=new Array(arguments.length),i=0;i<n.length;++i){var r=arguments[i];r.center&&((r=E({},r)).center=zr(r.center,this.getProjection())),r.anchor&&((r=E({},r)).anchor=zr(r.anchor,this.getProjection())),n[i]=r}this.animateInternal.apply(this,n)},n.prototype.animateInternal=function(t){var n,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(n=arguments[i-1],--i);for(var r=0;r<i&&!this.isDef();++r){var e=arguments[r];e.center&&this.setCenterInternal(e.center),void 0!==e.zoom?this.setZoom(e.zoom):e.resolution&&this.setResolution(e.resolution),void 0!==e.rotation&&this.setRotation(e.rotation)}if(r!==i){for(var o=Date.now(),s=this.mi.slice(),a=this.wi,u=this.bi,c=[];r<i;++r){var h=arguments[r],f={start:o,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||bt,callback:n};if(h.center&&(f.sourceCenter=s,f.targetCenter=h.center.slice(),s=f.targetCenter),void 0!==h.zoom?(f.sourceResolution=a,f.targetResolution=this.getResolutionForZoom(h.zoom),a=f.targetResolution):h.resolution&&(f.sourceResolution=a,f.targetResolution=h.resolution,a=f.targetResolution),void 0!==h.rotation){f.sourceRotation=u;var l=yi(h.rotation-u+Math.PI,2*Math.PI)-Math.PI;f.targetRotation=u+l,u=f.targetRotation}Qa(f)?f.complete=!0:o+=f.duration,c.push(f)}this.li.push(c),this.setHint(Pa,1),this.Pi()}else n&&Ka(n,!0)},n.prototype.getAnimating=function(){return this.fi[Pa]>0},n.prototype.getInteracting=function(){return this.fi[Ia]>0},n.prototype.cancelAnimations=function(){var t;this.setHint(Pa,-this.fi[Pa]);for(var n=0,i=this.li.length;n<i;++n){var r=this.li[n];if(r[0].callback&&Ka(r[0].callback,!1),!t)for(var e=0,o=r.length;e<o;++e){var s=r[e];if(!s.complete){t=s.anchor;break}}}this.li.length=0,this.Si=t,this.gi=null,this.xi=NaN,this.ji=NaN},n.prototype.Pi=function(){if(void 0!==this.vi&&(cancelAnimationFrame(this.vi),this.vi=void 0),this.getAnimating()){for(var t=Date.now(),n=!1,i=this.li.length-1;i>=0;--i){for(var r=this.li[i],e=!0,o=0,s=r.length;o<s;++o){var a=r[o];if(!a.complete){var u=t-a.start,c=a.duration>0?u/a.duration:1;c>=1?(a.complete=!0,c=1):e=!1;var h=a.easing(c);if(a.sourceCenter){var f=a.sourceCenter[0],l=a.sourceCenter[1],v=a.targetCenter[0],d=a.targetCenter[1];this.gi=a.targetCenter;var p=f+h*(v-f),y=l+h*(d-l);this.mi=[p,y]}if(a.sourceResolution&&a.targetResolution){var m=1===h?a.targetResolution:a.sourceResolution+h*(a.targetResolution-a.sourceResolution);if(a.anchor){var w=this.Ii(this.getRotation()),b=this.Ci.resolution(m,0,w,!0);this.mi=this.calculateCenterZoom(b,a.anchor)}this.xi=a.targetResolution,this.wi=m,this.Ni(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var g=1===h?yi(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+h*(a.targetRotation-a.sourceRotation);if(a.anchor){var x=this.Ci.rotation(g,!0);this.mi=this.calculateCenterRotate(x,a.anchor)}this.ji=a.targetRotation,this.bi=g}if(this.Ni(!0),n=!0,!a.complete)break}}if(e){this.li[i]=null,this.setHint(Pa,-1),this.gi=null,this.xi=NaN,this.ji=NaN;var j=r[0].callback;j&&Ka(j,!0)}}this.li=this.li.filter(Boolean),n&&void 0===this.vi&&(this.vi=requestAnimationFrame(this.Pi.bind(this)))}},n.prototype.calculateCenterRotate=function(t,n){var i,r=this.getCenterInternal();return void 0!==r&&(tr(i=[r[0]-n[0],r[1]-n[1]],t-this.getRotation()),Ji(i,n)),i},n.prototype.calculateCenterZoom=function(t,n){var i,r=this.getCenterInternal(),e=this.getResolution();void 0!==r&&void 0!==e&&(i=[n[0]-t*(n[0]-r[0])/e,n[1]-t*(n[1]-r[1])/e]);return i},n.prototype.Ii=function(t){var n=this.yi;if(t){var i=n[0],r=n[1];return[Math.abs(i*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(r*Math.cos(t))]}return n},n.prototype.setViewportSize=function(t){this.yi=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},n.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Nr(t,this.getProjection()):t},n.prototype.getCenterInternal=function(){return this.get(Na.CENTER)},n.prototype.getConstraints=function(){return this.Ci},n.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},n.prototype.getHints=function(t){return void 0!==t?(t[0]=this.fi[0],t[1]=this.fi[1],t):this.fi.slice()},n.prototype.calculateExtent=function(t){return Fr(this.calculateExtentInternal(t),this.getProjection())},n.prototype.calculateExtentInternal=function(t){var n=t||this.zi(),i=this.getCenterInternal();Mt(i,1);var r=this.getResolution();Mt(void 0!==r,2);var e=this.getRotation();return Mt(void 0!==e,3),Jn(i,r,e,n)},n.prototype.getMaxResolution=function(){return this.Mi},n.prototype.getMinResolution=function(){return this._i},n.prototype.getMaxZoom=function(){return this.getZoomForResolution(this._i)},n.prototype.setMaxZoom=function(t){this.ki(this.Ri({maxZoom:t}))},n.prototype.getMinZoom=function(){return this.getZoomForResolution(this.Mi)},n.prototype.setMinZoom=function(t){this.ki(this.Ri({minZoom:t}))},n.prototype.setConstrainResolution=function(t){this.ki(this.Ri({constrainResolution:t}))},n.prototype.getProjection=function(){return this.di},n.prototype.getResolution=function(){return this.get(Na.RESOLUTION)},n.prototype.getResolutions=function(){return this.Ti},n.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(Lr(t,this.getProjection()),n)},n.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.zi(),r=Qn(t)/i[0],e=Kn(t)/i[1];return Math.max(r,e)},n.prototype.getResolutionForValueFunction=function(t){var n=t||2,i=this.getConstrainedResolution(this.Mi),r=this._i,e=Math.log(i/r)/Math.log(n);return function(t){return i/Math.pow(n,t*e)}},n.prototype.getRotation=function(){return this.get(Na.ROTATION)},n.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),i=this.getConstrainedResolution(this.Mi),r=this._i,e=Math.log(i/r)/n;return function(t){return Math.log(i/t)/n/e}},n.prototype.zi=function(t){var n=this.Ii(t),i=this.Ei;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n},n.prototype.getState=function(){var t=this.getProjection(),n=this.getResolution(),i=this.getRotation(),r=this.getCenterInternal(),e=this.Ei;if(e){var o=this.zi();r=tu(r,this.Ii(),[o[0]/2+e[3],o[1]/2+e[0]],n,i)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:n,nextCenter:this.gi,nextResolution:this.xi,nextRotation:this.ji,rotation:i,zoom:this.getZoom()}},n.prototype.getZoom=function(){var t,n=this.getResolution();return void 0!==n&&(t=this.getZoomForResolution(n)),t},n.prototype.getZoomForResolution=function(t){var n,i,r=this.Ai||0;if(this.Ti){var e=m(this.Ti,t,1);r=e,n=this.Ti[e],i=e==this.Ti.length-1?2:n/this.Ti[e+1]}else n=this.Mi,i=this.Oi;return r+Math.log(n/t)/Math.log(i)},n.prototype.getResolutionForZoom=function(t){if(this.Ti){if(this.Ti.length<=1)return 0;var n=ui(Math.floor(t),0,this.Ti.length-2),i=this.Ti[n]/this.Ti[n+1];return this.Ti[n]/Math.pow(i,ui(t-n,0,1))}return this.Mi/Math.pow(this.Oi,t-this.Ai)},n.prototype.fit=function(t,n){var i;if(Mt(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))Mt(!ni(t),25),i=Ze(r=Lr(t,this.getProjection()));else if(t.getType()===Pt.CIRCLE){var r;(i=Ze(r=Lr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),Xn(r))}else{var e=Ir();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,n)},n.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),i=Math.cos(n),r=Math.sin(-n),e=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,u=-1/0,c=-1/0,h=0,f=e.length;h<f;h+=o){var l=e[h]*i-e[h+1]*r,v=e[h]*r+e[h+1]*i;s=Math.min(s,l),a=Math.min(a,v),u=Math.max(u,l),c=Math.max(c,v)}return[s,a,u,c]},n.prototype.fitInternal=function(t,n){var i=n||{},r=i.size;r||(r=this.zi());var e,o=void 0!==i.padding?i.padding:[0,0,0,0],s=void 0!==i.nearest&&i.nearest;e=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;var a=this.rotatedExtentForGeometry(t),u=this.getResolutionForExtentInternal(a,[r[0]-o[1]-o[3],r[1]-o[0]-o[2]]);u=isNaN(u)?e:Math.max(u,e),u=this.getConstrainedResolution(u,s?0:1);var c=this.getRotation(),h=Math.sin(c),f=Math.cos(c),l=Xn(a);l[0]+=(o[1]-o[3])/2*u,l[1]+=(o[0]-o[2])/2*u;var v=l[0]*f-l[1]*h,d=l[1]*f+l[0]*h,p=this.getConstrainedCenter([v,d],u),y=i.callback?i.callback:_;void 0!==i.duration?this.animateInternal({resolution:u,center:p,duration:i.duration,easing:i.easing},y):(this.wi=u,this.mi=p,this.Ni(!1,!0),Ka(y,!0))},n.prototype.centerOn=function(t,n,i){this.centerOnInternal(zr(t,this.getProjection()),n,i)},n.prototype.centerOnInternal=function(t,n,i){this.setCenterInternal(tu(t,n,i,this.getResolution(),this.getRotation()))},n.prototype.calculateCenterShift=function(t,n,i,r){var e,o=this.Ei;if(o&&t){var s=this.zi(-i),a=tu(t,r,[s[0]/2+o[3],s[1]/2+o[0]],n,i);e=[t[0]-a[0],t[1]-a[1]]}return e},n.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},n.prototype.adjustCenter=function(t){var n=Nr(this.mi,this.getProjection());this.setCenter([n[0]+t[0],n[1]+t[1]])},n.prototype.adjustCenterInternal=function(t){var n=this.mi;this.setCenterInternal([n[0]+t[0],n[1]+t[1]])},n.prototype.adjustResolution=function(t,n){var i=n&&zr(n,this.getProjection());this.adjustResolutionInternal(t,i)},n.prototype.adjustResolutionInternal=function(t,n){var i=this.getAnimating()||this.getInteracting(),r=this.Ii(this.getRotation()),e=this.Ci.resolution(this.wi*t,0,r,i);n&&(this.mi=this.calculateCenterZoom(e,n)),this.wi*=t,this.Ni()},n.prototype.adjustZoom=function(t,n){this.adjustResolution(Math.pow(this.Oi,-t),n)},n.prototype.adjustRotation=function(t,n){n&&(n=zr(n,this.getProjection())),this.adjustRotationInternal(t,n)},n.prototype.adjustRotationInternal=function(t,n){var i=this.getAnimating()||this.getInteracting(),r=this.Ci.rotation(this.bi+t,i);n&&(this.mi=this.calculateCenterRotate(r,n)),this.bi+=t,this.Ni()},n.prototype.setCenter=function(t){this.setCenterInternal(t?zr(t,this.getProjection()):t)},n.prototype.setCenterInternal=function(t){this.mi=t,this.Ni()},n.prototype.setHint=function(t,n){return this.fi[t]+=n,this.changed(),this.fi[t]},n.prototype.setResolution=function(t){this.wi=t,this.Ni()},n.prototype.setRotation=function(t){this.bi=t,this.Ni()},n.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},n.prototype.Ni=function(t,n){var i=this.getAnimating()||this.getInteracting()||n,r=this.Ci.rotation(this.bi,i),e=this.Ii(r),o=this.Ci.resolution(this.wi,0,e,i),s=this.Ci.center(this.mi,o,e,i,this.calculateCenterShift(this.mi,o,r,e));this.get(Na.ROTATION)!==r&&this.set(Na.ROTATION,r),this.get(Na.RESOLUTION)!==o&&(this.set(Na.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(Na.CENTER)&&Qi(this.get(Na.CENTER),s)||this.set(Na.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.Si=void 0},n.prototype.resolveConstraints=function(t,n,i){var r=void 0!==t?t:200,e=n||0,o=this.Ci.rotation(this.bi),s=this.Ii(o),a=this.Ci.resolution(this.wi,e,s),u=this.Ci.center(this.mi,a,s,!1,this.calculateCenterShift(this.mi,a,o,s));if(0===r&&!this.Si)return this.wi=a,this.bi=o,this.mi=u,void this.Ni();var c=i||(0===r?this.Si:void 0);this.Si=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&Qi(this.getCenterInternal(),u)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:u,resolution:a,duration:r,easing:wt,anchor:c}))},n.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Ia,1)},n.prototype.endInteraction=function(t,n,i){var r=i&&zr(i,this.getProjection());this.endInteractionInternal(t,n,r)},n.prototype.endInteractionInternal=function(t,n,i){this.setHint(Ia,-1),this.resolveConstraints(t,n,i)},n.prototype.getConstrainedCenter=function(t,n){var i=this.Ii(this.getRotation());return this.Ci.center(t,n||this.getResolution(),i)},n.prototype.getConstrainedZoom=function(t,n){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,n))},n.prototype.getConstrainedResolution=function(t,n){var i=n||0,r=this.Ii(this.getRotation());return this.Ci.resolution(t,i,r)},n}(ot);function iu(t,n,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*n,i[1]=t[1]+2*n,i}function ru(t){return t[0]>0&&t[1]>0}function eu(t,n,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*n+.5|0,i[1]=t[1]*n+.5|0,i}function ou(t,n){return Array.isArray(t)?t:(void 0===n?n=[t,t]:(n[0]=t,n[1]=t),n)}var su=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function au(t){t instanceof bs?t.setMapInternal(null):t instanceof ca&&t.getLayers().forEach(au)}function uu(t,n){if(t instanceof bs)t.setMapInternal(n);else if(t instanceof ca)for(var i=t.getLayers().getArray(),r=0,e=i.length;r<e;++r)uu(i[r],n)}var cu=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=function(t){var n=null;void 0!==t.keyboardEventTarget&&(n="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,r,e,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new ca({layers:t.layers});o[ka]=s,o[_a]=t.target,o[Oa]=t.view instanceof nu?t.view:new nu,void 0!==t.controls&&(Array.isArray(t.controls)?i=new ft(t.controls.slice()):(Mt("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new ft(t.interactions.slice()):(Mt("function"==typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?e=new ft(t.overlays.slice()):(Mt("function"==typeof t.overlays.getArray,49),e=t.overlays):e=new ft;return{controls:i,interactions:r,keyboardEventTarget:n,overlays:e,values:o}}(n);i.Fi,i.Li=i.handleBrowserEvent.bind(i),i.Gi=void 0!==n.maxTilesLoading?n.maxTilesLoading:16,i.Rt=void 0!==n.pixelRatio?n.pixelRatio:Vt,i.Di,i.Ui,i.qi=function(){this.Ui=void 0,this.Bi(Date.now())}.bind(i),i.Wi=[1,0,0,1,0,0],i.Vi=[1,0,0,1,0,0],i.Xi=0,i.Hi=null,i.Ji=null,i.Ki=null,i.Yi=null,i.Zi=null,i.$i=document.createElement("div"),i.$i.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.$i.style.position="relative",i.$i.style.overflow="hidden",i.$i.style.width="100%",i.$i.style.height="100%",i.Qi=document.createElement("div"),i.Qi.style.position="absolute",i.Qi.style.zIndex="0",i.Qi.style.width="100%",i.Qi.style.height="100%",i.Qi.style.pointerEvents="none",i.Qi.className="ol-overlaycontainer",i.$i.appendChild(i.Qi),i.tr=document.createElement("div"),i.tr.style.position="absolute",i.tr.style.zIndex="0",i.tr.style.width="100%",i.tr.style.height="100%",i.tr.style.pointerEvents="none",i.tr.className="ol-overlaycontainer-stopevent",i.$i.appendChild(i.tr),i.nr=null,i.Pn=n.moveTolerance,i.ir=r.keyboardEventTarget,i.rr=null,i.controls=r.controls||new ft,i.interactions=r.interactions||new ft,i.er=r.overlays,i.sr={},i.cn=null,i.ar=[],i.ur=new Ca(i.getTilePriority.bind(i),i.cr.bind(i)),i.addChangeListener(ka,i.hr),i.addChangeListener(Oa,i.lr),i.addChangeListener(Ma,i.vr),i.addChangeListener(_a,i.dr),i.setProperties(r.values);var e=i;return!n.view||n.view instanceof nu||n.view.then((function(t){e.setView(new nu(t))})),i.controls.addEventListener(st,function(t){t.element.setMap(this)}.bind(i)),i.controls.addEventListener(at,function(t){t.element.setMap(null)}.bind(i)),i.interactions.addEventListener(st,function(t){t.element.setMap(this)}.bind(i)),i.interactions.addEventListener(at,function(t){t.element.setMap(null)}.bind(i)),i.er.addEventListener(st,function(t){this.pr(t.element)}.bind(i)),i.er.addEventListener(at,function(t){var n=t.element.getId();void 0!==n&&delete this.sr[n.toString()],t.element.setMap(null)}.bind(i)),i.controls.forEach(function(t){t.setMap(this)}.bind(i)),i.interactions.forEach(function(t){t.setMap(this)}.bind(i)),i.er.forEach(i.pr.bind(i)),i}return su(n,t),n.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},n.prototype.addControl=function(t){this.getControls().push(t)},n.prototype.addInteraction=function(t){this.getInteractions().push(t)},n.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},n.prototype.yr=function(t){uu(t.layer,this)},n.prototype.addOverlay=function(t){this.getOverlays().push(t)},n.prototype.pr=function(t){var n=t.getId();void 0!==n&&(this.sr[n.toString()]=t),t.setMap(this)},n.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},n.prototype.forEachFeatureAtPixel=function(t,n,i){if(this.Hi&&this.cn){var r=this.getCoordinateFromPixelInternal(t),e=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,o=void 0!==i.layerFilter?i.layerFilter:k,s=!1!==i.checkWrapped;return this.cn.forEachFeatureAtCoordinate(r,this.Hi,e,s,n,null,o,null)}},n.prototype.getFeaturesAtPixel=function(t,n){var i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),n),i},n.prototype.getAllLayers=function(){var t=[];return function n(i){i.forEach((function(i){i instanceof ca?n(i.getLayers()):t.push(i)}))}(this.getLayers()),t},n.prototype.forEachLayerAtPixel=function(t,n,i){if(this.Hi&&this.cn){var r=i||{},e=void 0!==r.hitTolerance?r.hitTolerance:0,o=r.layerFilter||k;return this.cn.forEachLayerAtPixel(t,this.Hi,e,n,o)}},n.prototype.hasFeatureAtPixel=function(t,n){if(!this.Hi||!this.cn)return!1;var i=this.getCoordinateFromPixelInternal(t),r=void 0!==(n=void 0!==n?n:{}).layerFilter?n.layerFilter:k,e=void 0!==n.hitTolerance?n.hitTolerance:0,o=!1!==n.checkWrapped;return this.cn.hasFeatureAtCoordinate(i,this.Hi,e,o,r,null)},n.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},n.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},n.prototype.getEventPixel=function(t){var n=this.$i.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-n.left,i.clientY-n.top]},n.prototype.getTarget=function(){return this.get(_a)},n.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},n.prototype.getCoordinateFromPixel=function(t){return Nr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},n.prototype.getCoordinateFromPixelInternal=function(t){var n=this.Hi;return n?nn(n.pixelToCoordinateTransform,t.slice()):null},n.prototype.getControls=function(){return this.controls},n.prototype.getOverlays=function(){return this.er},n.prototype.getOverlayById=function(t){var n=this.sr[t.toString()];return void 0!==n?n:null},n.prototype.getInteractions=function(){return this.interactions},n.prototype.getLayerGroup=function(){return this.get(ka)},n.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof ft)n.setLayers(t);else{var i=n.getLayers();i.clear(),i.extend(t)}},n.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},n.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n<i;++n){var r=t[n];if(r.visible){var e=r.layer.getRenderer();if(e&&!e.ready)return!0;var o=r.layer.getSource();if(o&&o.loading)return!0}}return!1},n.prototype.getPixelFromCoordinate=function(t){var n=zr(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},n.prototype.getPixelFromCoordinateInternal=function(t){var n=this.Hi;return n?nn(n.coordinateToPixelTransform,t.slice(0,2)):null},n.prototype.getRenderer=function(){return this.cn},n.prototype.getSize=function(){return this.get(Ma)},n.prototype.getView=function(){return this.get(Oa)},n.prototype.getViewport=function(){return this.$i},n.prototype.getOverlayContainer=function(){return this.Qi},n.prototype.getOverlayContainerStopEvent=function(){return this.tr},n.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},n.prototype.getTilePriority=function(t,n,i,r){return Ra(this.Hi,t,n,i,r)},n.prototype.handleBrowserEvent=function(t,n){var i=n||t.type,r=new va(i,this,t);this.handleMapBrowserEvent(r)},n.prototype.handleMapBrowserEvent=function(t){if(this.Hi){var n=t.originalEvent,i=n.type;if(i===ya||i===K||i===W){var r=this.getOwnerDocument(),e=this.$i.getRootNode?this.$i.getRootNode():r,o=n.target;if(this.tr.contains(o)||!(e===r?r.documentElement:e).contains(o))return}if(t.frameState=this.Hi,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var u=s[a];if(u.getMap()===this&&u.getActive()&&this.getTargetElement())if(!u.handleEvent(t)||t.propagationStopped)break}}},n.prototype.handlePostRender=function(){var t=this.Hi,n=this.ur;if(!n.isEmpty()){var i=this.Gi,r=i;if(t){var e=t.viewHints;if(e[Pa]||e[Ia]){var o=Date.now()-t.time>8;i=o?0:8,r=o?0:2}}n.getTilesLoading()<i&&(n.reprioritize(),n.loadMoreTiles(i,r))}t&&this.cn&&this.hasListener(ls)&&!t.animate&&this.Fi&&this.cn.dispatchRenderEvent(ls,t);for(var s=this.ar,a=0,u=s.length;a<u;++a)s[a](this,t);s.length=0},n.prototype.vr=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},n.prototype.dr=function(){if(this.nr){for(var t=0,n=this.rr.length;t<n;++t)$(this.rr[t]);this.rr=null,this.$i.removeEventListener(L,this.Li),this.$i.removeEventListener(K,this.Li),this.nr.dispose(),this.nr=null,Ao(this.$i)}var i=this.getTargetElement();if(i){for(var r in i.appendChild(this.$i),this.cn||(this.cn=this.createRenderer()),this.nr=new ga(this,this.Pn),da)this.nr.addEventListener(da[r],this.handleMapBrowserEvent.bind(this));this.$i.addEventListener(L,this.Li,!1),this.$i.addEventListener(K,this.Li,!!Jt&&{passive:!1});var e=this.getOwnerDocument().defaultView,o=this.ir?this.ir:i;this.rr=[Y(o,W,this.handleBrowserEvent,this),Y(o,V,this.handleBrowserEvent,this),Y(e,H,this.updateSize,this)]}else this.cn&&(clearTimeout(this.Di),this.Di=void 0,this.ar.length=0,this.cn.dispose(),this.cn=null),this.Ui&&(cancelAnimationFrame(this.Ui),this.Ui=void 0);this.updateSize()},n.prototype.cr=function(){this.render()},n.prototype.mr=function(){this.render()},n.prototype.lr=function(){this.Ki&&($(this.Ki),this.Ki=null),this.Yi&&($(this.Yi),this.Yi=null);var t=this.getView();t&&(this.wr(),this.Ki=Y(t,l,this.mr,this),this.Yi=Y(t,N,this.mr,this),t.resolveConstraints(0)),this.render()},n.prototype.hr=function(){this.Zi&&(this.Zi.forEach($),this.Zi=null);var t=this.getLayerGroup();t&&(this.yr(new aa("addlayer",t)),this.Zi=[Y(t,l,this.render,this),Y(t,N,this.render,this),Y(t,"addlayer",this.yr,this),Y(t,"removelayer",this.br,this)]),this.render()},n.prototype.isRendered=function(){return!!this.Hi},n.prototype.renderSync=function(){this.Ui&&cancelAnimationFrame(this.Ui),this.qi()},n.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n<i;++n){var r=t[n].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}},n.prototype.render=function(){this.cn&&void 0===this.Ui&&(this.Ui=requestAnimationFrame(this.qi))},n.prototype.removeControl=function(t){return this.getControls().remove(t)},n.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},n.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},n.prototype.br=function(t){au(t.layer)},n.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},n.prototype.Bi=function(t){var n=this,i=this.getSize(),r=this.getView(),e=this.Hi,s=null;if(void 0!==i&&ru(i)&&r&&r.isDef()){var a=r.getHints(this.Hi?this.Hi.viewHints:void 0),u=r.getState();if(s={animate:!1,coordinateToPixelTransform:this.Wi,declutterTree:null,extent:Jn(u.center,u.resolution,u.rotation,i),index:this.Xi++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.Rt,pixelToCoordinateTransform:this.Vi,postRenderFunctions:[],size:i,tileQueue:this.ur,time:t,usedTiles:{},viewState:u,viewHints:a,wantedTiles:{},mapId:o(this),renderTargets:{}},u.nextCenter&&u.nextResolution){var c=isNaN(u.nextRotation)?u.rotation:u.nextRotation;s.nextExtent=Jn(u.nextCenter,u.nextResolution,c,i)}}if(this.Hi=s,this.cn.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.ar,s.postRenderFunctions),e)(!this.Ji||!ni(this.Ji)&&!In(s.extent,this.Ji))&&(this.dispatchEvent(new fa(ja,this,e)),this.Ji=Cn(this.Ji));this.Ji&&!s.viewHints[Pa]&&!s.viewHints[Ia]&&!In(s.extent,this.Ji)&&(this.dispatchEvent(new fa(Sa,this,s)),Sn(s.extent,this.Ji))}this.dispatchEvent(new fa(xa,this,s)),this.Fi=!this.ur.getTilesLoading()&&!this.ur.getCount()&&!this.getLoadingOrNotReady(),this.Di||(this.Di=setTimeout((function(){n.Di=void 0,n.handlePostRender()}),0))},n.prototype.setLayerGroup=function(t){var n=this.getLayerGroup();n&&this.br(new aa("removelayer",n)),this.set(ka,t)},n.prototype.setSize=function(t){this.set(Ma,t)},n.prototype.setTarget=function(t){this.set(_a,t)},n.prototype.setView=function(t){if(!t||t instanceof nu)this.set(Oa,t);else{this.set(Oa,new nu);var n=this;t.then((function(t){n.setView(new nu(t))}))}},n.prototype.updateSize=function(){var t=this.getTargetElement(),n=void 0;if(t){var i=getComputedStyle(t),r=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),e=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(r)||isNaN(e)||!ru(n=[r,e])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(n),this.wr()},n.prototype.wr=function(){var t=this.getView();if(t){var n=void 0,i=getComputedStyle(this.$i);i.width&&i.height&&(n=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(n)}},n}(ot),hu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fu=function(t){function n(n){var i=t.call(this)||this,r=n.element;return!r||n.target||r.style.pointerEvents||(r.style.pointerEvents="auto"),i.element=r||null,i.gr=null,i.vn=null,i.listenerKeys=[],n.render&&(i.render=n.render),n.target&&i.setTarget(n.target),i}return hu(n,t),n.prototype.disposeInternal=function(){Ao(this.element),t.prototype.disposeInternal.call(this)},n.prototype.getMap=function(){return this.vn},n.prototype.setMap=function(t){this.vn&&Ao(this.element);for(var n=0,i=this.listenerKeys.length;n<i;++n)$(this.listenerKeys[n]);(this.listenerKeys.length=0,this.vn=t,t)&&((this.gr?this.gr:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==_&&this.listenerKeys.push(Y(t,xa,this.render,this)),t.render())},n.prototype.render=function(t){},n.prototype.setTarget=function(t){this.gr="string"==typeof t?document.getElementById(t):t},n}(ot),lu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vu=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).jr=document.createElement("ul"),i.Sr=void 0===r.collapsed||r.collapsed,i.kr=i.Sr,i.Mr=void 0!==r.collapsible,i._r=void 0===r.collapsible||r.collapsible,i._r||(i.Sr=!1);var e=void 0!==r.className?r.className:"ol-attribution",o=void 0!==r.tipLabel?r.tipLabel:"Attributions",s=void 0!==r.expandClassName?r.expandClassName:e+"-expand",a=void 0!==r.collapseLabel?r.collapseLabel:"",u=void 0!==r.collapseClassName?r.collapseClassName:e+"-collapse";"string"==typeof a?(i.Tr=document.createElement("span"),i.Tr.textContent=a,i.Tr.className=u):i.Tr=a;var c=void 0!==r.label?r.label:"i";"string"==typeof c?(i.Er=document.createElement("span"),i.Er.textContent=c,i.Er.className=s):i.Er=c;var h=i._r&&!i.Sr?i.Tr:i.Er;i.Ar=document.createElement("button"),i.Ar.setAttribute("type","button"),i.Ar.setAttribute("aria-expanded",String(!i.Sr)),i.Ar.title=o,i.Ar.appendChild(h),i.Ar.addEventListener(G,i.Cr.bind(i),!1);var f=e+" "+"ol-unselectable "+Es+(i.Sr&&i._r?" ol-collapsed":"")+(i._r?"":" ol-uncollapsible"),l=i.element;return l.className=f,l.appendChild(i.Ar),l.appendChild(i.jr),i.Rr=[],i.mn=!0,i}return lu(n,t),n.prototype.Pr=function(t){for(var n={},i=[],r=!0,e=t.layerStatesArray,o=0,s=e.length;o<s;++o){var a=e[o];if(ws(a,t.viewState)){var u=a.layer.getSource();if(u){var c=u.getAttributions();if(c){var h=c(t);if(h)if(r=r&&!1!==u.getAttributionsCollapsible(),Array.isArray(h))for(var f=0,l=h.length;f<l;++f)h[f]in n||(i.push(h[f]),n[h[f]]=!0);else h in n||(i.push(h),n[h]=!0)}}}}return this.Mr||this.setCollapsible(r),i},n.prototype.Ir=function(t){if(t){var n=this.Pr(t),i=n.length>0;if(this.mn!=i&&(this.element.style.display=i?"":"none",this.mn=i),!x(n,this.Rr)){Co(this.jr);for(var r=0,e=n.length;r<e;++r){var o=document.createElement("li");o.innerHTML=n[r],this.jr.appendChild(o)}this.Rr=n}}else this.mn&&(this.element.style.display="none",this.mn=!1)},n.prototype.Cr=function(t){t.preventDefault(),this.Nr(),this.kr=this.Sr},n.prototype.Nr=function(){this.element.classList.toggle(As),this.Sr?Eo(this.Tr,this.Er):Eo(this.Er,this.Tr),this.Sr=!this.Sr,this.Ar.setAttribute("aria-expanded",String(!this.Sr))},n.prototype.getCollapsible=function(){return this._r},n.prototype.setCollapsible=function(t){this._r!==t&&(this._r=t,this.element.classList.toggle("ol-uncollapsible"),this.kr&&this.Nr())},n.prototype.setCollapsed=function(t){this.kr=t,this._r&&this.Sr!==t&&this.Nr()},n.prototype.getCollapsed=function(){return this.Sr},n.prototype.render=function(t){this.Ir(t.frameState)},n}(fu),du=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pu=function(t){function n(n){var i=this,r=n||{};i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this;var e=void 0!==r.className?r.className:"ol-rotate",o=void 0!==r.label?r.label:"⇧",s=void 0!==r.compassClassName?r.compassClassName:"ol-compass";i.Er=null,"string"==typeof o?(i.Er=document.createElement("span"),i.Er.className=s,i.Er.textContent=o):(i.Er=o,i.Er.classList.add(s));var a=r.tipLabel?r.tipLabel:"Reset rotation",u=document.createElement("button");u.className=e+"-reset",u.setAttribute("type","button"),u.title=a,u.appendChild(i.Er),u.addEventListener(G,i.Cr.bind(i),!1);var c=e+" "+"ol-unselectable "+Es,h=i.element;return h.className=c,h.appendChild(u),i.zr=r.resetNorth?r.resetNorth:void 0,i.Fr=void 0!==r.duration?r.duration:250,i.Lr=void 0===r.autoHide||r.autoHide,i.Gr=void 0,i.Lr&&i.element.classList.add(Ms),i}return du(n,t),n.prototype.Cr=function(t){t.preventDefault(),void 0!==this.zr?this.zr():this.Dr()},n.prototype.Dr=function(){var t=this.getMap().getView();if(t){var n=t.getRotation();void 0!==n&&(this.Fr>0&&n%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.Fr,easing:wt}):t.setRotation(0))}},n.prototype.render=function(t){var n=t.frameState;if(n){var i=n.viewState.rotation;if(i!=this.Gr){var r="rotate("+i+"rad)";if(this.Lr){var e=this.element.classList.contains(Ms);e||0!==i?e&&0!==i&&this.element.classList.remove(Ms):this.element.classList.add(Ms)}this.Er.style.transform=r}this.Gr=i}},n}(fu),yu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mu=function(t){function n(n){var i=this,r=n||{};i=t.call(this,{element:document.createElement("div"),target:r.target})||this;var e=void 0!==r.className?r.className:"ol-zoom",o=void 0!==r.delta?r.delta:1,s=void 0!==r.zoomInClassName?r.zoomInClassName:e+"-in",a=void 0!==r.zoomOutClassName?r.zoomOutClassName:e+"-out",u=void 0!==r.zoomInLabel?r.zoomInLabel:"+",c=void 0!==r.zoomOutLabel?r.zoomOutLabel:"",h=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",f=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=s,l.setAttribute("type","button"),l.title=h,l.appendChild("string"==typeof u?document.createTextNode(u):u),l.addEventListener(G,i.Cr.bind(i,o),!1);var v=document.createElement("button");v.className=a,v.setAttribute("type","button"),v.title=f,v.appendChild("string"==typeof c?document.createTextNode(c):c),v.addEventListener(G,i.Cr.bind(i,-o),!1);var d=e+" "+"ol-unselectable "+Es,p=i.element;return p.className=d,p.appendChild(l),p.appendChild(v),i.Fr=void 0!==r.duration?r.duration:250,i}return yu(n,t),n.prototype.Cr=function(t,n){n.preventDefault(),this.Ur(t)},n.prototype.Ur=function(t){var n=this.getMap().getView();if(n){var i=n.getZoom();if(void 0!==i){var r=n.getConstrainedZoom(i+t);this.Fr>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.Fr,easing:wt})):n.setZoom(r)}}},n}(fu);function wu(t){var n=t||{},i=new ft;return(void 0===n.zoom||n.zoom)&&i.push(new mu(n.zoomOptions)),(void 0===n.rotate||n.rotate)&&i.push(new pu(n.rotateOptions)),(void 0===n.attribution||n.attribution)&&i.push(new vu(n.attributionOptions)),i}var bu="active",gu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function xu(t,n,i){var r=t.getCenterInternal();if(r){var e=[r[0]+n[0],r[1]+n[1]];t.animateInternal({duration:void 0!==i?i:250,easing:gt,center:t.getConstrainedCenter(e)})}}function ju(t,n,i,r){var e=t.getZoom();if(void 0!==e){var o=t.getConstrainedZoom(e+n),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:i,duration:void 0!==r?r:250,easing:wt})}}var Su=function(t){function n(n){var i=t.call(this)||this;return i.on,i.once,i.un,n&&n.handleEvent&&(i.handleEvent=n.handleEvent),i.vn=null,i.setActive(!0),i}return gu(n,t),n.prototype.getActive=function(){return this.get(bu)},n.prototype.getMap=function(){return this.vn},n.prototype.handleEvent=function(t){return!0},n.prototype.setActive=function(t){this.set(bu,t)},n.prototype.setMap=function(t){this.vn=t},n}(ot),ku=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mu=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.qr=r.delta?r.delta:1,i.Fr=void 0!==r.duration?r.duration:250,i}return ku(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==da.DBLCLICK){var i=t.originalEvent,r=t.map,e=t.coordinate,o=i.shiftKey?-this.qr:this.qr;ju(r.getView(),o,e,this.Fr),i.preventDefault(),n=!0}return!n},n}(Su),_u=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Ou(t){for(var n=t.length,i=0,r=0,e=0;e<n;e++)i+=t[e].clientX,r+=t[e].clientY;return[i/n,r/n]}var Tu=function(t){function n(n){var i=this,r=n||{};return i=t.call(this,r)||this,r.handleDownEvent&&(i.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(i.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(i.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(i.handleUpEvent=r.handleUpEvent),r.stopDown&&(i.stopDown=r.stopDown),i.handlingDownUpSequence=!1,i.Br={},i.targetPointers=[],i}return _u(n,t),n.prototype.getPointerCount=function(){return this.targetPointers.length},n.prototype.handleDownEvent=function(t){return!1},n.prototype.handleDragEvent=function(t){},n.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var n=!1;if(this.Wr(t),this.handlingDownUpSequence){if(t.type==da.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==da.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==da.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,n=this.stopDown(r)}else t.type==da.POINTERMOVE&&this.handleMoveEvent(t);return!n},n.prototype.handleMoveEvent=function(t){},n.prototype.handleUpEvent=function(t){return!1},n.prototype.stopDown=function(t){return t},n.prototype.Wr=function(t){if(function(t){var n=t.type;return n===da.POINTERDOWN||n===da.POINTERDRAG||n===da.POINTERUP}(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==da.POINTERUP?delete this.Br[i]:(t.type==da.POINTERDOWN||i in this.Br)&&(this.Br[i]=n),this.targetPointers=C(this.Br)}},n}(Su);function Eu(t){var n=arguments;return function(t){for(var i=!0,r=0,e=n.length;r<e&&(i=i&&n[r](t));++r);return i}}var Au=function(t){var n=t.originalEvent;return n.altKey&&!(n.metaKey||n.ctrlKey)&&!n.shiftKey},Cu=function(t){var n=t.originalEvent;return n.altKey&&!(n.metaKey||n.ctrlKey)&&n.shiftKey},Ru=function(t){var n=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return n.contains(i)},Pu=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||Ru(t)},Iu=k,Nu=function(t){var n=t.originalEvent;return 0==n.button&&!(Bt&&Wt&&n.ctrlKey)},zu=M,Fu=function(t){return t.type==da.SINGLECLICK},Lu=function(t){var n=t.originalEvent;return!n.altKey&&!(n.metaKey||n.ctrlKey)&&!n.shiftKey},Gu=function(t){var n=t.originalEvent;return!n.altKey&&!(n.metaKey||n.ctrlKey)&&n.shiftKey},Du=function(t){var n=t.originalEvent.target.tagName;return"INPUT"!==n&&"SELECT"!==n&&"TEXTAREA"!==n},Uu=function(t){var n=t.originalEvent;return Mt(void 0!==n,56),"mouse"==n.pointerType},qu=function(t){var n=t.originalEvent;return Mt(void 0!==n,56),n.isPrimary&&0===n.button},Bu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wu=function(t){function n(n){var i=t.call(this,{stopDown:M})||this,r=n||{};i.Vr=r.kinetic,i.lastCentroid=null,i.Xr,i.Hr=!1;var e=r.condition?r.condition:Eu(Lu,qu);return i.Jr=r.onFocusOnly?Eu(Pu,e):e,i.Kr=!1,i}return Bu(n,t),n.prototype.handleDragEvent=function(t){this.Hr||(this.Hr=!0,this.getMap().getView().beginInteraction());var n=this.targetPointers,i=Ou(n);if(n.length==this.Xr){if(this.Vr&&this.Vr.update(i[0],i[1]),this.lastCentroid){var r=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],e=t.map.getView();nr(r,e.getResolution()),tr(r,e.getRotation()),e.adjustCenterInternal(r)}}else this.Vr&&this.Vr.begin();this.lastCentroid=i,this.Xr=n.length,t.originalEvent.preventDefault()},n.prototype.handleUpEvent=function(t){var n=t.map,i=n.getView();if(0===this.targetPointers.length){if(!this.Kr&&this.Vr&&this.Vr.end()){var r=this.Vr.getDistance(),e=this.Vr.getAngle(),o=i.getCenterInternal(),s=n.getPixelFromCoordinateInternal(o),a=n.getCoordinateFromPixelInternal([s[0]-r*Math.cos(e),s[1]-r*Math.sin(e)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:wt})}return this.Hr&&(this.Hr=!1,i.endInteraction()),!1}return this.Vr&&this.Vr.begin(),this.lastCentroid=null,!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.Jr(t)){var n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.Vr&&this.Vr.begin(),this.Kr=this.targetPointers.length>1,!0}return!1},n}(Tu),Vu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xu=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,{stopDown:M})||this).Jr=r.condition?r.condition:Cu,i.Yr=void 0,i.Fr=void 0!==r.duration?r.duration:250,i}return Vu(n,t),n.prototype.handleDragEvent=function(t){if(Uu(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==Wa){var r=n.getSize(),e=t.pixel,o=Math.atan2(r[1]/2-e[1],e[0]-r[0]/2);if(void 0!==this.Yr){var s=o-this.Yr;i.adjustRotationInternal(-s)}this.Yr=o}}},n.prototype.handleUpEvent=function(t){return!Uu(t)||(t.map.getView().endInteraction(this.Fr),!1)},n.prototype.handleDownEvent=function(t){return!!Uu(t)&&(!(!Nu(t)||!this.Jr(t))&&(t.map.getView().beginInteraction(),this.Yr=void 0,!0))},n}(Tu),Hu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ju=function(t){function n(n){var i=t.call(this)||this;return i.Zr=null,i.pn=document.createElement("div"),i.pn.style.position="absolute",i.pn.style.pointerEvents="auto",i.pn.className="ol-box "+n,i.vn=null,i.$r=null,i.Qr=null,i}return Hu(n,t),n.prototype.disposeInternal=function(){this.setMap(null)},n.prototype.te=function(){var t=this.$r,n=this.Qr,i="px",r=this.pn.style;r.left=Math.min(t[0],n[0])+i,r.top=Math.min(t[1],n[1])+i,r.width=Math.abs(n[0]-t[0])+i,r.height=Math.abs(n[1]-t[1])+i},n.prototype.setMap=function(t){if(this.vn){this.vn.getOverlayContainer().removeChild(this.pn);var n=this.pn.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.vn=t,this.vn&&this.vn.getOverlayContainer().appendChild(this.pn)},n.prototype.setPixels=function(t,n){this.$r=t,this.Qr=n,this.createOrUpdateGeometry(),this.te()},n.prototype.createOrUpdateGeometry=function(){var t=this.$r,n=this.Qr,i=[t,[t[0],n[1]],n,[n[0],t[1]]].map(this.vn.getCoordinateFromPixelInternal,this.vn);i[4]=i[0].slice(),this.Zr?this.Zr.setCoordinates([i]):this.Zr=new Ke([i])},n.prototype.getGeometry=function(){return this.Zr},n}(v),Ku=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Yu="boxstart",Zu="boxdrag",$u="boxend",Qu="boxcancel",tc=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.coordinate=i,e.mapBrowserEvent=r,e}return Ku(n,t),n}(f),nc=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};return i.ne=new Ju(r.className||"ol-dragbox"),i.ie=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(i.onBoxEnd=r.onBoxEnd),i.$r=null,i.Jr=r.condition?r.condition:Nu,i.re=r.boxEndCondition?r.boxEndCondition:i.defaultBoxEndCondition,i}return Ku(n,t),n.prototype.defaultBoxEndCondition=function(t,n,i){var r=i[0]-n[0],e=i[1]-n[1];return r*r+e*e>=this.ie},n.prototype.getGeometry=function(){return this.ne.getGeometry()},n.prototype.handleDragEvent=function(t){this.ne.setPixels(this.$r,t.pixel),this.dispatchEvent(new tc(Zu,t.coordinate,t))},n.prototype.handleUpEvent=function(t){this.ne.setMap(null);var n=this.re(t,this.$r,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new tc(n?$u:Qu,t.coordinate,t)),!1},n.prototype.handleDownEvent=function(t){return!!this.Jr(t)&&(this.$r=t.pixel,this.ne.setMap(t.map),this.ne.setPixels(this.$r,this.$r),this.dispatchEvent(new tc(Yu,t.coordinate,t)),!0)},n.prototype.onBoxEnd=function(t){},n}(Tu),ic=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rc=function(t){function n(n){var i=this,r=n||{},e=r.condition?r.condition:Gu;return(i=t.call(this,{condition:e,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).Fr=void 0!==r.duration?r.duration:200,i.ee=void 0!==r.out&&r.out,i}return ic(n,t),n.prototype.onBoxEnd=function(t){var n=this.getMap().getView(),i=this.getGeometry();if(this.ee){var r=n.rotatedExtentForGeometry(i),e=n.getResolutionForExtentInternal(r),o=n.getResolution()/e;(i=i.clone()).scale(o*o)}n.fitInternal(i,{duration:this.Fr,easing:wt})},n}(nc),ec=37,oc=38,sc=39,ac=40,uc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cc=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.oe=function(t){return Lu(t)&&Du(t)},i.Jr=void 0!==r.condition?r.condition:i.oe,i.Fr=void 0!==r.duration?r.duration:100,i.se=void 0!==r.pixelDelta?r.pixelDelta:128,i}return uc(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==W){var i=t.originalEvent,r=i.keyCode;if(this.Jr(t)&&(r==ac||r==ec||r==sc||r==oc)){var e=t.map.getView(),o=e.getResolution()*this.se,s=0,a=0;r==ac?a=-o:r==ec?s=-o:r==sc?s=o:a=o;var u=[s,a];tr(u,e.getRotation()),xu(e,u,this.Fr),i.preventDefault(),n=!0}}return!n},n}(Su),hc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fc=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Jr=r.condition?r.condition:Du,i.qr=r.delta?r.delta:1,i.Fr=void 0!==r.duration?r.duration:100,i}return hc(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==W||t.type==V){var i=t.originalEvent,r=i.charCode;if(this.Jr(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var e=t.map,o=r=="+".charCodeAt(0)?this.qr:-this.qr;ju(e.getView(),o,void 0,this.Fr),i.preventDefault(),n=!0}}return!n},n}(Su),lc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vc="trackpad",dc="wheel",pc=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,r)||this).ae=0,i.ue=0,i.wt=void 0!==r.maxDelta?r.maxDelta:1,i.Fr=void 0!==r.duration?r.duration:250,i.ce=void 0!==r.timeout?r.timeout:80,i.he=void 0===r.useAnchor||r.useAnchor,i.fe=void 0!==r.constrainResolution&&r.constrainResolution;var e=r.condition?r.condition:Iu;return i.Jr=r.onFocusOnly?Eu(Pu,e):e,i.le=null,i.ve=void 0,i.de,i.pe=void 0,i.ye=400,i.me,i.we=300,i}return lc(n,t),n.prototype.be=function(){this.me=void 0,this.getMap().getView().endInteraction(void 0,this.ue?this.ue>0?1:-1:0,this.le)},n.prototype.handleEvent=function(t){if(!this.Jr(t))return!0;if(t.type!==K)return!0;var n,i=t.map,r=t.originalEvent;if(r.preventDefault(),this.he&&(this.le=t.coordinate),t.type==K&&(n=r.deltaY,Ut&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=Vt),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.ue=n;var e=Date.now();void 0===this.ve&&(this.ve=e),(!this.pe||e-this.ve>this.ye)&&(this.pe=Math.abs(n)<4?vc:dc);var o=i.getView();if(this.pe===vc&&!o.getConstrainResolution()&&!this.fe)return this.me?clearTimeout(this.me):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.me=setTimeout(this.be.bind(this),this.ce),o.adjustZoom(-n/this.we,this.le),this.ve=e,!1;this.ae+=n;var s=Math.max(this.ce-(e-this.ve),0);return clearTimeout(this.de),this.de=setTimeout(this.ge.bind(this,i),s),!1},n.prototype.ge=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var i=-ui(this.ae,-this.wt*this.we,this.wt*this.we)/this.we;(n.getConstrainResolution()||this.fe)&&(i=i?i>0?1:-1:0),ju(n,i,this.le,this.Fr),this.pe=void 0,this.ae=0,this.le=null,this.ve=void 0,this.de=void 0},n.prototype.setMouseAnchor=function(t){this.he=t,t||(this.le=null)},n}(Su),yc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mc=function(t){function n(n){var i=this,r=n||{},e=r;return e.stopDown||(e.stopDown=M),(i=t.call(this,e)||this).xe=null,i.Yr=void 0,i.je=!1,i.Se=0,i.ke=void 0!==r.threshold?r.threshold:.3,i.Fr=void 0!==r.duration?r.duration:250,i}return yc(n,t),n.prototype.handleDragEvent=function(t){var n=0,i=this.targetPointers[0],r=this.targetPointers[1],e=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(void 0!==this.Yr){var o=e-this.Yr;this.Se+=o,!this.je&&Math.abs(this.Se)>this.ke&&(this.je=!0),n=o}this.Yr=e;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Wa){var u=s.getViewport().getBoundingClientRect(),c=Ou(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.xe=s.getCoordinateFromPixelInternal(c),this.je&&(s.render(),a.adjustRotationInternal(n,this.xe))}},n.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.Fr),!1)},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.xe=null,this.Yr=void 0,this.je=!1,this.Se=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(Tu),wc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),bc=function(t){function n(n){var i=this,r=n||{},e=r;return e.stopDown||(e.stopDown=M),(i=t.call(this,e)||this).xe=null,i.Fr=void 0!==r.duration?r.duration:400,i.Me=void 0,i._e=1,i}return wc(n,t),n.prototype.handleDragEvent=function(t){var n=1,i=this.targetPointers[0],r=this.targetPointers[1],e=i.clientX-r.clientX,o=i.clientY-r.clientY,s=Math.sqrt(e*e+o*o);void 0!==this.Me&&(n=this.Me/s),this.Me=s;var a=t.map,u=a.getView();1!=n&&(this._e=n);var c=a.getViewport().getBoundingClientRect(),h=Ou(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.xe=a.getCoordinateFromPixelInternal(h),a.render(),u.adjustResolutionInternal(n,this.xe)},n.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map.getView(),i=this._e>1?1:-1;return n.endInteraction(this.Fr,i),!1}return!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.xe=null,this.Me=void 0,this._e=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(Tu);function gc(t){var n=t||{},i=new ft,r=new No(-.005,.05,100);return(void 0===n.altShiftDragRotate||n.altShiftDragRotate)&&i.push(new Xu),(void 0===n.doubleClickZoom||n.doubleClickZoom)&&i.push(new Mu({delta:n.zoomDelta,duration:n.zoomDuration})),(void 0===n.dragPan||n.dragPan)&&i.push(new Wu({onFocusOnly:n.onFocusOnly,kinetic:r})),(void 0===n.pinchRotate||n.pinchRotate)&&i.push(new mc),(void 0===n.pinchZoom||n.pinchZoom)&&i.push(new bc({duration:n.zoomDuration})),(void 0===n.keyboard||n.keyboard)&&(i.push(new cc),i.push(new fc({delta:n.zoomDelta,duration:n.zoomDuration}))),(void 0===n.mouseWheelZoom||n.mouseWheelZoom)&&i.push(new pc({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(void 0===n.shiftDragZoom||n.shiftDragZoom)&&i.push(new rc({duration:n.zoomDuration})),i}var xc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jc=function(t){function n(n){return(n=E({},n)).controls||(n.controls=wu()),n.interactions||(n.interactions=gc({onFocusOnly:!0})),t.call(this,n)||this}return xc(n,t),n.prototype.createRenderer=function(){return new oa(this)},n}(cu),Sc="bottom-left",kc="bottom-center",Mc="bottom-right",_c="center-left",Oc="center-center",Tc="center-right",Ec="top-left",Ac="top-center",Cc="top-right";function Rc(t){return(Rc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Pc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ic="element",Nc="map",zc="offset",Fc="position",Lc="positioning",Gc=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un,i.options=n,i.id=n.id,i.insertFirst=void 0===n.insertFirst||n.insertFirst,i.stopEvent=void 0===n.stopEvent||n.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==n.className?n.className:"ol-overlay-container ol-selectable",i.element.style.position="absolute",i.element.style.pointerEvents="auto";var r=n.autoPan;return r&&"object"!==Rc(r)&&(r={animation:n.autoPanAnimation,margin:n.autoPanMargin}),i.autoPan=r||!1,i.rendered={_t:"",visible:!0},i.mapPostrenderListenerKey=null,i.addChangeListener(Ic,i.handleElementChanged),i.addChangeListener(Nc,i.handleMapChanged),i.addChangeListener(zc,i.handleOffsetChanged),i.addChangeListener(Fc,i.handlePositionChanged),i.addChangeListener(Lc,i.handlePositioningChanged),void 0!==n.element&&i.setElement(n.element),i.setOffset(void 0!==n.offset?n.offset:[0,0]),i.setPositioning(void 0!==n.positioning?n.positioning:Ec),void 0!==n.position&&i.setPosition(n.position),i}return Pc(n,t),n.prototype.getElement=function(){return this.get(Ic)},n.prototype.getId=function(){return this.id},n.prototype.getMap=function(){return this.get(Nc)||null},n.prototype.getOffset=function(){return this.get(zc)},n.prototype.getPosition=function(){return this.get(Fc)},n.prototype.getPositioning=function(){return this.get(Lc)},n.prototype.handleElementChanged=function(){Co(this.element);var t=this.getElement();t&&this.element.appendChild(t)},n.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(Ao(this.element),$(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=Y(t,xa,this.render,this),this.updatePixelPosition();var n=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},n.prototype.render=function(){this.updatePixelPosition()},n.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},n.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},n.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},n.prototype.setElement=function(t){this.set(Ic,t)},n.prototype.setMap=function(t){this.set(Nc,t)},n.prototype.setOffset=function(t){this.set(zc,t)},n.prototype.setPosition=function(t){this.set(Fc,t)},n.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},n.prototype.panIntoView=function(t){var n=this.getMap();if(n&&n.getTargetElement()&&this.get(Fc)){var i=this.getRect(n.getTargetElement(),n.getSize()),r=this.getElement(),e=this.getRect(r,[Oo(r),To(r)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!_n(i,e)){var a=e[0]-i[0],u=i[2]-e[2],c=e[1]-i[1],h=i[3]-e[3],f=[0,0];if(a<0?f[0]=a-s:u<0&&(f[0]=Math.abs(u)+s),c<0?f[1]=c-s:h<0&&(f[1]=Math.abs(h)+s),0!==f[0]||0!==f[1]){var l=n.getView().getCenterInternal(),v=n.getPixelFromCoordinateInternal(l);if(!v)return;var d=[v[0]+f[0],v[1]+f[1]],p=o.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(d),duration:p.duration,easing:p.easing})}}}},n.prototype.getRect=function(t,n){var i=t.getBoundingClientRect(),r=i.left+window.pageXOffset,e=i.top+window.pageYOffset;return[r,e,r+n[0],e+n[1]]},n.prototype.setPositioning=function(t){this.set(Lc,t)},n.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},n.prototype.updatePixelPosition=function(){var t=this.getMap(),n=this.getPosition();if(t&&t.isRendered()&&n){var i=t.getPixelFromCoordinate(n),r=t.getSize();this.updateRenderedPosition(i,r)}else this.setVisible(!1)},n.prototype.updateRenderedPosition=function(t,n){var i=this.element.style,r=this.getOffset(),e=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+r[0])+"px",s=Math.round(t[1]+r[1])+"px",a="0%",u="0%";e==Mc||e==Tc||e==Cc?a="-100%":e!=kc&&e!=Oc&&e!=Ac||(a="-50%"),e==Sc||e==kc||e==Mc?u="-100%":e!=_c&&e!=Oc&&e!=Tc||(u="-50%");var c="translate(".concat(a,", ").concat(u,") translate(").concat(o,", ").concat(s,")");this.rendered._t!=c&&(this.rendered._t=c,i.transform=c,i.msTransform=c)},n.prototype.getOptions=function(){return this.options},n}(ot),Dc=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.Oe=0,this.Te={},this.Ee=null,this.Ae=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.Oe=0,this.Te={},this.Ee=null,this.Ae=null},t.prototype.containsKey=function(t){return this.Te.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var n=this.Ee;n;)t(n.Ce,n.Re,this),n=n.newer},t.prototype.get=function(t,n){var i=this.Te[t];return Mt(void 0!==i,15),i===this.Ae||(i===this.Ee?(this.Ee=this.Ee.newer,this.Ee.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.Ae,this.Ae.newer=i,this.Ae=i),i.Ce},t.prototype.remove=function(t){var n=this.Te[t];return Mt(void 0!==n,15),n===this.Ae?(this.Ae=n.older,this.Ae&&(this.Ae.newer=null)):n===this.Ee?(this.Ee=n.newer,this.Ee&&(this.Ee.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.Te[t],--this.Oe,n.Ce},t.prototype.getCount=function(){return this.Oe},t.prototype.getKeys=function(){var t,n=new Array(this.Oe),i=0;for(t=this.Ae;t;t=t.older)n[i++]=t.Re;return n},t.prototype.getValues=function(){var t,n=new Array(this.Oe),i=0;for(t=this.Ae;t;t=t.older)n[i++]=t.Ce;return n},t.prototype.peekLast=function(){return this.Ee.Ce},t.prototype.peekLastKey=function(){return this.Ee.Re},t.prototype.peekFirstKey=function(){return this.Ae.Re},t.prototype.pop=function(){var t=this.Ee;return delete this.Te[t.Re],t.newer&&(t.newer.older=null),this.Ee=t.newer,this.Ee||(this.Ae=null),--this.Oe,t.Ce},t.prototype.replace=function(t,n){this.get(t),this.Te[t].Ce=n},t.prototype.set=function(t,n){Mt(!(t in this.Te),16);var i={Re:t,newer:null,older:this.Ae,Ce:n};this.Ae?this.Ae.newer=i:this.Ee=i,this.Ae=i,this.Te[t]=i,++this.Oe},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Uc(t,n,i,r){return void 0!==r?(r[0]=t,r[1]=n,r[2]=i,r):[t,n,i]}function qc(t,n,i){return t+"/"+n+"/"+i}function Bc(t){return qc(t[0],t[1],t[2])}function Wc(t){var n=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return qc(n[0],n[1],n[2])}function Vc(t){return t.split("/").map(Number)}function Xc(t){return(t[1]<<t[0])+t[2]}function Hc(t,n){var i=t[0],r=t[1],e=t[2];if(n.getMinZoom()>i||i>n.getMaxZoom())return!1;var o=n.getFullTileRange(i);return!o||o.containsXY(r,e)}var Jc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kc=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Jc(n,t),n.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},n.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Vc(this.peekFirstKey())[0];this.forEach(function(n){n.tileCoord[0]!==t&&(this.remove(Bc(n.tileCoord)),n.release())}.bind(this))}},n}(Dc),Yc=function(){function t(t,n,i,r){this.minX=t,this.maxX=n,this.minY=i,this.maxY=r}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,n){return this.minX<=t&&t<=this.maxX&&this.minY<=n&&n<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Zc(t,n,i,r,e){return void 0!==e?(e.minX=t,e.maxX=n,e.minY=i,e.maxY=r,e):new Yc(t,n,i,r)}var $c=Yc,Qc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),th=[],nh=function(t){function n(n,i,r,e){var o=t.call(this,n,i,{transition:0})||this;return o.Pe={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.Ne={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=e.bind(void 0,o),o.wrappedTileCoord=r,o}return Qc(n,t),n.prototype.getContext=function(t){var n=o(t);return n in this.Pe||(this.Pe[n]=_o(1,1,th)),this.Pe[n]},n.prototype.hasContext=function(t){return o(t)in this.Pe},n.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},n.prototype.getReplayState=function(t){var n=o(t);return n in this.Ne||(this.Ne[n]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.Ne[n]},n.prototype.load=function(){this.getSourceTiles()},n.prototype.release=function(){for(var n in this.Pe)th.push(this.Pe[n].canvas),delete this.Pe[n];t.prototype.release.call(this)},n}(jt),ih=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rh=function(t){function n(n,i,r,e,o,s){var a=t.call(this,n,i,s)||this;return a.extent=null,a.ze=e,a.Fe=null,a.q,a.projection=null,a.resolution,a.Wt=o,a.Le=r,a.key=r,a}return ih(n,t),n.prototype.getFormat=function(){return this.ze},n.prototype.getFeatures=function(){return this.Fe},n.prototype.load=function(){this.state==lt&&(this.setState(vt),this.Wt(this,this.Le),this.q&&this.q(this.extent,this.resolution,this.projection))},n.prototype.onLoad=function(t,n){this.setFeatures(t)},n.prototype.onError=function(){this.setState(pt)},n.prototype.setFeatures=function(t){this.Fe=t,this.setState(dt)},n.prototype.setLoader=function(t){this.q=t},n}(jt);function eh(t){return Array.isArray(t)?Bo(t):t}var oh="arraybuffer",sh="json",ah="text",uh="xml",ch=!1;function hh(t,n,i,r,e,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,r,e):t,!0),n.getType()==oh&&(a.responseType="arraybuffer"),a.withCredentials=ch,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=n.getType(),u=void 0;r==sh||r==ah?u=a.responseText:r==uh?(u=a.responseXML)||(u=(new DOMParser).parseFromString(a.responseText,"application/xml")):r==oh&&(u=a.response),u?o(n.readFeatures(u,{extent:i,featureProjection:e}),n.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function fh(t,n){return function(i,r,e,o,s){var a=this;hh(t,n,i,r,e,(function(t,n){a.addFeatures(t),void 0!==o&&o(t)}),s||_)}}function lh(t,n){return[[-1/0,-1/0,1/0,1/0]]}var vh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function dh(t,n,i,r){var e=document.createElement("script"),s="olc_"+o(n);function a(){delete window[s],e.parentNode.removeChild(e)}e.async=!0,e.src=t+(-1==t.indexOf("?")?"?":"&")+(r||"callback")+"="+s;var u=setTimeout((function(){a(),i&&i()}),1e4);window[s]=function(t){clearTimeout(u),a(),n(t)},document.getElementsByTagName("head")[0].appendChild(e)}var ph,yh=function(t){function n(n){var i=this,r="Unexpected response status: "+n.status;return(i=t.call(this,r)||this).name="ResponseError",i.response=n,i}return vh(n,t),n}(Error),mh=function(t){function n(n){var i=t.call(this,"Failed to issue request")||this;return i.name="ClientError",i.client=n,i}return vh(n,t),n}(Error);function wh(t){return new Promise((function(n,i){var r=new XMLHttpRequest;r.addEventListener("load",(function(t){var r=t.target;if(!r.status||r.status>=200&&r.status<300){var e=void 0;try{e=JSON.parse(r.responseText)}catch(t){var o="Error parsing response text as JSON: "+t.message;return void i(new Error(o))}n(e)}else i(new yh(r))})),r.addEventListener("error",(function(t){i(new mh(t.target))})),r.open("GET",t),r.setRequestHeader("Accept","application/json"),r.send()}))}function bh(t,n){return n.indexOf("://")>=0?n:new URL(n,t).href}var gh=function(){function t(){}return t.prototype.drawCustom=function(t,n,i,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,n){},t.prototype.drawFeature=function(t,n){},t.prototype.drawGeometryCollection=function(t,n){},t.prototype.drawLineString=function(t,n){},t.prototype.drawMultiLineString=function(t,n){},t.prototype.drawMultiPoint=function(t,n){},t.prototype.drawMultiPolygon=function(t,n){},t.prototype.drawPoint=function(t,n){},t.prototype.drawPolygon=function(t,n){},t.prototype.drawText=function(t,n){},t.prototype.setFillStrokeStyle=function(t,n){},t.prototype.setImageStyle=function(t,n){},t.prototype.setTextStyle=function(t,n){},t}(),xh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jh=function(t){function n(n,i,r,e,o,s,a){var u=t.call(this)||this;return u.Pe=n,u.Rt=i,u.st=r,u._t=e,u.Ge=o,u.De=s,u.Ue=a,u.qe=null,u.Be=null,u.We=null,u.Ve=null,u.Xe=null,u.Nt=null,u.He=0,u.Je=0,u.Ke=0,u.Ye=0,u.Ze=0,u.$e=0,u.Qe=!1,u.no=0,u.io=[0,0],u.ro=0,u.eo="",u.oo=0,u.so=0,u.ao=!1,u.uo=0,u.co=[0,0],u.ho=null,u.fo=null,u.lo=null,u.vo=[],u.do=[1,0,0,1,0,0],u}return xh(n,t),n.prototype.po=function(t,n,i,r){if(this.Nt){var e=Br(t,n,i,r,this._t,this.vo),o=this.Pe,s=this.do,a=o.globalAlpha;1!=this.Ye&&(o.globalAlpha=a*this.Ye);var u=this.no;this.Qe&&(u+=this.Ge);for(var c=0,h=e.length;c<h;c+=2){var f=e[c]-this.He,l=e[c+1]-this.Je;if(0!==u||1!=this.io[0]||1!=this.io[1]){var v=f+this.He,d=l+this.Je;an(s,v,d,1,1,u,-v,-d),o.setTransform.apply(o,s),o.translate(v,d),o.scale(this.io[0],this.io[1]),o.drawImage(this.Nt,this.Ze,this.$e,this.ro,this.Ke,-this.He,-this.Je,this.ro,this.Ke),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.Nt,this.Ze,this.$e,this.ro,this.Ke,f,l,this.ro,this.Ke)}1!=this.Ye&&(o.globalAlpha=a)}},n.prototype.yo=function(t,n,i,r){if(this.lo&&""!==this.eo){this.ho&&this.mo(this.ho),this.fo&&this.wo(this.fo),this.bo(this.lo);var e=Br(t,n,i,r,this._t,this.vo),o=this.Pe,s=this.uo;for(this.ao&&(s+=this.Ge);n<i;n+=r){var a=e[n]+this.oo,u=e[n+1]+this.so;if(0!==s||1!=this.co[0]||1!=this.co[1]){var c=an(this.do,a,u,1,1,s,-a,-u);o.setTransform.apply(o,c),o.translate(a,u),o.scale(this.co[0],this.co[1]),this.fo&&o.strokeText(this.eo,0,0),this.ho&&o.fillText(this.eo,0,0),o.setTransform(1,0,0,1,0,0)}else this.fo&&o.strokeText(this.eo,a,u),this.ho&&o.fillText(this.eo,a,u)}}},n.prototype.xo=function(t,n,i,r,e){var o=this.Pe,s=Br(t,n,i,r,this._t,this.vo);o.moveTo(s[0],s[1]);var a=s.length;e&&(a-=2);for(var u=2;u<a;u+=2)o.lineTo(s[u],s[u+1]);return e&&o.closePath(),i},n.prototype.jo=function(t,n,i,r){for(var e=0,o=i.length;e<o;++e)n=this.xo(t,n,i[e],r,!0);return n},n.prototype.drawCircle=function(t){if(ti(this.st,t.getExtent())){if(this.Ve||this.Xe){this.Ve&&this.mo(this.Ve),this.Xe&&this.wo(this.Xe);var n=$r(t,this._t,this.vo),i=n[2]-n[0],r=n[3]-n[1],e=Math.sqrt(i*i+r*r),o=this.Pe;o.beginPath(),o.arc(n[0],n[1],e,0,2*Math.PI),this.Ve&&o.fill(),this.Xe&&o.stroke()}""!==this.eo&&this.yo(t.getCenter(),0,2,2)}},n.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},n.prototype.setTransform=function(t){this._t=t},n.prototype.drawGeometry=function(t){switch(t.getType()){case Pt.POINT:this.drawPoint(t);break;case Pt.LINE_STRING:this.drawLineString(t);break;case Pt.POLYGON:this.drawPolygon(t);break;case Pt.MULTI_POINT:this.drawMultiPoint(t);break;case Pt.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case Pt.MULTI_POLYGON:this.drawMultiPolygon(t);break;case Pt.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case Pt.CIRCLE:this.drawCircle(t)}},n.prototype.drawFeature=function(t,n){var i=n.getGeometryFunction()(t);i&&ti(this.st,i.getExtent())&&(this.setStyle(n),this.drawGeometry(i))},n.prototype.drawGeometryCollection=function(t){for(var n=t.getGeometriesArray(),i=0,r=n.length;i<r;++i)this.drawGeometry(n[i])},n.prototype.drawPoint=function(t){this.De&&(t=t.simplifyTransformed(this.De,this.Ue));var n=t.getFlatCoordinates(),i=t.getStride();this.Nt&&this.po(n,0,n.length,i),""!==this.eo&&this.yo(n,0,n.length,i)},n.prototype.drawMultiPoint=function(t){this.De&&(t=t.simplifyTransformed(this.De,this.Ue));var n=t.getFlatCoordinates(),i=t.getStride();this.Nt&&this.po(n,0,n.length,i),""!==this.eo&&this.yo(n,0,n.length,i)},n.prototype.drawLineString=function(t){if(this.De&&(t=t.simplifyTransformed(this.De,this.Ue)),ti(this.st,t.getExtent())){if(this.Xe){this.wo(this.Xe);var n=this.Pe,i=t.getFlatCoordinates();n.beginPath(),this.xo(i,0,i.length,t.getStride(),!1),n.stroke()}if(""!==this.eo){var r=t.getFlatMidpoint();this.yo(r,0,2,2)}}},n.prototype.drawMultiLineString=function(t){this.De&&(t=t.simplifyTransformed(this.De,this.Ue));var n=t.getExtent();if(ti(this.st,n)){if(this.Xe){this.wo(this.Xe);var i=this.Pe,r=t.getFlatCoordinates(),e=0,o=t.getEnds(),s=t.getStride();i.beginPath();for(var a=0,u=o.length;a<u;++a)e=this.xo(r,e,o[a],s,!1);i.stroke()}if(""!==this.eo){var c=t.getFlatMidpoints();this.yo(c,0,c.length,2)}}},n.prototype.drawPolygon=function(t){if(this.De&&(t=t.simplifyTransformed(this.De,this.Ue)),ti(this.st,t.getExtent())){if(this.Xe||this.Ve){this.Ve&&this.mo(this.Ve),this.Xe&&this.wo(this.Xe);var n=this.Pe;n.beginPath(),this.jo(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.Ve&&n.fill(),this.Xe&&n.stroke()}if(""!==this.eo){var i=t.getFlatInteriorPoint();this.yo(i,0,2,2)}}},n.prototype.drawMultiPolygon=function(t){if(this.De&&(t=t.simplifyTransformed(this.De,this.Ue)),ti(this.st,t.getExtent())){if(this.Xe||this.Ve){this.Ve&&this.mo(this.Ve),this.Xe&&this.wo(this.Xe);var n=this.Pe,i=t.getOrientedFlatCoordinates(),r=0,e=t.getEndss(),o=t.getStride();n.beginPath();for(var s=0,a=e.length;s<a;++s){var u=e[s];r=this.jo(i,r,u,o)}this.Ve&&n.fill(),this.Xe&&n.stroke()}if(""!==this.eo){var c=t.getFlatInteriorPoints();this.yo(c,0,c.length,2)}}},n.prototype.mo=function(t){var n=this.Pe,i=this.qe;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,n.fillStyle=t.fillStyle):(n.fillStyle=t.fillStyle,this.qe={fillStyle:t.fillStyle})},n.prototype.wo=function(t){var n=this.Pe,i=this.Be;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,n.lineCap=t.lineCap),n.setLineDash&&(x(i.lineDash,t.lineDash)||n.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,n.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,n.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,n.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,n.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,n.strokeStyle=t.strokeStyle)):(n.lineCap=t.lineCap,n.setLineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.lineWidth=t.lineWidth,n.miterLimit=t.miterLimit,n.strokeStyle=t.strokeStyle,this.Be={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},n.prototype.bo=function(t){var n=this.Pe,i=this.We,r=t.textAlign?t.textAlign:qs;i?(i.font!=t.font&&(i.font=t.font,n.font=t.font),i.textAlign!=r&&(i.textAlign=r,n.textAlign=r),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,n.textBaseline=t.textBaseline)):(n.font=t.font,n.textAlign=r,n.textBaseline=t.textBaseline,this.We={font:t.font,textAlign:r,textBaseline:t.textBaseline})},n.prototype.setFillStrokeStyle=function(t,n){var i=this;if(t){var r=t.getColor();this.Ve={fillStyle:eh(r||zs)}}else this.Ve=null;if(n){var e=n.getColor(),o=n.getLineCap(),s=n.getLineDash(),a=n.getLineDashOffset(),u=n.getLineJoin(),c=n.getWidth(),h=n.getMiterLimit(),f=s||Ls;this.Xe={lineCap:void 0!==o?o:Fs,lineDash:1===this.Rt?f:f.map((function(t){return t*i.Rt})),lineDashOffset:(a||0)*this.Rt,lineJoin:void 0!==u?u:Gs,lineWidth:(void 0!==c?c:1)*this.Rt,miterLimit:void 0!==h?h:Ds,strokeStyle:eh(e||Us)}}else this.Xe=null},n.prototype.setImageStyle=function(t){var n;if(t&&(n=t.getSize())){var i=t.getAnchor(),r=t.getOrigin();this.Nt=t.getImage(this.Rt),this.He=i[0]*this.Rt,this.Je=i[1]*this.Rt,this.Ke=n[1]*this.Rt,this.Ye=t.getOpacity(),this.Ze=r[0],this.$e=r[1],this.Qe=t.getRotateWithView(),this.no=t.getRotation(),this.io=t.getScaleArray(),this.ro=n[0]*this.Rt}else this.Nt=null},n.prototype.setTextStyle=function(t){if(t){var n=t.getFill();if(n){var i=n.getColor();this.ho={fillStyle:eh(i||zs)}}else this.ho=null;var r=t.getStroke();if(r){var e=r.getColor(),o=r.getLineCap(),s=r.getLineDash(),a=r.getLineDashOffset(),u=r.getLineJoin(),c=r.getWidth(),h=r.getMiterLimit();this.fo={lineCap:void 0!==o?o:Fs,lineDash:s||Ls,lineDashOffset:a||0,lineJoin:void 0!==u?u:Gs,lineWidth:void 0!==c?c:1,miterLimit:void 0!==h?h:Ds,strokeStyle:eh(e||Us)}}else this.fo=null;var f=t.getFont(),l=t.getOffsetX(),v=t.getOffsetY(),d=t.getRotateWithView(),p=t.getRotation(),y=t.getScaleArray(),m=t.getText(),w=t.getTextAlign(),b=t.getTextBaseline();this.lo={font:void 0!==f?f:Ns,textAlign:void 0!==w?w:qs,textBaseline:void 0!==b?b:Bs},this.eo=void 0!==m?Array.isArray(m)?m.reduce((function(t,n,i){return t+(i%2?" ":n)}),""):m:"",this.oo=void 0!==l?this.Rt*l:0,this.so=void 0!==v?this.Rt*v:0,this.ao=void 0!==d&&d,this.uo=void 0!==p?p:0,this.co=[this.Rt*y[0],this.Rt*y[1]]}else this.eo=""},n}(gh),Sh="Circle",kh="Default",Mh="Image",_h="LineString",Oh="Polygon",Th="Text",Eh={Point:function(t,n,i,r,e){var o,s=i.getImage(),a=i.getText();e&&(t=e,o=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=wo)return;var u=t.getBuilder(i.getZIndex(),Mh);u.setImageStyle(s,o),u.drawPoint(n,r)}if(a&&a.getText()){var c=t.getBuilder(i.getZIndex(),Th);c.setTextStyle(a,o),c.drawText(n,r)}},LineString:function(t,n,i,r,e){var o=i.getStroke();if(o){var s=t.getBuilder(i.getZIndex(),_h);s.setFillStrokeStyle(null,o),s.drawLineString(n,r)}var a=i.getText();if(a&&a.getText()){var u=(e||t).getBuilder(i.getZIndex(),Th);u.setTextStyle(a),u.drawText(n,r)}},Polygon:function(t,n,i,r,e){var o=i.getFill(),s=i.getStroke();if(o||s){var a=t.getBuilder(i.getZIndex(),Oh);a.setFillStrokeStyle(o,s),a.drawPolygon(n,r)}var u=i.getText();if(u&&u.getText()){var c=(e||t).getBuilder(i.getZIndex(),Th);c.setTextStyle(u),c.drawText(n,r)}},MultiPoint:function(t,n,i,r,e){var o,s=i.getImage(),a=i.getText();e&&(t=e,o=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=wo)return;var u=t.getBuilder(i.getZIndex(),Mh);u.setImageStyle(s,o),u.drawMultiPoint(n,r)}if(a&&a.getText()){var c=(e||t).getBuilder(i.getZIndex(),Th);c.setTextStyle(a,o),c.drawText(n,r)}},MultiLineString:function(t,n,i,r,e){var o=i.getStroke();if(o){var s=t.getBuilder(i.getZIndex(),_h);s.setFillStrokeStyle(null,o),s.drawMultiLineString(n,r)}var a=i.getText();if(a&&a.getText()){var u=(e||t).getBuilder(i.getZIndex(),Th);u.setTextStyle(a),u.drawText(n,r)}},MultiPolygon:function(t,n,i,r,e){var o=i.getFill(),s=i.getStroke();if(s||o){var a=t.getBuilder(i.getZIndex(),Oh);a.setFillStrokeStyle(o,s),a.drawMultiPolygon(n,r)}var u=i.getText();if(u&&u.getText()){var c=(e||t).getBuilder(i.getZIndex(),Th);c.setTextStyle(u),c.drawText(n,r)}},GeometryCollection:function(t,n,i,r,e){var o,s,a=n.getGeometriesArray();for(o=0,s=a.length;o<s;++o){(0,Eh[a[o].getType()])(t,a[o],i,r,e)}},Circle:function(t,n,i,r,e){var o=i.getFill(),s=i.getStroke();if(o||s){var a=t.getBuilder(i.getZIndex(),Sh);a.setFillStrokeStyle(o,s),a.drawCircle(n,r)}var u=i.getText();if(u&&u.getText()){var c=(e||t).getBuilder(i.getZIndex(),Th);c.setTextStyle(u),c.drawText(n,r)}}};function Ah(t,n){return parseInt(o(t),10)-parseInt(o(n),10)}function Ch(t,n){var i=Rh(t,n);return i*i}function Rh(t,n){return.5*t/n}function Ph(t,n,i,r,e,o,s){var a=!1,u=i.getImage();if(u){var c=u.getImageState();c==wo||c==bo?u.unlistenImageChange(e):(c==yo&&u.load(),c=u.getImageState(),u.listenImageChange(e),a=!0)}return function(t,n,i,r,e,o){var s=i.getGeometryFunction()(n);if(!s)return;var a=s.simplifyTransformed(r,e);if(i.getRenderer())Ih(t,a,i,n);else{(0,Eh[a.getType()])(t,a,i,n,o)}}(t,n,i,r,o,s),a}function Ih(t,n,i,r){if(n.getType()!=Pt.GEOMETRY_COLLECTION)t.getBuilder(i.getZIndex(),kh).drawCustom(n,r,i.getRenderer(),i.getHitDetectionRenderer());else for(var e=n.getGeometries(),o=0,s=e.length;o<s;++o)Ih(t,e[o],i,r)}function Nh(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");var n,i=t.inversePixelTransform[0],r=t.frameState,e=$t(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),o=Ch(r.viewState.resolution,i),s=Ir();return s&&(n=Tr(s,r.viewState.projection)),new jh(t.context,i,r.extent,e,r.viewState.rotation,o,n)}var zh,Fh={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Lh={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0};function Gh(t,n,i,r,e){t.beginPath(),t.moveTo(0,0),t.lineTo(n,i),t.lineTo(r,e),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(n,r)+1,Math.max(i,e)),t.restore()}function Dh(t,n){return Math.abs(t[4*n]-210)>2||Math.abs(t[4*n+3]-191.25)>2}function Uh(t,n,i,r){var e=Ar(i,n,t),o=gr(n,r,i),s=n.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var u=t.getExtent();if(!u||Mn(u,e)){var c=gr(t,o,e)/o;isFinite(c)&&c>0&&(o/=c)}return o}function qh(t,n,i,r){var e=Xn(i),o=Uh(t,n,e,r);return(!isFinite(o)||o<=0)&&qn(i,(function(i){return o=Uh(t,n,i,r),isFinite(o)&&o>0})),o}function Bh(t,n,i,r,e,o,s,a,u,c,h,f){var l=_o(Math.round(i*t),Math.round(i*n));if(f||E(l,Fh),0===u.length)return l.canvas;function v(t){return Math.round(t*i)/i}l.scale(i,i),l.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];u.forEach((function(t,n,i){zn(d,t.extent)}));var p=Qn(d),y=Kn(d),m=_o(Math.round(i*p/r),Math.round(i*y/r));f||E(m,Fh);var w=i/r;u.forEach((function(t,n,i){var r=t.extent[0]-d[0],e=-(t.extent[3]-d[3]),o=Qn(t.extent),s=Kn(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,r*w,e*w,o*w,s*w)}));var b=Zn(s);return a.getTriangles().forEach((function(t,n,e){var s=t.source,a=t.target,u=s[0][0],c=s[0][1],h=s[1][0],p=s[1][1],y=s[2][0],w=s[2][1],g=v((a[0][0]-b[0])/o),x=v(-(a[0][1]-b[1])/o),j=v((a[1][0]-b[0])/o),S=v(-(a[1][1]-b[1])/o),k=v((a[2][0]-b[0])/o),M=v(-(a[2][1]-b[1])/o),_=u,O=c;u=0,c=0;var T=vi([[h-=_,p-=O,0,0,j-g],[y-=_,w-=O,0,0,k-g],[0,0,h,p,S-x],[0,0,y,w,M-x]]);if(T){if(l.save(),l.beginPath(),function(){if(void 0===zh){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Gh(t,4,5,4,0),Gh(t,4,5,0,5);var n=t.getImageData(0,0,3,3).data;zh=Dh(n,0)||Dh(n,4)||Dh(n,8)}return zh}()||!f){l.moveTo(j,S);for(var E=g-j,A=x-S,C=0;C<4;C++)l.lineTo(j+v((C+1)*E/4),S+v(C*A/3)),3!=C&&l.lineTo(j+v((C+1)*E/4),S+v((C+1)*A/3));l.lineTo(k,M)}else l.moveTo(j,S),l.lineTo(g,x),l.lineTo(k,M);l.clip(),l.transform(T[0],T[2],T[1],T[3],g,x),l.translate(d[0]-_,d[3]-O),l.scale(r/i,-r/i),l.drawImage(m.canvas,0,0),l.restore()}})),h&&(l.save(),l.globalCompositeOperation="source-over",l.strokeStyle="black",l.lineWidth=1,a.getTriangles().forEach((function(t,n,i){var r=t.target,e=(r[0][0]-b[0])/o,s=-(r[0][1]-b[1])/o,a=(r[1][0]-b[0])/o,u=-(r[1][1]-b[1])/o,c=(r[2][0]-b[0])/o,h=-(r[2][1]-b[1])/o;l.beginPath(),l.moveTo(a,u),l.lineTo(e,s),l.lineTo(c,h),l.closePath(),l.stroke()})),l.restore()),l.canvas}var Wh=[0,0,0],Vh=function(){function t(t){var n;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.Ti=t.resolutions,Mt(S(this.Ti,(function(t,n){return n-t}),!0),17),!t.origins)for(var i=0,r=this.Ti.length-1;i<r;++i)if(n){if(this.Ti[i]/this.Ti[i+1]!==n){n=void 0;break}}else n=this.Ti[i]/this.Ti[i+1];this.Oi=n,this.maxZoom=this.Ti.length-1,this.So=void 0!==t.origin?t.origin:null,this.ko=null,void 0!==t.origins&&(this.ko=t.origins,Mt(this.ko.length==this.Ti.length,20));var e=t.extent;void 0===e||this.So||this.ko||(this.So=Zn(e)),Mt(!this.So&&this.ko||this.So&&!this.ko,18),this.Mo=null,void 0!==t.tileSizes&&(this.Mo=t.tileSizes,Mt(this.Mo.length==this.Ti.length,19)),this._o=void 0!==t.tileSize?t.tileSize:this.Mo?null:za,Mt(!this._o&&this.Mo||this._o&&!this.Mo,22),this.st=void 0!==e?e:null,this.Oo=null,this.To=[0,0],this.Eo=[0,0,0,0],void 0!==t.sizes?this.Oo=t.sizes.map((function(t,n){var i=new $c(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(e){var r=this.getTileRangeForExtentAndZ(e,n);i.minX=Math.max(r.minX,i.minX),i.maxX=Math.min(r.maxX,i.maxX),i.minY=Math.max(r.minY,i.minY),i.maxY=Math.min(r.maxY,i.maxY)}return i}),this):e&&this.Ao(e)}return t.prototype.forEachTileCoord=function(t,n,i){for(var r=this.getTileRangeForExtentAndZ(t,n),e=r.minX,o=r.maxX;e<=o;++e)for(var s=r.minY,a=r.maxY;s<=a;++s)i([n,e,s])},t.prototype.forEachTileCoordParentTileRange=function(t,n,i,r){var e,o,s=null,a=t[0]-1;for(2===this.Oi?(e=t[1],o=t[2]):s=this.getTileCoordExtent(t,r);a>=this.minZoom;){if(n(a,2===this.Oi?Zc(e=Math.floor(e/2),e,o=Math.floor(o/2),o,i):this.getTileRangeForExtentAndZ(s,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.st},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.So?this.So:this.ko[t]},t.prototype.getResolution=function(t){return this.Ti[t]},t.prototype.getResolutions=function(){return this.Ti},t.prototype.getTileCoordChildTileRange=function(t,n,i){if(t[0]<this.maxZoom){if(2===this.Oi){var r=2*t[1],e=2*t[2];return Zc(r,r+1,e,e+1,n)}var o=this.getTileCoordExtent(t,i||this.Eo);return this.getTileRangeForExtentAndZ(o,t[0]+1,n)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,n,i){if(n>this.maxZoom||n<this.minZoom)return null;var r=t[0],e=t[1],o=t[2];if(n===r)return Zc(e,o,e,o,i);if(this.Oi){var s=Math.pow(this.Oi,n-r),a=Math.floor(e*s),u=Math.floor(o*s);return n<r?Zc(a,a,u,u,i):Zc(a,Math.floor(s*(e+1))-1,u,Math.floor(s*(o+1))-1,i)}var c=this.getTileCoordExtent(t,this.Eo);return this.getTileRangeForExtentAndZ(c,n,i)},t.prototype.getTileRangeExtent=function(t,n,i){var r=this.getOrigin(t),e=this.getResolution(t),o=ou(this.getTileSize(t),this.To),s=r[0]+n.minX*o[0]*e,a=r[0]+(n.maxX+1)*o[0]*e;return An(s,r[1]+n.minY*o[1]*e,a,r[1]+(n.maxY+1)*o[1]*e,i)},t.prototype.getTileRangeForExtentAndZ=function(t,n,i){var r=Wh;this.Co(t[0],t[3],n,!1,r);var e=r[1],o=r[2];return this.Co(t[2],t[1],n,!0,r),Zc(e,r[1],o,r[2],i)},t.prototype.getTileCoordCenter=function(t){var n=this.getOrigin(t[0]),i=this.getResolution(t[0]),r=ou(this.getTileSize(t[0]),this.To);return[n[0]+(t[1]+.5)*r[0]*i,n[1]-(t[2]+.5)*r[1]*i]},t.prototype.getTileCoordExtent=function(t,n){var i=this.getOrigin(t[0]),r=this.getResolution(t[0]),e=ou(this.getTileSize(t[0]),this.To),o=i[0]+t[1]*e[0]*r,s=i[1]-(t[2]+1)*e[1]*r;return An(o,s,o+e[0]*r,s+e[1]*r,n)},t.prototype.getTileCoordForCoordAndResolution=function(t,n,i){return this.Ro(t[0],t[1],n,!1,i)},t.prototype.Ro=function(t,n,i,r,e){var o=this.getZForResolution(i),s=i/this.getResolution(o),a=this.getOrigin(o),u=ou(this.getTileSize(o),this.To),c=s*(t-a[0])/i/u[0],h=s*(a[1]-n)/i/u[1];return r?(c=xi(c,5)-1,h=xi(h,5)-1):(c=gi(c,5),h=gi(h,5)),Uc(o,c,h,e)},t.prototype.Co=function(t,n,i,r,e){var o=this.getOrigin(i),s=this.getResolution(i),a=ou(this.getTileSize(i),this.To),u=(t-o[0])/s/a[0],c=(o[1]-n)/s/a[1];return r?(u=xi(u,5)-1,c=xi(c,5)-1):(u=gi(u,5),c=gi(c,5)),Uc(i,u,c,e)},t.prototype.getTileCoordForCoordAndZ=function(t,n,i){return this.Co(t[0],t[1],n,!1,i)},t.prototype.getTileCoordResolution=function(t){return this.Ti[t[0]]},t.prototype.getTileSize=function(t){return this._o?this._o:this.Mo[t]},t.prototype.getFullTileRange=function(t){return this.Oo?this.Oo[t]:this.st?this.getTileRangeForExtentAndZ(this.st,t):null},t.prototype.getZForResolution=function(t,n){return ui(m(this.Ti,t,n||0),this.minZoom,this.maxZoom)},t.prototype.Ao=function(t){for(var n=this.Ti.length,i=new Array(n),r=this.minZoom;r<n;++r)i[r]=this.getTileRangeForExtentAndZ(t,r);this.Oo=i},t}();function Xh(t){var n=t.getDefaultTileGrid();return n||(n=Zh(t),t.setDefaultTileGrid(n)),n}function Hh(t,n,i){var r=n[0],e=t.getTileCoordCenter(n),o=$h(i);if(Mn(o,e))return n;var s=Qn(o),a=Math.ceil((o[0]-e[0])/s);return e[0]+=s*a,t.getTileCoordForCoordAndZ(e,r)}function Jh(t,n,i,r){var e=void 0!==r?r:vn,o=Yh(t,n,i);return new Vh({extent:t,origin:Hn(t,e),resolutions:o,tileSize:i})}function Kh(t){var n=t||{},i=n.extent||br("EPSG:3857").getExtent(),r={extent:i,minZoom:n.minZoom,tileSize:n.tileSize,resolutions:Yh(i,n.maxZoom,n.tileSize,n.maxResolution)};return new Vh(r)}function Yh(t,n,i,r){for(var e=void 0!==n?n:42,o=Kn(t),s=Qn(t),a=ou(void 0!==i?i:za),u=r>0?r:Math.max(s/a[0],o/a[1]),c=e+1,h=new Array(c),f=0;f<c;++f)h[f]=u/Math.pow(2,f);return h}function Zh(t,n,i,r){return Jh($h(t),n,i,r)}function $h(t){var n=(t=br(t)).getExtent();if(!n){var i=180*Ft[Gt.DEGREES]/t.getMetersPerUnit();n=An(-i,-i,i,i)}return n}function Qh(t,n){var i=/\{z\}/g,r=/\{x\}/g,e=/\{y\}/g,o=/\{-y\}/g;return function(s,a,u){return s?t.replace(i,s[0].toString()).replace(r,s[1].toString()).replace(e,s[2].toString()).replace(o,(function(){var t=s[0],i=n.getFullTileRange(t);return Mt(i,55),(i.getHeight()-s[2]-1).toString()})):void 0}}function tf(t,n){for(var i=t.length,r=new Array(i),e=0;e<i;++e)r[e]=Qh(t[e],n);return nf(r)}function nf(t){return 1===t.length?t[0]:function(n,i,r){if(n){var e=yi(Xc(n),t.length);return t[e](n,i,r)}}}function rf(t,n,i){}function ef(t){var n=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var r=i[1].charCodeAt(0),e=i[2].charCodeAt(0),o=void 0;for(o=r;o<=e;++o)n.push(t.replace(i[0],String.fromCharCode(o)));return n}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(i[2],10),a=parseInt(i[1],10);a<=s;a++)n.push(t.replace(i[0],a.toString()));return n}return n.push(t),n}function of(t,n){var i=[];Object.keys(n).forEach((function(t){null!==n[t]&&void 0!==n[t]&&i.push(t+"="+encodeURIComponent(n[t]))}));var r=i.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+r}var sf,af=34962,uf=34963,cf=35044,hf=35048,ff=5126,lf=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function vf(t,n){for(var i=E({preserveDrawingBuffer:!0},n),r=lf.length,e=0;e<r;++e)try{var o=t.getContext(lf[e],i);if(o)return o}catch(t){}return null}var df="http://www.w3.org/2001/XMLSchema-instance";function pf(t,n){return Gf().createElementNS(t,n)}function yf(t,n){return mf(t,n,[]).join("")}function mf(t,n,i){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)n?i.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(t.nodeValue);else{var r=void 0;for(r=t.firstChild;r;r=r.nextSibling)mf(r,n,i)}return i}function wf(t){return"documentElement"in t}function bf(t,n,i){return t.getAttributeNS(n,i)||""}function gf(t){return(new DOMParser).parseFromString(t,"application/xml")}function xf(t,n){return function(i,r){var e=t.call(void 0!==n?n:this,i,r);void 0!==e&&b(r[r.length-1],e)}}function jf(t,n){return function(i,r){var e=t.call(void 0!==n?n:this,i,r);void 0!==e&&r[r.length-1].push(e)}}function Sf(t,n){return function(i,r){var e=t.call(void 0!==n?n:this,i,r);void 0!==e&&(r[r.length-1]=e)}}function kf(t,n,i){return function(r,e){var o=t.call(void 0!==i?i:this,r,e);if(void 0!==o){var s=e[e.length-1],a=void 0!==n?n:r.localName,u=void 0;a in s?u=s[a]:(u=[],s[a]=u),u.push(o)}}}function Mf(t,n,i){return function(r,e){var o=t.call(void 0!==i?i:this,r,e);void 0!==o&&(e[e.length-1][void 0!==n?n:r.localName]=o)}}function _f(t,n){return function(i,r,e){t.call(void 0!==n?n:this,i,r,e),e[e.length-1].node.appendChild(i)}}function Of(t,n){var i,r;return function(n,e,o){if(void 0===i){i={};var s={};s[n.localName]=t,i[n.namespaceURI]=s,r=Tf(n.localName)}If(i,r,e,o)}}function Tf(t,n){var i=t;return function(t,r,e){var o=r[r.length-1].node,s=i;return void 0===s&&(s=e),pf(void 0!==n?n:o.namespaceURI,s)}}var Ef=Tf();function Af(t,n){for(var i=n.length,r=new Array(i),e=0;e<i;++e)r[e]=t[n[e]];return r}function Cf(t,n,i){var r,e,o=void 0!==i?i:{};for(r=0,e=t.length;r<e;++r)o[t[r]]=n;return o}function Rf(t,n,i,r){var e;for(e=n.firstElementChild;e;e=e.nextElementSibling){var o=t[e.namespaceURI];if(void 0!==o){var s=o[e.localName];void 0!==s&&s.call(r,e,i)}}}function Pf(t,n,i,r,e){return r.push(t),Rf(n,i,r,e),r.pop()}function If(t,n,i,r,e,o){for(var s,a,u=(void 0!==e?e:i).length,c=0;c<u;++c)void 0!==(s=i[c])&&void 0!==(a=n.call(void 0!==o?o:this,s,r,void 0!==e?e[c]:void 0))&&t[a.namespaceURI][a.localName].call(o,a,s,r)}function Nf(t,n,i,r,e,o,s){return e.push(t),If(n,i,r,e,o,s),e.pop()}var zf=void 0;function Ff(){return void 0===zf&&"undefined"!=typeof XMLSerializer&&(zf=new XMLSerializer),zf}var Lf=void 0;function Gf(){return void 0===Lf&&"undefined"!=typeof document&&(Lf=document.implementation.createDocument("","",null)),Lf}var Df=cf;function Uf(t){switch(t){case af:return Float32Array;case uf:return Uint32Array;default:return Float32Array}}var qf=function(){function t(t,n){this.array=null,this.type=t,Mt(t===af||t===uf,62),this.usage=void 0!==n?n:Df}return t.prototype.ofSize=function(t){this.array=new(Uf(this.type))(t)},t.prototype.fromArray=function(t){var n=Uf(this.type);this.array=n.from?n.from(t):new n(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(Uf(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}(),Bf="webglcontextlost",Wf="webglcontextrestored",Vf=function(){function t(t){this.Po=t.webGlContext;var n=this.Po;this.Io=t.scaleRatio||1,this.No=n.createTexture(),this.zo=null,this.Fo=n.createFramebuffer();var i=n.createShader(n.VERTEX_SHADER);n.shaderSource(i,t.vertexShader||"\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n"),n.compileShader(i);var r=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(r,t.fragmentShader||"\n precision mediump float;\n \n uniform sampler2D u_image;\n uniform float u_opacity;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n"),n.compileShader(r),this.Lo=n.createProgram(),n.attachShader(this.Lo,i),n.attachShader(this.Lo,r),n.linkProgram(this.Lo),this.Go=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,this.Go),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),n.STATIC_DRAW),this.Do=n.getAttribLocation(this.Lo,"a_position"),this.Uo=n.getUniformLocation(this.Lo,"u_screenSize"),this.qo=n.getUniformLocation(this.Lo,"u_opacity"),this.Bo=n.getUniformLocation(this.Lo,"u_image"),this.Wo=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(i){this.Wo.push({value:t.uniforms[i],location:n.getUniformLocation(this.Lo,i)})}.bind(this))}return t.prototype.getGL=function(){return this.Po},t.prototype.init=function(t){var n=this.getGL(),i=[n.drawingBufferWidth*this.Io,n.drawingBufferHeight*this.Io];if(n.bindFramebuffer(n.FRAMEBUFFER,this.getFrameBuffer()),n.viewport(0,0,i[0],i[1]),!this.zo||this.zo[0]!==i[0]||this.zo[1]!==i[1]){this.zo=i;var r=n.RGBA,e=n.RGBA,o=n.UNSIGNED_BYTE;n.bindTexture(n.TEXTURE_2D,this.No),n.texImage2D(n.TEXTURE_2D,0,r,i[0],i[1],0,e,o,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.No,0)}},t.prototype.apply=function(t,n,i,r){var e=this.getGL(),s=t.size;if(e.bindFramebuffer(e.FRAMEBUFFER,n?n.getFrameBuffer():null),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.No),!n){var a=o(e.canvas);if(!t.renderTargets[a]){var u=e.getContextAttributes();u&&u.preserveDrawingBuffer&&(e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),t.renderTargets[a]=!0}}e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),e.bindBuffer(e.ARRAY_BUFFER,this.Go),e.useProgram(this.Lo),e.enableVertexAttribArray(this.Do),e.vertexAttribPointer(this.Do,2,e.FLOAT,!1,0,0),e.uniform2f(this.Uo,s[0],s[1]),e.uniform1i(this.Bo,0);var c=t.layerStatesArray[t.layerIndex].opacity;e.uniform1f(this.qo,c),this.applyUniforms(t),i&&i(e,t),e.drawArrays(e.TRIANGLES,0,6),r&&r(e,t)},t.prototype.getFrameBuffer=function(){return this.Fo},t.prototype.applyUniforms=function(t){var n,i=this.getGL(),r=1;this.Wo.forEach((function(e){if((n="function"==typeof e.value?e.value(t):e.value)instanceof HTMLCanvasElement||n instanceof ImageData)e.texture||(e.texture=i.createTexture()),i.activeTexture(i["TEXTURE".concat(r)]),i.bindTexture(i.TEXTURE_2D,e.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),n instanceof ImageData?i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,n.width,n.height,0,i.UNSIGNED_BYTE,new Uint8Array(n.data)):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),i.uniform1i(e.location,r++);else if(Array.isArray(n))switch(n.length){case 2:return void i.uniform2f(e.location,n[0],n[1]);case 3:return void i.uniform3f(e.location,n[0],n[1],n[2]);case 4:return void i.uniform4f(e.location,n[0],n[1],n[2],n[3]);default:return}else"number"==typeof n&&i.uniform1f(e.location,n)}))},t}();function Xf(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Hf(t,n){return t[0]=n[0],t[1]=n[1],t[4]=n[2],t[5]=n[3],t[12]=n[4],t[13]=n[5],t}var Jf=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kf="u_projectionMatrix",Yf="u_offsetScaleMatrix",Zf="u_offsetRotateMatrix",$f="u_time",Qf="u_zoom",tl="u_resolution",nl={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:ff},il={};function rl(t){return"shared/"+t}var el=0;function ol(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];n+=r.size*sl(r.type)}return n}function sl(t){switch(t){case nl.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case nl.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case nl.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case nl.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var al=function(t){function n(n){var i,r=t.call(this)||this,e=n||{};r.Vo=r.handleWebGLContextLost.bind(r),r.Xo=r.handleWebGLContextRestored.bind(r),r.Ho=e.canvasCacheKey?rl(e.canvasCacheKey):(i="unique/"+el,el+=1,i),r.Ut=function(t){var n=il[t];if(!n){var i=document.createElement("canvas");i.style.position="absolute",i.style.left="0",n={users:0,canvas:i},il[t]=n}return n.users+=1,n.canvas}(r.Ho),r.Po=vf(r.Ut),r.Jo={},r.Ko={},r.Yo=null,r.Ut.addEventListener(Bf,r.Vo),r.Ut.addEventListener(Wf,r.Xo),r.Zo=[1,0,0,1,0,0],r.$o=[1,0,0,1,0,0],r.Qo=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.ts={},r.ns={},r.Wo=[],e.uniforms&&r.setUniforms(e.uniforms);var o=r.getGL();return r.rs=e.postProcesses?e.postProcesses.map((function(t){return new Vf({webGlContext:o,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new Vf({webGlContext:o})],r.es=null,r.ve=Date.now(),r}return Jf(n,t),n.prototype.setUniforms=function(t){for(var n in this.Wo=[],t)this.Wo.push({name:n,value:t[n]});this.ts={}},n.prototype.canvasCacheKeyMatches=function(t){return this.Ho===rl(t)},n.prototype.getExtension=function(t){if(t in this.Ko)return this.Ko[t];var n=this.Po.getExtension(t);return this.Ko[t]=n,n},n.prototype.bindBuffer=function(t){var n=this.getGL(),i=o(t),r=this.Jo[i];r||(r={buffer:t,webGlBuffer:n.createBuffer()},this.Jo[i]=r);n.bindBuffer(t.getType(),r.webGlBuffer)},n.prototype.flushBufferData=function(t){var n=this.getGL();this.bindBuffer(t),n.bufferData(t.getType(),t.getArray(),t.getUsage())},n.prototype.deleteBuffer=function(t){var n=this.getGL(),i=o(t),r=this.Jo[i];r&&!n.isContextLost()&&n.deleteBuffer(r.webGlBuffer),delete this.Jo[i]},n.prototype.disposeInternal=function(){this.Ut.removeEventListener(Bf,this.Vo),this.Ut.removeEventListener(Wf,this.Xo),function(t){var n=il[t];if(n&&(n.users-=1,!(n.users>0))){var i=vf(n.canvas).getExtension("WEBGL_lose_context");i&&i.loseContext(),delete il[t]}}(this.Ho),delete this.Po,delete this.Ut},n.prototype.prepareDraw=function(t,n){var i=this.getGL(),r=this.getCanvas(),e=t.size,o=t.pixelRatio;r.width=e[0]*o,r.height=e[1]*o,r.style.width=e[0]+"px",r.style.height=e[1]+"px",i.useProgram(this.Yo);for(var s=this.rs.length-1;s>=0;s--)this.rs[s].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,n?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.Yo),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.prepareDrawToRenderTarget=function(t,n,i){var r=this.getGL(),e=n.getSize();r.bindFramebuffer(r.FRAMEBUFFER,n.getFramebuffer()),r.viewport(0,0,e[0],e[1]),r.bindTexture(r.TEXTURE_2D,n.getTexture()),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,i?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.Yo),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.drawElements=function(t,n){var i=this.getGL();this.getExtension("OES_element_index_uint");var r=i.UNSIGNED_INT,e=n-t,o=4*t;i.drawElements(i.TRIANGLES,e,r,o)},n.prototype.finalizeDraw=function(t,n,i){for(var r=0,e=this.rs.length;r<e;r++)r===e-1?this.rs[r].apply(t,null,n,i):this.rs[r].apply(t,this.rs[r+1])},n.prototype.getCanvas=function(){return this.Ut},n.prototype.getGL=function(){return this.Po},n.prototype.applyFrameState=function(t){var n=t.size,i=t.viewState.rotation,r=Zt(this.$o);en(r,2/n[0],2/n[1]);var e=Zt(this.Zo);0!==i&&rn(e,-i),this.setUniformMatrixValue(Yf,Hf(this.Qo,r)),this.setUniformMatrixValue(Zf,Hf(this.Qo,e)),this.setUniformFloatValue($f,.001*(Date.now()-this.ve)),this.setUniformFloatValue(Qf,t.viewState.zoom),this.setUniformFloatValue(tl,t.viewState.resolution)},n.prototype.applyUniforms=function(t){var n,i=this.getGL(),r=0;this.Wo.forEach(function(e){if((n="function"==typeof e.value?e.value(t):e.value)instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof ImageData)e.texture||(e.prevValue=void 0,e.texture=i.createTexture()),i.activeTexture(i["TEXTURE".concat(r)]),i.bindTexture(i.TEXTURE_2D,e.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),(!(n instanceof HTMLImageElement)||n.complete)&&e.prevValue!==n&&(e.prevValue=n,i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n)),i.uniform1i(this.getUniformLocation(e.name),r++);else if(Array.isArray(n)&&6===n.length)this.setUniformMatrixValue(e.name,Hf(this.Qo,n));else if(Array.isArray(n)&&n.length<=4)switch(n.length){case 2:return void i.uniform2f(this.getUniformLocation(e.name),n[0],n[1]);case 3:return void i.uniform3f(this.getUniformLocation(e.name),n[0],n[1],n[2]);case 4:return void i.uniform4f(this.getUniformLocation(e.name),n[0],n[1],n[2],n[3]);default:return}else"number"==typeof n&&i.uniform1f(this.getUniformLocation(e.name),n)}.bind(this))},n.prototype.useProgram=function(t){return t!=this.Yo&&(this.getGL().useProgram(t),this.Yo=t,this.ts={},this.ns={},!0)},n.prototype.compileShader=function(t,n){var i=this.getGL(),r=i.createShader(n);return i.shaderSource(r,t),i.compileShader(r),r},n.prototype.getProgram=function(t,n){var i=this.getGL(),r=this.compileShader(t,i.FRAGMENT_SHADER),e=this.compileShader(n,i.VERTEX_SHADER),o=i.createProgram();if(i.attachShader(o,r),i.attachShader(o,e),i.linkProgram(o),!i.getShaderParameter(r,i.COMPILE_STATUS)){var s="Fragment shader compliation failed: ".concat(i.getShaderInfoLog(r));throw new Error(s)}if(i.deleteShader(r),!i.getShaderParameter(e,i.COMPILE_STATUS)){s="Vertex shader compilation failed: ".concat(i.getShaderInfoLog(e));throw new Error(s)}if(i.deleteShader(e),!i.getProgramParameter(o,i.LINK_STATUS)){s="GL program linking failed: ".concat(i.getShaderInfoLog(e));throw new Error(s)}return o},n.prototype.getUniformLocation=function(t){return void 0===this.ts[t]&&(this.ts[t]=this.getGL().getUniformLocation(this.Yo,t)),this.ts[t]},n.prototype.getAttributeLocation=function(t){return void 0===this.ns[t]&&(this.ns[t]=this.getGL().getAttribLocation(this.Yo,t)),this.ns[t]},n.prototype.makeProjectionTransform=function(t,n){var i=t.size,r=t.viewState.rotation,e=t.viewState.resolution,o=t.viewState.center;return Zt(n),an(n,0,0,2/(e*i[0]),2/(e*i[1]),-r,-o[0],-o[1]),n},n.prototype.setUniformFloatValue=function(t,n){this.getGL().uniform1f(this.getUniformLocation(t),n)},n.prototype.setUniformFloatVec4=function(t,n){this.getGL().uniform4fv(this.getUniformLocation(t),n)},n.prototype.setUniformMatrixValue=function(t,n){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,n)},n.prototype.os=function(t,n,i,r,e){var o=this.getAttributeLocation(t);o<0||(this.getGL().enableVertexAttribArray(o),this.getGL().vertexAttribPointer(o,n,i,!1,r,e))},n.prototype.enableAttributes=function(t){for(var n=ol(t),i=0,r=0;r<t.length;r++){var e=t[r];this.os(e.name,e.size,e.type||ff,n,i),i+=e.size*sl(e.type)}},n.prototype.handleWebGLContextLost=function(){A(this.Jo),this.Yo=null},n.prototype.handleWebGLContextRestored=function(){},n.prototype.createTexture=function(t,n,i){var r=this.getGL(),e=i||r.createTexture(),o=r.RGBA,s=r.RGBA,a=r.UNSIGNED_BYTE;return r.bindTexture(r.TEXTURE_2D,e),n?r.texImage2D(r.TEXTURE_2D,0,o,s,a,n):r.texImage2D(r.TEXTURE_2D,0,o,t[0],t[1],0,s,a,null),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e},n}(v),ul=function(){function t(t,n){this.name=t,this.data=n,this.ss=null}return t.prototype.getTexture=function(t){if(!this.ss){var n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.ss=n}return this.ss},t}(),cl=new Uint8Array(4),hl=function(){function t(t,n){this.us=t;var i=t.getGL();this.ss=i.createTexture(),this.cs=i.createFramebuffer(),this.hs=n||[1,1],this.B=new Uint8Array(0),this.fs=!0,this.ls()}return t.prototype.setSize=function(t){x(t,this.hs)||(this.hs[0]=t[0],this.hs[1]=t[1],this.ls())},t.prototype.getSize=function(){return this.hs},t.prototype.clearCachedData=function(){this.fs=!0},t.prototype.readAll=function(){if(this.fs){var t=this.hs,n=this.us.getGL();n.bindFramebuffer(n.FRAMEBUFFER,this.cs),n.readPixels(0,0,t[0],t[1],n.RGBA,n.UNSIGNED_BYTE,this.B),this.fs=!1}return this.B},t.prototype.readPixel=function(t,n){if(t<0||n<0||t>this.hs[0]||n>=this.hs[1])return cl[0]=0,cl[1]=0,cl[2]=0,cl[3]=0,cl;this.readAll();var i=Math.floor(t)+(this.hs[1]-Math.floor(n)-1)*this.hs[0];return cl[0]=this.B[4*i],cl[1]=this.B[4*i+1],cl[2]=this.B[4*i+2],cl[3]=this.B[4*i+3],cl},t.prototype.getTexture=function(){return this.ss},t.prototype.getFramebuffer=function(){return this.cs},t.prototype.ls=function(){var t=this.hs,n=this.us.getGL();this.ss=this.us.createTexture(t,null,this.ss),n.bindFramebuffer(n.FRAMEBUFFER,this.cs),n.viewport(0,0,t[0],t[1]),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.ss,0),this.B=new Uint8Array(t[0]*t[1]*4)},t}(),fl=!0,ll=function(){function t(t,n,i,r,e,o){this.vs=t,this.ds=n;var s={},a=Er(this.ds,this.vs);this.ps=function(t){var n=t[0]+"/"+t[1];return s[n]||(s[n]=a(t)),s[n]},this.ys=r,this.ws=e*e,this.bs=[],this.gs=!1,this.xs=this.vs.canWrapX()&&!!r&&!!this.vs.getExtent()&&Qn(r)==Qn(this.vs.getExtent()),this.Ss=this.vs.getExtent()?Qn(this.vs.getExtent()):null,this.ks=this.ds.getExtent()?Qn(this.ds.getExtent()):null;var u=Zn(i),c=$n(i),h=Vn(i),f=Wn(i),l=this.ps(u),v=this.ps(c),d=this.ps(h),p=this.ps(f),y=10+(o?Math.max(0,Math.ceil(hi(Bn(i)/(o*o*256*256)))):0);if(this.Ms(u,c,h,f,l,v,d,p,y),this.gs){var m=1/0;this.bs.forEach((function(t,n,i){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.bs.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.Ss/2){var n=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];n[0][0]-m>this.Ss/2&&(n[0][0]-=this.Ss),n[1][0]-m>this.Ss/2&&(n[1][0]-=this.Ss),n[2][0]-m>this.Ss/2&&(n[2][0]-=this.Ss);var i=Math.min(n[0][0],n[1][0],n[2][0]);Math.max(n[0][0],n[1][0],n[2][0])-i<this.Ss/2&&(t.source=n)}}.bind(this))}s={}}return t.prototype._s=function(t,n,i,r,e,o){this.bs.push({source:[r,e,o],target:[t,n,i]})},t.prototype.Ms=function(t,n,i,r,e,o,s,a,u){var c=xn([e,o,s,a]),h=this.Ss?Qn(c)/this.Ss:null,f=this.Ss,l=this.vs.canWrapX()&&h>.5&&h<1,v=!1;if(u>0){if(this.ds.isGlobal()&&this.ks)v=Qn(xn([t,n,i,r]))/this.ks>.25||v;!l&&this.vs.isGlobal()&&h&&(v=h>.25||v)}if(!(!v&&this.ys&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||ti(c,this.ys)){var d=0;if(!(v||isFinite(e[0])&&isFinite(e[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(u>0)v=!0;else if(1!=(d=(isFinite(e[0])&&isFinite(e[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(u>0){if(!v){var p=[(t[0]+i[0])/2,(t[1]+i[1])/2],y=this.ps(p),m=void 0;if(l)m=(yi(e[0],f)+yi(s[0],f))/2-yi(y[0],f);else m=(e[0]+s[0])/2-y[0];var w=(e[1]+s[1])/2-y[1];v=m*m+w*w>this.ws}if(v){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var b=[(n[0]+i[0])/2,(n[1]+i[1])/2],g=this.ps(b),x=[(r[0]+t[0])/2,(r[1]+t[1])/2],j=this.ps(x);this.Ms(t,n,b,x,e,o,g,j,u-1),this.Ms(x,b,i,r,j,g,s,a,u-1)}else{var S=[(t[0]+n[0])/2,(t[1]+n[1])/2],k=this.ps(S),M=[(i[0]+r[0])/2,(i[1]+r[1])/2],_=this.ps(M);this.Ms(t,S,M,r,e,k,_,a,u-1),this.Ms(S,n,i,M,k,o,s,_,u-1)}return}}if(l){if(!this.xs)return;this.gs=!0}0==(11&d)&&this._s(t,i,r,e,s,a),0==(14&d)&&this._s(t,i,n,e,s,o),d&&(0==(13&d)&&this._s(n,r,t,o,a,e),0==(7&d)&&this._s(n,r,i,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.bs.forEach((function(n,i,r){var e=n.source;Fn(t,e[0]),Fn(t,e[1]),Fn(t,e[2])})),t},t.prototype.getTriangles=function(){return this.bs},t}(),vl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dl=function(t){function n(n,i,r,e,o,s,a,u,c,h,f,l){var v=t.call(this,o,lt,{interpolate:!!l})||this;v.Os=void 0!==f&&f,v.Rt=a,v.Ts=u,v.Ut=null,v.Es=i,v.As=e,v.Cs=s||o,v.Rs=[],v.Ps=null,v.Is=0;var d=e.getTileCoordExtent(v.Cs),p=v.As.getExtent(),y=v.Es.getExtent(),m=p?Yn(d,p):d;if(0===Bn(m))return v.state=yt,v;var w=n.getExtent();w&&(y=y?Yn(y,w):w);var b=e.getResolution(v.Cs[0]),g=qh(n,r,m,b);if(!isFinite(g)||g<=0)return v.state=yt,v;var x=void 0!==h?h:.5;if(v.Ns=new ll(n,r,m,y,g*x,b),0===v.Ns.getTriangles().length)return v.state=yt,v;v.Is=i.getZForResolution(g);var j=v.Ns.calculateSourceExtent();if(y&&(n.canWrapX()?(j[1]=ui(j[1],y[1],y[3]),j[3]=ui(j[3],y[1],y[3])):j=Yn(j,y)),Bn(j)){for(var S=i.getTileRangeForExtentAndZ(j,v.Is),k=S.minX;k<=S.maxX;k++)for(var M=S.minY;M<=S.maxY;M++){var _=c(v.Is,k,M,a);_&&v.Rs.push(_)}0===v.Rs.length&&(v.state=yt)}else v.state=yt;return v}return vl(n,t),n.prototype.getImage=function(){return this.Ut},n.prototype.zs=function(){var t=[];if(this.Rs.forEach(function(n,i,r){n&&n.getState()==dt&&t.push({extent:this.Es.getTileCoordExtent(n.tileCoord),image:n.getImage()})}.bind(this)),this.Rs.length=0,0===t.length)this.state=pt;else{var n=this.Cs[0],i=this.As.getTileSize(n),r="number"==typeof i?i:i[0],e="number"==typeof i?i:i[1],o=this.As.getResolution(n),s=this.Es.getResolution(this.Is),a=this.As.getTileCoordExtent(this.Cs);this.Ut=Bh(r,e,this.Rt,s,this.Es.getExtent(),o,a,this.Ns,t,this.Ts,this.Os,this.interpolate),this.state=dt}this.changed()},n.prototype.load=function(){if(this.state==lt){this.state=vt,this.changed();var t=0;this.Ps=[],this.Rs.forEach(function(n,i,r){var e=n.getState();if(e==lt||e==vt){t++;var o=Y(n,N,(function(i){var r=n.getState();r!=dt&&r!=pt&&r!=yt||($(o),0===--t&&(this.Fs(),this.zs()))}),this);this.Ps.push(o)}}.bind(this)),0===t?setTimeout(this.zs.bind(this),0):this.Rs.forEach((function(t,n,i){t.getState()==lt&&t.load()}))}},n.prototype.Fs=function(){this.Ps.forEach($),this.Ps=null},n}(jt),pl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function yl(t,n,i){var r=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,r)}function ml(t,n,i,r,e,o){var s=t.getGL();yl(s,n,o);var a,u,c=i.byteLength/r[1],h=1;switch(c%8==0?h=8:c%4==0?h=4:c%2==0&&(h=2),e){case 1:a=s.LUMINANCE;break;case 2:a=s.LUMINANCE_ALPHA;break;case 3:a=s.RGB;break;case 4:a=s.RGBA;break;default:throw new Error("Unsupported number of bands: ".concat(e))}i instanceof Float32Array?(u=s.FLOAT,t.getExtension("OES_texture_float"),t.getExtension("OES_texture_float_linear")):u=s.UNSIGNED_BYTE;var f=s.getParameter(s.UNPACK_ALIGNMENT);s.pixelStorei(s.UNPACK_ALIGNMENT,h),s.texImage2D(s.TEXTURE_2D,0,a,r[0],r[1],0,a,u,i),s.pixelStorei(s.UNPACK_ALIGNMENT,f)}var wl=null;var bl=function(t){function n(n){var i=t.call(this)||this;i.tile,i.textures=[],i.cr=i.cr.bind(i),i.size=ou(n.grid.getTileSize(n.tile.tileCoord[0])),i.Ls=n.tilePixelRatio||1,i.Ts=n.gutter||0,i.bandCount=NaN,i.us=n.helper;var r=new qf(af,cf);return r.fromArray([0,1,1,1,1,0,0,0]),i.us.flushBufferData(r),i.coords=r,i.setTile(n.tile),i}return pl(n,t),n.prototype.setTile=function(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(N,this.cr),this.tile=t,this.textures.length=0,this.loaded=t.getState()===dt,this.loaded)this.Gs();else{if(t instanceof Io){var n=t.getImage();n instanceof Image&&!n.crossOrigin&&(n.crossOrigin="anonymous")}t.addEventListener(N,this.cr)}},n.prototype.Gs=function(){var t=this.us,n=t.getGL(),i=this.tile;if(i instanceof Io||i instanceof dl){var r=i.getImage();if(0!==this.Ts){var e=this.Ls*this.Ts,o=Math.round(r.width-2*e),s=Math.round(r.height-2*e),a=_o(o,s);i.interpolate||E(a,Fh),a.drawImage(r,e,e,o,s,0,0,o,s),r=a.canvas}var u=n.createTexture();return this.textures.push(u),this.bandCount=4,void function(t,n,i,r){yl(t,n,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(n,u,r,i.interpolate)}var c=[this.size[0]*this.Ls,this.size[1]*this.Ls],h=i.getData(),f=h instanceof Float32Array,l=c[0]*c[1],v=f?Float32Array:Uint8Array,d=v.BYTES_PER_ELEMENT,p=h.byteLength/c[1];this.bandCount=Math.floor(p/d/c[0]);var y=Math.ceil(this.bandCount/4);if(1===y){u=n.createTexture();return this.textures.push(u),void ml(t,u,h,c,this.bandCount,i.interpolate)}for(var m=new Array(y),w=0;w<y;++w){u=n.createTexture();this.textures.push(u);var b=w<y-1?4:this.bandCount%4;m[w]=new v(l*b)}for(var g=0,x=0,j=c[0]*this.bandCount,S=0;S<c[1];++S){for(var k=0;k<j;++k){var M=h[x+k],_=Math.floor(g/this.bandCount),O=k%this.bandCount;(T=m[w=Math.floor(O/4)])[_*(b=T.length/l)+O%4]=M,++g}x+=p/d}for(w=0;w<y;++w){var T;ml(t,u=this.textures[w],T=m[w],c,b=T.length/l,i.interpolate)}},n.prototype.cr=function(){this.tile.getState()===dt&&(this.loaded=!0,this.Gs(),this.dispatchEvent(N))},n.prototype.disposeInternal=function(){var t=this.us.getGL();this.us.deleteBuffer(this.coords);for(var n=0;n<this.textures.length;++n)t.deleteTexture(this.textures[n]);this.tile.removeEventListener(N,this.cr)},n.prototype.getPixelData=function(t,n){if(!this.loaded)return null;if(t=Math.floor(this.Ls*t),n=Math.floor(this.Ls*n),this.tile instanceof kt){var i=this.tile.getData(),r=Math.floor(this.Ls*this.size[0]);if(i instanceof DataView){var e=i.byteLength/(this.size[0]*this.size[1]),o=n*r*e+t*e,s=i.buffer.slice(o,o+e);return new DataView(s)}var a=n*r*this.bandCount+t*this.bandCount;return i.slice(a,a+this.bandCount)}var u,c;wl||((u=document.createElement("canvas")).width=1,u.height=1,wl=u.getContext("2d")),wl.clearRect(0,0,1,1);var h=this.tile.getImage();try{wl.drawImage(h,t,n,1,1,0,0,1,1),c=wl.getImageData(0,0,1,1).data}catch(t){return null}return c},n}(I),gl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xl=function(t){function n(n){var i=t.call(this)||this;return i.ready=!0,i.Ds=i.Us.bind(i),i.qs=n,i.declutterExecutorGroup=null,i}return gl(n,t),n.prototype.getFeatures=function(t){return r()},n.prototype.getData=function(t){return null},n.prototype.prepareFrame=function(t){return r()},n.prototype.renderFrame=function(t,n){return r()},n.prototype.loadedTileCallback=function(t,n,i){t[n]||(t[n]={}),t[n][i.tileCoord.toString()]=i},n.prototype.createLoadedTileFinder=function(t,n,i){return function(r,e){var o=this.loadedTileCallback.bind(this,i,r);return t.forEachLoadedTile(n,r,e,o)}.bind(this)},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){},n.prototype.getDataAtPixel=function(t,n,i){return null},n.prototype.getLayer=function(){return this.qs},n.prototype.handleFontsChanged=function(){},n.prototype.Us=function(t){t.target.getState()===wo&&this.renderIfReadyAndVisible()},n.prototype.loadImage=function(t){var n=t.getState();return n!=wo&&n!=bo&&t.addEventListener(N,this.Ds),n==yo&&(t.load(),n=t.getState()),n==wo},n.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==ps&&t.changed()},n.prototype.disposeInternal=function(){delete this.qs,t.prototype.disposeInternal.call(this)},n}(it),jl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Sl="GENERATE_BUFFERS",kl=function(t){function n(n,i){var r=t.call(this,n)||this,e=i||{};return r.Bs=[1,0,0,1,0,0],r.Ws=null,r.Vs=e.postProcesses,r.Wo=e.uniforms,r.helper,n.addChangeListener(es,r.removeHelper.bind(r)),r.dispatchPreComposeEvent=r.dispatchPreComposeEvent.bind(r),r.dispatchPostComposeEvent=r.dispatchPostComposeEvent.bind(r),r}return jl(n,t),n.prototype.dispatchPreComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(hs)){var r=new ks(hs,void 0,n,t);i.dispatchEvent(r)}},n.prototype.dispatchPostComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(fs)){var r=new ks(fs,void 0,n,t);i.dispatchEvent(r)}},n.prototype.reset=function(t){this.Wo=t.uniforms,this.helper&&this.helper.setUniforms(this.Wo)},n.prototype.removeHelper=function(){this.helper&&(this.helper.dispose(),delete this.helper)},n.prototype.prepareFrame=function(t){if(this.getLayer().getRenderSource()){for(var i=!0,r=-1,e=void 0,o=0,s=t.layerStatesArray.length;o<s;o++){var a=t.layerStatesArray[o].layer,u=a.getRenderer();if(u instanceof n){var c=a.getClassName();if((i||c!==e)&&(r+=1,i=!1),e=c,u===this)break}else i=!0}var h="map/"+t.mapId+"/group/"+r;this.helper&&this.helper.canvasCacheKeyMatches(h)||(this.removeHelper(),this.helper=new al({postProcesses:this.Vs,uniforms:this.Wo,canvasCacheKey:h}),e&&(this.helper.getCanvas().className=e),this.afterHelperCreated())}return this.prepareFrameInternal(t)},n.prototype.afterHelperCreated=function(){},n.prototype.prepareFrameInternal=function(t){return!0},n.prototype.disposeInternal=function(){this.removeHelper(),t.prototype.disposeInternal.call(this)},n.prototype.Xs=function(t,n,i){var r=this.getLayer();if(r.hasListener(t)){an(this.Bs,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);var e=new ks(t,this.Bs,i,n);r.dispatchEvent(e)}},n.prototype.preRender=function(t,n){this.Xs(us,t,n)},n.prototype.postRender=function(t,n){this.Xs(cs,t,n)},n.prototype.getDataAtPixel=function(t,n,i){var r=nn([n.pixelRatio,0,0,n.pixelRatio,0,0],t.slice()),e=this.helper.getGL();if(!e)return null;var o=this.getLayer().getExtent();if(o&&!Mn(o,nn(n.pixelToCoordinateTransform,t.slice())))return null;var s=e.getContextAttributes();if(!s||!s.preserveDrawingBuffer)return new Uint8Array;var a,u=Math.round(r[0]),c=Math.round(r[1]),h=this.Ws;if(!h){var f=document.createElement("canvas");f.width=1,f.height=1,h=f.getContext("2d"),this.Ws=h}h.clearRect(0,0,1,1);try{h.drawImage(e.canvas,u,c,1,1,0,0,1,1),a=h.getImageData(0,0,1,1).data}catch(t){return a}return 0===a[3]?null:a},n}(xl),Ml=[],_l={vertexPosition:0,indexPosition:0};function Ol(t,n,i,r,e){t[n+0]=i,t[n+1]=r,t[n+2]=e}function Tl(t,n){var i=n||[],r=256,e=255;return i[0]=Math.floor(t/r/r/r)/e,i[1]=Math.floor(t/r/r)%r/e,i[2]=Math.floor(t/r)%r/e,i[3]=t%r/e,i}function El(t){var n=0,i=256,r=255;return n+=Math.round(t[0]*i*i*i*r),n+=Math.round(t[1]*i*i*r),n+=Math.round(t[2]*i*r),n+=Math.round(t[3]*r)}var Al=kl,Cl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rl={TILE_TEXTURE_ARRAY:"u_tileTextures",TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY",RENDER_EXTENT:"u_renderExtent",RESOLUTION:"u_resolution",ZOOM:"u_zoom"},Pl={TEXTURE_COORD:"a_textureCoord"},Il=[{name:Pl.TEXTURE_COORD,size:2,type:nl.FLOAT}],Nl={};function zl(t){return 2*(1-1/(t+1))-1}function Fl(t,n,i){i in t||(t[i]=[]),t[i].push(n)}function Ll(t,n){var i=t.layerStatesArray[t.layerIndex];i.extent&&(n=Yn(n,Lr(i.extent,t.viewState.projection)));var r=i.layer.getRenderSource();if(!r.getWrapX()){var e=r.getTileGridForProjection(t.viewState.projection).getExtent();e&&(n=Yn(n,e))}return n}function Gl(t,n){return"".concat(t.getKey(),",").concat(Bc(n))}var Dl=function(t){function n(n,i){var r=t.call(this,n,{uniforms:i.uniforms})||this;r.renderComplete=!1,r.Hs=[1,0,0,1,0,0],r.Js=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.Ks=new $c(0,0,0,0),r.Ys=Uc(0,0,0),r.Zs=[0,0],r.$s,r.Qs=i.vertexShader,r.ta=i.fragmentShader,r.na=new qf(uf,cf),r.na.fromArray([0,1,3,1,2,3]);var e=void 0!==i.cacheSize?i.cacheSize:512;return r.ia=new Dc(e),r.ra=i.paletteTextures||[],r.Hi=null,r}return Cl(n,t),n.prototype.reset=function(n){t.prototype.reset.call(this,{uniforms:n.uniforms}),this.Qs=n.vertexShader,this.ta=n.fragmentShader,this.ra=n.paletteTextures||[],this.helper&&(this.$s=this.helper.getProgram(this.ta,this.Qs))},n.prototype.afterHelperCreated=function(){this.$s=this.helper.getProgram(this.ta,this.Qs),this.helper.flushBufferData(this.na)},n.prototype.ea=function(t){var n=this.getLayer(),i=t.getState(),r=n.getUseInterimTilesOnError();return i==dt||i==yt||i==pt&&!r},n.prototype.prepareFrameInternal=function(t){var n=this.getLayer().getRenderSource();return!!n&&(!ni(Ll(t,t.extent))&&n.getState()===ps)},n.prototype.enqueueTiles=function(t,n,i,r){var e=t.viewState,s=this.getLayer(),a=s.getRenderSource(),u=a.getTileGridForProjection(e.projection),c=a.getTilePixelRatio(t.pixelRatio),h=a.getGutterForProjection(e.projection),f=o(a);f in t.wantedTiles||(t.wantedTiles[f]={});for(var l=t.wantedTiles[f],v=this.ia,d=Math.max(i-s.getPreload(),u.getMinZoom(),s.getMinZoom()),p=i;p>=d;--p)for(var y=u.getTileRangeForExtentAndZ(n,p,this.Ks),m=u.getResolution(p),w=y.minX;w<=y.maxX;++w)for(var b=y.minY;b<=y.maxY;++b){var g=Uc(p,w,b,this.Ys),x=Gl(a,g),j=void 0,S=void 0;if(v.containsKey(x)&&(S=(j=v.get(x)).tile),!j||j.tile.key!==a.getKey())if(S=a.getTile(p,w,b,t.pixelRatio,e.projection),j)if(this.ea(S))j.setTile(S);else{var k=S.getInterimTile();j.setTile(k)}else j=new bl({tile:S,grid:u,helper:this.helper,tilePixelRatio:c,gutter:h}),v.set(x,j);Fl(r,j,p);var M=S.getKey();l[M]=!0,S.getState()===lt&&(t.tileQueue.isKeyQueued(M)||t.tileQueue.enqueue([S,f,u.getTileCoordCenter(g),m]))}},n.prototype.renderFrame=function(t){this.Hi=t,this.renderComplete=!0;var n=this.helper.getGL();this.preRender(n,t);var i=t.viewState,r=this.getLayer().getRenderSource(),e=r.getTileGridForProjection(i.projection),s=Ll(t,t.extent),a=e.getZForResolution(i.resolution,r.zDirection),u={};if(t.nextExtent){var c=e.getZForResolution(i.nextResolution,r.zDirection),h=Ll(t,t.nextExtent);this.enqueueTiles(t,h,c,u)}this.enqueueTiles(t,s,a,u);for(var f={},l=o(this),v=t.time,d=!1,y=u[a],m=0,w=y.length;m<w;++m){var b=(z=(K=y[m]).tile).tileCoord;if(K.loaded){if(1===(F=z.getAlpha(l,v))){z.endTransition(l);continue}d=!0,f[L=Bc(b)]=F}if(this.renderComplete=!1,!this.oa(e,b,a+1,u))for(var g=e.getMinZoom(),x=a-1;x>=g;--x){if(this.oa(e,b,x,u))break}}this.helper.useProgram(this.$s),this.helper.prepareDraw(t,!d);for(var j=Object.keys(u).map(Number).sort(p),S=i.center[0],k=i.center[1],M=0,_=j.length;M<_;++M){var O=j[M],T=e.getResolution(O),E=ou(e.getTileSize(O),this.Zs),A=e.getOrigin(O),C=(S-A[0])/(E[0]*T),R=(A[1]-k)/(E[1]*T),P=i.resolution/T,I=zl(O),N=u[O];for(m=0,w=N.length;m<w;++m){if((K=N[m]).loaded){var z,F,L=Bc(b=(z=K.tile).tileCoord),G=b[1],D=b[2];an(this.Hs,0,0,2/(t.size[0]*P/E[0]),-2/(t.size[1]*P/E[1]),i.rotation,-(C-G),-(R-D)),this.helper.setUniformMatrixValue(Rl.TILE_TRANSFORM,Hf(this.Js,this.Hs)),this.helper.bindBuffer(K.coords),this.helper.bindBuffer(this.na),this.helper.enableAttributes(Il);for(var U=0;U<K.textures.length;){var q="TEXTURE"+U,B="".concat(Rl.TILE_TEXTURE_ARRAY,"[").concat(U,"]");n.activeTexture(n[q]),n.bindTexture(n.TEXTURE_2D,K.textures[U]),n.uniform1i(this.helper.getUniformLocation(B),U),++U}for(var W=0;W<this.ra.length;++W){var V=this.ra[W];n.activeTexture(n["TEXTURE"+U]);var X=V.getTexture(n);n.bindTexture(n.TEXTURE_2D,X),n.uniform1i(this.helper.getUniformLocation(V.name),U),++U}(F=L in f?f[L]:1)<1&&(t.animate=!0),this.helper.setUniformFloatValue(Rl.TRANSITION_ALPHA,F),this.helper.setUniformFloatValue(Rl.DEPTH,I),this.helper.setUniformFloatValue(Rl.TEXTURE_PIXEL_WIDTH,E[0]),this.helper.setUniformFloatValue(Rl.TEXTURE_PIXEL_HEIGHT,E[1]),this.helper.setUniformFloatValue(Rl.TEXTURE_RESOLUTION,T),this.helper.setUniformFloatValue(Rl.TEXTURE_ORIGIN_X,A[0]+G*E[0]*T),this.helper.setUniformFloatValue(Rl.TEXTURE_ORIGIN_Y,A[1]-D*E[1]*T),this.helper.setUniformFloatVec4(Rl.RENDER_EXTENT,s),this.helper.setUniformFloatValue(Rl.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(Rl.ZOOM,i.zoom),this.helper.drawElements(0,this.na.getSize())}}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var H=this.helper.getCanvas(),J=this.ia;J.canExpireCache();){var K;(K=J.pop()).dispose()}return t.postRenderFunctions.push((function(t,n){r.expireCache(n.viewState.projection,Nl)})),this.postRender(n,t),H},n.prototype.getData=function(t){if(!this.helper.getGL())return null;var n=this.Hi;if(!n)return null;var i=this.getLayer(),r=nn(n.pixelToCoordinateTransform,t.slice()),e=n.viewState,o=i.getExtent();if(o&&!Mn(Lr(o,e.projection),r))return null;var s=i.getRenderSource(),a=s.getTileGridForProjection(e.projection);if(!s.getWrapX()){var u=a.getExtent();if(u&&!Mn(u,r))return null}for(var c=this.ia,h=a.getZForResolution(e.resolution);h>=a.getMinZoom();--h){var f=a.getTileCoordForCoordAndZ(r,h),l=Gl(s,f);if(c.containsKey(l)){var v=c.get(l);if(v.loaded){var d=a.getOrigin(h),p=ou(a.getTileSize(h)),y=a.getResolution(h),m=(r[0]-d[0])/y-f[1]*p[0],w=(d[1]-r[1])/y-f[2]*p[1];return v.getPixelData(m,w)}}}return null},n.prototype.oa=function(t,n,i,r){var e=t.getTileRangeForTileCoordAndZ(n,i,this.Ks);if(!e)return!1;for(var o=!0,s=this.ia,a=this.getLayer().getRenderSource(),u=e.minX;u<=e.maxX;++u)for(var c=e.minY;c<=e.maxY;++c){var h=Gl(a,[i,u,c]),f=!1;if(s.containsKey(h)){var l=s.get(h);l.loaded&&(Fl(r,l,i),f=!0)}f||(o=!1)}return o},n.prototype.removeHelper=function(){if(this.helper){var n=this.ia;n.forEach((function(t){return t.dispose()})),n.clear()}t.prototype.removeHelper.call(this)},n.prototype.disposeInternal=function(){var n=this.helper;n&&(n.getGL().deleteProgram(this.$s),delete this.$s,n.deleteBuffer(this.na));t.prototype.disposeInternal.call(this),delete this.na,delete this.ia,delete this.Hi},n}(Al),Ul=1,ql=2,Bl=4,Wl=8,Vl=16,Xl=31,Hl=0,Jl={};function Kl(t){if("number"==typeof t)return Ul;if("boolean"==typeof t)return Wl;if("string"==typeof t)return Wo(t)?Bl|ql:ql;if(!Array.isArray(t))throw new Error("Unhandled value type: ".concat(JSON.stringify(t)));var n=t;if(n.every((function(t){return"number"==typeof t})))return 3===n.length||4===n.length?Bl|Vl:Vl;if("string"!=typeof n[0])throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(n)));var i=Jl[n[0]];if(void 0===i)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(n)));return i.getReturnType(n.slice(1))}function Yl(t){return hi(t)%1==0}function Zl(t){var n=t.toString();return-1===n.indexOf(".")?n+".0":n}function $l(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec".concat(t.length,"(").concat(t.map(Zl).join(", "),")")}function Ql(t){var n=Uo(t).slice();return n.length<4&&n.push(1),$l(n.map((function(t,n){return n<3?t/255:t})))}function tv(t,n){return void 0===t.stringLiteralsMap[n]&&(t.stringLiteralsMap[n]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[n]}function nv(t,n){return Zl(tv(t,n))}function iv(t,n,i){if(Array.isArray(n)&&"string"==typeof n[0]){var r=Jl[n[0]];if(void 0===r)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(n)));return r.toGlsl(t,n.slice(1),i)}var e=Kl(n);if((e&Ul)>0)return Zl(n);if((e&Wl)>0)return n.toString();if((e&ql)>0&&(void 0===i||i==ql))return nv(t,n.toString());if((e&Bl)>0&&(void 0===i||i==Bl))return Ql(n);if((e&Vl)>0)return $l(n);throw new Error("Unexpected expression ".concat(n," (expected type ").concat(i,")"))}function rv(t){if(!(Kl(t)&Ul))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(t)," instead"))}function ev(t){for(var n=0;n<t.length;n++)rv(t[n])}function ov(t){if(!(Kl(t)&ql))throw new Error("A string value was expected, got ".concat(JSON.stringify(t)," instead"))}function sv(t){if(!(Kl(t)&Wl))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(t)," instead"))}function av(t,n){if(t.length!==n)throw new Error("Exactly ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function uv(t,n){if(t.length<n)throw new Error("At least ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function cv(t,n){if(t.length>n)throw new Error("At most ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function hv(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got ".concat(t," instead"))}function fv(t,n){if(!Yl(n))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(t)))}function lv(t){return"u_var_"+t}Jl.get={getReturnType:function(t){return Xl},toGlsl:function(t,n){av(n,1),ov(n[0]);var i=n[0].toString();return-1===t.attributes.indexOf(i)&&t.attributes.push(i),(t.inFragmentShader?"v_":"a_")+i}},Jl.var={getReturnType:function(t){return Xl},toGlsl:function(t,n){av(n,1),ov(n[0]);var i=n[0].toString();return-1===t.variables.indexOf(i)&&t.variables.push(i),lv(i)}};var vv="u_paletteTextures";Jl.palette={getReturnType:function(t){return Bl},toGlsl:function(t,n){av(n,2),rv(n[0]);var i=iv(t,n[0]),r=n[1];if(!Array.isArray(r))throw new Error("The second argument of palette must be an array");for(var e=r.length,o=new Uint8Array(4*e),s=0;s<e;s++){var a=r[s],u=void 0;if("string"==typeof a)u=Do(a);else{if(!Array.isArray(a))throw new Error("The second argument of palette must be an array of strings or colors");var c=a.length;if(4===c)u=a;else{if(3!==c)throw new Error("Expected palette color to have 3 or 4 values, got ".concat(c));u=[a[0],a[1],a[2],1]}}var h=4*s;o[h]=u[0],o[h+1]=u[1],o[h+2]=u[2],o[h+3]=255*u[3]}t.paletteTextures||(t.paletteTextures=[]);var f="".concat(vv,"[").concat(t.paletteTextures.length,"]"),l=new ul(f,o);return t.paletteTextures.push(l),"texture2D(".concat(f,", vec2((").concat(i," + 0.5) / ").concat(e,".0, 0.5))")}};var dv="getBandValue";function pv(t){return{getReturnType:function(t){return Wl},toGlsl:function(n,i){av(i,2);for(var r=Xl,e=0;e<i.length;e++)r&=Kl(i[e]);if(r===Hl)throw new Error("All arguments should be of compatible type, got ".concat(JSON.stringify(i)," instead"));return r&=~Bl,"(".concat(iv(n,i[0],r)," ").concat(t," ").concat(iv(n,i[1],r),")")}}}function yv(t){return{getReturnType:function(t){return Wl},toGlsl:function(n,i){uv(i,2);for(var r=0;r<i.length;r++)sv(i[r]);var e="";return e=i.map((function(t){return iv(n,t)})).join(" ".concat(t," ")),e="(".concat(e,")")}}}Jl.band={getReturnType:function(t){return Ul},toGlsl:function(t,n){uv(n,1),cv(n,3);var i=n[0];if(!(dv in t.functions)){for(var r="",e=t.bandCount||1,o=0;o<e;o++){var s=Math.floor(o/4),a=o%4;a===e-1&&1===a&&(a=3);var u="".concat(Rl.TILE_TEXTURE_ARRAY,"[").concat(s,"]");r+="\n if (band == ".concat(o+1,".0) {\n return texture2D(").concat(u,", v_textureCoord + vec2(dx, dy))[").concat(a,"];\n }\n ")}t.functions.getBandValue="\n float getBandValue(float band, float xOffset, float yOffset) {\n float dx = xOffset / ".concat(Rl.TEXTURE_PIXEL_WIDTH,";\n float dy = yOffset / ").concat(Rl.TEXTURE_PIXEL_HEIGHT,";\n ").concat(r,"\n }\n ")}var c=iv(t,i),h=iv(t,n[1]||0),f=iv(t,n[2]||0);return"".concat(dv,"(").concat(c,", ").concat(h,", ").concat(f,")")}},Jl.time={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,0),"u_time"}},Jl.zoom={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,0),"u_zoom"}},Jl.resolution={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,0),"u_resolution"}},Jl["*"]={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," * ").concat(iv(t,n[1]),")")}},Jl["/"]={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," / ").concat(iv(t,n[1]),")")}},Jl["+"]={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," + ").concat(iv(t,n[1]),")")}},Jl["-"]={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," - ").concat(iv(t,n[1]),")")}},Jl.clamp={getReturnType:function(t){return Ul},toGlsl:function(t,n){av(n,3),ev(n);var i=iv(t,n[1]),r=iv(t,n[2]);return"clamp(".concat(iv(t,n[0]),", ").concat(i,", ").concat(r,")")}},Jl["%"]={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,2),ev(n),"mod(".concat(iv(t,n[0]),", ").concat(iv(t,n[1]),")")}},Jl["^"]={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,2),ev(n),"pow(".concat(iv(t,n[0]),", ").concat(iv(t,n[1]),")")}},Jl.abs={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,1),ev(n),"abs(".concat(iv(t,n[0]),")")}},Jl.floor={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,1),ev(n),"floor(".concat(iv(t,n[0]),")")}},Jl.round={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,1),ev(n),"floor(".concat(iv(t,n[0])," + 0.5)")}},Jl.ceil={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,1),ev(n),"ceil(".concat(iv(t,n[0]),")")}},Jl.sin={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,1),ev(n),"sin(".concat(iv(t,n[0]),")")}},Jl.cos={getReturnType:function(t){return Ul},toGlsl:function(t,n){return av(n,1),ev(n),"cos(".concat(iv(t,n[0]),")")}},Jl.atan={getReturnType:function(t){return Ul},toGlsl:function(t,n){return uv(n,1),cv(n,2),ev(n),2===n.length?"atan(".concat(iv(t,n[0]),", ").concat(iv(t,n[1]),")"):"atan(".concat(iv(t,n[0]),")")}},Jl[">"]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," > ").concat(iv(t,n[1]),")")}},Jl[">="]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," >= ").concat(iv(t,n[1]),")")}},Jl["<"]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," < ").concat(iv(t,n[1]),")")}},Jl["<="]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," <= ").concat(iv(t,n[1]),")")}},Jl["=="]=pv("=="),Jl["!="]=pv("!="),Jl["!"]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,1),sv(n[0]),"(!".concat(iv(t,n[0]),")")}},Jl.all=yv("&&"),Jl.any=yv("||"),Jl.between={getReturnType:function(t){return Wl},toGlsl:function(t,n){av(n,3),ev(n);var i=iv(t,n[1]),r=iv(t,n[2]),e=iv(t,n[0]);return"(".concat(e," >= ").concat(i," && ").concat(e," <= ").concat(r,")")}},Jl.array={getReturnType:function(t){return Vl},toGlsl:function(t,n){uv(n,2),cv(n,4),ev(n);var i=n.map((function(n){return iv(t,n,Ul)}));return"vec".concat(n.length,"(").concat(i.join(", "),")")}},Jl.color={getReturnType:function(t){return Bl},toGlsl:function(t,n){uv(n,3),cv(n,4),ev(n);var i=n;3===n.length&&i.push(1);var r=n.map((function(n,i){return iv(t,n,Ul)+(i<3?" / 255.0":"")}));return"vec".concat(n.length,"(").concat(r.join(", "),")")}},Jl.interpolate={getReturnType:function(t){for(var n=Bl|Ul,i=3;i<t.length;i+=2)n&=Kl(t[i]);return n},toGlsl:function(t,n,i){hv(n),uv(n,6);var r,e=n[0];switch(e[0]){case"linear":r=1;break;case"exponential":r=e[1];break;default:r=null}if(!r)throw new Error('Invalid interpolation type for "interpolate" operator, received: '.concat(JSON.stringify(e)));var o=void 0!==i?i:Xl,s=Jl.interpolate.getReturnType(n)&o;fv(n,s);for(var a=iv(t,n[1]),u=Zl(r),c="",h=2;h<n.length-2;h+=2){var f=iv(t,n[h]),l=c||iv(t,n[h+1],s),v=iv(t,n[h+2]),d=iv(t,n[h+3],s);c="mix(".concat(l,", ").concat(d,", pow(clamp((").concat(a," - ").concat(f,") / (").concat(v," - ").concat(f,"), 0.0, 1.0), ").concat(u,"))")}return c}},Jl.match={getReturnType:function(t){for(var n=Xl,i=2;i<t.length;i+=2)n&=Kl(t[i]);return n&=Kl(t[t.length-1])},toGlsl:function(t,n,i){hv(n),uv(n,4);var r=void 0!==i?i:Xl,e=Jl.match.getReturnType(n)&r;fv(n,e);for(var o=iv(t,n[0]),s=iv(t,n[n.length-1],e),a=null,u=n.length-3;u>=1;u-=2){var c=iv(t,n[u]),h=iv(t,n[u+1],e);a="(".concat(o," == ").concat(c," ? ").concat(h," : ").concat(a||s,")")}return a}},Jl.case={getReturnType:function(t){for(var n=Xl,i=1;i<t.length;i+=2)n&=Kl(t[i]);return n&=Kl(t[t.length-1])},toGlsl:function(t,n,i){!function(t){if(t.length%2==0)throw new Error("An odd amount of arguments was expected, got ".concat(t," instead"))}(n),uv(n,3);var r=void 0!==i?i:Xl,e=Jl.case.getReturnType(n)&r;fv(n,e);for(var o=0;o<n.length-1;o+=2)sv(n[o]);var s=iv(t,n[n.length-1],e),a=null;for(o=n.length-3;o>=0;o-=2){var u=iv(t,n[o]),c=iv(t,n[o+1],e);a="(".concat(u," ? ").concat(c," : ").concat(a||s,")")}return a}};var mv=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,n,i){return this.varyings.push({name:t,type:n,expression:i}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var n=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",i=this.attributes,r=this.varyings;return t&&(i=i.concat("vec4 a_hitColor"),r=r.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n"),"\nattribute vec2 a_position;\nattribute float a_index;\n").concat(i.map((function(t){return"attribute "+t+";"})).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(r.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n"),"\nvoid main(void) {\n mat4 offsetMatrix = ").concat(n,";\n vec2 halfSize = ").concat(this.sizeExpression," * 0.5;\n vec2 offset = ").concat(this.offsetExpression,";\n float angle = ").concat(this.rotationExpression,";\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = ").concat(this.texCoordExpression,";\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n").concat(r.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n"),"\n}")},t.prototype.getSymbolFragmentShader=function(t){var n=t?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",i=this.varyings;return t&&(i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(i.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n"),"\nvoid main(void) {\n if (").concat(this.discardExpression,") { discard; }\n gl_FragColor = ").concat(this.colorExpression,";\n gl_FragColor.rgb *= gl_FragColor.a;\n").concat(n,"\n}")},t}();function wv(t){var n=t.symbol,i=void 0!==n.size?n.size:1,r=n.color||"white",e=n.textureCoord||[0,0,1,1],o=n.offset||[0,0],s=void 0!==n.opacity?n.opacity:1,a=void 0!==n.rotation?n.rotation:0,u={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},c=iv(u,i,Vl|Ul),h=iv(u,o,Vl),f=iv(u,e,Vl),l=iv(u,a,Ul),v={inFragmentShader:!0,variables:u.variables,attributes:[],stringLiteralsMap:u.stringLiteralsMap,functions:{}},d=iv(v,r,Bl),p=iv(v,s,Ul),y="1.0",m="vec2(".concat(iv(v,i,Vl|Ul),").x");switch(n.symbolType){case"square":case"image":break;case"circle":y="(1.0-smoothstep(1.-4./".concat(m,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var w="(v_quadCoord*2.-1.)",b="(atan(".concat(w,".x,").concat(w,".y))");y="(1.0-smoothstep(.5-3./".concat(m,",.5,cos(floor(.5+").concat(b,"/2.094395102)*2.094395102-").concat(b,")*length(").concat(w,")))");break;default:throw new Error("Unexpected symbol type: "+n.symbolType)}var g=(new mv).setSizeExpression("vec2(".concat(c,")")).setRotationExpression(l).setSymbolOffsetExpression(h).setTextureCoordinateExpression(f).setSymbolRotateWithView(!!n.rotateWithView).setColorExpression("vec4(".concat(d,".rgb, ").concat(d,".a * ").concat(p," * ").concat(y,")"));if(t.filter){var x=iv(v,t.filter,Wl);g.setFragmentDiscardExpression("!".concat(x))}var j={};if(v.variables.forEach((function(n){var i=lv(n);g.addUniform("float ".concat(i)),j[i]=function(){if(!t.variables||void 0===t.variables[n])throw new Error("The following variable is missing from the style: ".concat(n));var i=t.variables[n];return"string"==typeof i&&(i=tv(u,i)),void 0!==i?i:-9999999}})),"image"===n.symbolType&&n.src){var S=new Image;S.crossOrigin=void 0===n.crossOrigin?"anonymous":n.crossOrigin,S.src=n.src,g.addUniform("sampler2D u_texture").setColorExpression(g.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),j.u_texture=S}return v.attributes.forEach((function(t){-1===u.attributes.indexOf(t)&&u.attributes.push(t),g.addVarying("v_".concat(t),"float","a_".concat(t))})),u.attributes.forEach((function(t){g.addAttribute("float a_".concat(t))})),{builder:g,attributes:u.attributes.map((function(t){return{name:t,callback:function(n,i){var r=i[t];return"string"==typeof r&&(r=tv(u,r)),void 0!==r?r:-9999999}}})),uniforms:j}}var bv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gv=function(t){function n(n){var i=t.call(this,{extent:n.extent,origin:n.origin,origins:n.origins,resolutions:n.resolutions,tileSize:n.tileSize,tileSizes:n.tileSizes,sizes:n.sizes})||this;return i.sa=n.matrixIds,i}return bv(n,t),n.prototype.getMatrixId=function(t){return this.sa[t]},n.prototype.getMatrixIds=function(){return this.sa},n}(Vh),xv=gv;function jv(t,n,i){var r=[],e=[],o=[],s=[],a=[],u=void 0!==i?i:[],c=br(t.SupportedCRS),h=c.getMetersPerUnit(),f="ne"==c.getAxisOrientation().substr(0,2);return t.TileMatrix.sort((function(t,n){return n.ScaleDenominator-t.ScaleDenominator})),t.TileMatrix.forEach((function(n){if(!(u.length>0)||g(u,(function(i){return n.Identifier==i.TileMatrix||-1===n.Identifier.indexOf(":")&&t.Identifier+":"+n.Identifier===i.TileMatrix}))){e.push(n.Identifier);var i=28e-5*n.ScaleDenominator/h,c=n.TileWidth,l=n.TileHeight;f?o.push([n.TopLeftCorner[1],n.TopLeftCorner[0]]):o.push(n.TopLeftCorner),r.push(i),s.push(c==l?c:[c,l]),a.push([n.MatrixWidth,n.MatrixHeight])}})),new gv({extent:n,origins:o,resolutions:r,matrixIds:e,tileSizes:s,sizes:a})}var Sv=function(){function t(t){this.aa=t.opacity,this.ua=t.rotateWithView,this.Gr=t.rotation,this.ca=t.scale,this.ha=ou(t.scale),this.fa=t.displacement}return t.prototype.clone=function(){var n=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(n)?n.slice():n,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.aa},t.prototype.getRotateWithView=function(){return this.ua},t.prototype.getRotation=function(){return this.Gr},t.prototype.getScale=function(){return this.ca},t.prototype.getScaleArray=function(){return this.ha},t.prototype.getDisplacement=function(){return this.fa},t.prototype.getAnchor=function(){return r()},t.prototype.getImage=function(t){return r()},t.prototype.getHitDetectionImage=function(){return r()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return r()},t.prototype.getImageSize=function(){return r()},t.prototype.getOrigin=function(){return r()},t.prototype.getSize=function(){return r()},t.prototype.setDisplacement=function(t){this.fa=t},t.prototype.setOpacity=function(t){this.aa=t},t.prototype.setRotateWithView=function(t){this.ua=t},t.prototype.setRotation=function(t){this.Gr=t},t.prototype.setScale=function(t){this.ca=t,this.ha=ou(t)},t.prototype.listenImageChange=function(t){r()},t.prototype.load=function(){r()},t.prototype.unlistenImageChange=function(t){r()},t}(),kv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mv=function(t){function n(n){var i=this,r=void 0!==n.rotateWithView&&n.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==n.rotation?n.rotation:0,scale:void 0!==n.scale?n.scale:1,displacement:void 0!==n.displacement?n.displacement:[0,0]})||this).Ut=void 0,i.la=null,i.va=void 0!==n.fill?n.fill:null,i.So=[0,0],i.Jt=n.points,i.da=void 0!==n.radius?n.radius:n.radius1,i.pa=n.radius2,i.Kt=void 0!==n.angle?n.angle:0,i.ya=void 0!==n.stroke?n.stroke:null,i.hs=null,i.ma=null,i.render(),i}return kv(n,t),n.prototype.clone=function(){var t=this.getScale(),i=new n({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 i.setOpacity(this.getOpacity()),i},n.prototype.getAnchor=function(){var t=this.hs;if(!t)return null;var n=this.getDisplacement();return[t[0]/2-n[0],t[1]/2+n[1]]},n.prototype.getAngle=function(){return this.Kt},n.prototype.getFill=function(){return this.va},n.prototype.getHitDetectionImage=function(){return this.la||this.wa(this.ma),this.la},n.prototype.getImage=function(t){var n=this.Ut[t];if(!n){var i=this.ma,r=_o(i.size*t,i.size*t);this.ba(i,r,t),n=r.canvas,this.Ut[t]=n}return n},n.prototype.getPixelRatio=function(t){return t},n.prototype.getImageSize=function(){return this.hs},n.prototype.getImageState=function(){return wo},n.prototype.getOrigin=function(){return this.So},n.prototype.getPoints=function(){return this.Jt},n.prototype.getRadius=function(){return this.da},n.prototype.getRadius2=function(){return this.pa},n.prototype.getSize=function(){return this.hs},n.prototype.getStroke=function(){return this.ya},n.prototype.listenImageChange=function(t){},n.prototype.load=function(){},n.prototype.unlistenImageChange=function(t){},n.prototype.ga=function(t,n,i){if(0===n||this.Jt===1/0||"bevel"!==t&&"miter"!==t)return n;var r=this.da,e=void 0===this.pa?r:this.pa;if(r<e){var o=r;r=e,e=o}var s=void 0===this.pa?this.Jt:2*this.Jt,a=2*Math.PI/s,u=e*Math.sin(a),c=r-Math.sqrt(e*e-u*u),h=Math.sqrt(u*u+c*c),f=h/u;if("miter"===t&&f<=i)return f*n;var l=n/2/f,v=n/2*(c/h),d=Math.sqrt((r+l)*(r+l)+v*v)-r;if(void 0===this.pa||"bevel"===t)return 2*d;var p=r*Math.sin(a),y=e-Math.sqrt(r*r-p*p),m=Math.sqrt(p*p+y*y)/p;if(m<=i){var w=m*n/2-e-r;return 2*Math.max(d,w)}return 2*d},n.prototype.createRenderOptions=function(){var t,n=Gs,i=0,r=null,e=0,o=0;this.ya&&(null===(t=this.ya.getColor())&&(t=Us),t=eh(t),void 0===(o=this.ya.getWidth())&&(o=1),r=this.ya.getLineDash(),e=this.ya.getLineDashOffset(),void 0===(n=this.ya.getLineJoin())&&(n=Gs),void 0===(i=this.ya.getMiterLimit())&&(i=Ds));var s=this.ga(n,o,i),a=Math.max(this.da,this.pa||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:r,lineDashOffset:e,lineJoin:n,miterLimit:i}},n.prototype.render=function(){this.ma=this.createRenderOptions();var t=this.ma.size;this.Ut={},this.hs=[t,t]},n.prototype.ba=function(t,n,i){if(n.scale(i,i),n.translate(t.size/2,t.size/2),this.xa(n),this.va){var r=this.va.getColor();null===r&&(r=zs),n.fillStyle=eh(r),n.fill()}this.ya&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,n.setLineDash&&t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},n.prototype.wa=function(t){if(this.va){var n=this.va.getColor(),i=0;if("string"==typeof n&&(n=Uo(n)),null===n?i=1:Array.isArray(n)&&(i=4===n.length?n[3]:1),0===i){var r=_o(t.size,t.size);this.la=r.canvas,this.ja(t,r)}}this.la||(this.la=this.getImage(1))},n.prototype.xa=function(t){var n=this.Jt,i=this.da;if(n===1/0)t.arc(0,0,i,0,2*Math.PI);else{var r=void 0===this.pa?i:this.pa;void 0!==this.pa&&(n*=2);for(var e=this.Kt-Math.PI/2,o=2*Math.PI/n,s=0;s<n;s++){var a=e+s*o,u=s%2==0?i:r;t.lineTo(u*Math.cos(a),u*Math.sin(a))}t.closePath()}},n.prototype.ja=function(t,n){n.translate(t.size/2,t.size/2),this.xa(n),n.fillStyle=zs,n.fill(),this.ya&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},n}(Sv),_v=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ov=function(t){function n(n){var i=n||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return _v(n,t),n.prototype.clone=function(){var t=this.getScale(),i=new n({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},n.prototype.setRadius=function(t){this.da=t,this.render()},n}(Mv),Tv=function(){function t(t){var n=t||{};this.Sa=void 0!==n.color?n.color:null}return t.prototype.clone=function(){var n=this.getColor();return new t({color:Array.isArray(n)?n.slice():n||void 0})},t.prototype.getColor=function(){return this.Sa},t.prototype.setColor=function(t){this.Sa=t},t}(),Ev="fraction",Av="pixels",Cv="bottom-left",Rv="bottom-right",Pv="top-left",Iv="top-right",Nv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zv=null,Fv=function(t){function n(n,i,r,e,o,s){var a=t.call(this)||this;return a.ka=null,a.Nt=n||new Image,null!==e&&(a.Nt.crossOrigin=e),a.Ut={},a.Sa=s,a.zt=null,a.Ma=o,a.hs=r,a.Pt=i,a._a,a}return Nv(n,t),n.prototype.Oa=function(){if(void 0===this._a&&this.Ma===wo){zv||(zv=_o(1,1)),zv.drawImage(this.Nt,0,0);try{zv.getImageData(0,0,1,1),this._a=!1}catch(t){zv=null,this._a=!0}}return!0===this._a},n.prototype.Ta=function(){this.dispatchEvent(N)},n.prototype.Lt=function(){this.Ma=bo,this.Gt(),this.Ta()},n.prototype.Dt=function(){this.Ma=wo,this.hs?(this.Nt.width=this.hs[0],this.Nt.height=this.hs[1]):this.hs=[this.Nt.width,this.Nt.height],this.Gt(),this.Ta()},n.prototype.getImage=function(t){return this.Ea(t),this.Ut[t]?this.Ut[t]:this.Nt},n.prototype.getPixelRatio=function(t){return this.Ea(t),this.Ut[t]?t:1},n.prototype.getImageState=function(){return this.Ma},n.prototype.getHitDetectionImage=function(){if(!this.ka)if(this.Oa()){var t=this.hs[0],n=this.hs[1],i=_o(t,n);i.fillRect(0,0,t,n),this.ka=i.canvas}else this.ka=this.Nt;return this.ka},n.prototype.getSize=function(){return this.hs},n.prototype.getSrc=function(){return this.Pt},n.prototype.load=function(){if(this.Ma==yo){this.Ma=mo;try{this.Nt.src=this.Pt}catch(t){this.Lt()}this.zt=jo(this.Nt,this.Dt.bind(this),this.Lt.bind(this))}},n.prototype.Ea=function(t){if(this.Sa&&!this.Ut[t]&&this.Ma===wo){var n=document.createElement("canvas");this.Ut[t]=n,n.width=Math.ceil(this.Nt.width*t),n.height=Math.ceil(this.Nt.height*t);var i=n.getContext("2d");if(i.scale(t,t),i.drawImage(this.Nt,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.Oa())i.fillStyle=Lo(this.Sa),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(this.Nt,0,0);else{for(var r=i.getImageData(0,0,n.width,n.height),e=r.data,o=this.Sa[0]/255,s=this.Sa[1]/255,a=this.Sa[2]/255,u=this.Sa[3],c=0,h=e.length;c<h;c+=4)e[c]*=o,e[c+1]*=s,e[c+2]*=a,e[c+3]*=u;i.putImageData(r,0,0)}}},n.prototype.Gt=function(){this.zt&&(this.zt(),this.zt=null)},n}(I);function Lv(t,n,i,r,e,o){var s=Jo.get(n,r,o);return s||(s=new Fv(t,n,i,r,e,o),Jo.set(n,r,o,s)),s}var Gv=Fv,Dv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Uv=function(t){function n(n){var i=this,r=n||{},e=void 0!==r.opacity?r.opacity:1,s=void 0!==r.rotation?r.rotation:0,a=void 0!==r.scale?r.scale:1,u=void 0!==r.rotateWithView&&r.rotateWithView;(i=t.call(this,{opacity:e,rotation:s,scale:a,displacement:void 0!==r.displacement?r.displacement:[0,0],rotateWithView:u})||this).xe=void 0!==r.anchor?r.anchor:[.5,.5],i.Aa=null,i.Ca=void 0!==r.anchorOrigin?r.anchorOrigin:Pv,i.Ra=void 0!==r.anchorXUnits?r.anchorXUnits:Ev,i.Pa=void 0!==r.anchorYUnits?r.anchorYUnits:Ev,i.Bt=void 0!==r.crossOrigin?r.crossOrigin:null;var c=void 0!==r.img?r.img:null;i.Ia=r.imgSize;var h=r.src;Mt(!(void 0!==h&&c),4),Mt(!c||c&&i.Ia,5),void 0!==h&&0!==h.length||!c||(h=c.src||o(c)),Mt(void 0!==h&&h.length>0,6);var f=void 0!==r.src?yo:wo;return i.Sa=void 0!==r.color?Uo(r.color):null,i.Na=Lv(c,h,void 0!==i.Ia?i.Ia:null,i.Bt,f,i.Sa),i.za=void 0!==r.offset?r.offset:[0,0],i.Fa=void 0!==r.offsetOrigin?r.offsetOrigin:Pv,i.So=null,i.hs=void 0!==r.size?r.size:null,i}return Dv(n,t),n.prototype.clone=function(){var t=this.getScale();return new n({anchor:this.xe.slice(),anchorOrigin:this.Ca,anchorXUnits:this.Ra,anchorYUnits:this.Pa,color:this.Sa&&this.Sa.slice?this.Sa.slice():this.Sa||void 0,crossOrigin:this.Bt,imgSize:this.Ia,offset:this.za.slice(),offsetOrigin:this.Fa,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.hs?this.hs.slice():void 0,src:this.getSrc()})},n.prototype.getAnchor=function(){var t=this.Aa;if(!t){t=this.xe;var n=this.getSize();if(this.Ra==Ev||this.Pa==Ev){if(!n)return null;t=this.xe.slice(),this.Ra==Ev&&(t[0]*=n[0]),this.Pa==Ev&&(t[1]*=n[1])}if(this.Ca!=Pv){if(!n)return null;t===this.xe&&(t=this.xe.slice()),this.Ca!=Iv&&this.Ca!=Rv||(t[0]=-t[0]+n[0]),this.Ca!=Cv&&this.Ca!=Rv||(t[1]=-t[1]+n[1])}this.Aa=t}var i=this.getDisplacement();return[t[0]-i[0],t[1]+i[1]]},n.prototype.setAnchor=function(t){this.xe=t,this.Aa=null},n.prototype.getColor=function(){return this.Sa},n.prototype.getImage=function(t){return this.Na.getImage(t)},n.prototype.getPixelRatio=function(t){return this.Na.getPixelRatio(t)},n.prototype.getImageSize=function(){return this.Na.getSize()},n.prototype.getImageState=function(){return this.Na.getImageState()},n.prototype.getHitDetectionImage=function(){return this.Na.getHitDetectionImage()},n.prototype.getOrigin=function(){if(this.So)return this.So;var t=this.za;if(this.Fa!=Pv){var n=this.getSize(),i=this.Na.getSize();if(!n||!i)return null;t=t.slice(),this.Fa!=Iv&&this.Fa!=Rv||(t[0]=i[0]-n[0]-t[0]),this.Fa!=Cv&&this.Fa!=Rv||(t[1]=i[1]-n[1]-t[1])}return this.So=t,this.So},n.prototype.getSrc=function(){return this.Na.getSrc()},n.prototype.getSize=function(){return this.hs?this.hs:this.Na.getSize()},n.prototype.listenImageChange=function(t){this.Na.addEventListener(N,t)},n.prototype.load=function(){this.Na.load()},n.prototype.unlistenImageChange=function(t){this.Na.removeEventListener(N,t)},n}(Sv),qv=function(){function t(t){var n=t||{};this.Sa=void 0!==n.color?n.color:null,this.La=n.lineCap,this.Ga=void 0!==n.lineDash?n.lineDash:null,this.Da=n.lineDashOffset,this.Ua=n.lineJoin,this.qa=n.miterLimit,this.Ba=n.width}return t.prototype.clone=function(){var n=this.getColor();return new t({color:Array.isArray(n)?n.slice():n||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.Sa},t.prototype.getLineCap=function(){return this.La},t.prototype.getLineDash=function(){return this.Ga},t.prototype.getLineDashOffset=function(){return this.Da},t.prototype.getLineJoin=function(){return this.Ua},t.prototype.getMiterLimit=function(){return this.qa},t.prototype.getWidth=function(){return this.Ba},t.prototype.setColor=function(t){this.Sa=t},t.prototype.setLineCap=function(t){this.La=t},t.prototype.setLineDash=function(t){this.Ga=t},t.prototype.setLineDashOffset=function(t){this.Da=t},t.prototype.setLineJoin=function(t){this.Ua=t},t.prototype.setMiterLimit=function(t){this.qa=t},t.prototype.setWidth=function(t){this.Ba=t},t}();function Bv(t){return(Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Wv=function(){function t(t){var n=t||{};this.Zr=null,this.Wa=Kv,void 0!==n.geometry&&this.setGeometry(n.geometry),this.va=void 0!==n.fill?n.fill:null,this.Nt=void 0!==n.image?n.image:null,this.cn=void 0!==n.renderer?n.renderer:null,this.Va=void 0!==n.hitDetectionRenderer?n.hitDetectionRenderer:null,this.ya=void 0!==n.stroke?n.stroke:null,this.eo=void 0!==n.text?n.text:null,this.Xa=n.zIndex}return t.prototype.clone=function(){var n=this.getGeometry();return n&&"object"===Bv(n)&&(n=n.clone()),new t({geometry:n,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.cn},t.prototype.setRenderer=function(t){this.cn=t},t.prototype.setHitDetectionRenderer=function(t){this.Va=t},t.prototype.getHitDetectionRenderer=function(){return this.Va},t.prototype.getGeometry=function(){return this.Zr},t.prototype.getGeometryFunction=function(){return this.Wa},t.prototype.getFill=function(){return this.va},t.prototype.setFill=function(t){this.va=t},t.prototype.getImage=function(){return this.Nt},t.prototype.setImage=function(t){this.Nt=t},t.prototype.getStroke=function(){return this.ya},t.prototype.setStroke=function(t){this.ya=t},t.prototype.getText=function(){return this.eo},t.prototype.setText=function(t){this.eo=t},t.prototype.getZIndex=function(){return this.Xa},t.prototype.setGeometry=function(t){"function"==typeof t?this.Wa=t:"string"==typeof t?this.Wa=function(n){return n.get(t)}:t?void 0!==t&&(this.Wa=function(){return t}):this.Wa=Kv,this.Zr=t},t.prototype.setZIndex=function(t){this.Xa=t},t}();function Vv(t){var n;if("function"==typeof t)n=t;else{var i;if(Array.isArray(t))i=t;else Mt("function"==typeof t.getZIndex,41),i=[t];n=function(){return i}}return n}var Xv=null;function Hv(t,n){if(!Xv){var i=new Tv({color:"rgba(255,255,255,0.4)"}),r=new qv({color:"#3399CC",width:1.25});Xv=[new Wv({image:new Ov({fill:i,stroke:r,radius:5}),fill:i,stroke:r})]}return Xv}function Jv(){var t={},n=[255,255,255,1],i=[0,153,255,1];return t[Pt.POLYGON]=[new Wv({fill:new Tv({color:[255,255,255,.5]})})],t[Pt.MULTI_POLYGON]=t[Pt.POLYGON],t[Pt.LINE_STRING]=[new Wv({stroke:new qv({color:n,width:5})}),new Wv({stroke:new qv({color:i,width:3})})],t[Pt.MULTI_LINE_STRING]=t[Pt.LINE_STRING],t[Pt.CIRCLE]=t[Pt.POLYGON].concat(t[Pt.LINE_STRING]),t[Pt.POINT]=[new Wv({image:new Ov({radius:6,fill:new Tv({color:i}),stroke:new qv({color:n,width:1.5})}),zIndex:1/0})],t[Pt.MULTI_POINT]=t[Pt.POINT],t[Pt.GEOMETRY_COLLECTION]=t[Pt.POLYGON].concat(t[Pt.LINE_STRING],t[Pt.POINT]),t}function Kv(t){return t.getGeometry()}var Yv=Wv,Zv="point",$v="line",Qv=function(){function t(t){var n=t||{};this.Ha=n.font,this.Gr=n.rotation,this.ua=n.rotateWithView,this.ca=n.scale,this.ha=ou(void 0!==n.scale?n.scale:1),this.eo=n.text,this.Ja=n.textAlign,this.Ka=n.textBaseline,this.va=void 0!==n.fill?n.fill:new Tv({color:"#333"}),this.Ya=void 0!==n.maxAngle?n.maxAngle:Math.PI/4,this.Za=void 0!==n.placement?n.placement:Zv,this.$a=!!n.overflow,this.ya=void 0!==n.stroke?n.stroke:null,this.Qa=void 0!==n.offsetX?n.offsetX:0,this.tu=void 0!==n.offsetY?n.offsetY:0,this.nu=n.backgroundFill?n.backgroundFill:null,this.iu=n.backgroundStroke?n.backgroundStroke:null,this.Ei=void 0===n.padding?null:n.padding}return t.prototype.clone=function(){var n=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(n)?n.slice():n,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})},t.prototype.getOverflow=function(){return this.$a},t.prototype.getFont=function(){return this.Ha},t.prototype.getMaxAngle=function(){return this.Ya},t.prototype.getPlacement=function(){return this.Za},t.prototype.getOffsetX=function(){return this.Qa},t.prototype.getOffsetY=function(){return this.tu},t.prototype.getFill=function(){return this.va},t.prototype.getRotateWithView=function(){return this.ua},t.prototype.getRotation=function(){return this.Gr},t.prototype.getScale=function(){return this.ca},t.prototype.getScaleArray=function(){return this.ha},t.prototype.getStroke=function(){return this.ya},t.prototype.getText=function(){return this.eo},t.prototype.getTextAlign=function(){return this.Ja},t.prototype.getTextBaseline=function(){return this.Ka},t.prototype.getBackgroundFill=function(){return this.nu},t.prototype.getBackgroundStroke=function(){return this.iu},t.prototype.getPadding=function(){return this.Ei},t.prototype.setOverflow=function(t){this.$a=t},t.prototype.setFont=function(t){this.Ha=t},t.prototype.setMaxAngle=function(t){this.Ya=t},t.prototype.setOffsetX=function(t){this.Qa=t},t.prototype.setOffsetY=function(t){this.tu=t},t.prototype.setPlacement=function(t){this.Za=t},t.prototype.setRotateWithView=function(t){this.ua=t},t.prototype.setFill=function(t){this.va=t},t.prototype.setRotation=function(t){this.Gr=t},t.prototype.setScale=function(t){this.ca=t,this.ha=ou(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.ya=t},t.prototype.setText=function(t){this.eo=t},t.prototype.setTextAlign=function(t){this.Ja=t},t.prototype.setTextBaseline=function(t){this.Ka=t},t.prototype.setBackgroundFill=function(t){this.nu=t},t.prototype.setBackgroundStroke=function(t){this.iu=t},t.prototype.setPadding=function(t){this.Ei=t},t}(),td=function(){function t(t){this.ru,this.eu,this.ou,this.su=void 0===t||t,this.au=0}return t.prototype.insertItem=function(t){var n={prev:void 0,next:void 0,data:t},i=this.ou;if(i){var r=i.next;n.prev=i,n.next=r,i.next=n,r&&(r.prev=n),i===this.eu&&(this.eu=n)}else this.ru=n,this.eu=n,this.su&&(n.next=n,n.prev=n);this.ou=n,this.au++},t.prototype.removeItem=function(){var t=this.ou;if(t){var n=t.next,i=t.prev;n&&(n.prev=i),i&&(i.next=n),this.ou=n||i,this.ru===this.eu?(this.ou=void 0,this.ru=void 0,this.eu=void 0):this.ru===t?this.ru=this.ou:this.eu===t&&(this.eu=i?this.ou.prev:this.ou),this.au--}},t.prototype.firstItem=function(){if(this.ou=this.ru,this.ou)return this.ou.data},t.prototype.lastItem=function(){if(this.ou=this.eu,this.ou)return this.ou.data},t.prototype.nextItem=function(){if(this.ou&&this.ou.next)return this.ou=this.ou.next,this.ou.data},t.prototype.getNextItem=function(){if(this.ou&&this.ou.next)return this.ou.next.data},t.prototype.prevItem=function(){if(this.ou&&this.ou.prev)return this.ou=this.ou.prev,this.ou.data},t.prototype.getPrevItem=function(){if(this.ou&&this.ou.prev)return this.ou.prev.data},t.prototype.getCurrItem=function(){if(this.ou)return this.ou.data},t.prototype.setFirstItem=function(){this.su&&this.ou&&(this.ru=this.ou,this.eu=this.ou.prev)},t.prototype.concat=function(t){if(t.ou){if(this.ou){var n=this.ou.next;this.ou.next=t.ru,t.ru.prev=this.ou,n.prev=t.eu,t.eu.next=n,this.au+=t.au}else this.ou=t.ou,this.ru=t.ru,this.eu=t.eu,this.au=t.au;t.ou=void 0,t.ru=void 0,t.eu=void 0,t.au=0}},t.prototype.getLength=function(){return this.au},t}(),nd=i(72),id=function(){function t(t){this.uu=new nd(t),this.cu={}}return t.prototype.insert=function(t,n){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:n};this.uu.insert(i),this.cu[o(n)]=i},t.prototype.load=function(t,n){for(var i=new Array(n.length),r=0,e=n.length;r<e;r++){var s=t[r],a=n[r],u={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};i[r]=u,this.cu[o(a)]=u}this.uu.load(i)},t.prototype.remove=function(t){var n=o(t),i=this.cu[n];return delete this.cu[n],null!==this.uu.remove(i)},t.prototype.update=function(t,n){var i=this.cu[o(n)];In([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(n),this.insert(t,n))},t.prototype.getAll=function(){return this.uu.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.uu.search(n).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.hu(this.getAll(),t)},t.prototype.forEachInExtent=function(t,n){return this.hu(this.getInExtent(t),n)},t.prototype.hu=function(t,n){for(var i,r=0,e=t.length;r<e;r++)if(i=n(t[r]))return i;return i},t.prototype.isEmpty=function(){return R(this.cu)},t.prototype.clear=function(){this.uu.clear(),this.cu={}},t.prototype.getExtent=function(t){var n=this.uu.toJSON();return An(n.minX,n.minY,n.maxX,n.maxY,t)},t.prototype.concat=function(t){for(var n in this.uu.load(t.uu.all()),t.cu)this.cu[n]=t.cu[n]},t}(),rd="tileloadstart",ed="tileloadend",od="tileloaderror",sd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function ad(t){return t?Array.isArray(t)?function(n){return t}:"function"==typeof t?t:function(n){return[t]}:null}var ud=function(t){function n(n){var i=t.call(this)||this;i.projection=br(n.projection),i.fu=ad(n.attributions),i.lu=void 0===n.attributionsCollapsible||n.attributionsCollapsible,i.loading=!1,i.rn=void 0!==n.state?n.state:ps,i.vu=void 0!==n.wrapX&&n.wrapX,i.du=!!n.interpolate,i.viewResolver=null,i.viewRejector=null;var r=i;return i.pu=new Promise((function(t,n){r.viewResolver=t,r.viewRejector=n})),i}return sd(n,t),n.prototype.getAttributions=function(){return this.fu},n.prototype.getAttributionsCollapsible=function(){return this.lu},n.prototype.getProjection=function(){return this.projection},n.prototype.getResolutions=function(){return r()},n.prototype.getView=function(){return this.pu},n.prototype.getState=function(){return this.rn},n.prototype.getWrapX=function(){return this.vu},n.prototype.getInterpolate=function(){return this.du},n.prototype.refresh=function(){this.changed()},n.prototype.setAttributions=function(t){this.fu=ad(t),this.changed()},n.prototype.setState=function(t){this.rn=t,this.changed()},n}(ot),cd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hd=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,projection:n.projection,state:n.state,wrapX:n.wrapX,interpolate:n.interpolate})||this;i.on,i.once,i.un,i.yu=void 0!==n.opaque&&n.opaque,i.Ls=void 0!==n.tilePixelRatio?n.tilePixelRatio:1,i.tileGrid=void 0!==n.tileGrid?n.tileGrid:null;return i.tileGrid&&ou(i.tileGrid.getTileSize(i.tileGrid.getMinZoom()),[256,256]),i.tileCache=new Kc(n.cacheSize||0),i.tmpSize=[0,0],i.Re=n.key||"",i.tileOptions={transition:n.transition,interpolate:n.interpolate},i.zDirection=n.zDirection?n.zDirection:0,i}return cd(n,t),n.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},n.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);i&&i.expireCache(n)},n.prototype.forEachLoadedTile=function(t,n,i,r){var e=this.getTileCacheForProjection(t);if(!e)return!1;for(var o,s,a,u=!0,c=i.minX;c<=i.maxX;++c)for(var h=i.minY;h<=i.maxY;++h)s=qc(n,c,h),a=!1,e.containsKey(s)&&(a=(o=e.get(s)).getState()===dt)&&(a=!1!==r(o)),a||(u=!1);return u},n.prototype.getGutterForProjection=function(t){return 0},n.prototype.getKey=function(){return this.Re},n.prototype.setKey=function(t){this.Re!==t&&(this.Re=t,this.changed())},n.prototype.getOpaque=function(t){return this.yu},n.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},n.prototype.getTile=function(t,n,i,e,o){return r()},n.prototype.getTileGrid=function(){return this.tileGrid},n.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Xh(t)},n.prototype.getTileCacheForProjection=function(t){return Mt(Or(this.getProjection(),t),68),this.tileCache},n.prototype.getTilePixelRatio=function(t){return this.Ls},n.prototype.getTilePixelSize=function(t,n,i){var r=this.getTileGridForProjection(i),e=this.getTilePixelRatio(n),o=ou(r.getTileSize(t),this.tmpSize);return 1==e?o:eu(o,e,this.tmpSize)},n.prototype.getTileCoordForTileUrlFunction=function(t,n){var i=void 0!==n?n:this.getProjection(),r=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=Hh(r,t,i)),Hc(t,r)?t:null},n.prototype.clear=function(){this.tileCache.clear()},n.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},n.prototype.updateCacheSize=function(t,n){var i=this.getTileCacheForProjection(n);t>i.highWaterMark&&(i.highWaterMark=t)},n.prototype.useTile=function(t,n,i,r){},n}(ud),fd=function(t){function n(n,i){var r=t.call(this,n)||this;return r.tile=i,r}return cd(n,t),n}(f),ld=hd,vd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dd=function(t){function n(i){var r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition,interpolate:i.interpolate,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return r.mu=r.tileUrlFunction===n.prototype.tileUrlFunction,r.tileLoadFunction=i.tileLoadFunction,i.tileUrlFunction&&(r.tileUrlFunction=i.tileUrlFunction),r.urls=null,i.urls?r.setUrls(i.urls):i.url&&r.setUrl(i.url),r.wu={},r}return vd(n,t),n.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},n.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},n.prototype.getUrls=function(){return this.urls},n.prototype.handleTileChange=function(t){var n,i=t.target,r=o(i),e=i.getState();e==vt?(this.wu[r]=!0,n=rd):r in this.wu&&(delete this.wu[r],n=e==pt?od:e==dt?ed:void 0),null!=n&&this.dispatchEvent(new fd(n,i))},n.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},n.prototype.setTileUrlFunction=function(t,n){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==n?this.setKey(n):this.changed()},n.prototype.setUrl=function(t){var n=ef(t);this.urls=n,this.setUrls(n)},n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.mu?this.setTileUrlFunction(tf(t,this.tileGrid),n):this.setKey(n)},n.prototype.tileUrlFunction=function(t,n,i){},n.prototype.useTile=function(t,n,i){var r=qc(t,n,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(ld),pd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function yd(t,n){t.getImage().src=n}var md=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:yd,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX,transition:n.transition,interpolate:r,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this).crossOrigin=void 0!==n.crossOrigin?n.crossOrigin:null,i.tileClass=void 0!==n.tileClass?n.tileClass:Io,i.tileCacheForProjection={},i.tileGridForProjection={},i.bu=n.reprojectionErrorThreshold,i.gu=!1,i}return pd(n,t),n.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},n.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==i?n:{}),this.tileCacheForProjection){var e=this.tileCacheForProjection[r];e.expireCache(e==i?n:{})}},n.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Or(this.getProjection(),t)?0:this.getGutter()},n.prototype.getGutter=function(){return 0},n.prototype.getKey=function(){var n=t.prototype.getKey.call(this);return this.getInterpolate()||(n+=":disable-interpolation"),n},n.prototype.getOpaque=function(n){return!(this.getProjection()&&n&&!Or(this.getProjection(),n))&&t.prototype.getOpaque.call(this,n)},n.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(!this.tileGrid||n&&!Or(n,t)){var i=o(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Xh(t)),this.tileGridForProjection[i]}return this.tileGrid},n.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||Or(n,t))return this.tileCache;var i=o(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Kc(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},n.prototype.xu=function(t,n,i,r,e,o){var s=[t,n,i],a=this.getTileCoordForTileUrlFunction(s,e),u=a?this.tileUrlFunction(a,r,e):void 0,c=new this.tileClass(s,void 0!==u?lt:yt,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(N,this.handleTileChange.bind(this)),c},n.prototype.getTile=function(t,n,i,r,e){var o=this.getProjection();if(o&&e&&!Or(o,e)){var s=this.getTileCacheForProjection(e),a=[t,n,i],u=void 0,c=Bc(a);s.containsKey(c)&&(u=s.get(c));var h=this.getKey();if(u&&u.key==h)return u;var f=this.getTileGridForProjection(o),l=this.getTileGridForProjection(e),v=this.getTileCoordForTileUrlFunction(a,e),d=new dl(o,f,e,l,a,v,this.getTilePixelRatio(r),this.getGutter(),function(t,n,i,r){return this.getTileInternal(t,n,i,r,o)}.bind(this),this.bu,this.gu,this.getInterpolate());return d.key=h,u?(d.interimTile=u,d.refreshInterimChain(),s.replace(c,d)):s.set(c,d),d}return this.getTileInternal(t,n,i,r,o||e)},n.prototype.getTileInternal=function(t,n,i,r,e){var o=null,s=qc(t,n,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var u=o;o=this.xu(t,n,i,r,e,a),u.getState()==lt?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.xu(t,n,i,r,e,a),this.tileCache.set(s,o);return o},n.prototype.setRenderReprojectionEdges=function(t){if(this.gu!=t){for(var n in this.gu=t,this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},n.prototype.setTileGridForProjection=function(t,n){var i=br(t);if(i){var r=o(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=n)}},n}(dd),wd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function bd(t){var n,i,r=t[0],e=new Array(r),o=1<<r-1;for(n=0;n<r;++n)i=48,t[1]&o&&(i+=1),t[2]&o&&(i+=2),e[n]=String.fromCharCode(i),o>>=1;return e.join("")}for(var gd=function(t){function n(n){var i=this,r=void 0!==n.hidpi&&n.hidpi,e=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(e=n.interpolate),(i=t.call(this,{cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:e,opaque:!0,projection:br("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:ds,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:r?2:1,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).ju=r,i.Su=void 0!==n.culture?n.culture:"en-us",i.ku=void 0!==n.maxZoom?n.maxZoom:-1,i.Mu=n.key,i._u=n.imagerySet,dh("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+i._u+"?uriScheme=https&include=ImageryProviders&key="+i.Mu+"&c="+i.Su,i.handleImageryMetadataResponse.bind(i),void 0,"jsonp"),i}return wd(n,t),n.prototype.getApiKey=function(){return this.Mu},n.prototype.getImagerySet=function(){return this._u},n.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var n=t.resourceSets[0].resources[0],i=-1==this.ku?n.zoomMax:this.ku,r=$h(this.getProjection()),e=this.ju?2:1,o=n.imageWidth==n.imageHeight?n.imageWidth/e:[n.imageWidth/e,n.imageHeight/e],s=Kh({extent:r,minZoom:n.zoomMin,maxZoom:i,tileSize:o});this.tileGrid=s;var a=this.Su,u=this.ju;if(this.tileUrlFunction=nf(n.imageUrlSubdomains.map((function(t){var i=[0,0,0],r=n.imageUrl.replace("{subdomain}",t).replace("{culture}",a);return function(t,n,e){if(t){Uc(t[0],t[1],t[2],i);var o=r;return u&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",bd(i))}}}))),n.imageryProviders){var c=Tr(br("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var i=[],r=t.viewState,e=this.getTileGrid(),o=e.getZForResolution(r.resolution,this.zDirection),s=e.getTileCoordForCoordAndZ(r.center,o)[0];return n.imageryProviders.map((function(n){for(var r=!1,e=n.coverageAreas,o=0,a=e.length;o<a;++o){var u=e[o];if(s>=u.zoomMin&&s<=u.zoomMax){var h=u.bbox;if(ti(oi([h[1],h[0],h[3],h[2]],c),t.extent)){r=!0;break}}}r&&i.push(n.attribution)})),i.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),i}.bind(this))}this.setState(ps)}else this.setState(ys)},n}(md),xd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jd=function(t){function n(n){var i=n||{},r=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(r=i.interpolate);var e=void 0!==i.projection?i.projection:"EPSG:3857",o=void 0!==i.tileGrid?i.tileGrid:Kh({extent:$h(e),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:r,opaque:i.opaque,projection:e,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return xd(n,t),n}(md),Sd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kd=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,maxZoom:void 0!==n.maxZoom?n.maxZoom:18,minZoom:n.minZoom,projection:n.projection,transition:n.transition,wrapX:n.wrapX,zDirection:n.zDirection})||this;return i.Ou=n.account,i.Tu=n.map||"",i.Eu=n.config||{},i.Au={},i.Cu(),i}return Sd(n,t),n.prototype.getConfig=function(){return this.Eu},n.prototype.updateConfig=function(t){E(this.Eu,t),this.Cu()},n.prototype.setConfig=function(t){this.Eu=t||{},this.Cu()},n.prototype.Cu=function(){var t=JSON.stringify(this.Eu);if(this.Au[t])this.Ru(this.Au[t]);else{var n="https://"+this.Ou+".carto.com/api/v1/map";this.Tu&&(n+="/named/"+this.Tu);var i=new XMLHttpRequest;i.addEventListener("load",this.Pu.bind(this,t)),i.addEventListener("error",this.Iu.bind(this)),i.open("POST",n),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.Eu))}},n.prototype.Pu=function(t,n){var i=n.target;if(!i.status||i.status>=200&&i.status<300){var r=void 0;try{r=JSON.parse(i.responseText)}catch(t){return void this.setState(ys)}this.Ru(r),this.Au[t]=r,this.setState(ps)}else this.setState(ys)},n.prototype.Iu=function(t){this.setState(ys)},n.prototype.Ru=function(t){var n="https://"+t.cdn_url.https+"/"+this.Ou+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(n)},n}(jd),Md="addfeature",_d="changefeature",Od="clear",Td="removefeature",Ed="featuresloadstart",Ad="featuresloadend",Cd="featuresloaderror",Rd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Pd=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.feature=i,e.features=r,e}return Rd(n,t),n}(f),Id=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{attributions:r.attributions,interpolate:!0,projection:void 0,state:ps,wrapX:void 0===r.wrapX||r.wrapX})||this).on,i.once,i.un,i.q=_,i.ze=r.format,i.Nu=void 0===r.overlaps||r.overlaps,i.Le=r.url,void 0!==r.loader?i.q=r.loader:void 0!==i.Le&&(Mt(i.ze,7),i.q=fh(i.Le,i.ze)),i.zu=void 0!==r.strategy?r.strategy:lh;var e,o,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return i.Fu=s?new id:null,i.Lu=new id,i.Gu=0,i.Du={},i.Uu={},i.qu={},i.Bu={},i.Wu=null,Array.isArray(r.features)?o=r.features:r.features&&(o=(e=r.features).getArray()),s||void 0!==e||(e=new ft(o)),void 0!==o&&i.addFeaturesInternal(o),void 0!==e&&i.Vu(e),i}return Rd(n,t),n.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},n.prototype.addFeatureInternal=function(t){var n=o(t);if(this.Xu(n,t)){this.Hu(n,t);var i=t.getGeometry();if(i){var r=i.getExtent();this.Fu&&this.Fu.insert(r,t)}else this.Du[n]=t;this.dispatchEvent(new Pd(Md,t))}else this.Wu&&this.Wu.remove(t)},n.prototype.Hu=function(t,n){this.Bu[t]=[Y(n,N,this.Ju,this),Y(n,l,this.Ju,this)]},n.prototype.Xu=function(t,n){var i=!0,r=n.getId();return void 0!==r&&(r.toString()in this.Uu?i=!1:this.Uu[r.toString()]=n),i&&(Mt(!(t in this.qu),30),this.qu[t]=n),i},n.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},n.prototype.addFeaturesInternal=function(t){for(var n=[],i=[],r=[],e=0,s=t.length;e<s;e++){var a=o(c=t[e]);this.Xu(a,c)&&i.push(c)}e=0;for(var u=i.length;e<u;e++){var c;a=o(c=i[e]);this.Hu(a,c);var h=c.getGeometry();if(h){var f=h.getExtent();n.push(f),r.push(c)}else this.Du[a]=c}if(this.Fu&&this.Fu.load(n,r),this.hasListener(Md)){e=0;for(var l=i.length;e<l;e++)this.dispatchEvent(new Pd(Md,i[e]))}},n.prototype.Vu=function(t){var n=!1;this.addEventListener(Md,(function(i){n||(n=!0,t.push(i.feature),n=!1)})),this.addEventListener(Td,(function(i){n||(n=!0,t.remove(i.feature),n=!1)})),t.addEventListener(st,function(t){n||(n=!0,this.addFeature(t.element),n=!1)}.bind(this)),t.addEventListener(at,function(t){n||(n=!0,this.removeFeature(t.element),n=!1)}.bind(this)),this.Wu=t},n.prototype.clear=function(t){if(t){for(var n in this.Bu){this.Bu[n].forEach($)}this.Wu||(this.Bu={},this.Uu={},this.qu={})}else if(this.Fu){var i=function(t){this.removeFeatureInternal(t)}.bind(this);for(var r in this.Fu.forEach(i),this.Du)this.removeFeatureInternal(this.Du[r])}this.Wu&&this.Wu.clear(),this.Fu&&this.Fu.clear(),this.Du={};var e=new Pd(Od);this.dispatchEvent(e),this.changed()},n.prototype.forEachFeature=function(t){if(this.Fu)return this.Fu.forEach(t);this.Wu&&this.Wu.forEach(t)},n.prototype.forEachFeatureAtCoordinateDirect=function(t,n){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){return i.getGeometry().intersectsCoordinate(t)?n(i):void 0}))},n.prototype.forEachFeatureInExtent=function(t,n){if(this.Fu)return this.Fu.forEachInExtent(t,n);this.Wu&&this.Wu.forEach(n)},n.prototype.forEachFeatureIntersectingExtent=function(t,n){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){var r=n(i);if(r)return r}}))},n.prototype.getFeaturesCollection=function(){return this.Wu},n.prototype.getFeatures=function(){var t;return this.Wu?t=this.Wu.getArray().slice(0):this.Fu&&(t=this.Fu.getAll(),R(this.Du)||b(t,C(this.Du))),t},n.prototype.getFeaturesAtCoordinate=function(t){var n=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){n.push(t)})),n},n.prototype.getFeaturesInExtent=function(t){return this.Fu?this.Fu.getInExtent(t):this.Wu?this.Wu.getArray().slice(0):[]},n.prototype.getClosestFeatureToCoordinate=function(t,n){var i=t[0],r=t[1],e=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],u=n||k;return this.Fu.forEachInExtent(a,(function(t){if(u(t)){var n=t.getGeometry(),c=s;if((s=n.closestPointXY(i,r,o,s))<c){e=t;var h=Math.sqrt(s);a[0]=i-h,a[1]=r-h,a[2]=i+h,a[3]=r+h}}})),e},n.prototype.getExtent=function(t){return this.Fu.getExtent(t)},n.prototype.getFeatureById=function(t){var n=this.Uu[t.toString()];return void 0!==n?n:null},n.prototype.getFeatureByUid=function(t){var n=this.qu[t];return void 0!==n?n:null},n.prototype.getFormat=function(){return this.ze},n.prototype.getOverlaps=function(){return this.Nu},n.prototype.getUrl=function(){return this.Le},n.prototype.Ju=function(t){var n=t.target,i=o(n),r=n.getGeometry();if(r){var e=r.getExtent();i in this.Du?(delete this.Du[i],this.Fu&&this.Fu.insert(e,n)):this.Fu&&this.Fu.update(e,n)}else i in this.Du||(this.Fu&&this.Fu.remove(n),this.Du[i]=n);var s=n.getId();if(void 0!==s){var a=s.toString();this.Uu[a]!==n&&(this.Ku(n),this.Uu[a]=n)}else this.Ku(n),this.qu[i]=n;this.changed(),this.dispatchEvent(new Pd(_d,n))},n.prototype.hasFeature=function(t){var n=t.getId();return void 0!==n?n in this.Uu:o(t)in this.qu},n.prototype.isEmpty=function(){return this.Fu?this.Fu.isEmpty()&&R(this.Du):!this.Wu||0===this.Wu.getLength()},n.prototype.loadFeatures=function(t,n,i){for(var r=this.Lu,e=this.zu(t,n,i),o=function(t,o){var a=e[t];r.forEachInExtent(a,(function(t){return _n(t.extent,a)}))||(++s.Gu,s.dispatchEvent(new Pd(Ed)),s.q.call(s,a,n,i,function(t){--this.Gu,this.dispatchEvent(new Pd(Ad,void 0,t))}.bind(s),function(){--this.Gu,this.dispatchEvent(new Pd(Cd))}.bind(s)),r.insert(a,{extent:a.slice()}))},s=this,a=0,u=e.length;a<u;++a)o(a);this.loading=!(this.q.length<4)&&this.Gu>0},n.prototype.refresh=function(){this.clear(!0),this.Lu.clear(),t.prototype.refresh.call(this)},n.prototype.removeLoadedExtent=function(t){var n,i=this.Lu;i.forEachInExtent(t,(function(i){if(In(i.extent,t))return n=i,!0})),n&&i.remove(n)},n.prototype.removeFeature=function(t){if(t){var n=o(t);n in this.Du?delete this.Du[n]:this.Fu&&this.Fu.remove(t),this.removeFeatureInternal(t)&&this.changed()}},n.prototype.removeFeatureInternal=function(t){var n=o(t),i=this.Bu[n];if(i){i.forEach($),delete this.Bu[n];var r=t.getId();return void 0!==r&&delete this.Uu[r.toString()],delete this.qu[n],this.dispatchEvent(new Pd(Td,t)),t}},n.prototype.Ku=function(t){var n=!1;for(var i in this.Uu)if(this.Uu[i]===t){delete this.Uu[i],n=!0;break}return n},n.prototype.setLoader=function(t){this.q=t},n.prototype.setUrl=function(t){Mt(this.ze,7),this.Le=t,this.setLoader(fh(t,this.ze))},n}(ud),Nd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zd=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,wrapX:n.wrapX})||this;return i.resolution=void 0,i.distance=void 0!==n.distance?n.distance:20,i.minDistance=n.minDistance||0,i.interpolationRatio=0,i.features=[],i.geometryFunction=n.geometryFunction||function(t){var n=t.getGeometry();return Mt(n.getType()==Pt.POINT,10),n},i.Yu=n.createCluster,i.source=null,i.Zu=i.refresh.bind(i),i.updateDistance(i.distance,i.minDistance),i.setSource(n.source||null),i}return Nd(n,t),n.prototype.clear=function(n){this.features.length=0,t.prototype.clear.call(this,n)},n.prototype.getDistance=function(){return this.distance},n.prototype.getSource=function(){return this.source},n.prototype.loadFeatures=function(t,n,i){this.source.loadFeatures(t,n,i),n!==this.resolution&&(this.resolution=n,this.refresh())},n.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},n.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},n.prototype.getMinDistance=function(){return this.minDistance},n.prototype.setSource=function(t){this.source&&this.source.removeEventListener(N,this.Zu),this.source=t,t&&t.addEventListener(N,this.Zu),this.refresh()},n.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},n.prototype.updateDistance=function(t,n){var i=0===t?0:Math.min(n,t)/t,r=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=n,this.interpolationRatio=i,r&&this.refresh()},n.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],n=this.distance*this.resolution,i=this.source.getFeatures(),r={},e=0,s=i.length;e<s;e++){var a=i[e];if(!(o(a)in r)){var u=this.geometryFunction(a);if(u){Rn(u.getCoordinates(),t),jn(t,n,t);var c=this.source.getFeaturesInExtent(t).filter((function(t){var n=o(t);return!(n in r)&&(r[n]=!0,!0)}));this.features.push(this.createCluster(c,t))}}}},n.prototype.createCluster=function(t,n){for(var i=[0,0],r=t.length-1;r>=0;--r){var e=this.geometryFunction(t[r]);e?Ji(i,e.getCoordinates()):t.splice(r,1)}nr(i,1/t.length);var o=Xn(n),s=this.interpolationRatio,a=new Oe([i[0]*(1-s)+o[0]*s,i[1]*(1-s)+o[1]*s]);return this.Yu?this.Yu(a,t):new Tt({geometry:a,features:t})},n}(Id),Fd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ld=function(t){function n(n){var i=this,r=void 0===n.projection?"EPSG:3857":n.projection,e=n.tileGrid;return void 0===e&&r&&(e=Kh({extent:$h(r),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize})),(i=t.call(this,{cacheSize:.1,attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,projection:r,tileGrid:e,opaque:n.opaque,state:n.state,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate})||this).wu={},i.q=n.loader,i.cr=i.cr.bind(i),i.bandCount=void 0===n.bandCount?4:n.bandCount,i}return Fd(n,t),n.prototype.setLoader=function(t){this.q=t},n.prototype.getTile=function(t,n,i,r,e){var o=qc(t,n,i);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=this.q;var a=new kt(E({tileCoord:[t,n,i],loader:function(){return T((function(){return s(t,n,i)}))}},this.tileOptions));return a.key=this.getKey(),a.addEventListener(N,this.cr),this.tileCache.set(o,a),a},n.prototype.cr=function(t){var n,i=t.target,r=o(i),e=i.getState();e==vt?(this.wu[r]=!0,n=rd):r in this.wu&&(delete this.wu[r],n=e==pt?od:e==dt?ed:void 0),n&&this.dispatchEvent(new fd(n,i))},n}(ld),Gd=new ArrayBuffer(4),Dd=new Float32Array(Gd),Ud=new Uint32Array(Gd),qd=new Uint32Array(512),Bd=new Uint32Array(512),Wd=0;Wd<256;++Wd){var Vd=Wd-127;Vd<-27?(qd[Wd]=0,qd[256|Wd]=32768,Bd[Wd]=24,Bd[256|Wd]=24):Vd<-14?(qd[Wd]=1024>>-Vd-14,qd[256|Wd]=1024>>-Vd-14|32768,Bd[Wd]=-Vd-1,Bd[256|Wd]=-Vd-1):Vd<=15?(qd[Wd]=Vd+15<<10,qd[256|Wd]=Vd+15<<10|32768,Bd[Wd]=13,Bd[256|Wd]=13):Vd<128?(qd[Wd]=31744,qd[256|Wd]=64512,Bd[Wd]=24,Bd[256|Wd]=24):(qd[Wd]=31744,qd[256|Wd]=64512,Bd[Wd]=13,Bd[256|Wd]=13)}var Xd=new Uint32Array(2048),Hd=new Uint32Array(64),Jd=new Uint32Array(64);Xd[0]=0;for(var Kd=1;Kd<1024;++Kd){for(var Yd=Kd<<13,Zd=0;0==(8388608&Yd);)Zd-=8388608,Yd<<=1;Yd&=-8388609,Zd+=947912704,Xd[Kd]=Yd|Zd}for(var $d=1024;$d<2048;++$d)Xd[$d]=939524096+($d-1024<<13);Hd[0]=0;for(var Qd=1;Qd<31;++Qd)Hd[Qd]=Qd<<23;Hd[31]=1199570944,Hd[32]=2147483648;for(var tp=33;tp<63;++tp)Hd[tp]=2147483648+(tp-32<<23);Hd[63]=3347054592,Jd[0]=0;for(var np=1;np<64;++np)Jd[np]=32===np?0:1024;function ip(t){var n=t>>10;return Ud[0]=Xd[Jd[n]+(1023&t)]+Hd[n],Dd[0]}var rp=Reflect.getPrototypeOf(Uint8Array).prototype,ep=Reflect.getOwnPropertyDescriptor(rp,Symbol.toStringTag).get;function op(t){return void 0!==ep.call(t)}var sp=Object.prototype.toString;function ap(t){return!!ArrayBuffer.isView(t)&&(!op(t)&&"[object DataView]"===sp.call(t))}function up(t,n){if(!ap(t))throw new TypeError("First argument to getFloat16 function must be a DataView");for(var i=arguments.length,r=new Array(i>2?i-2:0),e=2;e<i;e++)r[e-2]=arguments[e];return ip(t.getUint16.apply(t,[n].concat(r)))}var cp=i(802),hp=i(51),fp=i(150);function lp(t,n){for(var i,r=t.width,e=t.height,o=new Uint8Array(r*e*3),s=0,a=0;s<t.length;++s,a+=3)i=256-t[s]/n*256,o[a]=i,o[a+1]=i,o[a+2]=i;return o}function vp(t,n){for(var i,r=t.width,e=t.height,o=new Uint8Array(r*e*3),s=0,a=0;s<t.length;++s,a+=3)i=t[s]/n*256,o[a]=i,o[a+1]=i,o[a+2]=i;return o}function dp(t,n){for(var i=t.width,r=t.height,e=new Uint8Array(i*r*3),o=n.length/3,s=n.length/3*2,a=0,u=0;a<t.length;++a,u+=3){var c=t[a];e[u]=n[c]/65536*256,e[u+1]=n[c+o]/65536*256,e[u+2]=n[c+s]/65536*256}return e}function pp(t){for(var n=t.width,i=t.height,r=new Uint8Array(n*i*3),e=0,o=0;e<t.length;e+=4,o+=3){var s=t[e],a=t[e+1],u=t[e+2],c=t[e+3];r[o]=(255-s)/256*255*((255-c)/256),r[o+1]=(255-a)/256*255*((255-c)/256),r[o+2]=(255-u)/256*255*((255-c)/256)}return r}function yp(t){for(var n=t.width,i=t.height,r=new Uint8ClampedArray(n*i*3),e=0,o=0;e<t.length;e+=3,o+=3){var s=t[e],a=t[e+1],u=t[e+2];r[o]=s+1.402*(u-128),r[o+1]=s-.34414*(a-128)-.71414*(u-128),r[o+2]=s+1.772*(a-128)}return r}function mp(t){for(var n=t.width,i=t.height,r=new Uint8Array(n*i*3),e=0,o=0;e<t.length;e+=3,o+=3){var s=(t[e+0]+16)/116,a=(t[e+1]<<24>>24)/500+s,u=s-(t[e+2]<<24>>24)/200,c=void 0,h=void 0,f=void 0;h=-.9689*(a=.95047*(a*a*a>.008856?a*a*a:(a-16/116)/7.787))+1.8758*(s=1*(s*s*s>.008856?s*s*s:(s-16/116)/7.787))+.0415*(u=1.08883*(u*u*u>.008856?u*u*u:(u-16/116)/7.787)),f=.0557*a+-.204*s+1.057*u,c=(c=3.2406*a+-1.5372*s+-.4986*u)>.0031308?1.055*Math.pow(c,1/2.4)-.055:12.92*c,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:12.92*h,f=f>.0031308?1.055*Math.pow(f,1/2.4)-.055:12.92*f,r[o]=255*Math.max(0,Math.min(1,c)),r[o+1]=255*Math.max(0,Math.min(1,h)),r[o+2]=255*Math.max(0,Math.min(1,f))}return r}function wp(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function bp(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){wp(o,r,e,s,a,"next",t)}function a(t){wp(o,r,e,s,a,"throw",t)}s(void 0)}))}}var gp=new Map;function xp(t,n){Array.isArray(t)||(t=[t]),t.forEach((function(t){return gp.set(t,n)}))}function jp(t){return Sp.apply(this,arguments)}function Sp(){return(Sp=bp(regeneratorRuntime.mark((function t(n){var i,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=gp.get(n.Compression)){t.next=3;break}throw new Error("Unknown compression method identifier: ".concat(n.Compression));case 3:return t.next=5,i();case 5:return r=t.sent,t.abrupt("return",new r(n));case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function kp(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(t).constructor)(n*i*r)}function Mp(t,n,i,r,e){var o=n/r,s=i/e;return t.map((function(t){for(var a=kp(t,r,e),u=0;u<e;++u)for(var c=Math.min(Math.round(s*u),i-1),h=0;h<r;++h){var f=Math.min(Math.round(o*h),n-1),l=t[c*n+f];a[u*r+h]=l}return a}))}function _p(t,n,i){return(1-i)*t+i*n}function Op(t,n,i,r,e){var o=n/r,s=i/e;return t.map((function(t){for(var a=kp(t,r,e),u=0;u<e;++u)for(var c=s*u,h=Math.floor(c),f=Math.min(Math.ceil(c),i-1),l=0;l<r;++l){var v=o*l,d=v%1,p=Math.floor(v),y=Math.min(Math.ceil(v),n-1),m=t[h*n+p],w=t[h*n+y],b=t[f*n+p],g=t[f*n+y],x=_p(_p(m,w,d),_p(b,g,d),c%1);a[u*r+l]=x}return a}))}function Tp(t,n,i,r,e){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"nearest";switch(o.toLowerCase()){case"nearest":return Mp(t,n,i,r,e);case"bilinear":case"linear":return Op(t,n,i,r,e);default:throw new Error("Unsupported resampling method: '".concat(o,"'"))}}function Ep(t,n,i,r,e,o){for(var s=n/r,a=i/e,u=kp(t,r,e,o),c=0;c<e;++c)for(var h=Math.min(Math.round(a*c),i-1),f=0;f<r;++f)for(var l=Math.min(Math.round(s*f),n-1),v=0;v<o;++v){var d=t[h*n*o+l*o+v];u[c*r*o+f*o+v]=d}return u}function Ap(t,n,i,r,e,o){for(var s=n/r,a=i/e,u=kp(t,r,e,o),c=0;c<e;++c)for(var h=a*c,f=Math.floor(h),l=Math.min(Math.ceil(h),i-1),v=0;v<r;++v)for(var d=s*v,p=d%1,y=Math.floor(d),m=Math.min(Math.ceil(d),n-1),w=0;w<o;++w){var b=t[f*n*o+y*o+w],g=t[f*n*o+m*o+w],x=t[l*n*o+y*o+w],j=t[l*n*o+m*o+w],S=_p(_p(b,g,p),_p(x,j,p),h%1);u[c*r*o+v*o+w]=S}return u}function Cp(t,n,i,r,e,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"nearest";switch(s.toLowerCase()){case"nearest":return Ep(t,n,i,r,e,o);case"bilinear":case"linear":return Ap(t,n,i,r,e,o);default:throw new Error("Unsupported resampling method: '".concat(s,"'"))}}function Rp(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return Pp(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Pp(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pp(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i<n;i++)r[i]=t[i];return r}function Ip(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function Np(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){Ip(o,r,e,s,a,"next",t)}function a(t){Ip(o,r,e,s,a,"throw",t)}s(void 0)}))}}function zp(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fp(t,n,i){for(var r=0,e=n;e<i;++e)r+=t[e];return r}function Lp(t,n,i){switch(t){case 1:if(n<=8)return new Uint8Array(i);if(n<=16)return new Uint16Array(i);if(n<=32)return new Uint32Array(i);break;case 2:if(8===n)return new Int8Array(i);if(16===n)return new Int16Array(i);if(32===n)return new Int32Array(i);break;case 3:switch(n){case 16:case 32:return new Float32Array(i);case 64:return new Float64Array(i)}}throw Error("Unsupported data format/bitsPerSample")}function Gp(t,n){return(1!==t&&2!==t||!(n<=32)||n%8!=0)&&(3!==t||16!==n&&32!==n&&64!==n)}function Dp(t,n,i,r,e,o,s){var a=new DataView(t),u=2===i?1:r,c=Lp(n,e,2===i?s*o:s*o*r),h=parseInt("1".repeat(e),2);if(1===n){var f=o*(1===i?r*e:e);0!=(7&f)&&(f=f+7&-8);for(var l=0;l<s;++l)for(var v=l*f,d=0;d<o;++d)for(var p=v+d*u*e,y=0;y<u;++y){var m=p+y*e,w=(l*o+d)*u+y,b=Math.floor(m/8),g=m%8;if(g+e<=8)c[w]=a.getUint8(b)>>8-e-g&h;else if(g+e<=16)c[w]=a.getUint16(b)>>16-e-g&h;else if(g+e<=24){var x=a.getUint16(b)<<8|a.getUint8(b+2);c[w]=x>>24-e-g&h}else c[w]=a.getUint32(b)>>32-e-g&h}}return c.buffer}xp([void 0,1],(function(){return i.e(226).then(i.bind(i,966)).then((function(t){return t.default}))})),xp(5,(function(){return i.e(611).then(i.bind(i,611)).then((function(t){return t.default}))})),xp(6,(function(){throw new Error("old style JPEG compression is not supported.")})),xp(7,(function(){return i.e(382).then(i.bind(i,382)).then((function(t){return t.default}))})),xp([8,32946],(function(){return Promise.all([i.e(247),i.e(356)]).then(i.bind(i,356)).then((function(t){return t.default}))})),xp(32773,(function(){return i.e(395).then(i.bind(i,395)).then((function(t){return t.default}))})),xp(34887,(function(){return Promise.all([i.e(247),i.e(54)]).then(i.bind(i,54)).then((function(t){return t.default}))})),xp(50001,(function(){return i.e(629).then(i.bind(i,629)).then((function(t){return t.default}))}));var Up=function(){function t(n,i,r,e,o,s){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.fileDirectory=n,this.geoKeys=i,this.dataView=r,this.littleEndian=e,this.tiles=o?{}:null,this.isTiled=!n.StripOffsets;var a=n.PlanarConfiguration;if(this.planarConfiguration=void 0===a?1:a,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=s}var n,i,r,e,o,s,a;return n=t,(i=[{key:"getFileDirectory",value:function(){return this.fileDirectory}},{key:"getGeoKeys",value:function(){return this.geoKeys}},{key:"getWidth",value:function(){return this.fileDirectory.ImageWidth}},{key:"getHeight",value:function(){return this.fileDirectory.ImageLength}},{key:"getSamplesPerPixel",value:function(){return void 0!==this.fileDirectory.SamplesPerPixel?this.fileDirectory.SamplesPerPixel:1}},{key:"getTileWidth",value:function(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}},{key:"getTileHeight",value:function(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}},{key:"getBlockWidth",value:function(){return this.getTileWidth()}},{key:"getBlockHeight",value:function(t){return this.isTiled||(t+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-t*this.getTileHeight()}},{key:"getBytesPerPixel",value:function(){for(var t=0,n=0;n<this.fileDirectory.BitsPerSample.length;++n)t+=this.getSampleByteSize(n);return t}},{key:"getSampleByteSize",value:function(t){if(t>=this.fileDirectory.BitsPerSample.length)throw new RangeError("Sample index ".concat(t," is out of range."));return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}},{key:"getReaderForSample",value:function(t){var n=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,i=this.fileDirectory.BitsPerSample[t];switch(n){case 1:if(i<=8)return DataView.prototype.getUint8;if(i<=16)return DataView.prototype.getUint16;if(i<=32)return DataView.prototype.getUint32;break;case 2:if(i<=8)return DataView.prototype.getInt8;if(i<=16)return DataView.prototype.getInt16;if(i<=32)return DataView.prototype.getInt32;break;case 3:switch(i){case 16:return function(t,n){return up(this,t,n)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}},{key:"getSampleFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}},{key:"getBitsPerSample",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.BitsPerSample[t]}},{key:"getArrayForSample",value:function(t,n){return Lp(this.getSampleFormat(t),this.getBitsPerSample(t),n)}},{key:"getTileOrStrip",value:(a=Np(regeneratorRuntime.mark((function t(n,i,r,e,o){var s,a,u,c,h,f,l,v,d=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=Math.ceil(this.getWidth()/this.getTileWidth()),a=Math.ceil(this.getHeight()/this.getTileHeight()),c=this.tiles,1===this.planarConfiguration?u=i*s+n:2===this.planarConfiguration&&(u=r*s*a+i*s+n),this.isTiled?(h=this.fileDirectory.TileOffsets[u],f=this.fileDirectory.TileByteCounts[u]):(h=this.fileDirectory.StripOffsets[u],f=this.fileDirectory.StripByteCounts[u]),t.next=7,this.source.fetch([{offset:h,length:f}],o);case 7:return l=t.sent[0],null!==c&&c[u]?v=c[u]:(v=Np(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.decode(d.fileDirectory,l);case 2:return n=t.sent,r=d.getSampleFormat(),o=d.getBitsPerSample(),Gp(r,o)&&(n=Dp(n,r,d.planarConfiguration,d.getSamplesPerPixel(),o,d.getTileWidth(),d.getBlockHeight(i))),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)})))(),null!==c&&(c[u]=v)),t.t0=n,t.t1=i,t.t2=r,t.next=14,v;case 14:return t.t3=t.sent,t.abrupt("return",{x:t.t0,y:t.t1,sample:t.t2,data:t.t3});case 16:case"end":return t.stop()}}),t,this)}))),function(t,n,i,r,e){return a.apply(this,arguments)})},{key:"_readRaster",value:(s=Np(regeneratorRuntime.mark((function t(n,i,r,e,o,s,a,u,c){var h,f,l,v,d,p,y,m,w,b,g,x,j,S,k,M,_,O,T,E,A=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(h=this.getTileWidth(),f=this.getTileHeight(),l=this.getWidth(),v=this.getHeight(),d=Math.max(Math.floor(n[0]/h),0),p=Math.min(Math.ceil(n[2]/h),Math.ceil(l/h)),y=Math.max(Math.floor(n[1]/f),0),m=Math.min(Math.ceil(n[3]/f),Math.ceil(v/f)),w=n[2]-n[0],b=this.getBytesPerPixel(),g=[],x=[],j=0;j<i.length;++j)1===this.planarConfiguration?g.push(Fp(this.fileDirectory.BitsPerSample,0,i[j])/8):g.push(0),x.push(this.getReaderForSample(i[j]));for(S=[],k=this.littleEndian,M=y;M<m;++M)for(_=d;_<p;++_)for(O=function(t){var s=t,a=i[t];2===A.planarConfiguration&&(b=A.getSampleByteSize(t));var u=A.getTileOrStrip(_,M,a,o,c);S.push(u),u.then((function(t){for(var o=t.data,a=new DataView(o),u=A.getBlockHeight(t.y),c=t.y*f,d=t.x*h,p=c+u,y=(t.x+1)*h,m=x[s],j=Math.min(u,u-(p-n[3]),v-c),S=Math.min(h,h-(y-n[2]),l-d),M=Math.max(0,n[1]-c);M<j;++M)for(var _=Math.max(0,n[0]-d);_<S;++_){var O=(M*h+_)*b,T=m.call(a,O+g[s],k),E=void 0;e?(E=(M+c-n[1])*w*i.length+(_+d-n[0])*i.length+s,r[E]=T):(E=(M+c-n[1])*w+_+d-n[0],r[s][E]=T)}}))},T=0;T<i.length;++T)O(T);return t.next=18,Promise.all(S);case 18:if(!(s&&n[2]-n[0]!==s||a&&n[3]-n[1]!==a)){t.next=23;break}return(E=e?Cp(r,n[2]-n[0],n[3]-n[1],s,a,i.length,u):Tp(r,n[2]-n[0],n[3]-n[1],s,a,u)).width=s,E.height=a,t.abrupt("return",E);case 23:return r.width=s||n[2]-n[0],r.height=a||n[3]-n[1],t.abrupt("return",r);case 26:case"end":return t.stop()}}),t,this)}))),function(t,n,i,r,e,o,a,u,c){return s.apply(this,arguments)})},{key:"readRasters",value:(o=Np(regeneratorRuntime.mark((function t(){var n,i,r,e,o,s,a,u,c,h,f,l,v,d,p,y,m,w,b,g,x,j,S,k,M,_,O=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=O.length>0&&void 0!==O[0]?O[0]:{},i=n.window,r=n.samples,e=void 0===r?[]:r,o=n.interleave,s=n.pool,a=void 0===s?null:s,u=n.width,c=n.height,h=n.resampleMethod,f=n.fillValue,l=n.signal,!((v=i||[0,0,this.getWidth(),this.getHeight()])[0]>v[2]||v[1]>v[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if(d=v[2]-v[0],p=v[3]-v[1],y=d*p,m=this.getSamplesPerPixel(),e&&e.length){t.next=12;break}for(w=0;w<m;++w)e.push(w);t.next=19;break;case 12:b=0;case 13:if(!(b<e.length)){t.next=19;break}if(!(e[b]>=m)){t.next=16;break}return t.abrupt("return",Promise.reject(new RangeError("Invalid sample index '".concat(e[b],"'."))));case 16:++b,t.next=13;break;case 19:if(o)x=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,j=Math.max.apply(null,this.fileDirectory.BitsPerSample),g=Lp(x,j,y*e.length),f&&g.fill(f);else for(g=[],S=0;S<e.length;++S)k=this.getArrayForSample(e[S],y),Array.isArray(f)&&S<f.length?k.fill(f[S]):f&&!Array.isArray(f)&&k.fill(f),g.push(k);if(t.t0=a,t.t0){t.next=25;break}return t.next=24,jp(this.fileDirectory);case 24:t.t0=t.sent;case 25:return M=t.t0,t.next=28,this._readRaster(v,e,g,o,M,u,c,h,l);case 28:return _=t.sent,t.abrupt("return",_);case 30:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"readRGB",value:(e=Np(regeneratorRuntime.mark((function t(){var n,i,r,e,o,s,a,u,c,h,f,l,v,d,p,y,m,w,b,g,x,j,S,k,M,_,O,T=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=T.length>0&&void 0!==T[0]?T[0]:{},i=n.window,r=n.interleave,e=void 0===r||r,o=n.pool,s=void 0===o?null:o,a=n.width,u=n.height,c=n.resampleMethod,h=n.enableAlpha,f=void 0!==h&&h,l=n.signal,!((v=i||[0,0,this.getWidth(),this.getHeight()])[0]>v[2]||v[1]>v[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if((d=this.fileDirectory.PhotometricInterpretation)!==fp.Ie.RGB){t.next=9;break}if(p=[0,1,2],this.fileDirectory.ExtraSamples!==fp.pd.Unspecified&&f)for(p=[],y=0;y<this.fileDirectory.BitsPerSample.length;y+=1)p.push(y);return t.abrupt("return",this.readRasters({window:i,interleave:e,samples:p,pool:s,width:a,height:u,resampleMethod:c,signal:l}));case 9:t.t0=d,t.next=t.t0===fp.Ie.WhiteIsZero||t.t0===fp.Ie.BlackIsZero||t.t0===fp.Ie.Palette?12:t.t0===fp.Ie.CMYK?14:t.t0===fp.Ie.YCbCr||t.t0===fp.Ie.CIELab?16:18;break;case 12:return m=[0],t.abrupt("break",19);case 14:return m=[0,1,2,3],t.abrupt("break",19);case 16:return m=[0,1,2],t.abrupt("break",19);case 18:throw new Error("Invalid or unsupported photometric interpretation.");case 19:return w={window:v,interleave:!0,samples:m,pool:s,width:a,height:u,resampleMethod:c,signal:l},b=this.fileDirectory,t.next=23,this.readRasters(w);case 23:g=t.sent,x=Math.pow(2,this.fileDirectory.BitsPerSample[0]),t.t1=d,t.next=t.t1===fp.Ie.WhiteIsZero?28:t.t1===fp.Ie.BlackIsZero?30:t.t1===fp.Ie.Palette?32:t.t1===fp.Ie.CMYK?34:t.t1===fp.Ie.YCbCr?36:t.t1===fp.Ie.CIELab?38:40;break;case 28:return j=lp(g,x),t.abrupt("break",41);case 30:return j=vp(g,x),t.abrupt("break",41);case 32:return j=dp(g,b.ColorMap),t.abrupt("break",41);case 34:return j=pp(g),t.abrupt("break",41);case 36:return j=yp(g),t.abrupt("break",41);case 38:return j=mp(g),t.abrupt("break",41);case 40:throw new Error("Unsupported photometric interpretation.");case 41:if(!e){for(S=new Uint8Array(j.length/3),k=new Uint8Array(j.length/3),M=new Uint8Array(j.length/3),_=0,O=0;_<j.length;_+=3,++O)S[O]=j[_],k[O]=j[_+1],M[O]=j[_+2];j=[S,k,M]}return j.width=g.width,j.height=g.height,t.abrupt("return",j);case 45:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getTiePoints",value:function(){if(!this.fileDirectory.ModelTiepoint)return[];for(var t=[],n=0;n<this.fileDirectory.ModelTiepoint.length;n+=6)t.push({i:this.fileDirectory.ModelTiepoint[n],j:this.fileDirectory.ModelTiepoint[n+1],k:this.fileDirectory.ModelTiepoint[n+2],x:this.fileDirectory.ModelTiepoint[n+3],y:this.fileDirectory.ModelTiepoint[n+4],z:this.fileDirectory.ModelTiepoint[n+5]});return t}},{key:"getGDALMetadata",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n={};if(!this.fileDirectory.GDAL_METADATA)return null;var i=this.fileDirectory.GDAL_METADATA,r=hp(i,"Item");r=null===t?r.filter((function(t){return void 0===cp(t,"sample")})):r.filter((function(n){return Number(cp(n,"sample"))===t}));for(var e=0;e<r.length;++e){var o=r[e];n[cp(o,"name")]=o.inner}return n}},{key:"getGDALNoData",value:function(){if(!this.fileDirectory.GDAL_NODATA)return null;var t=this.fileDirectory.GDAL_NODATA;return Number(t.substring(0,t.length-1))}},{key:"getOrigin",value:function(){var t=this.fileDirectory.ModelTiepoint,n=this.fileDirectory.ModelTransformation;if(t&&6===t.length)return[t[3],t[4],t[5]];if(n)return[n[3],n[7],n[11]];throw new Error("The image does not have an affine transformation.")}},{key:"getResolution",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.fileDirectory.ModelPixelScale,i=this.fileDirectory.ModelTransformation;if(n)return[n[0],-n[1],n[2]];if(i)return[i[0],i[5],i[10]];if(t){var r=t.getResolution(),e=Rp(r,3),o=e[0],s=e[1],a=e[2];return[o*t.getWidth()/this.getWidth(),s*t.getHeight()/this.getHeight(),a*t.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}},{key:"pixelIsArea",value:function(){return 1===this.geoKeys.GTRasterTypeGeoKey}},{key:"getBoundingBox",value:function(){var t=this.getOrigin(),n=this.getResolution(),i=t[0],r=t[1],e=i+n[0]*this.getWidth(),o=r+n[1]*this.getHeight();return[Math.min(i,e),Math.min(r,o),Math.max(i,e),Math.max(r,o)]}}])&&zp(n.prototype,i),r&&zp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function qp(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Bp=function(){function t(n){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this._dataView=new DataView(n)}var n,i,r;return n=t,(i=[{key:"buffer",get:function(){return this._dataView.buffer}},{key:"getUint64",value:function(t,n){var i,r=this.getUint32(t,n),e=this.getUint32(t+4,n);if(n){if(i=r+Math.pow(2,32)*e,!Number.isSafeInteger(i))throw new Error("".concat(i," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return i}if(i=Math.pow(2,32)*r+e,!Number.isSafeInteger(i))throw new Error("".concat(i," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return i}},{key:"getInt64",value:function(t,n){for(var i=0,r=(128&this._dataView.getUint8(t+(n?7:0)))>0,e=!0,o=0;o<8;o++){var s=this._dataView.getUint8(t+(n?o:7-o));r&&(e?0!==s&&(s=255&~(s-1),e=!1):s=255&~s),i+=s*Math.pow(256,o)}return r&&(i=-i),i}},{key:"getUint8",value:function(t,n){return this._dataView.getUint8(t,n)}},{key:"getInt8",value:function(t,n){return this._dataView.getInt8(t,n)}},{key:"getUint16",value:function(t,n){return this._dataView.getUint16(t,n)}},{key:"getInt16",value:function(t,n){return this._dataView.getInt16(t,n)}},{key:"getUint32",value:function(t,n){return this._dataView.getUint32(t,n)}},{key:"getInt32",value:function(t,n){return this._dataView.getInt32(t,n)}},{key:"getFloat16",value:function(t,n){return up(this._dataView,t,n)}},{key:"getFloat32",value:function(t,n){return this._dataView.getFloat32(t,n)}},{key:"getFloat64",value:function(t,n){return this._dataView.getFloat64(t,n)}}])&&qp(n.prototype,i),r&&qp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function Wp(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Vp=function(){function t(n,i,r,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this._dataView=new DataView(n),this._sliceOffset=i,this._littleEndian=r,this._bigTiff=e}var n,i,r;return n=t,(i=[{key:"sliceOffset",get:function(){return this._sliceOffset}},{key:"sliceTop",get:function(){return this._sliceOffset+this.buffer.byteLength}},{key:"littleEndian",get:function(){return this._littleEndian}},{key:"bigTiff",get:function(){return this._bigTiff}},{key:"buffer",get:function(){return this._dataView.buffer}},{key:"covers",value:function(t,n){return this.sliceOffset<=t&&this.sliceTop>=t+n}},{key:"readUint8",value:function(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}},{key:"readInt8",value:function(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}},{key:"readUint16",value:function(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}},{key:"readInt16",value:function(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}},{key:"readUint32",value:function(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}},{key:"readInt32",value:function(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat32",value:function(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat64",value:function(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}},{key:"readUint64",value:function(t){var n,i=this.readUint32(t),r=this.readUint32(t+4);if(this._littleEndian){if(n=i+Math.pow(2,32)*r,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}if(n=Math.pow(2,32)*i+r,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}},{key:"readInt64",value:function(t){for(var n=0,i=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0,r=!0,e=0;e<8;e++){var o=this._dataView.getUint8(t+(this._littleEndian?e:7-e));i&&(r?0!==o&&(o=255&~(o-1),r=!1):o=255&~o),n+=o*Math.pow(256,e)}return i&&(n=-n),n}},{key:"readOffset",value:function(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}])&&Wp(n.prototype,i),r&&Wp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function Xp(t){return Kp(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Yp(t)||Jp()}function Hp(t,n){return Kp(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||Yp(t,n)||Jp()}function Jp(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Kp(t){if(Array.isArray(t))return t}function Yp(t,n){if(t){if("string"==typeof t)return Zp(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Zp(t,n):void 0}}function Zp(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i<n;i++)r[i]=t[i];return r}var $p="\r\n\r\n";function Qp(t){if(void 0!==Object.fromEntries)return Object.fromEntries(t);var n,i={},r=function(t,n){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=Yp(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}(t);try{for(r.s();!(n=r.n()).done;){var e=Hp(n.value,2),o=e[0],s=e[1];i[o.toLowerCase()]=s}}catch(t){r.e(t)}finally{r.f()}return i}function ty(t){return Qp(t.split("\r\n").map((function(t){var n=t.split(":").map((function(t){return t.trim()}));return n[0]=n[0].toLowerCase(),n})))}function ny(t){var n,i,r;if(t){var e=Hp(t.match(/bytes (\d+)-(\d+)\/(\d+)/),4);n=e[1],i=e[2],r=e[3],n=parseInt(n,10),i=parseInt(i,10),r=parseInt(r,10)}return{start:n,end:i,total:r}}function iy(t,n){for(var i=null,r=new TextDecoder("ascii"),e=[],o="--".concat(n),s="".concat(o,"--"),a=0;a<10;++a){r.decode(new Uint8Array(t,a,o.length))===o&&(i=a)}if(null===i)throw new Error("Could not find initial boundary");for(;i<t.byteLength;){var u=r.decode(new Uint8Array(t,i,Math.min(o.length+1024,t.byteLength-i)));if(0===u.length||u.startsWith(s))break;if(!u.startsWith(o))throw new Error("Part does not start with boundary");var c=u.substr(o.length+2);if(0===c.length)break;var h=c.indexOf($p),f=ty(c.substr(0,h)),l=ny(f["content-range"]),v=l.start,d=l.end,p=l.total,y=i+o.length+h+$p.length,m=parseInt(d,10)+1-parseInt(v,10);e.push({headers:f,data:t.slice(y,y+m),offset:v,length:m,fileSize:p}),i=y+m+4}return e}function ry(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function ey(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){ry(o,r,e,s,a,"next",t)}function a(t){ry(o,r,e,s,a,"throw",t)}s(void 0)}))}}function oy(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var sy=function(){function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,i,r,e,o,s;return n=t,(i=[{key:"fetch",value:(s=ey(regeneratorRuntime.mark((function t(n){var i,r=this,e=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.length>1&&void 0!==e[1]?e[1]:void 0,t.abrupt("return",Promise.all(n.map((function(t){return r.fetchSlice(t,i)}))));case 2:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"fetchSlice",value:(o=ey(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("fetching of slice ".concat(n," not possible, not implemented"));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"fileSize",get:function(){return null}},{key:"close",value:(e=ey(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})}])&&oy(n.prototype,i),r&&oy(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(),ay=i(875);function uy(t){return(uy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cy(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hy(t,n,i){return n&&cy(t.prototype,n),i&&cy(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function fy(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function ly(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&by(t,n)}function vy(t){var n=wy();return function(){var i,r=gy(t);if(n){var e=gy(this).constructor;i=Reflect.construct(r,arguments,e)}else i=r.apply(this,arguments);return dy(this,i)}}function dy(t,n){if(n&&("object"===uy(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return py(t)}function py(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yy(t){var n="function"==typeof Map?new Map:void 0;return(yy=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return my(t,arguments,gy(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),by(r,t)})(t)}function my(t,n,i){return(my=wy()?Reflect.construct:function(t,n,i){var r=[null];r.push.apply(r,n);var e=new(Function.bind.apply(t,r));return i&&by(e,i.prototype),e}).apply(null,arguments)}function wy(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function by(t,n){return(by=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function gy(t){return(gy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function xy(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function jy(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){xy(o,r,e,s,a,"next",t)}function a(t){xy(o,r,e,s,a,"throw",t)}s(void 0)}))}}function Sy(t){return ky.apply(this,arguments)}function ky(){return(ky=jy(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,n)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function My(t,n){var i=Array.isArray(t)?t:Array.from(t),r=Array.isArray(n)?n:Array.from(n);return i.map((function(t,n){return[t,r[n]]}))}var _y=function(t){ly(i,t);var n=vy(i);function i(t){var r;return fy(this,i),r=n.call(this,t),Error.captureStackTrace&&Error.captureStackTrace(py(r),i),r.name="AbortError",r}return hy(i)}(yy(Error)),Oy=function(t){ly(i,t);var n=vy(i);function i(t,r){var e;return fy(this,i),(e=n.call(this,r)).errors=t,e.message=r,e.name="AggregateError",e}return hy(i)}(yy(Error));function Ty(t){return(Ty="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ey(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||Cy(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ay(t,n){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=Cy(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Cy(t,n){if(t){if("string"==typeof t)return Ry(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ry(t,n):void 0}}function Ry(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i<n;i++)r[i]=t[i];return r}function Py(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function Iy(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){Py(o,r,e,s,a,"next",t)}function a(t){Py(o,r,e,s,a,"throw",t)}s(void 0)}))}}function Ny(t,n){return(Ny=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function zy(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,r=Ly(t);if(n){var e=Ly(this).constructor;i=Reflect.construct(r,arguments,e)}else i=r.apply(this,arguments);return Fy(this,i)}}function Fy(t,n){if(n&&("object"===Ty(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ly(t){return(Ly=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gy(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Dy(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Uy(t,n,i){return n&&Dy(t.prototype,n),i&&Dy(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}var qy=function(){function t(n,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Gy(this,t),this.offset=n,this.length=i,this.data=r}return Uy(t,[{key:"top",get:function(){return this.offset+this.length}}]),t}(),By=Uy((function t(n,i,r){Gy(this,t),this.offset=n,this.length=i,this.blockIds=r})),Wy=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Ny(t,n)}(r,t);var n,i=zy(r);function r(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.blockSize,s=void 0===o?65536:o,a=e.cacheSize,u=void 0===a?100:a;return Gy(this,r),(n=i.call(this)).source=t,n.blockSize=s,n.blockCache=new ay({max:u}),n.blockRequests=new Map,n.blockIdsToFetch=new Set,n}return Uy(r,[{key:"fileSize",get:function(){return this.source.fileSize}},{key:"fetch",value:(n=Iy(regeneratorRuntime.mark((function t(n,i){var r,e,o,s,a,u,c,h,f,l,v,d,p,y,m,w,b,g,x,j,S,k,M,_,O,T,E,A,C,R,P,I,N,z,F,L,G,D;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new Map,e=new Map,o=new Set,s=Ay(n);try{for(s.s();!(a=s.n()).done;)for(u=a.value,c=u.offset,h=u.length,f=c+h,null!==(l=this.fileSize)&&(f=Math.min(f,l)),v=Math.floor(c/this.blockSize)*this.blockSize,d=v;d<f;d+=this.blockSize)p=Math.floor(d/this.blockSize),this.blockCache.has(p)?r.set(p,this.blockCache.get(p)):this.blockRequests.has(p)?e.set(p,this.blockRequests.get(p)):(this.blockIdsToFetch.has(p)||this.blockIdsToFetch.add(p),o.add(p))}catch(t){s.e(t)}finally{s.f()}return t.next=7,Sy();case 7:this.fetchBlocks(i),y=Ay(o),t.prev=9,y.s();case 11:if((m=y.n()).done){t.next=26;break}if(w=m.value,b=this.blockRequests.get(w),g=this.blockCache.get(w),!b){t.next=19;break}e.set(w,b),t.next=24;break;case 19:if(!g){t.next=23;break}r.set(w,g),t.next=24;break;case 23:throw new Error("Block ".concat(w," is not in the block requests"));case 24:t.next=11;break;case 26:t.next=31;break;case 28:t.prev=28,t.t0=t.catch(9),y.e(t.t0);case 31:return t.prev=31,y.f(),t.finish(31);case 34:return t.next=36,Promise.allSettled(Array.from(e.values()));case 36:if(!(x=t.sent).some((function(t){return"rejected"===t.status}))){t.next=65;break}j=new Set,S=Ay(My(e.keys(),x));try{for(S.s();!(k=S.n()).done;)M=Ey(k.value,2),_=M[0],O=M[1],T=O.rejected,E=O.reason,T&&"AbortError"===E.name&&E.signal!==i&&(this.blockIdsToFetch.add(_),j.add(_))}catch(t){S.e(t)}finally{S.f()}if(!(this.blockIdsToFetch.length>0)){t.next=65;break}this.fetchBlocks(i),A=Ay(j),t.prev=44,A.s();case 46:if((C=A.n()).done){t.next=54;break}if(R=C.value,P=this.blockRequests.get(R)){t.next=51;break}throw new Error("Block ".concat(R," is not in the block requests"));case 51:e.set(R,P);case 52:t.next=46;break;case 54:t.next=59;break;case 56:t.prev=56,t.t1=t.catch(44),A.e(t.t1);case 59:return t.prev=59,A.f(),t.finish(59);case 62:return t.next=64,Promise.allSettled(Array.from(e.values()));case 64:x=t.sent;case 65:if(!x.some((function(t){return"rejected"===t.status}))){t.next=69;break}if(!i||!i.aborted){t.next=68;break}throw new _y("Request was aborted");case 68:throw new Oy(x.filter((function(t){return"rejected"===t.status})).map((function(t){return t.reason})),"Request failed");case 69:I=x.map((function(t){return t.value})),N=new Map(My(Array.from(e.keys()),I)),z=Ay(r);try{for(z.s();!(F=z.n()).done;)L=Ey(F.value,2),G=L[0],D=L[1],N.set(G,D)}catch(t){z.e(t)}finally{z.f()}return t.abrupt("return",this.readSliceData(n,N));case 74:case"end":return t.stop()}}),t,this,[[9,28,31,34],[44,56,59,62]])}))),function(t,i){return n.apply(this,arguments)})},{key:"fetchBlocks",value:function(t){var n=this;this.blockIdsToFetch.size>0&&function(){for(var i=n.groupBlocks(n.blockIdsToFetch),r=n.source.fetch(i,t),e=function(e){var o,s=Ay(i[e].blockIds);try{var a=function(){var i=o.value,s=Iy(regeneratorRuntime.mark((function o(){var s,a,u,c,h,f;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,r;case 3:return o.t0=e,s=o.sent[o.t0],a=i*n.blockSize,u=a-s.offset,c=Math.min(u+n.blockSize,s.data.byteLength),h=s.data.slice(u,c),f=new qy(a,h.byteLength,h),n.blockCache.set(i,f),o.abrupt("return",f);case 14:throw o.prev=14,o.t1=o.catch(0),"AbortError"===o.t1.name&&(o.t1.signal=t),o.t1;case 18:return o.prev=18,n.blockRequests.delete(i),o.finish(18);case 21:case"end":return o.stop()}}),o,null,[[0,14,18,21]])})))();n.blockRequests.set(i,s)};for(s.s();!(o=s.n()).done;)a()}catch(t){s.e(t)}finally{s.f()}},o=0;o<i.length;++o)e(o);n.blockIdsToFetch.clear()}()}},{key:"groupBlocks",value:function(t){var n=Array.from(t).sort((function(t,n){return t-n}));if(0===n.length)return[];var i,r=[],e=null,o=[],s=Ay(n);try{for(s.s();!(i=s.n()).done;){var a=i.value;null===e||e+1===a?(r.push(a),e=a):(o.push(new By(r[0]*this.blockSize,r.length*this.blockSize,r)),r=[a],e=a)}}catch(t){s.e(t)}finally{s.f()}return o.push(new By(r[0]*this.blockSize,r.length*this.blockSize,r)),o}},{key:"readSliceData",value:function(t,n){var i=this;return t.map((function(t){for(var r=t.offset+t.length,e=Math.floor(t.offset/i.blockSize),o=Math.floor((t.offset+t.length)/i.blockSize),s=new ArrayBuffer(t.length),a=new Uint8Array(s),u=e;u<=o;++u){var c=n.get(u),h=c.offset-t.offset,f=0,l=0,v=void 0;h<0?f=-h:h>0&&(l=h),v=c.top-r<0?c.length-f:r-c.offset-f;var d=new Uint8Array(c.data,f,v);a.set(d,l)}return s}))}}]),r}(sy);function Vy(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function Xy(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){Vy(o,r,e,s,a,"next",t)}function a(t){Vy(o,r,e,s,a,"throw",t)}s(void 0)}))}}function Hy(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Jy(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ky(t,n,i){return n&&Jy(t.prototype,n),i&&Jy(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}var Yy=function(){function t(){Hy(this,t)}var n;return Ky(t,[{key:"ok",get:function(){return this.status>=200&&this.status<=299}},{key:"status",get:function(){throw new Error("not implemented")}},{key:"getHeader",value:function(t){throw new Error("not implemented")}},{key:"getData",value:(n=Xy(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("not implemented");case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]),t}(),Zy=function(){function t(n){Hy(this,t),this.url=n}var n;return Ky(t,[{key:"request",value:(n=Xy(regeneratorRuntime.mark((function t(){var n,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw(n=i.length>0&&void 0!==i[0]?i[0]:{}).headers,n.credentials,n.signal,new Error("request is not implemented");case 2:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]),t}();function $y(t){return($y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qy(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function tm(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){Qy(o,r,e,s,a,"next",t)}function a(t){Qy(o,r,e,s,a,"throw",t)}s(void 0)}))}}function nm(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function im(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rm(t,n,i){return n&&im(t.prototype,n),i&&im(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function em(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&om(t,n)}function om(t,n){return(om=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function sm(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,r=um(t);if(n){var e=um(this).constructor;i=Reflect.construct(r,arguments,e)}else i=r.apply(this,arguments);return am(this,i)}}function am(t,n){if(n&&("object"===$y(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function um(t){return(um=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cm=function(t){em(r,t);var n,i=sm(r);function r(t){var n;return nm(this,r),(n=i.call(this)).response=t,n}return rm(r,[{key:"status",get:function(){return this.response.status}},{key:"getHeader",value:function(t){return this.response.headers.get(t)}},{key:"getData",value:(n=tm(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.response.arrayBuffer){t.next=6;break}return t.next=3,this.response.arrayBuffer();case 3:t.t0=t.sent,t.next=9;break;case 6:return t.next=8,this.response.buffer();case 8:t.t0=t.sent.buffer;case 9:return n=t.t0,t.abrupt("return",n);case 11:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Yy),hm=function(t){em(r,t);var n,i=sm(r);function r(t,n){var e;return nm(this,r),(e=i.call(this,t)).credentials=n,e}return rm(r,[{key:"request",value:(n=tm(regeneratorRuntime.mark((function t(){var n,i,r,e,o,s=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},i=n.headers,r=n.credentials,e=n.signal,t.next=3,fetch(this.url,{headers:i,credentials:r,signal:e});case 3:return o=t.sent,t.abrupt("return",new cm(o));case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Zy);function fm(t){return(fm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lm(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return vm(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return vm(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vm(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i<n;i++)r[i]=t[i];return r}function dm(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function pm(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){dm(o,r,e,s,a,"next",t)}function a(t){dm(o,r,e,s,a,"throw",t)}s(void 0)}))}}function ym(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function mm(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wm(t,n,i){return n&&mm(t.prototype,n),i&&mm(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function bm(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&gm(t,n)}function gm(t,n){return(gm=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function xm(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,r=Sm(t);if(n){var e=Sm(this).constructor;i=Reflect.construct(r,arguments,e)}else i=r.apply(this,arguments);return jm(this,i)}}function jm(t,n){if(n&&("object"===fm(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Sm(t){return(Sm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var km=function(t){bm(r,t);var n,i=xm(r);function r(t,n){var e;return ym(this,r),(e=i.call(this)).xhr=t,e.data=n,e}return wm(r,[{key:"status",get:function(){return this.xhr.status}},{key:"getHeader",value:function(t){return this.xhr.getResponseHeader(t)}},{key:"getData",value:(n=pm(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.data);case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Yy),Mm=function(t){bm(r,t);var n,i=xm(r);function r(){return ym(this,r),i.apply(this,arguments)}return wm(r,[{key:"constructRequest",value:function(t,n){var i=this;return new Promise((function(r,e){var o=new XMLHttpRequest;o.open("GET",i.url),o.responseType="arraybuffer";for(var s=0,a=Object.entries(t);s<a.length;s++){var u=lm(a[s],2),c=u[0],h=u[1];o.setRequestHeader(c,h)}o.onload=function(){var t=o.response;r(new km(o,t))},o.onerror=e,o.onabort=function(){return e(new _y("Request aborted"))},o.send(),n&&(n.aborted&&o.abort(),n.addEventListener("abort",(function(){return o.abort()})))}))}},{key:"request",value:(n=pm(regeneratorRuntime.mark((function t(){var n,i,r,e,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]?o[0]:{},i=n.headers,r=n.signal,t.next=3,this.constructRequest(i,r);case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Zy),_m=i(752),Om=i(640),Tm=i(630);function Em(t){return(Em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Am(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,r)}return i}function Cm(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Am(Object(i),!0).forEach((function(n){Rm(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Am(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function Rm(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function Pm(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function Im(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){Pm(o,r,e,s,a,"next",t)}function a(t){Pm(o,r,e,s,a,"throw",t)}s(void 0)}))}}function Nm(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function zm(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fm(t,n,i){return n&&zm(t.prototype,n),i&&zm(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Lm(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Gm(t,n)}function Gm(t,n){return(Gm=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Dm(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,r=qm(t);if(n){var e=qm(this).constructor;i=Reflect.construct(r,arguments,e)}else i=r.apply(this,arguments);return Um(this,i)}}function Um(t,n){if(n&&("object"===Em(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function qm(t){return(qm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Bm=function(t){Lm(r,t);var n,i=Dm(r);function r(t,n){var e;return Nm(this,r),(e=i.call(this)).response=t,e.dataPromise=n,e}return Fm(r,[{key:"status",get:function(){return this.response.statusCode}},{key:"getHeader",value:function(t){return this.response.headers[t]}},{key:"getData",value:(n=Im(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.dataPromise;case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Yy),Wm=function(t){Lm(r,t);var n,i=Dm(r);function r(t){var n;return Nm(this,r),(n=i.call(this,t)).parsedUrl=Tm.parse(n.url),n.httpApi="http:"===n.parsedUrl.protocol?_m:Om,n}return Fm(r,[{key:"constructRequest",value:function(t,n){var i=this;return new Promise((function(r,e){var o=i.httpApi.get(Cm(Cm({},i.parsedUrl),{},{headers:t}),(function(t){var n=new Promise((function(n){var i=[];t.on("data",(function(t){i.push(t)})),t.on("end",(function(){var t=Buffer.concat(i).buffer;n(t)})),t.on("error",e)}));r(new Bm(t,n))}));o.on("error",e),n&&(n.aborted&&o.destroy(new _y("Request aborted")),n.addEventListener("abort",(function(){return o.destroy(new _y("Request aborted"))})))}))}},{key:"request",value:(n=Im(regeneratorRuntime.mark((function t(){var n,i,r,e,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]?o[0]:{},i=n.headers,r=n.signal,t.next=3,this.constructRequest(i,r);case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Zy);function Vm(t){return(Vm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Xm=["headers","credentials","maxRanges","allowFullFile"],Hm=["headers","maxRanges","allowFullFile"],Jm=["headers","maxRanges","allowFullFile"],Km=["forceXHR"];function Ym(t,n){if(null==t)return{};var i,r,e=function(t,n){if(null==t)return{};var i,r,e={},o=Object.keys(t);for(r=0;r<o.length;r++)i=o[r],n.indexOf(i)>=0||(e[i]=t[i]);return e}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],n.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}return e}function Zm(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,r)}return i}function $m(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Zm(Object(i),!0).forEach((function(n){Qm(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Zm(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function Qm(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function tw(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function nw(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){tw(o,r,e,s,a,"next",t)}function a(t){tw(o,r,e,s,a,"throw",t)}s(void 0)}))}}function iw(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rw(t,n){return(rw=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function ew(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,r=sw(t);if(n){var e=sw(this).constructor;i=Reflect.construct(r,arguments,e)}else i=r.apply(this,arguments);return ow(this,i)}}function ow(t,n){if(n&&("object"===Vm(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sw(t){return(sw=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var aw=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&rw(t,n)}(u,t);var n,i,r,e,o,s,a=ew(u);function u(t,n,i,r){var e;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,u),(e=a.call(this)).client=t,e.headers=n,e.maxRanges=i,e.allowFullFile=r,e._fileSize=null,e}return n=u,(i=[{key:"fetch",value:(s=nw(regeneratorRuntime.mark((function t(n,i){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this.maxRanges>=n.length)){t.next=4;break}return t.abrupt("return",this.fetchSlices(n,i));case 4:this.maxRanges>0&&n.length;case 5:return t.abrupt("return",Promise.all(n.map((function(t){return r.fetchSlice(t,i)}))));case 6:case"end":return t.stop()}}),t,this)}))),function(t,n){return s.apply(this,arguments)})},{key:"fetchSlices",value:(o=nw(regeneratorRuntime.mark((function t(n,i){var r,e,o,s,a,u,c,h,f,l,v,d,p=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.request({headers:$m($m({},this.headers),{},{Range:"bytes=".concat(n.map((function(t){var n=t.offset,i=t.length;return"".concat(n,"-").concat(n+i)})).join(","))}),signal:i});case 2:if((r=t.sent).ok){t.next=7;break}throw new Error("Error fetching data.");case 7:if(206!==r.status){t.next=32;break}if(y=r.getHeader("content-type"),m=void 0,m=Xp(y.split(";").map((function(t){return t.trim()}))),e={type:m[0],params:Qp(m.slice(1).map((function(t){return t.split("=")})))},o=e.params,"multipart/byteranges"!==e.type){t.next=18;break}return t.t0=iy,t.next=13,r.getData();case 13:return t.t1=t.sent,t.t2=o.boundary,s=(0,t.t0)(t.t1,t.t2),this._fileSize=s[0].fileSize||null,t.abrupt("return",s);case 18:return t.next=20,r.getData();case 20:if(a=t.sent,u=ny(r.getHeader("content-range")),c=u.start,h=u.end,f=u.total,this._fileSize=f||null,l=[{data:a,offset:c,length:h-c}],!(n.length>1)){t.next=29;break}return t.next=27,Promise.all(n.slice(1).map((function(t){return p.fetchSlice(t,i)})));case 27:return v=t.sent,t.abrupt("return",l.concat(v));case 29:return t.abrupt("return",l);case 32:if(this.allowFullFile){t.next=34;break}throw new Error("Server responded with full file");case 34:return t.next=36,r.getData();case 36:return d=t.sent,this._fileSize=d.byteLength,t.abrupt("return",[{data:d,offset:0,length:d.byteLength}]);case 39:case"end":return t.stop()}var y,m}),t,this)}))),function(t,n){return o.apply(this,arguments)})},{key:"fetchSlice",value:(e=nw(regeneratorRuntime.mark((function t(n,i){var r,e,o,s,a,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.offset,e=n.length,t.next=3,this.client.request({headers:$m($m({},this.headers),{},{Range:"bytes=".concat(r,"-").concat(r+e)}),signal:i});case 3:if((o=t.sent).ok){t.next=8;break}throw new Error("Error fetching data.");case 8:if(206!==o.status){t.next=17;break}return t.next=11,o.getData();case 11:return s=t.sent,a=ny(o.getHeader("content-range")),u=a.total,this._fileSize=u||null,t.abrupt("return",{data:s,offset:r,length:e});case 17:if(this.allowFullFile){t.next=19;break}throw new Error("Server responded with full file");case 19:return t.next=21,o.getData();case 21:return c=t.sent,this._fileSize=c.byteLength,t.abrupt("return",{data:c,offset:0,length:c.byteLength});case 24:case"end":return t.stop()}}),t,this)}))),function(t,n){return e.apply(this,arguments)})},{key:"fileSize",get:function(){return this._fileSize}}])&&iw(n.prototype,i),r&&iw(n,r),Object.defineProperty(n,"prototype",{writable:!1}),u}(sy);function uw(t,n){var i=n.blockSize,r=n.cacheSize;return null===i?t:new Wy(t,i,r)}function cw(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.headers,r=void 0===i?{}:i,e=n.credentials,o=n.maxRanges,s=void 0===o?0:o,a=n.allowFullFile,u=void 0!==a&&a,c=Ym(n,Xm),h=new hm(t,e),f=new aw(h,r,s,u);return uw(f,c)}function hw(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.headers,r=void 0===i?{}:i,e=n.maxRanges,o=void 0===e?0:e,s=n.allowFullFile,a=void 0!==s&&s,u=Ym(n,Hm),c=new Mm(t),h=new aw(c,r,o,a);return uw(h,u)}function fw(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.headers,r=void 0===i?{}:i,e=n.maxRanges,o=void 0===e?0:e,s=n.allowFullFile,a=void 0!==s&&s,u=Ym(n,Jm),c=new Wm(t),h=new aw(c,r,o,a);return uw(h,u)}function lw(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.forceXHR,r=void 0!==i&&i,e=Ym(n,Km);return"function"!=typeof fetch||r?"undefined"!=typeof XMLHttpRequest?hw(t,e):fw(t,e):cw(t,e)}function vw(t){return(vw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dw(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,r)}return i}function pw(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?dw(Object(i),!0).forEach((function(n){yw(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):dw(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function yw(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function mw(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return ww(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ww(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ww(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i<n;i++)r[i]=t[i];return r}function bw(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function gw(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){bw(o,r,e,s,a,"next",t)}function a(t){bw(o,r,e,s,a,"throw",t)}s(void 0)}))}}function xw(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Ow(t,n)}function jw(t){var n=_w();return function(){var i,r=Tw(t);if(n){var e=Tw(this).constructor;i=Reflect.construct(r,arguments,e)}else i=r.apply(this,arguments);return Sw(this,i)}}function Sw(t,n){if(n&&("object"===vw(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kw(t){var n="function"==typeof Map?new Map:void 0;return(kw=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return Mw(t,arguments,Tw(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ow(r,t)})(t)}function Mw(t,n,i){return(Mw=_w()?Reflect.construct:function(t,n,i){var r=[null];r.push.apply(r,n);var e=new(Function.bind.apply(t,r));return i&&Ow(e,i.prototype),e}).apply(null,arguments)}function _w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Ow(t,n){return(Ow=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Tw(t){return(Tw=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ew(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Aw(t,n,i){return n&&Ew(t.prototype,n),i&&Ew(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Cw(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Rw(t){switch(t){case fp.sf.BYTE:case fp.sf.ASCII:case fp.sf.SBYTE:case fp.sf.UNDEFINED:return 1;case fp.sf.SHORT:case fp.sf.SSHORT:return 2;case fp.sf.LONG:case fp.sf.SLONG:case fp.sf.FLOAT:case fp.sf.IFD:return 4;case fp.sf.RATIONAL:case fp.sf.SRATIONAL:case fp.sf.DOUBLE:case fp.sf.LONG8:case fp.sf.SLONG8:case fp.sf.IFD8:return 8;default:throw new RangeError("Invalid field type: ".concat(t))}}function Pw(t){var n=t.GeoKeyDirectory;if(!n)return null;for(var i={},r=4;r<=4*n[3];r+=4){var e=fp.P1[n[r]],o=n[r+1]?fp.L[n[r+1]]:null,s=n[r+2],a=n[r+3],u=null;if(o){if(null==(u=t[o]))throw new Error("Could not get value of geoKey '".concat(e,"'."));"string"==typeof u?u=u.substring(a,a+s-1):u.subarray&&(u=u.subarray(a,a+s),1===s&&(u=u[0]))}else u=a;i[e]=u}return i}function Iw(t,n,i,r){var e=null,o=null,s=Rw(n);switch(n){case fp.sf.BYTE:case fp.sf.ASCII:case fp.sf.UNDEFINED:e=new Uint8Array(i),o=t.readUint8;break;case fp.sf.SBYTE:e=new Int8Array(i),o=t.readInt8;break;case fp.sf.SHORT:e=new Uint16Array(i),o=t.readUint16;break;case fp.sf.SSHORT:e=new Int16Array(i),o=t.readInt16;break;case fp.sf.LONG:case fp.sf.IFD:e=new Uint32Array(i),o=t.readUint32;break;case fp.sf.SLONG:e=new Int32Array(i),o=t.readInt32;break;case fp.sf.LONG8:case fp.sf.IFD8:e=new Array(i),o=t.readUint64;break;case fp.sf.SLONG8:e=new Array(i),o=t.readInt64;break;case fp.sf.RATIONAL:e=new Uint32Array(2*i),o=t.readUint32;break;case fp.sf.SRATIONAL:e=new Int32Array(2*i),o=t.readInt32;break;case fp.sf.FLOAT:e=new Float32Array(i),o=t.readFloat32;break;case fp.sf.DOUBLE:e=new Float64Array(i),o=t.readFloat64;break;default:throw new RangeError("Invalid field type: ".concat(n))}if(n!==fp.sf.RATIONAL&&n!==fp.sf.SRATIONAL)for(var a=0;a<i;++a)e[a]=o.call(t,r+a*s);else for(var u=0;u<i;u+=2)e[u]=o.call(t,r+u*s),e[u+1]=o.call(t,r+(u*s+4));return n===fp.sf.ASCII?new TextDecoder("utf-8").decode(e):e}var Nw=Aw((function t(n,i,r){Cw(this,t),this.fileDirectory=n,this.geoKeyDirectory=i,this.nextIFDByteOffset=r})),zw=function(t){xw(i,t);var n=jw(i);function i(t){var r;return Cw(this,i),(r=n.call(this,"No image at index ".concat(t))).index=t,r}return Aw(i)}(kw(Error)),Fw=function(){function t(){Cw(this,t)}var n;return Aw(t,[{key:"readRasters",value:(n=gw(regeneratorRuntime.mark((function t(){var n,i,r,e,o,s,a,u,c,h,f,l,v,d,p,y,m,w,b,g,x,j,S,k,M,_,O,T,E,A,C,R,P,I,N,z,F,L,G,D=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=D.length>0&&void 0!==D[0]?D[0]:{},i=n.window,r=n.width,e=n.height,o=n.resX,s=n.resY,a=n.bbox,t.next=5,this.getImage();case 5:return u=t.sent,c=u,t.next=9,this.getImageCount();case 9:if(h=t.sent,f=u.getBoundingBox(),!i||!a){t.next=13;break}throw new Error('Both "bbox" and "window" passed.');case 13:if(!r&&!e){t.next=24;break}if(i&&(l=u.getOrigin(),v=mw(l,2),d=v[0],p=v[1],y=u.getResolution(),m=mw(y,2),w=m[0],b=m[1],a=[d+i[0]*w,p+i[1]*b,d+i[2]*w,p+i[3]*b]),g=a||f,!r){t.next=20;break}if(!o){t.next=19;break}throw new Error("Both width and resX passed");case 19:o=(g[2]-g[0])/r;case 20:if(!e){t.next=24;break}if(!s){t.next=23;break}throw new Error("Both width and resY passed");case 23:s=(g[3]-g[1])/e;case 24:if(!o&&!s){t.next=48;break}x=[],j=0;case 27:if(!(j<h)){t.next=36;break}return t.next=30,this.getImage(j);case 30:S=t.sent,k=S.fileDirectory,M=k.SubfileType,_=k.NewSubfileType,(0===j||2===M||1&_)&&x.push(S);case 33:++j,t.next=27;break;case 36:x.sort((function(t,n){return t.getWidth()-n.getWidth()})),O=0;case 38:if(!(O<x.length)){t.next=48;break}if(T=x[O],E=(f[2]-f[0])/T.getWidth(),A=(f[3]-f[1])/T.getHeight(),c=T,!(o&&o>E||s&&s>A)){t.next=45;break}return t.abrupt("break",48);case 45:++O,t.next=38;break;case 48:return C=i,a&&(R=u.getOrigin(),P=mw(R,2),I=P[0],N=P[1],z=c.getResolution(u),F=mw(z,2),L=F[0],G=F[1],C=[Math.round((a[0]-I)/L),Math.round((a[1]-N)/G),Math.round((a[2]-I)/L),Math.round((a[3]-N)/G)],C=[Math.min(C[0],C[2]),Math.min(C[1],C[3]),Math.max(C[0],C[2]),Math.max(C[1],C[3])]),t.abrupt("return",c.readRasters(pw(pw({},n),{},{window:C})));case 51:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),t}(),Lw=function(t){xw(c,t);var n,i,r,e,o,s,a,u=jw(c);function c(t,n,i,r){var e,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Cw(this,c),(e=u.call(this)).source=t,e.littleEndian=n,e.bigTiff=i,e.firstIFDOffset=r,e.cache=o.cache||!1,e.ifdRequests=[],e.ghostValues=null,e}return Aw(c,[{key:"getSlice",value:(a=gw(regeneratorRuntime.mark((function t(n,i){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.bigTiff?4048:1024,t.t0=Vp,t.next=4,this.source.fetch([{offset:n,length:void 0!==i?i:r}]);case 4:return t.t1=t.sent[0],t.t2=n,t.t3=this.littleEndian,t.t4=this.bigTiff,t.abrupt("return",new t.t0(t.t1,t.t2,t.t3,t.t4));case 9:case"end":return t.stop()}}),t,this)}))),function(t,n){return a.apply(this,arguments)})},{key:"parseFileDirectoryAt",value:(s=gw(regeneratorRuntime.mark((function t(n){var i,r,e,o,s,a,u,c,h,f,l,v,d,p,y,m,w,b,g,x;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.bigTiff?20:12,r=this.bigTiff?8:2,t.next=4,this.getSlice(n);case 4:if(e=t.sent,o=this.bigTiff?e.readUint64(n):e.readUint16(n),s=o*i+(this.bigTiff?16:6),e.covers(n,s)){t.next=11;break}return t.next=10,this.getSlice(n,s);case 10:e=t.sent;case 11:a={},u=n+(this.bigTiff?8:2),c=0;case 14:if(!(c<o)){t.next=41;break}if(h=e.readUint16(u),f=e.readUint16(u+2),l=this.bigTiff?e.readUint64(u+4):e.readUint32(u+4),v=void 0,d=void 0,p=Rw(f),y=u+(this.bigTiff?12:8),!(p*l<=(this.bigTiff?8:4))){t.next=26;break}v=Iw(e,f,l,y),t.next=36;break;case 26:if(m=e.readOffset(y),w=Rw(f)*l,!e.covers(m,w)){t.next=32;break}v=Iw(e,f,l,m),t.next=36;break;case 32:return t.next=34,this.getSlice(m,w);case 34:b=t.sent,v=Iw(b,f,l,m);case 36:d=1===l&&-1===fp.It.indexOf(h)&&f!==fp.sf.RATIONAL&&f!==fp.sf.SRATIONAL?v[0]:v,a[fp.L[h]]=d;case 38:u+=i,++c,t.next=14;break;case 41:return g=Pw(a),x=e.readOffset(n+r+i*o),t.abrupt("return",new Nw(a,g,x));case 44:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"requestIFD",value:(o=gw(regeneratorRuntime.mark((function t(n){var i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.ifdRequests[n]){t.next=4;break}return t.abrupt("return",this.ifdRequests[n]);case 4:if(0!==n){t.next=9;break}return this.ifdRequests[n]=this.parseFileDirectoryAt(this.firstIFDOffset),t.abrupt("return",this.ifdRequests[n]);case 9:if(this.ifdRequests[n-1]){t.next=19;break}t.prev=10,this.ifdRequests[n-1]=this.requestIFD(n-1),t.next=19;break;case 14:if(t.prev=14,t.t0=t.catch(10),!(t.t0 instanceof zw)){t.next=18;break}throw new zw(n);case 18:throw t.t0;case 19:return this.ifdRequests[n]=gw(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.ifdRequests[n-1];case 2:if(0!==(r=t.sent).nextIFDByteOffset){t.next=5;break}throw new zw(n);case 5:return t.abrupt("return",i.parseFileDirectoryAt(r.nextIFDByteOffset));case 6:case"end":return t.stop()}}),t)})))(),t.abrupt("return",this.ifdRequests[n]);case 21:case"end":return t.stop()}}),t,this,[[10,14]])}))),function(t){return o.apply(this,arguments)})},{key:"getImage",value:(e=gw(regeneratorRuntime.mark((function t(){var n,i,r=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:0,t.next=3,this.requestIFD(n);case 3:return i=t.sent,t.abrupt("return",new Up(i.fileDirectory,i.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source));case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getImageCount",value:(r=gw(regeneratorRuntime.mark((function t(){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=0,i=!0;case 2:if(!i){t.next=18;break}return t.prev=3,t.next=6,this.requestIFD(n);case 6:++n,t.next=16;break;case 9:if(t.prev=9,t.t0=t.catch(3),!(t.t0 instanceof zw)){t.next=15;break}i=!1,t.next=16;break;case 15:throw t.t0;case 16:t.next=2;break;case 18:return t.abrupt("return",n);case 19:case"end":return t.stop()}}),t,this,[[3,9]])}))),function(){return r.apply(this,arguments)})},{key:"getGhostValues",value:(i=gw(regeneratorRuntime.mark((function t(){var n,i,r,e,o,s,a,u,c=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.bigTiff?16:8,!this.ghostValues){t.next=3;break}return t.abrupt("return",this.ghostValues);case 3:return r=(i="GDAL_STRUCTURAL_METADATA_SIZE=").length+100,t.next=7,this.getSlice(n,r);case 7:if(e=t.sent,i!==Iw(e,fp.sf.ASCII,i.length,n)){t.next=19;break}if(o=Iw(e,fp.sf.ASCII,r,n),s=o.split("\n")[0],!((a=Number(s.split("=")[1].split(" ")[0])+s.length)>r)){t.next=16;break}return t.next=15,this.getSlice(n,a);case 15:e=t.sent;case 16:u=Iw(e,fp.sf.ASCII,a,n),this.ghostValues={},u.split("\n").filter((function(t){return t.length>0})).map((function(t){return t.split("=")})).forEach((function(t){var n=mw(t,2),i=n[0],r=n[1];c.ghostValues[i]=r}));case 19:return t.abrupt("return",this.ghostValues);case 20:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"close",value:function(){return"function"==typeof this.source.close&&this.source.close()}}],[{key:"fromSource",value:(n=gw(regeneratorRuntime.mark((function t(n,i,r){var e,o,s,a,u,h,f;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.fetch([{offset:0,length:1024}],r);case 2:if(e=t.sent[0],o=new Bp(e),18761!==(s=o.getUint16(0,0))){t.next=9;break}a=!0,t.next=14;break;case 9:if(19789!==s){t.next=13;break}a=!1,t.next=14;break;case 13:throw new TypeError("Invalid byte order value.");case 14:if(42!==(u=o.getUint16(2,a))){t.next=19;break}h=!1,t.next=27;break;case 19:if(43!==u){t.next=26;break}if(h=!0,8===o.getUint16(4,a)){t.next=24;break}throw new Error("Unsupported offset byte-size.");case 24:t.next=27;break;case 26:throw new TypeError("Invalid magic number.");case 27:return f=h?o.getUint64(8,a):o.getUint32(4,a),t.abrupt("return",new c(n,a,h,f,i));case 29:case"end":return t.stop()}}),t)}))),function(t,i,r){return n.apply(this,arguments)})}]),c}(Fw),Gw=function(t){xw(o,t);var n,i,r,e=jw(o);function o(t,n){var i;return Cw(this,o),(i=e.call(this)).mainFile=t,i.overviewFiles=n,i.imageFiles=[t].concat(n),i.fileDirectoriesPerFile=null,i.fileDirectoriesPerFileParsing=null,i.imageCount=null,i}return Aw(o,[{key:"parseFileDirectoriesPerFile",value:(r=gw(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((function(t){return t.parseFileDirectoryAt(t.firstIFDOffset)}))),t.next=3,Promise.all(n);case 3:return this.fileDirectoriesPerFile=t.sent,t.abrupt("return",this.fileDirectoriesPerFile);case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"getImage",value:(i=gw(regeneratorRuntime.mark((function t(){var n,i,r,e,o,s,a,u=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>0&&void 0!==u[0]?u[0]:0,t.next=3,this.getImageCount();case 3:return t.next=5,this.parseFileDirectoriesPerFile();case 5:i=0,r=0,e=0;case 8:if(!(e<this.imageFiles.length)){t.next=26;break}o=this.imageFiles[e],s=0;case 11:if(!(s<this.imageCounts[e])){t.next=22;break}if(n!==i){t.next=17;break}return t.next=15,o.requestIFD(r);case 15:return a=t.sent,t.abrupt("return",new Up(a.fileDirectory,a.geoKeyDirectory,o.dataView,o.littleEndian,o.cache,o.source));case 17:i++,r++;case 19:s++,t.next=11;break;case 22:r=0;case 23:e++,t.next=8;break;case 26:throw new RangeError("Invalid image index");case 27:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getImageCount",value:(n=gw(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null===this.imageCount){t.next=2;break}return t.abrupt("return",this.imageCount);case 2:return n=[this.mainFile.getImageCount()].concat(this.overviewFiles.map((function(t){return t.getImageCount()}))),t.next=5,Promise.all(n);case 5:return this.imageCounts=t.sent,this.imageCount=this.imageCounts.reduce((function(t,n){return t+n}),0),t.abrupt("return",this.imageCount);case 8:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),o}(Fw);function Dw(){return(Dw=gw(regeneratorRuntime.mark((function t(n){var i,r,e=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.length>1&&void 0!==e[1]?e[1]:{},r=e.length>2?e[2]:void 0,t.abrupt("return",Lw.fromSource(lw(n,i),r));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Uw(){return(Uw=gw(regeneratorRuntime.mark((function t(n){var i,r,e,o,s,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=a.length>1&&void 0!==a[1]?a[1]:[],r=a.length>2&&void 0!==a[2]?a[2]:{},e=a.length>3?a[3]:void 0,t.next=5,Lw.fromSource(lw(n,r),e);case 5:return o=t.sent,t.next=8,Promise.all(i.map((function(t){return Lw.fromSource(lw(t,r))})));case 8:return s=t.sent,t.abrupt("return",new Gw(o,s));case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function qw(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function Bw(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Ww(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Vw,Xw="undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,Hw=function(){function t(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xw,e=arguments.length>1?arguments[1]:void 0;Bw(this,t),this.workers=null,this._awaitingDecoder=null,this.size=r,this.messageId=0,r&&(this._awaitingDecoder=e?Promise.resolve(e):new Promise((function(t){i.e(231).then(i.bind(i,231)).then((function(n){t(n.create)}))})),this._awaitingDecoder.then((function(t){n._awaitingDecoder=null,n.workers=[];for(var i=0;i<r;i++)n.workers.push({worker:t(),idle:!0})})))}var n,r,e,o,s;return n=t,(r=[{key:"decode",value:(o=regeneratorRuntime.mark((function t(n,i){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._awaitingDecoder){t.next=3;break}return t.next=3,this._awaitingDecoder;case 3:return t.abrupt("return",0===this.size?jp(n).then((function(t){return t.decode(n,i)})):new Promise((function(t){var e=r.workers.find((function(t){return t.idle}))||r.workers[Math.floor(Math.random()*r.size)];e.idle=!1;var o=r.messageId++;e.worker.addEventListener("message",(function n(i){i.data.id===o&&(e.idle=!0,t(i.data.decoded),e.worker.removeEventListener("message",n))})),e.worker.postMessage({fileDirectory:n,buffer:i,id:o},[i])})));case 4:case"end":return t.stop()}}),t,this)})),s=function(){var t=this,n=arguments;return new Promise((function(i,r){var e=o.apply(t,n);function s(t){qw(e,i,r,s,a,"next",t)}function a(t){qw(e,i,r,s,a,"throw",t)}s(void 0)}))},function(t,n){return s.apply(this,arguments)})},{key:"destroy",value:function(){this.workers&&(this.workers.forEach((function(t){t.worker.terminate()})),this.workers=null)}}])&&Ww(n.prototype,r),e&&Ww(n,e),Object.defineProperty(n,"prototype",{writable:!1}),t}(),Jw=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kw="STATISTICS_MAXIMUM",Yw="STATISTICS_MINIMUM";function Zw(t){try{return t.getBoundingBox()}catch(i){var n=t.fileDirectory;return[0,0,n.ImageWidth,n.ImageLength]}}function $w(t){try{return t.getOrigin().slice(0,2)}catch(n){return[0,t.fileDirectory.ImageLength]}}function Qw(t,n){try{return t.getResolution(n)[0]}catch(i){return n.fileDirectory.ImageWidth/t.fileDirectory.ImageWidth}}function tb(t){var n=t.geoKeys;if(!n)return null;if(n.ProjectedCSTypeGeoKey){if(!(r=br(i="EPSG:"+n.ProjectedCSTypeGeoKey)))(e=zt(n.ProjLinearUnitsGeoKey))&&(r=new ai({code:i,units:e}));return r}if(n.GeographicTypeGeoKey){var i,r,e;if(!(r=br(i="EPSG:"+n.GeographicTypeGeoKey)))(e=zt(n.GeogAngularUnitsGeoKey))&&(r=new ai({code:i,units:e}));return r}return null}function nb(t){return t.getImageCount().then((function(n){for(var i=new Array(n),r=0;r<n;++r)i[r]=t.getImage(r);return Promise.all(i)}))}function ib(t,n){return(t.overviews?function(t){return Uw.apply(this,arguments)}(t.url,t.overviews,n):function(t){return Dw.apply(this,arguments)}(t.url,n)).then(nb)}function rb(t,n,i,r,e){if(Array.isArray(t)){var o=t.length;if(!Array.isArray(n)||o!=n.length){var s=new Error(r);throw e(s),s}for(var a=0;a<o;++a)rb(t[a],n[a],i,r,e)}else if(n=n,Math.abs(t-n)>i*t)throw new Error(r)}function eb(t){return t instanceof Int8Array?-128:t instanceof Int16Array?-32768:t instanceof Int32Array?-2147483648:t instanceof Float32Array?12e-39:0}function ob(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}var sb=function(t){function n(n){var i=t.call(this,{state:ds,tileGrid:null,projection:null,opaque:n.opaque,transition:n.transition,interpolate:!1!==n.interpolate,wrapX:n.wrapX})||this;i.$u=n.sources;var r=i.$u.length;i.Qu=n.sourceOptions,i.tc=new Array(r),i.ic=new Array(r),i.rc,i.ec,i.oc,i.sc=!1!==n.normalize,i.ac=!1,i.W=null,i.uc=n.convertToRGB?"readRGB":"readRasters",i.setKey(i.$u.map((function(t){return t.url})).join(","));for(var e=i,o=new Array(r),s=0;s<r;++s)o[s]=ib(i.$u[s],i.Qu);return Promise.all(o).then((function(t){e.cc(t)})).catch((function(t){console.error(t),e.W=t,e.setState(ys)})),i}return Jw(n,t),n.prototype.getError=function(){return this.W},n.prototype.cc=function(t){for(var n,i,r,e,o=new Array(t.length),s=new Array(t.length),a=new Array(t.length),u=0,c=t.length,h=function(c){var h=t[c],l=h.length,v=void 0,d=void 0,p=new Array(l),y=new Array(l);s[c]=new Array(l),a[c]=new Array(l);for(var m=0;m<l;++m){var w=h[m],b=w.getGDALNoData();a[c][m]=w.getGDALMetadata(0),s[c][m]=null===b?NaN:b;var g=f.$u[c].bands;o[c]=g?g.length:w.getSamplesPerPixel();var x=l-(m+1);v||(v=Zw(w)),d||(d=$w(w)),y[x]=Qw(w,h[0]),p[x]=[w.getTileWidth(),w.getTileHeight()]}if(n?Yn(n,v,n):n=v,i){var j="Origin mismatch for source ".concat(c,", got [").concat(d,"] but expected [").concat(i,"]");rb(i,d,0,j,f.viewRejector)}else i=d;if(e){e.length-u>y.length&&(u=e.length-y.length);var S=e[e.length-1]/y[y.length-1];f.ic[c]=S;var k=y.map((function(t){return t*S}));j="Resolution mismatch for source ".concat(c,", got [").concat(k,"] but expected [").concat(e,"]");rb(e.slice(u,e.length),k,.02,j,f.viewRejector)}else e=y,f.ic[c]=1;r?rb(r.slice(u,r.length),p,0,"Tile size mismatch for source ".concat(c),f.viewRejector):r=p,f.tc[c]=h.reverse()},f=this,l=0;l<c;++l)h(l);for(var v=0,d=this.tc.length;v<d;++v)for(var p=this.tc[v];p.length<e.length;)p.unshift(void 0);if(!this.getProjection()){var y=t[0];for(v=y.length-1;v>=0;--v){var m=tb(y[v]);if(m){this.projection=m;break}}}this.rc=o,this.ec=s,this.oc=a;t:for(l=0;l<c;++l){if(void 0!==this.$u[l].nodata){this.ac=!0;break}var w=s[l],b=this.$u[l].bands;if(b){for(v=0;v<b.length;++v)if(!isNaN(w[b[v]-1])){this.ac=!0;break t}}else for(var g=0;g<w.length;++g)if(!isNaN(w[g])){this.ac=!0;break t}}var x=this.ac?1:0;this.bandCount=o.reduce((function(t,n){return t+=n}),0)+x;var j=new Vh({extent:n,minZoom:u,origin:i,resolutions:e,tileSizes:r});this.tileGrid=j,this.setLoader(this.hc.bind(this)),this.setState(ps),this.viewResolver({projection:this.projection,resolutions:e,center:Nr(Xn(n),this.projection),extent:Fr(n,this.projection),zoom:0})},n.prototype.hc=function(t,n,i){for(var r=ou(this.tileGrid.getTileSize(t)),e=this.tc.length,o=new Array(e),s=this.ac,a=this.bandCount,u=this.rc,c=this.ec,h=this.$u,f=function(e){var s=h[e],a=l.ic[e],u=[Math.round(n*(r[0]*a)),Math.round(i*(r[1]*a)),Math.round((n+1)*(r[0]*a)),Math.round((i+1)*(r[1]*a))],f=l.tc[e][t],v=void 0;s.bands&&(v=s.bands.map((function(t){return t-1})));var d=void 0;d=isNaN(s.nodata)?v?v.map((function(t){return c[e][t]})):c[e]:s.nodata,o[e]=f[l.uc]({window:u,width:r[0],height:r[1],samples:v,fillValue:d,pool:(Vw||(Vw=new Hw),Vw),interleave:!1})},l=this,v=0;v<e;++v)f(v);var d=r[0]*r[1],p=d*a,y=this.sc,m=this.oc;return Promise.all(o).then((function(t){var n;n=y?new Uint8Array(p):new Float32Array(p);for(var i=0,r=0;r<d;++r){for(var o=s,a=0;a<e;++a){var f=h[a],l=f.min,v=f.max,w=void 0,b=void 0;if(y){var g=m[a][0];void 0===l&&(l=g&&Yw in g?parseFloat(g.STATISTICS_MINIMUM):eb(t[a][0])),void 0===v&&(v=g&&Kw in g?parseFloat(g.STATISTICS_MAXIMUM):ob(t[a][0])),b=-l*(w=255/(v-l))}for(var x=0;x<u[a];++x){var j=t[a][x][r],S=void 0;if(S=y?ui(w*j+b,0,255):j,s){var k=f.nodata;if(void 0===k){var M=void 0;M=f.bands?f.bands[x]-1:x,k=c[a][M]}j!==k&&(o=!1,n[i]=S)}else n[i]=S;i++}}s&&(o||(n[i]=255),i++)}return n}))},n}(Ld);sb.prototype.getView;var ab=sb,ub=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cb="default",hb="truncated",fb=function(t){function n(n,i,r,e,o,s,a){var u=t.call(this,i,r,e,o,s,a)||this;return u.fc=null,u._o=n,u}return ub(n,t),n.prototype.getImage=function(){if(this.fc)return this.fc;var n=t.prototype.getImage.call(this);if(this.state==dt){var i=this._o;if(n.width==i[0]&&n.height==i[1])return this.fc=n,n;var r=_o(i[0],i[1]);return r.drawImage(n,0,0),this.fc=r.canvas,r.canvas}return n},n}(Io),lb=function(t){function n(n){var i=this,r=n,e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=r.size,s=void 0!==r.tierSizeCalculation?r.tierSizeCalculation:cb,a=r.tilePixelRatio||1,u=o[0],c=o[1],h=[],f=r.tileSize||za,l=f*a;switch(s){case cb:for(;u>l||c>l;)h.push([Math.ceil(u/l),Math.ceil(c/l)]),l+=l;break;case hb:for(var v=u,d=c;v>l||d>l;)h.push([Math.ceil(v/l),Math.ceil(d/l)]),v>>=1,d>>=1;break;default:Mt(!1,53)}h.push([1,1]),h.reverse();for(var p=[a],y=[0],m=1,w=h.length;m<w;m++)p.push(a<<m),y.push(h[m-1][0]*h[m-1][1]+y[m-1]);p.reverse();var b=new Vh({tileSize:f,extent:r.extent||[0,-c,u,0],resolutions:p}),g=r.url;g&&-1==g.indexOf("{TileGroup}")&&-1==g.indexOf("{tileIndex}")&&(g+="{TileGroup}/{z}-{x}-{y}.jpg");var x=ef(g),j=f*a;var S=nf(x.map((function(t){return function(n,i,r){if(n){var e=n[0],o=n[1],s=n[2],a=o+s*h[e][0],u={z:e,x:o,y:s,tileIndex:a,TileGroup:"TileGroup"+((a+y[e])/j|0)};return t.replace(/\{(\w+?)\}/g,(function(t,n){return u[n]}))}}}))),k=fb.bind(null,ou(f*a));(i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,projection:r.projection,tilePixelRatio:a,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:k,tileGrid:b,tileUrlFunction:S,transition:r.transition})||this).zDirection=r.zDirection;var M=S(b.getTileCoordForCoordAndResolution(Xn(b.getExtent()),p[p.length-1]),1,null),_=new Image;return _.addEventListener("error",function(){j=f,this.changed()}.bind(i)),_.src=M,i}return ub(n,t),n}(md),vb=function(t,n,i){if(i||2===arguments.length)for(var r,e=0,o=n.length;e<o;e++)!r&&e in n||(r||(r=Array.prototype.slice.call(n,0,e)),r[e]=n[e]);return t.concat(r||Array.prototype.slice.call(n))},db="version1",pb="version2",yb="version3",mb={};mb[db]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},mb[pb]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},mb[yb]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},mb.none={none:{supports:[],formats:[],qualities:[]}};var wb=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,bb=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,gb=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;var xb={};xb[db]=function(t){var n=t.getComplianceLevelSupportedFeatures();return void 0===n&&(n=mb[db].level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:n.supports,formats:vb(vb([],n.formats,!0),[void 0===t.imageInfo.formats?[]:t.imageInfo.formats],!1),qualities:vb(vb([],n.qualities,!0),[void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities],!1),resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:null!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},xb[pb]=function(t){var n=t.getComplianceLevelSupportedFeatures(),i=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,r=i&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],e=i&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=i&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:vb(vb([],n.supports,!0),r,!0),formats:vb(vb([],n.formats,!0),e,!0),qualities:vb(vb([],n.qualities,!0),o,!0)}},xb[yb]=function(t){var n=t.getComplianceLevelSupportedFeatures(),i=void 0===t.imageInfo.extraFormats?n.formats:vb(vb([],n.formats,!0),t.imageInfo.extraFormats,!0),r=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return y(["jpg","png","gif"],t)})).reduce((function(t,n){return void 0===t&&y(i,n)?n:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?n.supports:vb(vb([],n.supports,!0),t.imageInfo.extraFeatures,!0),formats:i,qualities:void 0===t.imageInfo.extraQualities?n.qualities:vb(vb([],n.qualities,!0),t.imageInfo.extraQualities,!0),preferredFormat:r}};var jb=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)switch(t[n]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return db;case"http://iiif.io/api/image/2/context.json":return pb;case"http://iiif.io/api/image/3/context.json":return yb;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(db)&&this.imageInfo.identifier)return db}Mt(!1,61)}},t.prototype.getComplianceLevelEntryFromProfile=function(t){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===t&&(t=this.getImageApiVersion()),t){case db:if(wb.test(this.imageInfo.profile))return this.imageInfo.profile;break;case yb:if(gb.test(this.imageInfo.profile))return this.imageInfo.profile;break;case pb:if("string"==typeof this.imageInfo.profile&&bb.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&bb.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var n=this.getComplianceLevelEntryFromProfile(t);if(void 0!==n){var i=n.match(/level[0-2](?:\.json)?$/g);return Array.isArray(i)?i[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),n=this.getComplianceLevelFromProfile(t);return void 0===n?mb.none.none:mb[t][n]}},t.prototype.getTileSourceOptions=function(t){var n=t||{},i=this.getImageApiVersion();if(void 0!==i){var r=void 0===i?void 0:xb[i](this);if(void 0!==r)return{url:r.url,version:i,size:[this.imageInfo.width,this.imageInfo.height],sizes:r.sizes,format:void 0!==n.format&&y(r.formats,n.format)?n.format:void 0!==r.preferredFormat?r.preferredFormat:"jpg",supports:r.supports,quality:n.quality&&y(r.qualities,n.quality)?n.quality:y(r.qualities,"native")?"native":"default",resolutions:Array.isArray(r.resolutions)?r.resolutions.sort((function(t,n){return n-t})):void 0,tileSize:r.tileSize}}},t}(),Sb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function kb(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var Mb=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=r.url||"";o+=o.lastIndexOf("/")===o.length-1||""===o?"":"/";var s=r.version||pb,a=r.sizes||[],u=r.size;Mt(null!=u&&Array.isArray(u)&&2==u.length&&!isNaN(u[0])&&u[0]>0&&!isNaN(u[1])&&u[1]>0,60);var c,h,f,l=u[0],v=u[1],d=r.tileSize,p=r.tilePixelRatio||1,m=r.format||"jpg",w=r.quality||(r.version==db?"native":"default"),b=r.resolutions||[],g=r.supports||[],x=r.extent||[0,-v,l,0],j=null!=a&&Array.isArray(a)&&a.length>0,S=void 0!==d&&("number"==typeof d&&Number.isInteger(d)&&d>0||Array.isArray(d)&&d.length>0),k=null!=g&&Array.isArray(g)&&(y(g,"regionByPx")||y(g,"regionByPct"))&&(y(g,"sizeByWh")||y(g,"sizeByH")||y(g,"sizeByW")||y(g,"sizeByPct"));if(b.sort((function(t,n){return n-t})),S||k)if(null!=d&&("number"==typeof d&&Number.isInteger(d)&&d>0?(c=d,h=d):Array.isArray(d)&&d.length>0&&((1==d.length||null==d[1]&&Number.isInteger(d[0]))&&(c=d[0],h=d[0]),2==d.length&&(Number.isInteger(d[0])&&Number.isInteger(d[1])?(c=d[0],h=d[1]):null==d[0]&&Number.isInteger(d[1])&&(c=d[1],h=d[1])))),void 0!==c&&void 0!==h||(c=za,h=za),0==b.length)for(var M=f=Math.max(Math.ceil(Math.log(l/c)/Math.LN2),Math.ceil(Math.log(v/h)/Math.LN2));M>=0;M--)b.push(Math.pow(2,M));else{var _=Math.max.apply(Math,b);f=Math.round(Math.log(_)/Math.LN2)}else if(c=l,h=v,b=[],j){a.sort((function(t,n){return t[0]-n[0]})),f=-1;var O=[];for(M=0;M<a.length;M++){var T=l/a[M][0];b.length>0&&b[b.length-1]==T?O.push(M):(b.push(T),f++)}if(O.length>0)for(M=0;M<O.length;M++)a.splice(O[M]-M,1)}else b.push(1),a.push([l,v]),f=0;var E=new Vh({tileSize:[c,h],extent:x,origin:Zn(x),resolutions:b}),A=fb.bind(null,ou(d||256).map((function(t){return t*p})));return(i=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,state:r.state,tileClass:A,tileGrid:E,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:function(t,n,i){var r,e,u=t[0];if(!(u>f)){var d=t[1],p=t[2],x=b[u];if(!(void 0===d||void 0===p||void 0===x||d<0||Math.ceil(l/x/c)<=d||p<0||Math.ceil(v/x/h)<=p)){if(k||S){var M=d*c*x,_=p*h*x,O=c*x,T=h*x,E=c,A=h;if(M+O>l&&(O=l-M),_+T>v&&(T=v-_),M+c*x>l&&(E=Math.floor((l-M+x-1)/x)),_+h*x>v&&(A=Math.floor((v-_+x-1)/x)),0==M&&O==l&&0==_&&T==v)r="full";else if(!k||y(g,"regionByPx"))r=M+","+_+","+O+","+T;else if(y(g,"regionByPct")){r="pct:"+kb(M/l*100)+","+kb(_/v*100)+","+kb(O/l*100)+","+kb(T/v*100)}s!=yb||k&&!y(g,"sizeByWh")?!k||y(g,"sizeByW")?e=E+",":y(g,"sizeByH")?e=","+A:y(g,"sizeByWh")?e=E+","+A:y(g,"sizeByPct")&&(e="pct:"+kb(100/x)):e=E+","+A}else if(r="full",j){var C=a[u][0],R=a[u][1];e=s==yb?C==l&&R==v?"max":C+","+R:C==l?"full":C+","}else e=s==yb?"max":"full";return o+r+"/"+e+"/0/"+w+"."+m}}},transition:r.transition})||this).zDirection=r.zDirection,i}return Sb(n,t),n}(md),_b=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ob=function(t){function n(n,i,r,e,o,s,a){var u=this,c=n.getExtent(),h=i.getExtent(),f=h?Yn(r,h):r,l=Uh(n,i,Xn(f),e),v=new ll(n,i,f,c,.5*l,e),d=s(v.calculateSourceExtent(),l,o),p=d?yo:go,y=d?d.getPixelRatio():1;return(u=t.call(this,r,e,y,p)||this).ds=i,u.ys=c,u.Ns=v,u.wi=e,u.lc=r,u.vc=d,u.dc=y,u.du=a,u.Ut=null,u.yc=null,u}return _b(n,t),n.prototype.disposeInternal=function(){this.state==mo&&this.mc(),t.prototype.disposeInternal.call(this)},n.prototype.getImage=function(){return this.Ut},n.prototype.getProjection=function(){return this.ds},n.prototype.zs=function(){var t=this.vc.getState();if(t==wo){var n=Qn(this.lc)/this.wi,i=Kn(this.lc)/this.wi;this.Ut=Bh(n,i,this.dc,this.vc.getResolution(),this.ys,this.wi,this.lc,this.Ns,[{extent:this.vc.getExtent(),image:this.vc.getImage()}],0,void 0,this.du)}this.state=t,this.changed()},n.prototype.load=function(){if(this.state==yo){this.state=mo,this.changed();var t=this.vc.getState();t==wo||t==bo?this.zs():(this.yc=Y(this.vc,N,(function(t){var n=this.vc.getState();n!=wo&&n!=bo||(this.mc(),this.zs())}),this),this.vc.load())}},n.prototype.mc=function(){$(this.yc),this.yc=null},n}(po),Tb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Eb="imageloadstart",Ab="imageloadend",Cb="imageloaderror",Rb=function(t){function n(n,i){var r=t.call(this,n)||this;return r.image=i,r}return Tb(n,t),n}(f);function Pb(t,n){t.getImage().src=n}var Ib=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,projection:n.projection,state:n.state,interpolate:r})||this).on,i.once,i.un,i.Ti=void 0!==n.resolutions?n.resolutions:null,i.wc=null,i.bc=0,i}return Tb(n,t),n.prototype.getResolutions=function(){return this.Ti},n.prototype.findNearestResolution=function(t){if(this.Ti){var n=m(this.Ti,t,0);t=this.Ti[n]}return t},n.prototype.getImage=function(t,n,i,r){var e=this.getProjection();if(e&&r&&!Or(e,r)){if(this.wc){if(this.bc==this.getRevision()&&Or(this.wc.getProjection(),r)&&this.wc.getResolution()==n&&In(this.wc.getExtent(),t))return this.wc;this.wc.dispose(),this.wc=null}return this.wc=new Ob(e,r,t,n,i,function(t,n,i){return this.getImageInternal(t,n,i,e)}.bind(this),this.getInterpolate()),this.bc=this.getRevision(),this.wc}return e&&(r=e),this.getImageInternal(t,n,i,r)},n.prototype.getImageInternal=function(t,n,i,e){return r()},n.prototype.handleImageChange=function(t){var n,i=t.target;switch(i.getState()){case mo:this.loading=!0,n=Eb;break;case wo:this.loading=!1,n=Ab;break;case bo:this.loading=!1,n=Cb;break;default:return}this.hasListener(n)&&this.dispatchEvent(new Rb(n,i))},n}(ud),Nb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zb=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions})||this).Bt=void 0!==r.crossOrigin?r.crossOrigin:null,i.ju=void 0===r.hidpi||r.hidpi,i.Le=r.url,i.Ft=void 0!==r.imageLoadFunction?r.imageLoadFunction:Pb,i.gc=r.params||{},i.Nt=null,i.xc=[0,0],i.jc=0,i.Sc=void 0!==r.ratio?r.ratio:1.5,i}return Nb(n,t),n.prototype.getParams=function(){return this.gc},n.prototype.getImageInternal=function(t,n,i,r){if(void 0===this.Le)return null;n=this.findNearestResolution(n),i=this.ju?i:1;var e=this.Nt;if(e&&this.jc==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&_n(e.getExtent(),t))return e;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};E(o,this.gc);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.Sc){var u=this.Sc*Qn(t)/2,c=this.Sc*Kn(t)/2;t[0]=s-u,t[1]=a-c,t[2]=s+u,t[3]=a+c}var h=n/i,f=Math.ceil(Qn(t)/h),l=Math.ceil(Kn(t)/h);t[0]=s-h*f/2,t[2]=s+h*f/2,t[1]=a-h*l/2,t[3]=a+h*l/2,this.xc[0]=f,this.xc[1]=l;var v=this.kc(t,this.xc,i,r,o);return this.Nt=new So(t,n,i,v,this.Bt,this.Ft),this.jc=this.getRevision(),this.Nt.addEventListener(N,this.handleImageChange.bind(this)),this.Nt},n.prototype.getImageLoadFunction=function(){return this.Ft},n.prototype.kc=function(t,n,i,r,e){var o=r.getCode().split(/:(?=\d+$)/).pop();e.SIZE=n[0]+","+n[1],e.BBOX=t.join(","),e.BBOXSR=o,e.IMAGESR=o,e.DPI=Math.round(90*i);var s=this.Le,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&Mt(!1,50),of(a,e)},n.prototype.getUrl=function(){return this.Le},n.prototype.setImageLoadFunction=function(t){this.Nt=null,this.Ft=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Le&&(this.Le=t,this.Nt=null,this.changed())},n.prototype.updateParams=function(t){E(this.gc,t),this.Nt=null,this.changed()},n}(Ib),Fb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Lb=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions,state:r.state})||this).Mc=r.canvasFunction,i.Ut=null,i.jc=0,i.Sc=void 0!==r.ratio?r.ratio:1.5,i}return Fb(n,t),n.prototype.getImageInternal=function(t,n,i,r){n=this.findNearestResolution(n);var e=this.Ut;if(e&&this.jc==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&_n(e.getExtent(),t))return e;ri(t=t.slice(),this.Sc);var o=[Qn(t)/n*i,Kn(t)/n*i],s=this.Mc.call(this,t,n,i,o,r);return s&&(e=new Mo(t,n,i,s)),this.Ut=e,this.jc=this.getRevision(),e},n}(Ib),Gb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();var Db=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{interpolate:r,projection:n.projection,resolutions:n.resolutions})||this).Bt=void 0!==n.crossOrigin?n.crossOrigin:null,i._c=void 0!==n.displayDpi?n.displayDpi:96,i.gc=n.params||{},i.Le=n.url,i.Ft=void 0!==n.imageLoadFunction?n.imageLoadFunction:Pb,i.ju=void 0===n.hidpi||n.hidpi,i.dt=void 0!==n.metersPerUnit?n.metersPerUnit:1,i.Sc=void 0!==n.ratio?n.ratio:1,i.Oc=void 0!==n.useOverlay&&n.useOverlay,i.Nt=null,i.jc=0,i}return Gb(n,t),n.prototype.getParams=function(){return this.gc},n.prototype.getImageInternal=function(t,n,i,r){n=this.findNearestResolution(n),i=this.ju?i:1;var e=this.Nt;if(e&&this.jc==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&_n(e.getExtent(),t))return e;1!=this.Sc&&ri(t=t.slice(),this.Sc);var o=[Qn(t)/n*i,Kn(t)/n*i];if(void 0!==this.Le){var s=this.getUrl(this.Le,this.gc,t,o,r);(e=new So(t,n,i,s,this.Bt,this.Ft)).addEventListener(N,this.handleImageChange.bind(this))}else e=null;return this.Nt=e,this.jc=this.getRevision(),e},n.prototype.getImageLoadFunction=function(){return this.Ft},n.prototype.updateParams=function(t){E(this.gc,t),this.changed()},n.prototype.getUrl=function(t,n,i,r,e){var o=function(t,n,i,r){var e=Qn(t),o=Kn(t),s=n[0],a=n[1],u=.0254/r;return a*e>s*o?e*i/(s*u):o*i/(a*u)}(i,r,this.dt,this._c),s=Xn(i),a={OPERATION:this.Oc?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this._c,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:o,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return E(a,n),of(t,a)},n.prototype.setImageLoadFunction=function(t){this.Nt=null,this.Ft=t,this.changed()},n}(Ib),Ub=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qb=function(t){function n(n){var i=this,r=void 0!==n.crossOrigin?n.crossOrigin:null,e=void 0!==n.imageLoadFunction?n.imageLoadFunction:Pb,o=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(o=n.interpolate),(i=t.call(this,{attributions:n.attributions,interpolate:o,projection:br(n.projection)})||this).Le=n.url,i.Tc=n.imageExtent,i.Nt=new So(i.Tc,void 0,1,i.Le,r,e),i.xc=n.imageSize?n.imageSize:null,i.Nt.addEventListener(N,i.handleImageChange.bind(i)),i}return Ub(n,t),n.prototype.getImageExtent=function(){return this.Tc},n.prototype.getImageInternal=function(t,n,i,r){return ti(t,this.Nt.getExtent())?this.Nt:null},n.prototype.getUrl=function(){return this.Le},n.prototype.handleImageChange=function(n){if(this.Nt.getState()==wo){var i=this.Nt.getExtent(),r=this.Nt.getImage(),e=void 0,o=void 0;this.xc?(e=this.xc[0],o=this.xc[1]):(e=r.width,o=r.height);var s=Qn(i),a=Kn(i),u=s/e,c=a/o,h=e,f=o;if(u>c?h=Math.round(s/c):f=Math.round(a/u),h!==e||f!==o){var l=_o(h,f);this.getInterpolate()||E(l,Fh);var v=l.canvas;l.drawImage(r,0,0,e,o,0,0,v.width,v.height),this.Nt.setImage(v)}}t.prototype.handleImageChange.call(this,n)},n}(Ib),Bb="1.3.0",Wb="carmentaserver",Vb="geoserver",Xb="mapserver",Hb="qgis",Jb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kb=[101,101],Yb=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions})||this).Bt=void 0!==r.crossOrigin?r.crossOrigin:null,i.Le=r.url,i.Ft=void 0!==r.imageLoadFunction?r.imageLoadFunction:Pb,i.gc=r.params||{},i.Ec=!0,i.Ac(),i.Cc=r.serverType,i.ju=void 0===r.hidpi||r.hidpi,i.Nt=null,i.xc=[0,0],i.jc=0,i.Sc=void 0!==r.ratio?r.ratio:1.5,i}return Jb(n,t),n.prototype.getFeatureInfoUrl=function(t,n,i,r){if(void 0!==this.Le){var e=br(i),o=this.getProjection();o&&o!==e&&(n=Uh(o,e,t,n),t=Ar(t,e,o));var s=Jn(t,n,0,Kb),a={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.gc.LAYERS};E(a,this.gc,r);var u=gi((t[0]-s[0])/n,4),c=gi((s[3]-t[1])/n,4);return a[this.Ec?"I":"X"]=u,a[this.Ec?"J":"Y"]=c,this.kc(s,Kb,1,o||e,a)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.Le){var i={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.gc.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;i.LAYER=r}if(void 0!==t){var e=this.getProjection()?this.getProjection().getMetersPerUnit():1;i.SCALE=t*e/28e-5}return E(i,n),of(this.Le,i)}},n.prototype.getParams=function(){return this.gc},n.prototype.getImageInternal=function(t,n,i,r){if(void 0===this.Le)return null;n=this.findNearestResolution(n),1==i||this.ju&&void 0!==this.Cc||(i=1);var e=n/i,o=Xn(t),s=Jn(o,e,0,[xi(Qn(t)/e,4),xi(Kn(t)/e,4)]),a=Jn(o,e,0,[xi(this.Sc*Qn(t)/e,4),xi(this.Sc*Kn(t)/e,4)]),u=this.Nt;if(u&&this.jc==this.getRevision()&&u.getResolution()==n&&u.getPixelRatio()==i&&_n(u.getExtent(),s))return u;var c={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};E(c,this.gc),this.xc[0]=bi(Qn(a)/e,4),this.xc[1]=bi(Kn(a)/e,4);var h=this.kc(a,this.xc,i,r,c);return this.Nt=new So(a,n,i,h,this.Bt,this.Ft),this.jc=this.getRevision(),this.Nt.addEventListener(N,this.handleImageChange.bind(this)),this.Nt},n.prototype.getImageLoadFunction=function(){return this.Ft},n.prototype.kc=function(t,n,i,r,e){if(Mt(void 0!==this.Le,9),e[this.Ec?"CRS":"SRS"]=r.getCode(),"STYLES"in this.gc||(e.STYLES=""),1!=i)switch(this.Cc){case Vb:var o=90*i+.5|0;"FORMAT_OPTIONS"in e?e.FORMAT_OPTIONS+=";dpi:"+o:e.FORMAT_OPTIONS="dpi:"+o;break;case Xb:e.MAP_RESOLUTION=90*i;break;case Wb:case Hb:e.DPI=90*i;break;default:Mt(!1,8)}e.WIDTH=n[0],e.HEIGHT=n[1];var s,a=r.getAxisOrientation();return s=this.Ec&&"ne"==a.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,e.BBOX=s.join(","),of(this.Le,e)},n.prototype.getUrl=function(){return this.Le},n.prototype.setImageLoadFunction=function(t){this.Nt=null,this.Ft=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Le&&(this.Le=t,this.Nt=null,this.changed())},n.prototype.updateParams=function(t){E(this.gc,t),this.Ac(),this.Nt=null,this.changed()},n.prototype.Ac=function(){var t=this.gc.VERSION||Bb;this.Ec=Hi(t,"1.3")>=0},n}(Ib),Zb={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},$b={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function Qb(t,n){for(var i,r,e=0;e<t.length;++e){var o=t[e];if("item"===o.rel){if(o.type===n){i=o.href;break}Zb[o.type]?r=o.href:r||0!==o.type.indexOf("image/")||(r=o.href)}}if(!i){if(!r)throw new Error('Could not find "item" link');i=r}return i}function tg(t,n,i){for(var r,e,o={},s=0;s<t.length;++s){var a=t[s];if(o[a.type]=a.href,"item"===a.rel){if(a.type===n){r=a.href;break}$b[a.type]&&(e=a.href)}}if(!r&&i)for(s=0;s<i.length;++s){var u=i[s];if(o[u]){r=o[u];break}}if(!r){if(!e)throw new Error('Could not find "item" link');r=e}return r}function ng(t,n,i,r){var e=t.projection;if(!e&&!(e=br(n.crs)))throw new Error("Unsupported CRS: ".concat(n.crs));for(var o="en"!==e.getAxisOrientation().substr(0,2),s=n.tileMatrices,a={},u=0;u<s.length;++u){var c=s[u];a[c.id]=c}var h={},f=[];if(r)for(u=0;u<r.length;++u){var l=(b=r[u]).tileMatrix;f.push(l),h[l]=b}else for(u=0;u<s.length;++u){l=s[u].id;f.push(l)}var v=f.length,d=new Array(v),p=new Array(v),y=new Array(v),m=new Array(v),w=[-1/0,-1/0,1/0,1/0];for(u=0;u<v;++u){l=f[u];var b,g=(c=a[l]).pointOfOrigin;if(d[u]=o?[g[1],g[0]]:g,p[u]=c.cellSize,y[u]=[c.matrixWidth,c.matrixHeight],m[u]=[c.tileWidth,c.tileHeight],b=h[l]){var x=c.cellSize*c.tileWidth,j=d[u][0]+b.minTileCol*x,S=d[u][0]+(b.maxTileCol+1)*x,k=c.cellSize*c.tileHeight,M=void 0,_=void 0;"bottomLeft"===c.cornerOfOrigin?(M=d[u][1]+b.minTileRow*k,_=d[u][1]+(b.maxTileRow+1)*k):(M=d[u][1]-(b.maxTileRow+1)*k,_=d[u][1]-b.minTileRow*k),Yn(w,[j,M,S,_],w)}}var O=new Vh({origins:d,resolutions:p,sizes:y,tileSizes:m,extent:r?w:void 0}),T=t.context,A=t.url;return{grid:O,urlTemplate:i,urlFunction:function(t,n,e){if(t){var o=f[t[0]],s=a[o],u="bottomLeft"===s.cornerOfOrigin,c={tileMatrix:o,tileCol:t[1],tileRow:u?-t[2]-1:t[2]};if(r){var l=h[s.id];if(c.tileCol<l.minTileCol||c.tileCol>l.maxTileCol||c.tileRow<l.minTileRow||c.tileRow>l.maxTileRow)return}E(c,T);var v=i.replace(/\{(\w+?)\}/g,(function(t,n){return c[n]}));return bh(A,v)}}}}function ig(t){return wh(t.url).then((function(n){return function(t,n){var i,r=n.tileMatrixSetLimits;if("map"===n.dataType)i=Qb(n.links,t.mediaType);else{if("vector"!==n.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');i=tg(n.links,t.mediaType,t.supportedMediaTypes)}if(n.tileMatrixSet)return ng(t,n.tileMatrixSet,i,r);var e=n.links.find((function(t){return"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===t.rel}));if(!e)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");var o=e.href;return wh(bh(t.url,o)).then((function(n){return ng(t,n,i,r)}))}(t,n)}))}var rg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),eg=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:ds,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this,ig({url:n.url,projection:i.getProjection(),mediaType:n.mediaType,context:n.context||null}).then(i.Rc.bind(i)).catch(i.Pc.bind(i)),i}return rg(n,t),n.prototype.Rc=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState(ps)},n.prototype.Pc=function(t){console.error(t),this.setState(ys)},n}(md),og=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sg=function(t){function n(n){var i=this,r=n.projection||"EPSG:3857",e=n.extent||$h(r),o=n.tileGrid||Kh({extent:e,maxResolution:n.maxResolution,maxZoom:void 0!==n.maxZoom?n.maxZoom:22,minZoom:n.minZoom,tileSize:n.tileSize||512});return(i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,interpolate:!0,opaque:!1,projection:r,state:n.state,tileGrid:o,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:ag,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:void 0===n.zDirection?1:n.zDirection})||this).ze=n.format?n.format:null,i.sourceTileCache=new Kc(i.tileCache.highWaterMark),i.Nu=null==n.overlaps||n.overlaps,i.tileClass=n.tileClass?n.tileClass:rh,i.Ic={},i}return og(n,t),n.prototype.getFeaturesInExtent=function(t){var n=[],i=this.tileCache;if(0===i.getCount())return n;var r=Vc(i.peekFirstKey())[0],e=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]===r&&i.getState()===dt)for(var o=i.getSourceTiles(),s=0,a=o.length;s<a;++s){var u=o[s],c=u.tileCoord;if(ti(t,e.getTileCoordExtent(c))){var h=u.getFeatures();if(h)for(var f=0,l=h.length;f<l;++f){var v=h[f],d=v.getGeometry();ti(t,d.getExtent())&&n.push(v)}}}})),n},n.prototype.getOverlaps=function(){return this.Nu},n.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},n.prototype.expireCache=function(n,i){var r=this.getTileCacheForProjection(n),e=Object.keys(i).reduce((function(t,n){var i=Wc(n);if(r.containsKey(i))for(var e=r.get(i).sourceTiles,o=0,s=e.length;o<s;++o)t[e[o].getKey()]=!0;return t}),{});t.prototype.expireCache.call(this,n,i),this.sourceTileCache.expireCache(e)},n.prototype.getSourceTiles=function(t,n,i){var r=this;if(i.getState()===lt){i.setState(vt);var e=i.wrappedTileCoord,o=this.getTileGridForProjection(n),s=o.getTileCoordExtent(e),a=e[0],u=o.getResolution(a);jn(s,-u,s);var c=this.tileGrid,h=c.getExtent();h&&Yn(s,h,s);var f=c.getZForResolution(u,1);c.forEachTileCoord(s,f,(function(e){var o=r.tileUrlFunction(e,t,n),s=r.sourceTileCache.containsKey(o)?r.sourceTileCache.get(o):new r.tileClass(e,o?lt:yt,o,r.ze,r.tileLoadFunction);i.sourceTiles.push(s);var a=s.getState();if(a<dt){s.addEventListener(N,(function t(n){r.handleTileChange(n);var e=s.getState();if(e===dt||e===pt){var o=s.getKey();o in i.errorTileKeys?s.getState()===dt&&delete i.errorTileKeys[o]:i.loadingSourceTiles--,e===pt?i.errorTileKeys[o]=!0:s.removeEventListener(N,t),0===i.loadingSourceTiles&&i.setState(R(i.errorTileKeys)?dt:pt)}})),i.loadingSourceTiles++}a===lt&&(s.extent=c.getTileCoordExtent(e),s.projection=n,s.resolution=c.getResolution(e[0]),r.sourceTileCache.set(o,s),s.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((function(t){return t.getState()===pt}))?pt:dt)}return i.sourceTiles},n.prototype.getTile=function(t,n,i,r,e){var o,s=qc(t,n,i),a=this.getKey();if(this.tileCache.containsKey(s)&&(o=this.tileCache.get(s)).key===a)return o;var u=[t,n,i],c=this.getTileCoordForTileUrlFunction(u,e),h=this.getTileGrid().getExtent(),f=this.getTileGridForProjection(e);if(c&&h){var l=f.getTileCoordExtent(c);jn(l,-f.getResolution(t),l),ti(h,l)||(c=null)}var v=!0;if(null!==c){var d=this.tileGrid,p=f.getResolution(t),y=d.getZForResolution(p,1),m=f.getTileCoordExtent(c);jn(m,-p,m),d.forEachTileCoord(m,y,function(t){v=v&&!this.tileUrlFunction(t,r,e)}.bind(this))}var w=new nh(u,v?yt:lt,c,this.getSourceTiles.bind(this,r,e));return w.key=a,o?(w.interimTile=o,w.refreshInterimChain(),this.tileCache.replace(s,w)):this.tileCache.set(s,w),w},n.prototype.getTileGridForProjection=function(t){var n=t.getCode(),i=this.Ic[n];if(!i){var r=this.tileGrid;i=Zh(t,void 0,r?r.getTileSize(r.getMinZoom()):void 0),this.Ic[n]=i}return i},n.prototype.getTilePixelRatio=function(t){return t},n.prototype.getTilePixelSize=function(t,n,i){var r=ou(this.getTileGridForProjection(i).getTileSize(t),this.tmpSize);return[Math.round(r[0]*n),Math.round(r[1]*n)]},n.prototype.updateCacheSize=function(n,i){t.prototype.updateCacheSize.call(this,2*n,i),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(i).highWaterMark},n}(dd);function ag(t,n){t.setLoader((function(i,r,e){hh(n,t.getFormat(),i,r,e,t.onLoad.bind(t),t.onError.bind(t))}))}var ug=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cg=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,format:n.format,overlaps:n.overlaps,projection:n.projection,tileClass:n.tileClass,transition:n.transition,wrapX:n.wrapX,zDirection:n.zDirection,state:ds})||this;return ig({url:n.url,projection:i.getProjection(),mediaType:n.mediaType,supportedMediaTypes:n.format.supportedMediaTypes,context:n.context||null}).then(i.Rc.bind(i)).catch(i.Pc.bind(i)),i}return ug(n,t),n.prototype.Rc=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState(ps)},n.prototype.Pc=function(t){console.error(t),this.setState(ys)},n}(sg),hg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',lg=function(t){function n(n){var i,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate),i=void 0!==r.attributions?r.attributions:[fg];var o=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",s=void 0!==r.url?r.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,attributionsCollapsible:!1,cacheSize:r.cacheSize,crossOrigin:o,interpolate:e,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,opaque:void 0===r.opaque||r.opaque,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,transition:r.transition,url:s,wrapX:r.wrapX,zDirection:r.zDirection})||this}return hg(n,t),n}(jd),vg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dg=function(t){function n(n){var i=n||{};return t.call(this,i)||this}return vg(n,t),n}(bs),pg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),yg=null;var mg,wg=function(t){function n(n){var i=t.call(this,n)||this;return i.container=null,i.renderedResolution,i.tempTransform=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i.Ws=null,i.frameState=null,i}return pg(n,t),n.prototype.getImageData=function(t,n,i){var r,e;yg||((r=document.createElement("canvas")).width=1,r.height=1,yg=r.getContext("2d")),yg.clearRect(0,0,1,1);try{yg.drawImage(t,n,i,1,1,0,0,1,1),e=yg.getImageData(0,0,1,1).data}catch(t){return null}return e},n.prototype.getBackground=function(t){var n=this.getLayer().getBackground();return"function"==typeof n&&(n=n(t.viewState.resolution)),n||void 0},n.prototype.useContainer=function(t,n,i,r){var e,o,s=this.getLayer().getClassName();t&&t.className===s&&""===t.style.opacity&&1===i&&(!r||t.style.backgroundColor&&x(Uo(t.style.backgroundColor),Uo(r)))&&((u=t.firstElementChild)instanceof HTMLCanvasElement&&(o=u.getContext("2d")));if(o&&o.canvas.style.transform===n?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(e=document.createElement("div")).className=s;var a=e.style;a.position="absolute",a.width="100%",a.height="100%",r&&(a.backgroundColor=r);var u=(o=_o()).canvas;e.appendChild(u),(a=u.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=e,this.context=o}},n.prototype.clipUnrotated=function(t,n,i){var r=Zn(i),e=$n(i),o=Vn(i),s=Wn(i);nn(n.coordinateToPixelTransform,r),nn(n.coordinateToPixelTransform,e),nn(n.coordinateToPixelTransform,o),nn(n.coordinateToPixelTransform,s);var a=this.inversePixelTransform;nn(a,r),nn(a,e),nn(a,o),nn(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(e[0]),Math.round(e[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},n.prototype.Xs=function(t,n,i){var r=this.getLayer();if(r.hasListener(t)){var e=new ks(t,this.inversePixelTransform,i,n);r.dispatchEvent(e)}},n.prototype.preRender=function(t,n){this.frameState=n,this.Xs(us,t,n)},n.prototype.postRender=function(t,n){this.Xs(cs,t,n)},n.prototype.getRenderTransform=function(t,n,i,r,e,o,s){var a=e/2,u=o/2,c=r/n,h=-c,f=-t[0]+s,l=-t[1];return an(this.tempTransform,a,u,c,h,-i,f,l)},n.prototype.getDataAtPixel=function(t,n,i){var r=nn(this.inversePixelTransform,t.slice()),e=this.context,o=this.getLayer().getExtent();if(o&&!Mn(o,nn(n.pixelToCoordinateTransform,t.slice())))return null;var s,a=Math.round(r[0]),u=Math.round(r[1]),c=this.Ws;if(!c){var h=document.createElement("canvas");h.width=1,h.height=1,c=h.getContext("2d"),this.Ws=c}c.clearRect(0,0,1,1);try{c.drawImage(e.canvas,a,u,1,1,0,0,1,1),s=c.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.Ws=null,new Uint8Array):s}return 0===s[3]?null:s},n.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},n}(xl),bg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gg=function(t){function n(n){var i=t.call(this,n)||this;return i.Nt=null,i}return bg(n,t),n.prototype.getImage=function(){return this.Nt?this.Nt.getImage():null},n.prototype.prepareFrame=function(t){var n=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,r=t.viewState,e=r.resolution,o=this.getLayer().getSource(),s=t.viewHints,a=t.extent;if(void 0!==n.extent&&(a=Yn(a,Lr(n.extent,r.projection))),!s[Pa]&&!s[Ia]&&!ni(a))if(o){var u=r.projection,c=o.getImage(a,e,i,u);c&&(this.loadImage(c)?this.Nt=c:c.getState()===go&&(this.Nt=null))}else this.Nt=null;return!!this.Nt},n.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),r=nn(n.pixelToCoordinateTransform,t.slice()),e=i.getExtent();if(e&&!Mn(e,r))return null;var o=this.Nt.getExtent(),s=this.Nt.getImage(),a=Qn(o),u=Math.floor(s.width*((r[0]-o[0])/a));if(u<0||u>=s.width)return null;var c=Kn(o),h=Math.floor(s.height*((o[3]-r[1])/c));return h<0||h>=s.height?null:this.getImageData(s,u,h)},n.prototype.renderFrame=function(t,n){var i=this.Nt,r=i.getExtent(),e=i.getResolution(),o=i.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,u=t.viewState,c=u.center,h=u.resolution,f=t.size,l=a*e/(h*o),v=Math.round(f[0]*a),d=Math.round(f[1]*a),p=u.rotation;if(p){var y=Math.round(Math.sqrt(v*v+d*d));v=y,d=y}an(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,p,-v/2,-d/2),un(this.inversePixelTransform,this.pixelTransform);var m=hn(this.pixelTransform);this.useContainer(n,m,s.opacity,this.getBackground(t));var w=this.context,b=w.canvas;b.width!=v||b.height!=d?(b.width=v,b.height=d):this.containerReused||w.clearRect(0,0,v,d);var g=!1,x=!0;if(s.extent){var j=Lr(s.extent,u.projection);(g=(x=ti(j,t.extent))&&!_n(j,t.extent))&&this.clipUnrotated(w,t,j)}var S=i.getImage(),k=an(this.tempTransform,v/2,d/2,l,l,0,o*(r[0]-c[0])/e,o*(c[1]-r[3])/e);this.renderedResolution=e*a/o;var M=S.width*k[0],_=S.height*k[3];if(this.getLayer().getSource().getInterpolate()||E(w,Fh),this.preRender(w,t),x&&M>=.5&&_>=.5){var O=k[4],T=k[5],A=s.opacity,C=void 0;1!==A&&(C=w.globalAlpha,w.globalAlpha=A),w.drawImage(S,0,0,+S.width,+S.height,Math.round(O),Math.round(T),Math.round(M),Math.round(_)),1!==A&&(w.globalAlpha=C)}return this.postRender(w,t),g&&w.restore(),E(w,Lh),m!==b.style.transform&&(b.style.transform=m),this.container},n}(wg),xg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jg=function(t){function n(n){return t.call(this,n)||this}return xg(n,t),n.prototype.createRenderer=function(){return new gg(this)},n.prototype.getData=function(n){return t.prototype.getData.call(this,n)},n}(dg),Sg="preload",kg="useInterimTilesOnError",Mg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_g=function(t){function n(n){var i=this,r=n||{},e=E({},r);return delete e.preload,delete e.useInterimTilesOnError,(i=t.call(this,e)||this).on,i.once,i.un,i.setPreload(void 0!==r.preload?r.preload:0),i.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),i}return Mg(n,t),n.prototype.getPreload=function(){return this.get(Sg)},n.prototype.setPreload=function(t){this.set(Sg,t)},n.prototype.getUseInterimTilesOnError=function(){return this.get(kg)},n.prototype.setUseInterimTilesOnError=function(t){this.set(kg,t)},n.prototype.getData=function(n){return t.prototype.getData.call(this,n)},n}(bs),Og=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Tg=function(t){function n(n){var i=t.call(this,n)||this;return i.extentChanged=!0,i.Nc=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.zc=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.Fc=new $c(0,0,0,0),i}return Og(n,t),n.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),r=n.getUseInterimTilesOnError();return i==dt||i==yt||i==pt&&!r},n.prototype.getTile=function(t,n,i,r){var e=r.pixelRatio,o=r.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,n,i,e,o);return a.getState()==pt&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.zc=!0):a.setState(dt)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},n.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),r=nn(n.pixelToCoordinateTransform,t.slice()),e=i.getExtent();if(e&&!Mn(e,r))return null;for(var o=n.pixelRatio,s=n.viewState.projection,a=n.viewState,u=i.getRenderSource(),c=u.getTileGridForProjection(a.projection),h=u.getTilePixelRatio(n.pixelRatio),f=c.getZForResolution(a.resolution);f>=c.getMinZoom();--f){var l=c.getTileCoordForCoordAndZ(r,f),v=u.getTile(f,l[1],l[2],o,s);if(!(v instanceof Io||v instanceof dl))return null;if(v.getState()===dt){var d=c.getOrigin(f),p=ou(c.getTileSize(f)),y=c.getResolution(f),m=Math.floor(h*((r[0]-d[0])/y-l[1]*p[0])),w=Math.floor(h*((d[1]-r[1])/y-l[2]*p[1]));return this.getImageData(v.getImage(),m,w)}}return null},n.prototype.loadedTileCallback=function(n,i,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,n,i,r)},n.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},n.prototype.renderFrame=function(t,n){var i=t.layerStatesArray[t.layerIndex],r=t.viewState,e=r.projection,s=r.resolution,a=r.center,u=r.rotation,c=t.pixelRatio,h=this.getLayer(),f=h.getSource(),l=f.getRevision(),v=f.getTileGridForProjection(e),d=v.getZForResolution(s,f.zDirection),y=v.getResolution(d),m=t.extent,w=i.extent&&Lr(i.extent,e);w&&(m=Yn(m,Lr(i.extent,e)));var b=f.getTilePixelRatio(c),g=Math.round(t.size[0]*b),x=Math.round(t.size[1]*b);if(u){var j=Math.round(Math.sqrt(g*g+x*x));g=j,x=j}var S=y*g/2/b,k=y*x/2/b,M=[a[0]-S,a[1]-k,a[0]+S,a[1]+k],_=v.getTileRangeForExtentAndZ(m,d),O={};O[d]={};var T=this.createLoadedTileFinder(f,e,O),A=this.tmpExtent,C=this.Fc;this.zc=!1;for(var R=_.minX;R<=_.maxX;++R)for(var P=_.minY;P<=_.maxY;++P){var I=this.getTile(d,R,P,t);if(this.isDrawableTile(I)){var N=o(this);if(I.getState()==dt){O[d][I.tileCoord.toString()]=I;var z=I.inTransition(N);this.zc||!z&&-1!==this.renderedTiles.indexOf(I)||(this.zc=!0)}if(1===I.getAlpha(N,t.time))continue}var F=v.getTileCoordChildTileRange(I.tileCoord,C,A),L=!1;F&&(L=T(d+1,F)),L||v.forEachTileCoordParentTileRange(I.tileCoord,T,C,A)}var G=y/s;an(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/b,1/b,u,-g/2,-x/2);var D=hn(this.pixelTransform);this.useContainer(n,D,i.opacity,this.getBackground(t));var U=this.context,q=U.canvas;un(this.inversePixelTransform,this.pixelTransform),an(this.tempTransform,g/2,x/2,G,G,0,-g/2,-x/2),q.width!=g||q.height!=x?(q.width=g,q.height=x):this.containerReused||U.clearRect(0,0,g,x),w&&this.clipUnrotated(U,t,w),f.getInterpolate()||E(U,Fh),this.preRender(U,t),this.renderedTiles.length=0;var B,W,V,X=Object.keys(O).map(Number);X.sort(p),1!==i.opacity||this.containerReused&&!f.getOpaque(t.viewState.projection)?(B=[],W=[]):X=X.reverse();for(var H=X.length-1;H>=0;--H){var J=X[H],K=f.getTilePixelSize(J,c,e),Y=v.getResolution(J)/y,Z=K[0]*Y*G,$=K[1]*Y*G,Q=v.getTileCoordForCoordAndZ(Zn(M),J),tt=v.getTileCoordExtent(Q),nt=nn(this.tempTransform,[b*(tt[0]-M[0])/y,b*(M[3]-tt[3])/y]),it=b*f.getGutterForProjection(e),rt=O[J];for(var et in rt){var ot=(I=rt[et]).tileCoord,st=Q[1]-ot[1],at=Math.round(nt[0]-(st-1)*Z),ut=Q[2]-ot[2],ct=Math.round(nt[1]-(ut-1)*$),ht=at-(R=Math.round(nt[0]-st*Z)),ft=ct-(P=Math.round(nt[1]-ut*$)),lt=d===J,vt=!1;if(!(z=lt&&1!==I.getAlpha(o(this),t.time)))if(B){V=[R,P,R+ht,P,R+ht,P+ft,R,P+ft];for(var pt=0,yt=B.length;pt<yt;++pt)if(d!==J&&J<W[pt]){var mt=B[pt];ti([R,P,R+ht,P+ft],[mt[0],mt[3],mt[4],mt[7]])&&(vt||(U.save(),vt=!0),U.beginPath(),U.moveTo(V[0],V[1]),U.lineTo(V[2],V[3]),U.lineTo(V[4],V[5]),U.lineTo(V[6],V[7]),U.moveTo(mt[6],mt[7]),U.lineTo(mt[4],mt[5]),U.lineTo(mt[2],mt[3]),U.lineTo(mt[0],mt[1]),U.clip())}B.push(V),W.push(J)}else U.clearRect(R,P,ht,ft);this.drawTileImage(I,t,R,P,ht,ft,it,lt),B&&!z?(vt&&U.restore(),this.renderedTiles.unshift(I)):this.renderedTiles.push(I),this.updateUsedTiles(t.usedTiles,f,I)}}this.renderedRevision=l,this.renderedResolution=y,this.extentChanged=!this.Nc||!In(this.Nc,M),this.Nc=M,this.renderedPixelRatio=c,this.renderedProjection=e,this.manageTilePyramid(t,f,v,c,e,m,d,h.getPreload()),this.scheduleExpireCache(t,f),this.postRender(U,t),i.extent&&U.restore(),E(U,Lh),D!==q.style.transform&&(q.style.transform=D);var wt=Is(i.opacity),bt=this.container;return wt!==bt.style.opacity&&(bt.style.opacity=wt),this.container},n.prototype.drawTileImage=function(t,n,i,r,e,s,a,u){var c=this.getTileImage(t);if(c){var h=o(this),f=u?t.getAlpha(h,n.time):1,l=f!==this.context.globalAlpha;l&&(this.context.save(),this.context.globalAlpha=f),this.context.drawImage(c,a,a,c.width-2*a,c.height-2*a,i,r,e,s),l&&this.context.restore(),1!==f?n.animate=!0:u&&t.endTransition(h)}},n.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},n.prototype.getTileImage=function(t){return t.getImage()},n.prototype.scheduleExpireCache=function(t,n){if(n.canExpireCache()){var i=function(t,n,i){var r=o(t);r in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[r])}.bind(null,n);t.postRenderFunctions.push(i)}},n.prototype.updateUsedTiles=function(t,n,i){var r=o(n);r in t||(t[r]={}),t[r][i.getKey()]=!0},n.prototype.manageTilePyramid=function(t,n,i,r,e,s,a,u,c){var h=o(n);h in t.wantedTiles||(t.wantedTiles[h]={});var f,l,v,d,p,y,m=t.wantedTiles[h],w=t.tileQueue,b=0;for(y=i.getMinZoom();y<=a;++y)for(l=i.getTileRangeForExtentAndZ(s,y,l),v=i.getResolution(y),d=l.minX;d<=l.maxX;++d)for(p=l.minY;p<=l.maxY;++p)a-y<=u?(++b,(f=n.getTile(y,d,p,r,e)).getState()==lt&&(m[f.getKey()]=!0,w.isKeyQueued(f.getKey())||w.enqueue([f,h,i.getTileCoordCenter(f.tileCoord),v])),void 0!==c&&c(f)):n.useTile(y,d,p,e);n.updateCacheSize(b,e)},n}(wg),Eg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ag=function(t){function n(n){return t.call(this,n)||this}return Eg(n,t),n.prototype.createRenderer=function(){return new Tg(this)},n}(_g),Cg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rg=!0;try{new ImageData(10,10)}catch(t){Rg=!1}function Pg(t,n,i){if(Rg)return new ImageData(t,n,i);mg||(mg=document.createElement("canvas").getContext("2d"));var r=mg.createImageData(n,i);return r.data.set(t),r}function Ig(t){var n=!0;try{new ImageData(10,10)}catch(t){n=!1}function i(t,i,r){return n?new ImageData(t,i,r):{data:t,width:i,height:r}}return function(n){var r=n.buffers,e=n.meta,o=n.imageOps,s=n.width,a=n.height,u=r.length,c=r[0].byteLength;if(o){for(var h=new Array(u),f=0;f<u;++f)h[f]=i(new Uint8ClampedArray(r[f]),s,a);return t(h,e).data.buffer}var l=new Uint8ClampedArray(c),v=new Array(u),d=new Array(u);for(f=0;f<u;++f)v[f]=new Uint8ClampedArray(r[f]),d[f]=[0,0,0,0];for(var p=0;p<c;p+=4){for(var y=0;y<u;++y){var m=v[y];d[y][0]=m[p],d[y][1]=m[p+1],d[y][2]=m[p+2],d[y][3]=m[p+3]}var w=t(d,e);l[p]=w[0],l[p+1]=w[1],l[p+2]=w[2],l[p+3]=w[3]}return l.buffer}}function Ng(t,n){var i=Object.keys(t.lib||{}).map((function(n){return"var "+n+" = "+t.lib[n].toString()+";"})).concat(["var __minion__ = ("+Ig.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {'," var buffer = __minion__(event.data);"," self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),r=new Worker("undefined"==typeof Blob?"data:text/javascript;base64,"+Buffer.from(i.join("\n"),"binary").toString("base64"):URL.createObjectURL(new Blob(i,{type:"text/javascript"})));return r.addEventListener("message",n),r}var zg=function(t){function n(n){var i,r=t.call(this)||this;r._imageOps=!!n.imageOps,i=0===n.threads?0:r._imageOps?1:n.threads||1;var e=new Array(i);if(i)for(var o=0;o<i;++o)e[o]=Ng(n,r._onWorkerMessage.bind(r,o));else e[0]=function(t,n){var i=Ig(t.operation),r=!1;return{postMessage:function(t){setTimeout((function(){r||n({data:{buffer:i(t),meta:t.meta}})}),0)},terminate:function(){r=!0}}}(n,r._onWorkerMessage.bind(r,0));return r._workers=e,r._queue=[],r._maxQueueLength=n.queue||1/0,r._running=0,r._dataLookup={},r._job=null,r}return Cg(n,t),n.prototype.process=function(t,n,i){this._enqueue({inputs:t,meta:n,callback:i}),this._dispatch()},n.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},n.prototype._dispatch=function(){if(!this._running&&0!==this._queue.length){var t=this._queue.shift();this._job=t;var n=t.inputs[0].width,i=t.inputs[0].height,r=t.inputs.map((function(t){return t.data.buffer})),e=this._workers.length;if(this._running=e,1!==e)for(var o=t.inputs[0].data.length,s=4*Math.ceil(o/4/e),a=0;a<e;++a){for(var u=a*s,c=[],h=0,f=r.length;h<f;++h)c.push(r[h].slice(u,u+s));this._workers[a].postMessage({buffers:c,meta:t.meta,imageOps:this._imageOps,width:n,height:i},c)}else this._workers[0].postMessage({buffers:r,meta:t.meta,imageOps:this._imageOps,width:n,height:i},r)}},n.prototype._onWorkerMessage=function(t,n){this.disposed||(this._dataLookup[t]=n.data,--this._running,0===this._running&&this._resolveJob())},n.prototype._resolveJob=function(){var t,n,i=this._job,r=this._workers.length;if(1===r)t=new Uint8ClampedArray(this._dataLookup[0].buffer),n=this._dataLookup[0].meta;else{var e=i.inputs[0].data.length;t=new Uint8ClampedArray(e),n=new Array(r);for(var o=4*Math.ceil(e/4/r),s=0;s<r;++s){var a=this._dataLookup[s].buffer,u=s*o;t.set(new Uint8ClampedArray(a),u),n[s]=this._dataLookup[s].meta}}this._job=null,this._dataLookup={},i.callback(null,Pg(t,i.inputs[0].width,i.inputs[0].height),n),this._dispatch()},n.prototype.disposeInternal=function(){for(var t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0},n}(v),Fg="beforeoperations",Lg="afteroperations",Gg="pixel",Dg="image",Ug=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.extent=i.extent,e.resolution=i.viewState.resolution/i.pixelRatio,e.data=r,e}return Cg(n,t),n}(f),qg=function(t){function n(n){var i=t.call(this,{projection:null})||this;i.on,i.once,i.un,i.Lc=null,i.Gc=void 0!==n.operationType?n.operationType:Gg,i.Dc=void 0!==n.threads?n.threads:1,i.Uc=function(t){for(var n=t.length,i=new Array(n),r=0;r<n;++r)i[r]=Vg(t[r]);return i}(n.sources);for(var r,e=i.changed.bind(i),s=0,a=i.Uc.length;s<a;++s)i.Uc[s].addEventListener(N,e);return i.ur=new Ca((function(){return 1}),i.changed.bind(i)),i.qc,i.Bc=null,i.jc,i.Hi={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:(r=i.Uc,r.map((function(t){return t.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],tileQueue:i.ur,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:o(i),renderTargets:{}},i.setAttributions((function(t){for(var i=[],r=0,e=n.sources.length;r<e;++r){var o=n.sources[r],s=(o instanceof ud?o:o.getSource()).getAttributions();if("function"==typeof s){var a=s(t);i.push.apply(i,a)}}return 0!==i.length?i:null})),void 0!==n.operation&&i.setOperation(n.operation,n.lib),i}return Cg(n,t),n.prototype.setOperation=function(t,n){this.Lc&&this.Lc.dispose(),this.Lc=new zg({operation:t,imageOps:this.Gc===Dg,queue:1,lib:n,threads:this.Dc}),this.changed()},n.prototype.Wc=function(t,n,i){var r=E({},this.Hi);r.viewState=E({},r.viewState);var e=Xn(t);r.extent=t.slice(),r.size[0]=Math.round(Qn(t)/n),r.size[1]=Math.round(Kn(t)/n),r.time=Date.now();var o=r.viewState;return o.center=e,o.projection=i,o.resolution=n,r},n.prototype.Vc=function(){for(var t=!0,n=0,i=this.Uc.length;n<i;++n)if(this.Uc[n].getSource().getState()!==ps){t=!1;break}return t},n.prototype.getImage=function(t,n,i,r){if(!this.Vc())return null;var e=this.Wc(t,n,r);if(this.qc=e,this.Bc){var o=this.Bc.getResolution(),s=this.Bc.getExtent();n===o&&In(t,s)||(this.Bc=null)}return this.Bc&&this.getRevision()===this.jc||this.Xc(),e.tileQueue.loadMoreTiles(16,16),e.animate&&requestAnimationFrame(this.changed.bind(this)),this.Bc},n.prototype.Xc=function(){for(var t=this.qc,n=this.Uc.length,i=new Array(n),r=0;r<n;++r){t.layerIndex=r;var e=Wg(this.Uc[r],t);if(!e)return;i[r]=e}var o={};this.dispatchEvent(new Ug(Fg,t,o)),this.Lc.process(i,o,this.Hc.bind(this,t))},n.prototype.Hc=function(t,n,i,r){if(!n&&i){var e=t.extent,o=t.viewState.resolution;if(o===this.qc.viewState.resolution&&In(e,this.qc.extent)){var s;if(this.Bc)s=this.Bc.getImage().getContext("2d");else s=_o(Math.round(Qn(e)/o),Math.round(Kn(e)/o)),this.Bc=new Mo(e,o,1,s.canvas);s.putImageData(i,0,0),this.changed(),this.jc=this.getRevision(),this.dispatchEvent(new Ug(Lg,t,r)),t.animate&&requestAnimationFrame(this.changed.bind(this))}}},n.prototype.disposeInternal=function(){this.Lc&&this.Lc.dispose(),t.prototype.disposeInternal.call(this)},n}(Ib);qg.prototype.dispose;var Bg=null;function Wg(t,n){var i=t.getRenderer();if(!i)throw new Error("Unsupported layer type: "+t);if(!i.prepareFrame(n))return null;var r=n.size[0],e=n.size[1];if(0===r||0===e)return null;var o,s=i.renderFrame(n,null);if(s instanceof HTMLCanvasElement)o=s;else{if(s&&(o=s.firstElementChild),!(o instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+o);if(o.width===r&&o.height===e)return o.getContext("2d").getImageData(0,0,r,e)}if(Bg){var a=Bg.canvas;a.width!==r||a.height!==e?Bg=_o(r,e):Bg.clearRect(0,0,r,e)}else Bg=_o(r,e);return Bg.drawImage(o,0,0,r,e),Bg.getImageData(0,0,r,e)}function Vg(t){var n;return t instanceof ud?t instanceof ld?n=new Ag({source:t}):t instanceof Ib&&(n=new jg({source:t})):n=t,n}var Xg=qg,Hg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jg=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',fg],Kg={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},Yg={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},Zg=function(t){function n(n){var i=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(i=n.interpolate);var r=n.layer.indexOf("-"),e=-1==r?n.layer:n.layer.slice(0,r),o=Yg[e],s=Kg[n.layer],a=void 0!==n.url?n.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+n.layer+"/{z}/{x}/{y}."+s.extension;return t.call(this,{attributions:Jg,cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:i,maxZoom:null!=n.maxZoom?n.maxZoom:o.maxZoom,minZoom:null!=n.minZoom?n.minZoom:o.minZoom,opaque:s.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:a,wrapX:n.wrapX,zDirection:n.zDirection})||this}return Hg(n,t),n}(jd),$g=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qg=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).gc=r.params||{},i.ju=void 0===r.hidpi||r.hidpi,i.Eo=[1/0,1/0,-1/0,-1/0],i.setKey(i.Jc()),i}return $g(n,t),n.prototype.Jc=function(){var t=0,n=[];for(var i in this.gc)n[t++]=i+"-"+this.gc[i];return n.join("/")},n.prototype.getParams=function(){return this.gc},n.prototype.kc=function(t,n,i,r,e,o){var s=this.urls;if(s){var a,u=e.getCode().split(/:(?=\d+$)/).pop();if(o.SIZE=n[0]+","+n[1],o.BBOX=i.join(","),o.BBOXSR=u,o.IMAGESR=u,o.DPI=Math.round(o.DPI?o.DPI*r:90*r),1==s.length)a=s[0];else a=s[yi(Xc(t),s.length)];return of(a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},n.prototype.getTilePixelRatio=function(t){return this.ju?t:1},n.prototype.updateParams=function(t){E(this.gc,t),this.setKey(this.Jc())},n.prototype.tileUrlFunction=function(t,n,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){1==n||this.ju||(n=1);var e=r.getTileCoordExtent(t,this.Eo),o=ou(r.getTileSize(t[0]),this.tmpSize);1!=n&&(o=eu(o,n,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return E(s,this.gc),this.kc(t,o,e,n,i,s)}},n}(md),tx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),nx=function(t){function n(n){var i=this,r=n||{};return i=t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection,url:r.template||"z:{z} x:{x} y:{y}",tileLoadFunction:function(t,n){var r=t.getTileCoord()[0],e=ou(i.tileGrid.getTileSize(r)),o=_o(e[0],e[1]);o.strokeStyle="grey",o.strokeRect(.5,.5,e[0]+.5,e[1]+.5),o.fillStyle="grey",o.strokeStyle="white",o.textAlign="center",o.textBaseline="middle",o.font="24px sans-serif",o.lineWidth=4,o.strokeText(n,e[0]/2,e[1]/2,e[0]),o.fillText(n,e[0]/2,e[1]/2,e[0]),t.setImage(o.canvas)}})||this}return tx(n,t),n}(jd),ix=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rx=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;if(void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:br("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:ds,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).Kc=null,i._o=n.tileSize,n.url)if(n.jsonp)dh(n.url,i.handleTileJSONResponse.bind(i),i.handleTileJSONError.bind(i));else{var e=new XMLHttpRequest;e.addEventListener("load",i.Yc.bind(i)),e.addEventListener("error",i.Zc.bind(i)),e.open("GET",n.url),e.send()}else n.tileJSON?i.handleTileJSONResponse(n.tileJSON):Mt(!1,51);return i}return ix(n,t),n.prototype.Yc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},n.prototype.Zc=function(t){this.handleTileJSONError()},n.prototype.getTileJSON=function(){return this.Kc},n.prototype.handleTileJSONResponse=function(t){var n,i=br("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var e=Tr(i,r);n=oi(t.bounds,e)}var o=$h(r),s=t.minzoom||0,a=Kh({extent:o,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this._o});if(this.tileGrid=a,this.tileUrlFunction=tf(t.tiles,a),void 0!==t.attribution&&!this.getAttributions()){var u=void 0!==n?n:o;this.setAttributions((function(n){return ti(u,n.extent)?[t.attribution]:null}))}this.Kc=t,this.setState(ps)},n.prototype.handleTileJSONError=function(){this.setState(ys)},n}(md),ex=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ox=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=r.params||{},s=!("TRANSPARENT"in o)||o.TRANSPARENT;return(i=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,opaque:!s,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:r.tileClass,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).Ts=void 0!==r.gutter?r.gutter:0,i.gc=o,i.Ec=!0,i.Cc=r.serverType,i.ju=void 0===r.hidpi||r.hidpi,i.Eo=[1/0,1/0,-1/0,-1/0],i.Ac(),i.setKey(i.Jc()),i}return ex(n,t),n.prototype.getFeatureInfoUrl=function(t,n,i,r){var e=br(i),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(e));var a=s.getZForResolution(n,this.zDirection),u=s.getTileCoordForCoordAndZ(t,a);if(!(s.getResolutions().length<=u[0])){var c=s.getResolution(u[0]),h=s.getTileCoordExtent(u,this.Eo),f=ou(s.getTileSize(u[0]),this.tmpSize),l=this.Ts;0!==l&&(f=iu(f,l,this.tmpSize),h=jn(h,c*l,h)),o&&o!==e&&(c=Uh(o,e,t,c),h=Cr(h,e,o),t=Ar(t,e,o));var v={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.gc.LAYERS};E(v,this.gc,r);var d=Math.floor((t[0]-h[0])/c),p=Math.floor((h[3]-t[1])/c);return v[this.Ec?"I":"X"]=d,v[this.Ec?"J":"Y"]=p,this.kc(u,f,h,1,o||e,v)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.urls[0]){var i={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.gc.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;i.LAYER=r}if(void 0!==t){var e=this.getProjection()?this.getProjection().getMetersPerUnit():1;i.SCALE=t*e/28e-5}return E(i,n),of(this.urls[0],i)}},n.prototype.getGutter=function(){return this.Ts},n.prototype.getParams=function(){return this.gc},n.prototype.kc=function(t,n,i,r,e,o){var s=this.urls;if(s){if(o.WIDTH=n[0],o.HEIGHT=n[1],o[this.Ec?"CRS":"SRS"]=e.getCode(),"STYLES"in this.gc||(o.STYLES=""),1!=r)switch(this.Cc){case Vb:var a=90*r+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case Xb:o.MAP_RESOLUTION=90*r;break;case Wb:case Hb:o.DPI=90*r;break;default:Mt(!1,52)}var u,c=e.getAxisOrientation(),h=i;if(this.Ec&&"ne"==c.substr(0,2)){var f=void 0;f=i[0],h[0]=i[1],h[1]=f,f=i[2],h[2]=i[3],h[3]=f}if(o.BBOX=h.join(","),1==s.length)u=s[0];else u=s[yi(Xc(t),s.length)];return of(u,o)}},n.prototype.getTilePixelRatio=function(t){return this.ju&&void 0!==this.Cc?t:1},n.prototype.Jc=function(){var t=0,n=[];for(var i in this.gc)n[t++]=i+"-"+this.gc[i];return n.join("/")},n.prototype.updateParams=function(t){E(this.gc,t),this.Ac(),this.setKey(this.Jc())},n.prototype.Ac=function(){var t=this.gc.VERSION||Bb;this.Ec=Hi(t,"1.3")>=0},n.prototype.tileUrlFunction=function(t,n,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){1==n||this.ju&&void 0!==this.Cc||(n=1);var e=r.getResolution(t[0]),o=r.getTileCoordExtent(t,this.Eo),s=ou(r.getTileSize(t[0]),this.tmpSize),a=this.Ts;0!==a&&(s=iu(s,a,this.tmpSize),o=jn(o,e*a,o)),1!=n&&(s=eu(s,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return E(u,this.gc),this.kc(t,s,o,n,i,u)}},n}(md),sx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ax=function(t){function n(n,i,r,e,o,s){var a=t.call(this,n,i)||this;return a.Pt=r,a.st=e,a.$c=o,a.Qc=null,a.th=null,a.B=null,a.nh=s,a}return sx(n,t),n.prototype.getImage=function(){return null},n.prototype.getData=function(t){if(!this.Qc||!this.th)return null;var n=(t[0]-this.st[0])/(this.st[2]-this.st[0]),i=(t[1]-this.st[1])/(this.st[3]-this.st[1]),r=this.Qc[Math.floor((1-i)*this.Qc.length)];if("string"!=typeof r)return null;var e=r.charCodeAt(Math.floor(n*r.length));e>=93&&e--,e>=35&&e--;var o=null;if((e-=32)in this.th){var s=this.th[e];o=this.B&&s in this.B?this.B[s]:s}return o},n.prototype.forDataAtCoordinate=function(t,n,i){this.state==yt&&!0===i?(this.state=lt,Z(this,N,(function(i){n(this.getData(t))}),this),this.ih()):!0===i?setTimeout(function(){n(this.getData(t))}.bind(this),0):n(this.getData(t))},n.prototype.getKey=function(){return this.Pt},n.prototype.Pc=function(){this.state=pt,this.changed()},n.prototype.qt=function(t){this.Qc=t.grid,this.th=t.keys,this.B=t.data,this.state=dt,this.changed()},n.prototype.ih=function(){if(this.state==lt)if(this.state=vt,this.nh)dh(this.Pt,this.qt.bind(this),this.Pc.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.Yc.bind(this)),t.addEventListener("error",this.Zc.bind(this)),t.open("GET",this.Pt),t.send()}},n.prototype.Yc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.Pc()}this.qt(i)}else this.Pc()},n.prototype.Zc=function(t){this.Pc()},n.prototype.load=function(){this.$c?this.ih():this.setState(yt)},n}(jt),ux=function(t){function n(n){var i=t.call(this,{projection:br("EPSG:3857"),state:ds,zDirection:n.zDirection})||this;if(i.$c=void 0===n.preemptive||n.preemptive,i.rh=rf,i.eh=void 0,i.nh=n.jsonp||!1,n.url)if(i.nh)dh(n.url,i.handleTileJSONResponse.bind(i),i.handleTileJSONError.bind(i));else{var r=new XMLHttpRequest;r.addEventListener("load",i.Yc.bind(i)),r.addEventListener("error",i.Zc.bind(i)),r.open("GET",n.url),r.send()}else n.tileJSON?i.handleTileJSONResponse(n.tileJSON):Mt(!1,51);return i}return sx(n,t),n.prototype.Yc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},n.prototype.Zc=function(t){this.handleTileJSONError()},n.prototype.getTemplate=function(){return this.eh},n.prototype.forDataAtCoordinateAndResolution=function(t,n,i,r){if(this.tileGrid){var e=this.tileGrid.getZForResolution(n,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,e);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,i,r)}else!0===r?setTimeout((function(){i(null)}),0):i(null)},n.prototype.handleTileJSONError=function(){this.setState(ys)},n.prototype.handleTileJSONResponse=function(t){var n,i=br("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var e=Tr(i,r);n=oi(t.bounds,e)}var o=$h(r),s=t.minzoom||0,a=Kh({extent:o,maxZoom:t.maxzoom||22,minZoom:s});this.tileGrid=a,this.eh=t.template;var u=t.grids;if(u){if(this.rh=tf(u,a),void 0!==t.attribution){var c=void 0!==n?n:o;this.setAttributions((function(n){return ti(c,n.extent)?[t.attribution]:null}))}this.setState(ps)}else this.setState(ys)},n.prototype.getTile=function(t,n,i,r,e){var o=qc(t,n,i);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=[t,n,i],a=this.getTileCoordForTileUrlFunction(s,e),u=this.rh(a,r,e),c=new ax(s,void 0!==u?lt:yt,void 0!==u?u:"",this.tileGrid.getTileCoordExtent(s),this.$c,this.nh);return this.tileCache.set(o,c),c},n.prototype.useTile=function(t,n,i){var r=qc(t,n,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(ld),cx="KVP",hx="REST",fx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lx=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(r=n.interpolate);var e=void 0!==n.requestEncoding?n.requestEncoding:cx,o=n.tileGrid,s=n.urls;return void 0===s&&void 0!==n.url&&(s=ef(n.url)),(i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,urls:s,wrapX:void 0!==n.wrapX&&n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).oh=void 0!==n.version?n.version:"1.0.0",i.ze=void 0!==n.format?n.format:"image/jpeg",i.sh=void 0!==n.dimensions?n.dimensions:{},i.qs=n.layer,i.ah=n.matrixSet,i.K=n.style,i.uh=e,i.setKey(i.hh()),s&&s.length>0&&(i.tileUrlFunction=nf(s.map(i.createFromWMTSTemplate.bind(i)))),i}return fx(n,t),n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.setTileUrlFunction(nf(t.map(this.createFromWMTSTemplate.bind(this))),n)},n.prototype.getDimensions=function(){return this.sh},n.prototype.getFormat=function(){return this.ze},n.prototype.getLayer=function(){return this.qs},n.prototype.getMatrixSet=function(){return this.ah},n.prototype.getRequestEncoding=function(){return this.uh},n.prototype.getStyle=function(){return this.K},n.prototype.getVersion=function(){return this.oh},n.prototype.hh=function(){var t=0,n=[];for(var i in this.sh)n[t++]=i+"-"+this.sh[i];return n.join("/")},n.prototype.updateDimensions=function(t){E(this.sh,t),this.setKey(this.hh())},n.prototype.createFromWMTSTemplate=function(t){var n=this.uh,i={layer:this.qs,style:this.K,tilematrixset:this.ah};n==cx&&E(i,{Service:"WMTS",Request:"GetTile",Version:this.oh,Format:this.ze}),t=n==cx?of(t,i):t.replace(/\{(\w+?)\}/g,(function(t,n){return n.toLowerCase()in i?i[n.toLowerCase()]:t}));var r=this.tileGrid,e=this.sh;return function(i,o,s){if(i){var a={TileMatrix:r.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};E(a,e);var u=t;return u=n==cx?of(u,a):u.replace(/\{(\w+?)\}/g,(function(t,n){return a[n]}))}}},n}(md);var vx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dx="renderOrder",px=function(t){function n(n){var i=this,r=n||{},e=E({},r);return delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,(i=t.call(this,e)||this).fh=void 0!==r.declutter&&r.declutter,i.lh=void 0!==r.renderBuffer?r.renderBuffer:100,i.K=null,i.tt=void 0,i.setStyle(r.style),i.dh=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,i.ph=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,i}return vx(n,t),n.prototype.getDeclutter=function(){return this.fh},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderBuffer=function(){return this.lh},n.prototype.getRenderOrder=function(){return this.get(dx)},n.prototype.getStyle=function(){return this.K},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.getUpdateWhileAnimating=function(){return this.dh},n.prototype.getUpdateWhileInteracting=function(){return this.ph},n.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new nd(9)),this.getRenderer().renderDeclutter(t)},n.prototype.setRenderOrder=function(t){this.set(dx,t)},n.prototype.setStyle=function(t){this.K=void 0!==t?t:Hv,this.tt=null===t?void 0:Vv(this.K),this.changed()},n}(bs);var yx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mx=function(t){function n(n,i){var r=this,e=i.uniforms||{},s=[1,0,0,1,0,0];e[Kf]=s,(r=t.call(this,n,{uniforms:e,postProcesses:i.postProcesses})||this).ready=!1,r.yh=-1,r.mh=new qf(af,hf),r.wh=new qf(af,hf),r.bh=new qf(uf,hf),r.Qs=i.vertexShader,r.ta=i.fragmentShader,r.$s,r.gh=!(!i.hitFragmentShader||!i.hitVertexShader),r.xh=i.hitVertexShader,r.jh=i.hitFragmentShader,r.Sh;var a=i.attributes?i.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:nl.FLOAT}})):[];r.attributes=[{name:"a_position",size:2,type:nl.FLOAT},{name:"a_index",size:1,type:nl.FLOAT}].concat(a),r.hitDetectionAttributes=[{name:"a_position",size:2,type:nl.FLOAT},{name:"a_index",size:1,type:nl.FLOAT},{name:"a_hitColor",size:4,type:nl.FLOAT},{name:"a_featureUid",size:1,type:nl.FLOAT}].concat(a),r.customAttributes=i.attributes?i.attributes:[],r.Ji=[1/0,1/0,-1/0,-1/0],r.kh=s,r.Mh=[1,0,0,1,0,0],r._h=[1,0,0,1,0,0],r.Oh=new Float32Array(0),r.Th=new Float32Array(0),r.Eh,r.Ah=0,r.Ch=function(){var t='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,a){var u=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=a?a.vertexPosition:0,h=a?a.indexPosition:0,d=b/u;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=u,l,v,1),c.length&&i.set(c,b+3),o(i,b+=u,l,v,2),c.length&&i.set(c,b+3),o(i,b+=u,l,v,3),c.length&&i.set(c,b+3),b+=u,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o,s=r.customAttributesCount,a=2+s,u=new Float32Array(r.renderInstructions),l=u.length/a,v=4*l*(s+3),c=new Uint32Array(6*l),g=new Float32Array(v),b=0;b<u.length;b+=a)o=i(u,b,g,c,s,o);var h=e({vertexBuffer:g.buffer,indexBuffer:c.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[g.buffer,c.buffer,u.buffer])}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}(),r.Ch.addEventListener("message",function(t){var n=t.data;if(n.type===Sl){var i=n.projectionTransform;n.hitDetection?(this.wh.fromArrayBuffer(n.vertexBuffer),this.helper.flushBufferData(this.wh)):(this.mh.fromArrayBuffer(n.vertexBuffer),this.helper.flushBufferData(this.mh)),this.bh.fromArrayBuffer(n.indexBuffer),this.helper.flushBufferData(this.bh),this.Mh=i,un(this._h,this.Mh),n.hitDetection?this.Th=new Float32Array(t.data.renderInstructions):(this.Oh=new Float32Array(t.data.renderInstructions),n.generateBuffersRun===this.Ah&&(this.ready=!0)),this.getLayer().changed()}}.bind(r)),r.Rh={},r.Ph=0;var u=r.getLayer().getSource();return r.Ih=[Y(u,Md,r.Nh,r),Y(u,_d,r.zh,r),Y(u,Td,r.Fh,r),Y(u,Od,r.Lh,r)],u.forEachFeature(function(t){this.Rh[o(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.Ph++}.bind(r)),r}return yx(n,t),n.prototype.afterHelperCreated=function(){this.$s=this.helper.getProgram(this.ta,this.Qs),this.gh&&(this.Sh=this.helper.getProgram(this.jh,this.xh),this.Eh=new hl(this.helper))},n.prototype.Nh=function(t){var n=t.feature;this.Rh[o(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.Ph++},n.prototype.zh=function(t){var n=t.feature;this.Rh[o(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}},n.prototype.Fh=function(t){var n=t.feature;delete this.Rh[o(n)],this.Ph--},n.prototype.Lh=function(){this.Rh={},this.Ph=0},n.prototype.renderFrame=function(t){var n=this.helper.getGL();this.preRender(n,t);var i=this.bh.getSize();this.helper.drawElements(0,i),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var r=this.helper.getCanvas();return this.gh&&(this.renderHitDetection(t),this.Eh.clearCachedData()),this.postRender(n,t),r},n.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getSource(),r=t.viewState,e=!t.viewHints[Pa]&&!t.viewHints[Ia],o=!In(this.Ji,t.extent),s=this.yh<i.getRevision();if(s&&(this.yh=i.getRevision()),e&&(o||s)){var a=r.projection,u=r.resolution,c=n instanceof px?n.getRenderBuffer():0,h=jn(t.extent,c*u);i.loadFeatures(h,u,a),this.Gh(t),this.Ji=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.kh),$t(this.kh,this._h),this.helper.useProgram(this.$s),this.helper.prepareDraw(t),this.helper.bindBuffer(this.mh),this.helper.bindBuffer(this.bh),this.helper.enableAttributes(this.attributes),!0},n.prototype.Gh=function(t){var n=[1,0,0,1,0,0];this.helper.makeProjectionTransform(t,n);var i,r,e=(2+this.customAttributes.length)*this.Ph;if(this.Oh&&this.Oh.length===e||(this.Oh=new Float32Array(e)),this.gh){var o=(7+this.customAttributes.length)*this.Ph;this.Th&&this.Th.length===o||(this.Th=new Float32Array(o))}var s,a=[],u=[],c=0,h=0;for(var f in this.Rh)if((r=(i=this.Rh[f]).geometry)&&r.getType()===Pt.POINT){a[0]=r.getFlatCoordinates()[0],a[1]=r.getFlatCoordinates()[1],nn(n,a),s=Tl(h+6,u),this.Oh[c++]=a[0],this.Oh[c++]=a[1],this.gh&&(this.Th[h++]=a[0],this.Th[h++]=a[1],this.Th[h++]=s[0],this.Th[h++]=s[1],this.Th[h++]=s[2],this.Th[h++]=s[3],this.Th[h++]=Number(f));for(var l=void 0,v=0;v<this.customAttributes.length;v++)l=this.customAttributes[v].callback(i.feature,i.properties),this.Oh[c++]=l,this.gh&&(this.Th[h++]=l)}var d={type:Sl,renderInstructions:this.Oh.buffer,customAttributesCount:this.customAttributes.length};if(d.projectionTransform=n,d.generateBuffersRun=++this.Ah,this.ready=!1,this.Ch.postMessage(d,[this.Oh.buffer]),this.Oh=null,this.gh){var p={type:Sl,renderInstructions:this.Th.buffer,customAttributesCount:5+this.customAttributes.length};p.projectionTransform=n,p.hitDetection=!0,this.Ch.postMessage(p,[this.Th.buffer]),this.Th=null}},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){if(Mt(this.gh,66),this.Th){var o=nn(n.coordinateToPixelTransform,t.slice()),s=this.Eh.readPixel(o[0]/2,o[1]/2),a=El([s[0]/255,s[1]/255,s[2]/255,s[3]/255]),u=this.Th[a],c=Math.floor(u).toString(),h=this.getLayer().getSource().getFeatureByUid(c);return h?r(h,this.getLayer(),null):void 0}},n.prototype.renderHitDetection=function(t){if(this.wh.getSize()){this.Eh.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.Sh),this.helper.prepareDrawToRenderTarget(t,this.Eh,!0),this.helper.bindBuffer(this.wh),this.helper.bindBuffer(this.bh),this.helper.enableAttributes(this.hitDetectionAttributes);var n=this.bh.getSize();this.helper.drawElements(0,n)}},n.prototype.disposeInternal=function(){this.Ch.terminate(),this.qs=null,this.Ih.forEach((function(t){$(t)})),this.Ih=null,t.prototype.disposeInternal.call(this)},n}(Al),wx={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},bx=[wx.FILL],gx=[wx.STROKE],xx=[wx.BEGIN_PATH],jx=[wx.CLOSE_PATH],Sx=wx,kx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mx=function(t){function n(n,i,r,e){var o=t.call(this)||this;return o.tolerance=n,o.maxExtent=i,o.pixelRatio=e,o.maxLineWidth=0,o.resolution=r,o.Dh=null,o.Uh=null,o.qh=null,o.instructions=[],o.coordinates=[],o.Bh=[],o.hitDetectionInstructions=[],o.state={},o}return kx(n,t),n.prototype.applyPixelRatio=function(t){var n=this.pixelRatio;return 1==n?t:t.map((function(t){return t*n}))},n.prototype.appendFlatPointCoordinates=function(t,n){for(var i=this.getBufferedMaxExtent(),r=this.Bh,e=this.coordinates,o=e.length,s=0,a=t.length;s<a;s+=n)r[0]=t[s],r[1]=t[s+1],Mn(i,r)&&(e[o++]=r[0],e[o++]=r[1]);return o},n.prototype.appendFlatLineCoordinates=function(t,n,i,r,e,o){var s=this.coordinates,a=s.length,u=this.getBufferedMaxExtent();o&&(n+=r);var c,h,f,l=t[n],v=t[n+1],d=this.Bh,p=!0;for(c=n+r;c<i;c+=r)d[0]=t[c],d[1]=t[c+1],(f=Tn(u,d))!==h?(p&&(s[a++]=l,s[a++]=v,p=!1),s[a++]=d[0],s[a++]=d[1]):f===yn?(s[a++]=d[0],s[a++]=d[1],p=!1):p=!0,l=d[0],v=d[1],h=f;return(e&&p||c===n+r)&&(s[a++]=l,s[a++]=v),a},n.prototype.Wh=function(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var a=i[o],u=this.appendFlatLineCoordinates(t,n,a,r,!1,!1);e.push(u),n=a}return n},n.prototype.drawCustom=function(t,n,i,r){this.beginGeometry(t,n);var e,o,s,a,u,c=t.getType(),h=t.getStride(),f=this.coordinates.length;switch(c){case Pt.MULTI_POLYGON:e=t.getOrientedFlatCoordinates(),a=[];var l=t.getEndss();u=0;for(var v=0,d=l.length;v<d;++v){var p=[];u=this.Wh(e,u,l[v],h,p),a.push(p)}this.instructions.push([Sx.CUSTOM,f,a,t,i,ge]),this.hitDetectionInstructions.push([Sx.CUSTOM,f,a,t,r||i,ge]);break;case Pt.POLYGON:case Pt.MULTI_LINE_STRING:s=[],e=c==Pt.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),u=this.Wh(e,0,t.getEnds(),h,s),this.instructions.push([Sx.CUSTOM,f,s,t,i,be]),this.hitDetectionInstructions.push([Sx.CUSTOM,f,s,t,r||i,be]);break;case Pt.LINE_STRING:case Pt.CIRCLE:e=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(e,0,e.length,h,!1,!1),this.instructions.push([Sx.CUSTOM,f,o,t,i,we]),this.hitDetectionInstructions.push([Sx.CUSTOM,f,o,t,r||i,we]);break;case Pt.MULTI_POINT:e=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(e,h))>f&&(this.instructions.push([Sx.CUSTOM,f,o,t,i,we]),this.hitDetectionInstructions.push([Sx.CUSTOM,f,o,t,r||i,we]));break;case Pt.POINT:e=t.getFlatCoordinates(),this.coordinates.push(e[0],e[1]),o=this.coordinates.length,this.instructions.push([Sx.CUSTOM,f,o,t,i]),this.hitDetectionInstructions.push([Sx.CUSTOM,f,o,t,r||i])}this.endGeometry(n)},n.prototype.beginGeometry=function(t,n){this.Dh=[Sx.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.Dh),this.Uh=[Sx.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.Uh)},n.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},n.prototype.reverseHitDetectionInstructions=function(){var t,n=this.hitDetectionInstructions;n.reverse();var i,r,e=n.length,o=-1;for(t=0;t<e;++t)(r=(i=n[t])[0])==Sx.END_GEOMETRY?o=t:r==Sx.BEGIN_GEOMETRY&&(i[2]=t,w(this.hitDetectionInstructions,o,t),o=-1)},n.prototype.setFillStrokeStyle=function(t,n){var i=this.state;if(t){var r=t.getColor();i.fillStyle=eh(r||zs)}else i.fillStyle=void 0;if(n){var e=n.getColor();i.strokeStyle=eh(e||Us);var o=n.getLineCap();i.lineCap=void 0!==o?o:Fs;var s=n.getLineDash();i.lineDash=s?s.slice():Ls;var a=n.getLineDashOffset();i.lineDashOffset=a||0;var u=n.getLineJoin();i.lineJoin=void 0!==u?u:Gs;var c=n.getWidth();i.lineWidth=void 0!==c?c:1;var h=n.getMiterLimit();i.miterLimit=void 0!==h?h:Ds,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.qh=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},n.prototype.createFill=function(t){var n=t.fillStyle,i=[Sx.SET_FILL_STYLE,n];return"string"!=typeof n&&i.push(!0),i},n.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},n.prototype.createStroke=function(t){return[Sx.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},n.prototype.updateFillStyle=function(t,n){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(n.call(this,t)),t.currentFillStyle=i)},n.prototype.updateStrokeStyle=function(t,n){var i=t.strokeStyle,r=t.lineCap,e=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=r||e!=t.currentLineDash&&!x(t.currentLineDash,e)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=u)&&(void 0!==i&&n.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=r,t.currentLineDash=e,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=u)},n.prototype.endGeometry=function(t){this.Dh[2]=this.instructions.length,this.Dh=null,this.Uh[2]=this.hitDetectionInstructions.length,this.Uh=null;var n=[Sx.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},n.prototype.getBufferedMaxExtent=function(){if(!this.qh&&(this.qh=Sn(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;jn(this.qh,t,this.qh)}return this.qh},n}(gh),_x=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ox=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r,e)||this;return o.ka=null,o.Nt=null,o.Vh=void 0,o.Xh=void 0,o.Hh=void 0,o.Jh=void 0,o.aa=void 0,o.Kh=void 0,o.Yh=void 0,o.ua=void 0,o.Gr=void 0,o.ca=void 0,o.Ba=void 0,o.Zh=void 0,o}return _x(n,t),n.prototype.drawPoint=function(t,n){if(this.Nt){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),r=t.getStride(),e=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([Sx.DRAW_IMAGE,e,o,this.Nt,this.Xh*this.Vh,this.Hh*this.Vh,Math.ceil(this.Jh*this.Vh),this.aa,this.Kh,this.Yh,this.ua,this.Gr,[this.ca[0]*this.pixelRatio/this.Vh,this.ca[1]*this.pixelRatio/this.Vh],Math.ceil(this.Ba*this.Vh),this.Zh]),this.hitDetectionInstructions.push([Sx.DRAW_IMAGE,e,o,this.ka,this.Xh,this.Hh,this.Jh,this.aa,this.Kh,this.Yh,this.ua,this.Gr,this.ca,this.Ba,this.Zh]),this.endGeometry(n)}},n.prototype.drawMultiPoint=function(t,n){if(this.Nt){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),r=t.getStride(),e=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([Sx.DRAW_IMAGE,e,o,this.Nt,this.Xh*this.Vh,this.Hh*this.Vh,Math.ceil(this.Jh*this.Vh),this.aa,this.Kh,this.Yh,this.ua,this.Gr,[this.ca[0]*this.pixelRatio/this.Vh,this.ca[1]*this.pixelRatio/this.Vh],Math.ceil(this.Ba*this.Vh),this.Zh]),this.hitDetectionInstructions.push([Sx.DRAW_IMAGE,e,o,this.ka,this.Xh,this.Hh,this.Jh,this.aa,this.Kh,this.Yh,this.ua,this.Gr,this.ca,this.Ba,this.Zh]),this.endGeometry(n)}},n.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.Xh=void 0,this.Hh=void 0,this.ka=null,this.Nt=null,this.Vh=void 0,this.Jh=void 0,this.ca=void 0,this.aa=void 0,this.Kh=void 0,this.Yh=void 0,this.ua=void 0,this.Gr=void 0,this.Ba=void 0,t.prototype.finish.call(this)},n.prototype.setImageStyle=function(t,n){var i=t.getAnchor(),r=t.getSize(),e=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.Vh=t.getPixelRatio(this.pixelRatio),this.Xh=i[0],this.Hh=i[1],this.ka=e,this.Nt=o,this.Jh=r[1],this.aa=t.getOpacity(),this.Kh=s[0]*this.Vh,this.Yh=s[1]*this.Vh,this.ua=t.getRotateWithView(),this.Gr=t.getRotation(),this.ca=t.getScaleArray(),this.Ba=r[0],this.Zh=n},n}(Mx),Tx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ex=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e)||this}return Tx(n,t),n.prototype.$h=function(t,n,i,r){var e=this.coordinates.length,o=this.appendFlatLineCoordinates(t,n,i,r,!1,!1),s=[Sx.MOVE_TO_LINE_TO,e,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},n.prototype.drawLineString=function(t,n){var i=this.state,r=i.strokeStyle,e=i.lineWidth;if(void 0!==r&&void 0!==e){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([Sx.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Ls,0],xx);var o=t.getFlatCoordinates(),s=t.getStride();this.$h(o,0,o.length,s),this.hitDetectionInstructions.push(gx),this.endGeometry(n)}},n.prototype.drawMultiLineString=function(t,n){var i=this.state,r=i.strokeStyle,e=i.lineWidth;if(void 0!==r&&void 0!==e){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([Sx.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],xx);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),u=0,c=0,h=o.length;c<h;++c)u=this.$h(s,u,o[c],a);this.hitDetectionInstructions.push(gx),this.endGeometry(n)}},n.prototype.finish=function(){var n=this.state;return null!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&this.instructions.push(gx),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},n.prototype.applyStroke=function(n){null!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&(this.instructions.push(gx),n.lastStroke=this.coordinates.length),n.lastStroke=0,t.prototype.applyStroke.call(this,n),this.instructions.push(xx)},n}(Mx),Ax=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Cx=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e)||this}return Ax(n,t),n.prototype.Qh=function(t,n,i,r){var e=this.state,o=void 0!==e.fillStyle,s=void 0!==e.strokeStyle,a=i.length;this.instructions.push(xx),this.hitDetectionInstructions.push(xx);for(var u=0;u<a;++u){var c=i[u],h=this.coordinates.length,f=this.appendFlatLineCoordinates(t,n,c,r,!0,!s),l=[Sx.MOVE_TO_LINE_TO,h,f];this.instructions.push(l),this.hitDetectionInstructions.push(l),s&&(this.instructions.push(jx),this.hitDetectionInstructions.push(jx)),n=c}return o&&(this.instructions.push(bx),this.hitDetectionInstructions.push(bx)),s&&(this.instructions.push(gx),this.hitDetectionInstructions.push(gx)),n},n.prototype.drawCircle=function(t,n){var i=this.state,r=i.fillStyle,e=i.strokeStyle;if(void 0!==r||void 0!==e){this.tf(),this.beginGeometry(t,n),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Sx.SET_FILL_STYLE,zs]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Sx.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var u=[Sx.CIRCLE,a];this.instructions.push(xx,u),this.hitDetectionInstructions.push(xx,u),void 0!==i.fillStyle&&(this.instructions.push(bx),this.hitDetectionInstructions.push(bx)),void 0!==i.strokeStyle&&(this.instructions.push(gx),this.hitDetectionInstructions.push(gx)),this.endGeometry(n)}},n.prototype.drawPolygon=function(t,n){var i=this.state,r=i.fillStyle,e=i.strokeStyle;if(void 0!==r||void 0!==e){this.tf(),this.beginGeometry(t,n),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Sx.SET_FILL_STYLE,zs]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Sx.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.Qh(s,0,o,a),this.endGeometry(n)}},n.prototype.drawMultiPolygon=function(t,n){var i=this.state,r=i.fillStyle,e=i.strokeStyle;if(void 0!==r||void 0!==e){this.tf(),this.beginGeometry(t,n),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Sx.SET_FILL_STYLE,zs]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Sx.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),u=0,c=0,h=o.length;c<h;++c)u=this.Qh(s,u,o[c],a);this.endGeometry(n)}},n.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var n=this.tolerance;if(0!==n)for(var i=this.coordinates,r=0,e=i.length;r<e;++r)i[r]=de(i[r],n);return t.prototype.finish.call(this)},n.prototype.tf=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},n}(Mx);function Rx(t,n,i,r,e){var o,s,a,u,c,h,f,l,v,d=i,p=i,y=0,m=0,w=i;for(o=i;o<r;o+=e){var b=n[o],g=n[o+1];void 0!==u&&(l=b-u,v=g-c,a=Math.sqrt(l*l+v*v),void 0!==h&&(m+=s,Math.acos((h*l+f*v)/(s*a))>t&&(m>y&&(y=m,d=w,p=o),m=0,w=o-e)),s=a,h=l,f=v),u=b,c=g}return(m+=a)>y?[w,o]:[d,p]}var Px=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ix={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Nx=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r,e)||this;return o.nf=null,o.eo="",o.oo=0,o.so=0,o.ao=void 0,o.uo=0,o.ho=null,o.fillStates={},o.fo=null,o.strokeStates={},o.lo={},o.textStates={},o.if="",o.rf="",o.ef="",o.Zh=void 0,o}return Px(n,t),n.prototype.finish=function(){var n=t.prototype.finish.call(this);return n.textStates=this.textStates,n.fillStates=this.fillStates,n.strokeStates=this.strokeStates,n},n.prototype.drawText=function(t,n){var i=this.ho,r=this.fo,e=this.lo;if(""!==this.eo&&e&&(i||r)){var o=this.coordinates,s=o.length,a=t.getType(),u=null,c=t.getStride();if(e.placement!==$v||a!=Pt.LINE_STRING&&a!=Pt.MULTI_LINE_STRING&&a!=Pt.POLYGON&&a!=Pt.MULTI_POLYGON){var h=e.overflow?null:[];switch(a){case Pt.POINT:case Pt.MULTI_POINT:u=t.getFlatCoordinates();break;case Pt.LINE_STRING:u=t.getFlatMidpoint();break;case Pt.CIRCLE:u=t.getCenter();break;case Pt.MULTI_LINE_STRING:u=t.getFlatMidpoints(),c=2;break;case Pt.POLYGON:u=t.getFlatInteriorPoint(),e.overflow||h.push(u[2]/this.resolution),c=3;break;case Pt.MULTI_POLYGON:var f=t.getFlatInteriorPoints();u=[];for(j=0,S=f.length;j<S;j+=3)e.overflow||h.push(f[j+2]/this.resolution),u.push(f[j],f[j+1]);if(0===u.length)return;c=2}if((A=this.appendFlatPointCoordinates(u,c))===s)return;if(h&&(A-s)/2!=u.length/c){var l=s/2;h=h.filter((function(t,n){var i=o[2*(l+n)]===u[n*c]&&o[2*(l+n)+1]===u[n*c+1];return i||--l,i}))}this.af(),(e.backgroundFill||e.backgroundStroke)&&(this.setFillStrokeStyle(e.backgroundFill,e.backgroundStroke),e.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),e.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,n);var v=e.padding;if(v!=Ws&&(e.scale[0]<0||e.scale[1]<0)){var d=e.padding[0],p=e.padding[1],y=e.padding[2],m=e.padding[3];e.scale[0]<0&&(p=-p,m=-m),e.scale[1]<0&&(d=-d,y=-y),v=[d,p,y,m]}var w=this.pixelRatio;this.instructions.push([Sx.DRAW_IMAGE,s,A,null,NaN,NaN,NaN,1,0,0,this.ao,this.uo,[1,1],NaN,this.Zh,v==Ws?Ws:v.map((function(t){return t*w})),!!e.backgroundFill,!!e.backgroundStroke,this.eo,this.if,this.ef,this.rf,this.oo,this.so,h]);var b=1/w;this.hitDetectionInstructions.push([Sx.DRAW_IMAGE,s,A,null,NaN,NaN,NaN,1,0,0,this.ao,this.uo,[b,b],NaN,this.Zh,v,!!e.backgroundFill,!!e.backgroundStroke,this.eo,this.if,this.ef,this.rf,this.oo,this.so,h]),this.endGeometry(n)}else{if(!ti(this.getBufferedMaxExtent(),t.getExtent()))return;var g=void 0;if(u=t.getFlatCoordinates(),a==Pt.LINE_STRING)g=[u.length];else if(a==Pt.MULTI_LINE_STRING)g=t.getEnds();else if(a==Pt.POLYGON)g=t.getEnds().slice(0,1);else if(a==Pt.MULTI_POLYGON){var x=t.getEndss();g=[];for(var j=0,S=x.length;j<S;++j)g.push(x[j][0])}this.beginGeometry(t,n);for(var k=e.textAlign,M=0,_=void 0,O=0,T=g.length;O<T;++O){if(null==k){var E=Rx(e.maxAngle,u,M,g[O],c);M=E[0],_=E[1]}else _=g[O];for(var j=M;j<_;j+=c)o.push(u[j],u[j+1]);var A=o.length;M=g[O],this.uf(s,A),s=A}this.endGeometry(n)}}},n.prototype.af=function(){var t=this.fo,n=this.lo,i=this.ho,r=this.ef;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var e=this.if;e in this.textStates||(this.textStates[e]={font:n.font,textAlign:n.textAlign||qs,textBaseline:n.textBaseline||Bs,scale:n.scale});var o=this.rf;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))},n.prototype.uf=function(t,n){var i=this.fo,r=this.lo,e=this.ef,o=this.if,s=this.rf;this.af();var a=this.pixelRatio,u=Ix[r.textBaseline],c=this.so*a,h=this.eo,f=i?i.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Sx.DRAW_CHARS,t,n,u,r.overflow,s,r.maxAngle,a,c,e,f*a,h,o,1]),this.hitDetectionInstructions.push([Sx.DRAW_CHARS,t,n,u,r.overflow,s,r.maxAngle,1,c,e,f,h,o,1/a])},n.prototype.setTextStyle=function(t,n){var i,r,e;if(t){var s=t.getFill();s?((r=this.ho)||(r={},this.ho=r),r.fillStyle=eh(s.getColor()||zs)):(r=null,this.ho=r);var a=t.getStroke();if(a){(e=this.fo)||(e={},this.fo=e);var u=a.getLineDash(),c=a.getLineDashOffset(),h=a.getWidth(),f=a.getMiterLimit();e.lineCap=a.getLineCap()||Fs,e.lineDash=u?u.slice():Ls,e.lineDashOffset=void 0===c?0:c,e.lineJoin=a.getLineJoin()||Gs,e.lineWidth=void 0===h?1:h,e.miterLimit=void 0===f?Ds:f,e.strokeStyle=eh(a.getColor()||Us)}else e=null,this.fo=e;i=this.lo;var l=t.getFont()||Ns;Zs(l);var v=t.getScaleArray();i.overflow=t.getOverflow(),i.font=l,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||Bs,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Ws,i.scale=void 0===v?[1,1]:v;var d=t.getOffsetX(),p=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation();this.eo=t.getText()||"",this.oo=void 0===d?0:d,this.so=void 0===p?0:p,this.ao=void 0!==y&&y,this.uo=void 0===m?0:m,this.ef=e?("string"==typeof e.strokeStyle?e.strokeStyle:o(e.strokeStyle))+e.lineCap+e.lineDashOffset+"|"+e.lineWidth+e.lineJoin+e.miterLimit+"["+e.lineDash.join()+"]":"",this.if=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.rf=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+o(r.fillStyle):""}else this.eo="";this.Zh=n},n}(Mx),zx={Circle:Cx,Default:Mx,Image:Ox,LineString:Ex,Polygon:Cx,Text:Nx},Fx=function(){function t(t,n,i,r){this.cf=t,this.hf=n,this.Rt=r,this.ff=i,this.lf={}}return t.prototype.finish=function(){var t={};for(var n in this.lf){t[n]=t[n]||{};var i=this.lf[n];for(var r in i){var e=i[r].finish();t[n][r]=e}}return t},t.prototype.getBuilder=function(t,n){var i=void 0!==t?t.toString():"0",r=this.lf[i];void 0===r&&(r={},this.lf[i]=r);var e=r[n];void 0===e&&(e=new(0,zx[n])(this.cf,this.hf,this.ff,this.Rt),r[n]=e);return e},t}();function Lx(t,n,i,r,e,o,s,a,u,c,h,f){var l=t[n],v=t[n+1],d=0,p=0,y=0,m=0;function w(){d=l,p=v,l=t[n+=r],v=t[n+1],m+=y,y=Math.sqrt((l-d)*(l-d)+(v-p)*(v-p))}do{w()}while(n<i-r&&m+y<o);for(var b=0===y?0:(o-m)/y,g=mi(d,l,b),x=mi(p,v,b),j=n-r,S=m,k=o+a*u(c,e,h);n<i-r&&m+y<k;)w();var M,_=mi(d,l,b=0===y?0:(k-m)/y),O=mi(p,v,b);if(f){var T=[g,x,_,O];Wr(T,0,4,2,f,T,T),M=T[0]>T[2]}else M=g>_;var E,A=Math.PI,C=[],R=j+r===n;if(y=0,m=S,l=t[n=j],v=t[n+1],R){w(),E=Math.atan2(v-p,l-d),M&&(E+=E>0?-A:A);var P=(_+g)/2,I=(O+x)/2;return C[0]=[P,I,(k-o)/2,E,e],C}for(var N=0,z=e.length;N<z;){w();var F=Math.atan2(v-p,l-d);if(M&&(F+=F>0?-A:A),void 0!==E){var L=F-E;if(L+=L>A?-2*A:L<-A?2*A:0,Math.abs(L)>s)return null}E=F;for(var G=N,D=0;N<z;++N){var U=a*u(c,e[M?z-N-1:N],h);if(n+r<i&&m+y<o+D+U/2)break;D+=U}if(N!==G){var q=M?e.substring(z-G,z-N):e.substring(G,N);P=mi(d,l,b=0===y?0:(o+D/2-m)/y),I=mi(p,v,b);C.push([P,I,D/2,F,q]),o+=D}}return C}function Gx(t,n,i,r){for(var e=t[n],o=t[n+1],s=0,a=n+r;a<i;a+=r){var u=t[a],c=t[a+1];s+=Math.sqrt((u-e)*(u-e)+(c-o)*(c-o)),e=u,o=c}return s}var Dx=[1/0,1/0,-1/0,-1/0],Ux=[],qx=[],Bx=[],Wx=[];function Vx(t){return t[3].declutterBox}var Xx=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Hx(t,n){return"start"!==n&&"end"!==n||Xx.test(t)||(n="start"===n?"left":"right"),Ix[n]}function Jx(t,n,i){return i>0&&t.push("\n",""),t.push(n,""),t}var Kx=function(){function t(t,n,i,r){this.overlaps=i,this.pixelRatio=n,this.resolution=t,this.vf,this.instructions=r.instructions,this.coordinates=r.coordinates,this.df={},this.pf=[1,0,0,1,0,0],this.hitDetectionInstructions=r.hitDetectionInstructions,this.vo=null,this.Ge=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.yf={},this.nf={}}return t.prototype.createLabel=function(t,n,i,r){var e=t+n+i+r;if(this.nf[e])return this.nf[e];var o=r?this.strokeStates[r]:null,s=i?this.fillStates[i]:null,a=this.textStates[n],u=this.pixelRatio,c=[a.scale[0]*u,a.scale[1]*u],h=Array.isArray(t),f=Hx(h?t[0]:t,a.textAlign||qs),l=r&&o.lineWidth?o.lineWidth:0,v=h?t:t.split("\n").reduce(Jx,[]),d=ia(a,v),p=d.width,y=d.height,m=d.widths,w=d.heights,b=d.lineWidths,g=p+l,x=[],j=(g+2)*c[0],S=(y+l)*c[1],k={width:j<0?Math.floor(j):Math.ceil(j),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:x};(1==c[0]&&1==c[1]||x.push("scale",c),r)&&(x.push("strokeStyle",o.strokeStyle),x.push("lineWidth",l),x.push("lineCap",o.lineCap),x.push("lineJoin",o.lineJoin),x.push("miterLimit",o.miterLimit),(Xt?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(x.push("setLineDash",[o.lineDash]),x.push("lineDashOffset",o.lineDashOffset)));i&&x.push("fillStyle",s.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");for(var M,_=.5-f,O=f*g+_*l,T=[],E=[],A=0,C=0,R=0,P=0,I=0,N=v.length;I<N;I+=2){var z=v[I];if("\n"!==z){var F=v[I+1]||a.font;F!==M&&(r&&T.push("font",F),i&&E.push("font",F),M=F),A=Math.max(A,w[R]);var L=[z,O+_*m[R]+f*(m[R]-b[P]),.5*(l+A)+C];O+=m[R],r&&T.push("strokeText",L),i&&E.push("fillText",L),++R}else C+=A,A=0,O=f*g+_*l,++P}return Array.prototype.push.apply(x,T),Array.prototype.push.apply(x,E),this.nf[e]=k,k},t.prototype.mf=function(t,n,i,r,e,o,s){t.beginPath(),t.moveTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,r),t.lineTo.apply(t,e),t.lineTo.apply(t,n),o&&(this.vf=o[2],this.va(t)),s&&(this.wf(t,s),t.stroke())},t.prototype.bf=function(t,n,i,r,e,o,s,a,u,c,h,f,l,v,d,p){var y,m=i-(s*=f[0]),w=r-(a*=f[1]),b=e+u>t?t-u:e,g=o+c>n?n-c:o,x=v[3]+b*f[0]+v[1],j=v[0]+g*f[1]+v[2],S=m-v[3],k=w-v[0];return(d||0!==h)&&(Ux[0]=S,Wx[0]=S,Ux[1]=k,qx[1]=k,qx[0]=S+x,Bx[0]=qx[0],Bx[1]=k+j,Wx[1]=Bx[1]),0!==h?(nn(y=an([1,0,0,1,0,0],i,r,1,1,h,-i,-r),Ux),nn(y,qx),nn(y,Bx),nn(y,Wx),An(Math.min(Ux[0],qx[0],Bx[0],Wx[0]),Math.min(Ux[1],qx[1],Bx[1],Wx[1]),Math.max(Ux[0],qx[0],Bx[0],Wx[0]),Math.max(Ux[1],qx[1],Bx[1],Wx[1]),Dx)):An(Math.min(S,S+x),Math.min(k,k+j),Math.max(S,S+x),Math.max(k,k+j),Dx),l&&(m=Math.round(m),w=Math.round(w)),{drawImageX:m,drawImageY:w,drawImageW:b,drawImageH:g,originX:u,originY:c,declutterBox:{minX:Dx[0],minY:Dx[1],maxX:Dx[2],maxY:Dx[3],value:p},canvasTransform:y,scale:f}},t.prototype.gf=function(t,n,i,r,e,o,s){var a=!(!o&&!s),u=r.declutterBox,c=t.canvas,h=s?s[2]*r.scale[0]/2:0;return u.minX-h<=c.width/n&&u.maxX+h>=0&&u.minY-h<=c.height/n&&u.maxY+h>=0&&(a&&this.mf(t,Ux,qx,Bx,Wx,o,s),ra(t,r.canvasTransform,e,i,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.va=function(t){if(this.vf){var n=nn(this.pf,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(n[0]%i,n[1]%i),t.rotate(this.Ge)}t.fill(),this.vf&&t.restore()},t.prototype.wf=function(t,n){t.strokeStyle=n[1],t.lineWidth=n[2],t.lineCap=n[3],t.lineJoin=n[4],t.miterLimit=n[5],t.setLineDash&&(t.lineDashOffset=n[7],t.setLineDash(n[6]))},t.prototype.xf=function(t,n,i,r){var e=this.textStates[n],o=this.createLabel(t,n,r,i),s=this.strokeStates[i],a=this.pixelRatio,u=Hx(Array.isArray(t)?t[0]:t,e.textAlign||qs),c=Ix[e.textBaseline||Bs],h=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:u*(o.width/a-2*e.scale[0])+2*(.5-u)*h,anchorY:c*o.height/a+2*(.5-c)*h}},t.prototype.jf=function(t,n,i,r,e,o,s,a){var u;this.vo&&x(i,this.pf)?u=this.vo:(this.vo||(this.vo=[]),u=Br(this.coordinates,0,this.coordinates.length,2,i,this.vo),tn(this.pf,i));for(var c,h,f,l,v,d,p,y,m,w,b,g,j,S,k,M,_=0,O=r.length,T=0,E=0,A=0,C=null,R=null,P=this.df,I=this.Ge,N=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:I},F=this.instructions!=r||this.overlaps?0:200;_<O;){var L=r[_];switch(L[0]){case Sx.BEGIN_GEOMETRY:j=L[1],M=L[3],j.getGeometry()?void 0===s||ti(s,M.getExtent())?++_:_=L[2]+1:_=L[2];break;case Sx.BEGIN_PATH:E>F&&(this.va(t),E=0),A>F&&(t.stroke(),A=0),E||A||(t.beginPath(),l=NaN,v=NaN),++_;break;case Sx.CIRCLE:var G=u[T=L[1]],D=u[T+1],U=u[T+2]-G,q=u[T+3]-D,B=Math.sqrt(U*U+q*q);t.moveTo(G+B,D),t.arc(G,D,B,0,2*Math.PI,!0),++_;break;case Sx.CLOSE_PATH:t.closePath(),++_;break;case Sx.CUSTOM:T=L[1],c=L[2];var W=L[3],V=L[4],X=6==L.length?L[5]:void 0;z.geometry=W,z.feature=j,_ in P||(P[_]=[]);var H=P[_];X?X(u,T,c,2,H):(H[0]=u[T],H[1]=u[T+1],H.length=2),V(H,z),++_;break;case Sx.DRAW_IMAGE:T=L[1],c=L[2],y=L[3],h=L[4],f=L[5];var J=L[6],K=L[7],Y=L[8],Z=L[9],$=L[10],Q=L[11],tt=L[12],nt=L[13],it=L[14];if(!y&&L.length>=19){m=L[18],w=L[19],b=L[20],g=L[21];var rt=this.xf(m,w,b,g);y=rt.label,L[3]=y;var et=L[22];h=(rt.anchorX-et)*this.pixelRatio,L[4]=h;var ot=L[23];f=(rt.anchorY-ot)*this.pixelRatio,L[5]=f,J=y.height,L[6]=J,nt=y.width,L[13]=nt}var st=void 0;L.length>24&&(st=L[24]);var at=void 0,ut=void 0,ct=void 0;L.length>16?(at=L[15],ut=L[16],ct=L[17]):(at=Ws,ut=!1,ct=!1),$&&N?Q+=I:$||N||(Q-=I);for(var ht=0;T<c;T+=2)if(!(st&&st[ht++]<nt/this.pixelRatio)){var ft=[t,n,y,Lt=this.bf(y.width,y.height,u[T],u[T+1],nt,J,h,f,Y,Z,Q,tt,e,at,ut||ct,j),K,ut?C:null,ct?R:null],lt=void 0,vt=void 0;if(a&&it){var dt=c-T;if(!it[dt]){it[dt]=ft;continue}if(lt=it[dt],delete it[dt],vt=Vx(lt),a.collides(vt))continue}a&&a.collides(Lt.declutterBox)||(lt&&(a&&a.insert(vt),this.gf.apply(this,lt)),a&&a.insert(Lt.declutterBox),this.gf.apply(this,ft))}++_;break;case Sx.DRAW_CHARS:var pt=L[1],yt=L[2],mt=L[3],wt=L[4];g=L[5];var bt=L[6],gt=L[7],xt=L[8];b=L[9];var jt=L[10];m=L[11],w=L[12];var St=[L[13],L[13]],kt=this.textStates[w],Mt=kt.font,_t=[kt.scale[0]*gt,kt.scale[1]*gt],Ot=void 0;Mt in this.yf?Ot=this.yf[Mt]:(Ot={},this.yf[Mt]=Ot);var Tt=Gx(u,pt,yt,2),Et=Math.abs(_t[0])*na(Mt,m,Ot);if(wt||Et<=Tt){var At=this.textStates[w].textAlign,Ct=Lx(u,pt,yt,2,m,(Tt-Et)*Ix[At],bt,Math.abs(_t[0]),na,Mt,Ot,N?0:this.Ge);t:if(Ct){var Rt=[],Pt=void 0,It=void 0,Nt=void 0,zt=void 0,Ft=void 0;if(b)for(Pt=0,It=Ct.length;Pt<It;++Pt){Nt=(Ft=Ct[Pt])[4],zt=this.createLabel(Nt,w,"",b),h=Ft[2]+(_t[0]<0?-jt:jt),f=mt*zt.height+2*(.5-mt)*jt*_t[1]/_t[0]-xt;var Lt=this.bf(zt.width,zt.height,Ft[0],Ft[1],zt.width,zt.height,h,f,0,0,Ft[3],St,!1,Ws,!1,j);if(a&&a.collides(Lt.declutterBox))break t;Rt.push([t,n,zt,Lt,1,null,null])}if(g)for(Pt=0,It=Ct.length;Pt<It;++Pt){Nt=(Ft=Ct[Pt])[4],zt=this.createLabel(Nt,w,g,""),h=Ft[2],f=mt*zt.height-xt;Lt=this.bf(zt.width,zt.height,Ft[0],Ft[1],zt.width,zt.height,h,f,0,0,Ft[3],St,!1,Ws,!1,j);if(a&&a.collides(Lt.declutterBox))break t;Rt.push([t,n,zt,Lt,1,null,null])}a&&a.load(Rt.map(Vx));for(var Gt=0,Dt=Rt.length;Gt<Dt;++Gt)this.gf.apply(this,Rt[Gt])}}++_;break;case Sx.END_GEOMETRY:if(void 0!==o){var Ut=o(j=L[1],M);if(Ut)return Ut}++_;break;case Sx.FILL:F?E++:this.va(t),++_;break;case Sx.MOVE_TO_LINE_TO:for(T=L[1],c=L[2],S=u[T],p=(k=u[T+1])+.5|0,(d=S+.5|0)===l&&p===v||(t.moveTo(S,k),l=d,v=p),T+=2;T<c;T+=2)d=(S=u[T])+.5|0,p=(k=u[T+1])+.5|0,T!=c-2&&d===l&&p===v||(t.lineTo(S,k),l=d,v=p);++_;break;case Sx.SET_FILL_STYLE:C=L,this.vf=L[2],E&&(this.va(t),E=0,A&&(t.stroke(),A=0)),t.fillStyle=L[1],++_;break;case Sx.SET_STROKE_STYLE:R=L,A&&(t.stroke(),A=0),this.wf(t,L),++_;break;case Sx.STROKE:F?A++:t.stroke(),++_;break;default:++_}}E&&this.va(t),A&&t.stroke()},t.prototype.execute=function(t,n,i,r,e,o){this.Ge=r,this.jf(t,n,i,this.instructions,e,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,n,i,r,e){return this.Ge=i,this.jf(t,1,n,this.hitDetectionInstructions,!0,r,e)},t}(),Yx=[Oh,Sh,_h,Mh,Th,kh],Zx=function(){function t(t,n,i,r,e,o){this.hf=t,this.Nu=r,this.Rt=i,this.ff=n,this.lh=o,this.Sf={},this.kf=null,this.Mf=[1,0,0,1,0,0],this._f(e)}return t.prototype.clip=function(t,n){var i=this.getClipCoords(n);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},t.prototype._f=function(t){for(var n in t){var i=this.Sf[n];void 0===i&&(i={},this.Sf[n]=i);var r=t[n];for(var e in r){var o=r[e];i[e]=new Kx(this.ff,this.Rt,this.Nu,o)}}},t.prototype.hasExecutors=function(t){for(var n in this.Sf)for(var i=this.Sf[n],r=0,e=t.length;r<e;++r)if(t[r]in i)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e,o){var s=2*(r=Math.round(r))+1,a=an(this.Mf,r+.5,r+.5,1/n,-1/n,-i,-t[0],-t[1]),u=!this.kf;u&&(this.kf=_o(s,s));var c,h=this.kf;h.canvas.width!==s||h.canvas.height!==s?(h.canvas.width=s,h.canvas.height=s):u||h.clearRect(0,0,s,s),void 0!==this.lh&&(Fn(c=[1/0,1/0,-1/0,-1/0],t),jn(c,n*(this.lh+r),c));var f,l=Qx(r);function v(t,n){for(var i=h.getImageData(0,0,s,s).data,a=0,u=l.length;a<u;a++)if(i[l[a]]>0){if(!o||f!==Mh&&f!==Th||-1!==o.indexOf(t)){var c=(l[a]-3)/4,v=r-c%s,d=r-(c/s|0),p=e(t,n,v*v+d*d);if(p)return p}h.clearRect(0,0,s,s);break}}var d,y,m,w,b,g=Object.keys(this.Sf).map(Number);for(g.sort(p),d=g.length-1;d>=0;--d){var x=g[d].toString();for(m=this.Sf[x],y=Yx.length-1;y>=0;--y)if(void 0!==(w=m[f=Yx[y]])&&(b=w.executeHitDetection(h,a,i,v,c)))return b}},t.prototype.getClipCoords=function(t){var n=this.hf;if(!n)return null;var i=n[0],r=n[1],e=n[2],o=n[3],s=[i,r,i,o,e,o,e,r];return Br(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return R(this.Sf)},t.prototype.execute=function(t,n,i,r,e,o,s){var a=Object.keys(this.Sf).map(Number);a.sort(p),this.hf&&(t.save(),this.clip(t,i));var u,c,h,f,l,v,d=o||Yx;for(s&&a.reverse(),u=0,c=a.length;u<c;++u){var y=a[u].toString();for(l=this.Sf[y],h=0,f=d.length;h<f;++h){void 0!==(v=l[d[h]])&&v.execute(t,n,i,r,e,s)}}this.hf&&t.restore()},t}(),$x={};function Qx(t){if(void 0!==$x[t])return $x[t];for(var n=2*t+1,i=t*t,r=new Array(i+1),e=0;e<=t;++e)for(var o=0;o<=t;++o){var s=e*e+o*o;if(s>i)break;var a=r[s];a||(a=[],r[s]=a),a.push(4*((t+e)*n+(t+o))+3),e>0&&a.push(4*((t-e)*n+(t+o))+3),o>0&&(a.push(4*((t+e)*n+(t-o))+3),e>0&&a.push(4*((t-e)*n+(t-o))+3))}for(var u=[],c=(e=0,r.length);e<c;++e)r[e]&&u.push.apply(u,r[e]);return $x[t]=u,u}var tj=Zx,nj=.5;function ij(t,n,i,r,e,o,s){var a=_o(t[0]*nj,t[1]*nj);a.imageSmoothingEnabled=!1;for(var u=a.canvas,c=new jh(a,nj,e,null,s),h=i.length,f=Math.floor(16777215/h),l={},v=1;v<=h;++v){var d=i[v-1],y=d.getStyleFunction()||r;if(r){var m=y(d,o);if(m){Array.isArray(m)||(m=[m]);for(var w="#"+("000000"+(v*f).toString(16)).slice(-6),b=0,g=m.length;b<g;++b){var x=m[b],j=x.getGeometryFunction()(d);if(j&&ti(e,j.getExtent())){var S=x.clone(),k=S.getFill();k&&k.setColor(w);var M=S.getStroke();M&&(M.setColor(w),M.setLineDash(null)),S.setText(void 0);var _=x.getImage();if(_&&0!==_.getOpacity()){var O=_.getImageSize();if(!O)continue;var T=_o(O[0],O[1],void 0,{alpha:!1}),E=T.canvas;T.fillStyle=w,T.fillRect(0,0,E.width,E.height),S.setImage(new Uv({img:E,imgSize:O,anchor:_.getAnchor(),anchorXUnits:Av,anchorYUnits:Av,offset:_.getOrigin(),opacity:1,size:_.getSize(),scale:_.getScale(),rotation:_.getRotation(),rotateWithView:_.getRotateWithView()}))}var A=S.getZIndex()||0;(P=l[A])||(P={},l[A]=P,P[Pt.POLYGON]=[],P[Pt.CIRCLE]=[],P[Pt.LINE_STRING]=[],P[Pt.POINT]=[]),P[j.getType().replace("Multi","")].push(j,S)}}}}}for(var C=Object.keys(l).map(Number).sort(p),R=(v=0,C.length);v<R;++v){var P=l[C[v]];for(var I in P){var N=P[I];for(b=0,g=N.length;b<g;b+=2){c.setStyle(N[b+1]);for(var z=0,F=n.length;z<F;++z)c.setTransform(n[z]),c.drawGeometry(N[b])}}}return a.getImageData(0,0,u.width,u.height)}function rj(t,n,i){var r=[];if(i){var e=Math.floor(Math.round(t[0])*nj),o=Math.floor(Math.round(t[1])*nj),s=4*(ui(e,0,i.width-1)+ui(o,0,i.height-1)*i.width),a=i.data[s],u=i.data[s+1],c=i.data[s+2]+256*(u+256*a),h=Math.floor(16777215/n.length);c&&c%h==0&&r.push(n[c/h-1])}return r}var ej=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),oj=function(t){function n(n){var i=t.call(this,n)||this;return i.Of=i.Tf.bind(i),i.Ef,i.Af=!1,i.Cf=null,i.Rf=null,i.jc=-1,i.Pf=NaN,i.Nc=[1/0,1/0,-1/0,-1/0],i.If=[1/0,1/0,-1/0,-1/0],i.Nf,i.zf=null,i.Ff=null,i.Lf=null,i.Gf=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i}return ej(n,t),n.prototype.renderWorlds=function(t,n,i){var r=n.extent,e=n.viewState,o=e.center,s=e.resolution,a=e.projection,u=e.rotation,c=a.getExtent(),h=this.getLayer().getSource(),f=n.pixelRatio,l=n.viewHints,v=!(l[Pa]||l[Ia]),d=this.context,p=Math.round(n.size[0]*f),y=Math.round(n.size[1]*f),m=h.getWrapX()&&a.canWrapX(),w=m?Qn(c):null,b=m?Math.ceil((r[2]-c[2])/w)+1:1,g=m?Math.floor((r[0]-c[0])/w):0;do{var x=this.getRenderTransform(o,s,u,f,p,y,g*w);t.execute(d,1,x,u,v,void 0,i)}while(++g<b)},n.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},n.prototype.renderFrame=function(t,n){var i=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];on(this.pixelTransform,1/i,1/i),un(this.inversePixelTransform,this.pixelTransform);var e=hn(this.pixelTransform);this.useContainer(n,e,r.opacity,this.getBackground(t));var o=this.context,s=o.canvas,a=this.Gf,u=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!u||u.isEmpty()))return null;var c=Math.round(t.size[0]*i),h=Math.round(t.size[1]*i);s.width!=c||s.height!=h?(s.width=c,s.height=h,s.style.transform!==e&&(s.style.transform=e)):this.containerReused||o.clearRect(0,0,c,h),this.preRender(o,t);var f=t.viewState,l=f.projection,v=!1,d=!0;if(r.extent&&this.clipping){var p=Lr(r.extent,l);(v=(d=ti(p,t.extent))&&!_n(p,t.extent))&&this.clipUnrotated(o,t,p)}d&&this.renderWorlds(a,t),v&&o.restore(),this.postRender(o,t);var y=Is(r.opacity),m=this.container;return y!==m.style.opacity&&(m.style.opacity=y),this.Nf!==f.rotation&&(this.Nf=f.rotation,this.Cf=null),this.container},n.prototype.getFeatures=function(t){return new Promise(function(n){if(!this.Cf&&!this.Ef){var i=[this.context.canvas.width,this.context.canvas.height];nn(this.pixelTransform,i);var r=this.zf,e=this.Pf,o=this.Nf,s=this.Ff,a=this.If,u=this.getLayer(),c=[],h=i[0]*nj,f=i[1]*nj;c.push(this.getRenderTransform(r,e,o,nj,h,f,0).slice());var l=u.getSource(),v=s.getExtent();if(l.getWrapX()&&s.canWrapX()&&!_n(v,a)){for(var d=a[0],p=Qn(v),y=0,m=void 0;d<v[0];)m=p*--y,c.push(this.getRenderTransform(r,e,o,nj,h,f,m).slice()),d+=p;for(y=0,d=a[2];d>v[2];)m=p*++y,c.push(this.getRenderTransform(r,e,o,nj,h,f,m).slice()),d-=p}this.Cf=ij(i,c,this.Rf,u.getStyleFunction(),a,e,o)}n(rj(t,this.Rf,this.Cf))}.bind(this))},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){var s=this;if(this.Gf){var a,u=n.viewState.resolution,c=n.viewState.rotation,h=this.getLayer(),f={},l=function(t,n,i){var s=o(t),a=f[s];if(a){if(!0!==a&&i<a.distanceSq){if(0===i)return f[s]=!0,e.splice(e.lastIndexOf(a),1),r(t,h,n);a.geometry=n,a.distanceSq=i}}else{if(0===i)return f[s]=!0,r(t,h,n);e.push(f[s]={feature:t,layer:h,geometry:n,distanceSq:i,callback:r})}},v=[this.Gf];return this.declutterExecutorGroup&&v.push(this.declutterExecutorGroup),v.some((function(r){return a=r.forEachFeatureAtCoordinate(t,u,c,i,l,r===s.declutterExecutorGroup&&n.declutterTree?n.declutterTree.all().map((function(t){return t.value})):null)})),a}},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.Gf&&t.changed()},n.prototype.Tf=function(t){this.renderIfReadyAndVisible()},n.prototype.prepareFrame=function(t){var n=this.getLayer(),i=n.getSource();if(!i)return!1;var r=t.viewHints[Pa],e=t.viewHints[Ia],o=n.getUpdateWhileAnimating(),s=n.getUpdateWhileInteracting();if(!this.Af&&!o&&r||!s&&e)return this.Ef=!0,!0;this.Ef=!1;var a=t.extent,u=t.viewState,c=u.projection,h=u.resolution,f=t.pixelRatio,l=n.getRevision(),v=n.getRenderBuffer(),d=n.getRenderOrder();void 0===d&&(d=Ah);var p=u.center.slice(),y=jn(a,v*h),m=y.slice(),w=[y.slice()],b=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!_n(b,t.extent)){var g=Qn(b),j=Math.max(Qn(y)/2,g);y[0]=b[0]-j,y[2]=b[2]+j,sr(p,c);var S=si(w[0],c);S[0]<b[0]&&S[2]<b[2]?w.push([S[0]+g,S[1],S[2]+g,S[3]]):S[0]>b[0]&&S[2]>b[2]&&w.push([S[0]-g,S[1],S[2]-g,S[3]])}if(!this.Af&&this.Pf==h&&this.jc==l&&this.Lf==d&&_n(this.If,y))return x(this.Nc,m)||(this.Cf=null,this.Nc=m),this.zf=p,this.replayGroupChanged=!1,!0;this.Gf=null,this.Af=!1;var k,M=new Fx(Rh(h,f),y,h,f);this.getLayer().getDeclutter()&&(k=new Fx(Rh(h,f),y,h,f));var _,O=Ir();if(O){for(var T=0,E=w.length;T<E;++T){var A=Fr(w[T],c);i.loadFeatures(A,Gr(h,c),O)}_=Tr(O,c)}else for(T=0,E=w.length;T<E;++T)i.loadFeatures(w[T],h,c);var C=Ch(h,f),R=function(t){var i,r=t.getStyleFunction()||n.getStyleFunction();if(r&&(i=r(t,h)),i){var e=this.renderFeature(t,C,i,M,_,k);this.Af=this.Af||e}}.bind(this),P=Fr(y,c),I=i.getFeaturesInExtent(P);d&&I.sort(d);for(T=0,E=I.length;T<E;++T)R(I[T]);this.Rf=I;var N=M.finish(),z=new tj(y,h,f,i.getOverlaps(),N,n.getRenderBuffer());return k&&(this.declutterExecutorGroup=new tj(y,h,f,i.getOverlaps(),k.finish(),n.getRenderBuffer())),this.Pf=h,this.jc=l,this.Lf=d,this.Nc=m,this.If=y,this.zf=p,this.Ff=c,this.Gf=z,this.Cf=null,this.replayGroupChanged=!0,!0},n.prototype.renderFeature=function(t,n,i,r,e,o){if(!i)return!1;var s=!1;if(Array.isArray(i))for(var a=0,u=i.length;a<u;++a)s=Ph(r,t,i[a],n,this.Of,e,o)||s;else s=Ph(r,t,i,n,this.Of,e,o);return s},n}(wg),sj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),aj=function(t){function n(n){var i=t.call(this,n)||this;return i.Df=new oj(n),i.Uf=n.getImageRatio(),i.qf=[1,0,0,1,0,0],i.Bf=null,i}return sj(n,t),n.prototype.disposeInternal=function(){this.Df.dispose(),t.prototype.disposeInternal.call(this)},n.prototype.getFeatures=function(t){if(!this.Df)return new Promise((function(t){return t([])}));var n=nn(this.qf,nn(this.Bf,t.slice()));return this.Df.getFeatures(n)},n.prototype.handleFontsChanged=function(){this.Df.handleFontsChanged()},n.prototype.prepareFrame=function(t){var n=t.pixelRatio,i=t.viewState,r=i.resolution,e=t.viewHints,o=this.Df,s=t.extent;1!==this.Uf&&ri(s=s.slice(0),this.Uf);var a=Qn(s)/r,u=Kn(s)/r;if(!e[Pa]&&!e[Ia]&&!ni(s)){o.useContainer(null,null,1);var c=o.context,h=E({},t,{declutterTree:new nd(9),extent:s,size:[a,u],viewState:E({},t.viewState,{rotation:0})}),f=!0,l=new Mo(s,r,n,c.canvas,(function(t){o.prepareFrame(h)&&o.replayGroupChanged&&(o.clipping=!1,o.renderFrame(h,null)&&(o.renderDeclutter(h),f=!1),t())}));l.addEventListener(N,function(){if(l.getState()===wo){this.Nt=f?null:l;var t=l.getResolution(),r=l.getPixelRatio(),e=t*n/r;this.renderedResolution=e,this.qf=an(this.qf,a/2,u/2,1/e,-1/e,0,-i.center[0],-i.center[1])}}.bind(this)),l.load()}return this.Nt&&(this.Bf=t.pixelToCoordinateTransform.slice()),!!this.Nt},n.prototype.preRender=function(){},n.prototype.postRender=function(){},n.prototype.renderDeclutter=function(){},n.prototype.forEachFeatureAtCoordinate=function(n,i,r,e,o){return this.Df?this.Df.forEachFeatureAtCoordinate(n,i,r,e,o):t.prototype.forEachFeatureAtCoordinate.call(this,n,i,r,e,o)},n}(gg),uj="image",cj="hybrid",hj="vector",fj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lj={image:[Oh,Sh,_h,Mh,Th],hybrid:[Oh,_h],vector:[]},vj={hybrid:[Mh,Th,kh],vector:[Oh,Sh,_h,Mh,Th,kh]},dj=function(t){function n(n){var i=t.call(this,n)||this;return i.Of=i.Tf.bind(i),i.Af=!1,i.Wf,i.Bf=null,i.Nf,i.Vf=[1,0,0,1,0,0],i}return fj(n,t),n.prototype.prepareTile=function(t,n,i){var r,e=t.getState();return e!==dt&&e!==pt||(this.Xf(t,n,i),this.Hf(t)&&(r=!0)),r},n.prototype.getTile=function(n,i,r,e){var o=e.pixelRatio,s=e.viewState,a=s.resolution,u=s.projection,c=this.getLayer(),h=c.getSource().getTile(n,i,r,o,u),f=e.viewHints,l=!(f[Pa]||f[Ia]);return!l&&h.wantedResolution||(h.wantedResolution=a),this.prepareTile(h,o,u)&&(l||Date.now()-e.time<8)&&c.getRenderMode()!==hj&&this.Jf(h,e),t.prototype.getTile.call(this,n,i,r,e)},n.prototype.isDrawableTile=function(n){var i=this.getLayer();return t.prototype.isDrawableTile.call(this,n)&&(i.getRenderMode()===hj?o(i)in n.executorGroups:n.hasContext(i))},n.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},n.prototype.prepareFrame=function(n){var i=this.getLayer().getRevision();return this.Wf!=i&&(this.renderedTiles.length=0),this.Wf=i,t.prototype.prepareFrame.call(this,n)},n.prototype.Xf=function(t,n,i){var r=this.getLayer(),e=r.getRevision(),s=r.getRenderOrder()||null,a=t.wantedResolution,u=t.getReplayState(r);if(u.dirty||u.renderedResolution!==a||u.renderedRevision!=e||u.renderedRenderOrder!=s){var c=r.getSource(),h=r.getDeclutter(),f=c.getTileGrid(),l=c.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),v=c.getSourceTiles(n,i,t),d=o(r);delete t.hitDetectionImageData[d],t.executorGroups[d]=[],h&&(t.declutterExecutorGroups[d]=[]);for(var p=function(i,e){var o=v[i];if(o.getState()!=dt)return"continue";var p=o.tileCoord,m=f.getTileCoordExtent(p),w=Yn(l,m),b=jn(w,r.getRenderBuffer()*a,y.tmpExtent),g=In(m,w)?null:b;u.dirty=!1;var x=new Fx(0,b,a,n),j=h?new Fx(0,w,a,n):void 0,S=Ch(a,n),k=function(t){var n,i=t.getStyleFunction()||r.getStyleFunction();if(i&&(n=i(t,a)),n){var e=this.renderFeature(t,S,n,x,j);this.Af=this.Af||e,u.dirty=u.dirty||e}},M=o.getFeatures();s&&s!==u.renderedRenderOrder&&M.sort(s);for(var _=0,O=M.length;_<O;++_){var T=M[_];g&&!ti(g,T.getGeometry().getExtent())||k.call(y,T)}var E=x.finish(),A=r.getRenderMode()!==hj&&h&&1===v.length?null:w,C=new tj(A,a,n,c.getOverlaps(),E,r.getRenderBuffer());if(t.executorGroups[d].push(C),j){var R=new tj(null,a,n,c.getOverlaps(),j.finish(),r.getRenderBuffer());t.declutterExecutorGroups[d].push(R)}},y=this,m=0,w=v.length;m<w;++m)p(m);u.renderedRevision=e,u.renderedRenderOrder=s,u.renderedResolution=a}},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){var s=n.viewState.resolution,a=n.viewState.rotation;i=null==i?0:i;var u=this.getLayer(),c=u.getSource().getTileGridForProjection(n.viewState.projection),h=xn([t]);jn(h,s*i,h);for(var f,l={},v=function(t,n,i){var s=t.getId();void 0===s&&(s=o(t));var a=l[s];if(a){if(!0!==a&&i<a.distanceSq){if(0===i)return l[s]=!0,e.splice(e.lastIndexOf(a),1),r(t,u,n);a.geometry=n,a.distanceSq=i}}else{if(0===i)return l[s]=!0,r(t,u,n);e.push(l[s]={feature:t,layer:u,geometry:n,distanceSq:i,callback:r})}},d=this.renderedTiles,p=function(r,e){var l=d[r];if(!ti(c.getTileCoordExtent(l.wrappedTileCoord),h))return"continue";var p=o(u),y=[l.executorGroups[p]],m=l.declutterExecutorGroups[p];m&&y.push(m),y.some((function(r){for(var e=r===m?n.declutterTree.all().map((function(t){return t.value})):null,o=0,u=r.length;o<u;++o){var c=r[o];if(f=c.forEachFeatureAtCoordinate(t,s,a,i,v,e))return!0}}))},y=0,m=d.length;!f&&y<m;++y)p(y);return f},n.prototype.getFeatures=function(t){return new Promise(function(n,i){for(var r,e=this.getLayer(),s=o(e),a=e.getSource(),u=this.renderedProjection,c=u.getExtent(),h=this.renderedResolution,f=a.getTileGridForProjection(u),l=nn(this.Bf,t.slice()),v=f.getTileCoordForCoordAndResolution(l,h),d=0,p=this.renderedTiles.length;d<p;++d)if(v.toString()===this.renderedTiles[d].tileCoord.toString()){if((r=this.renderedTiles[d]).getState()===dt){var y=f.getTileCoordExtent(r.tileCoord);a.getWrapX()&&u.canWrapX()&&!_n(c,y)&&sr(l,u);break}r=void 0}if(!r||r.loadingSourceTiles>0)n([]);else{var m=Zn(f.getTileCoordExtent(r.wrappedTileCoord)),w=[(l[0]-m[0])/h,(m[1]-l[1])/h],b=r.getSourceTiles().reduce((function(t,n){return t.concat(n.getFeatures())}),[]),g=r.hitDetectionImageData[s];if(!g&&!this.Ef){var x=ou(f.getTileSize(f.getZForResolution(h))),j=this.Nf;g=ij(x,[this.getRenderTransform(f.getTileCoordCenter(r.wrappedTileCoord),h,0,nj,x[0]*nj,x[1]*nj,0)],b,e.getStyleFunction(),f.getTileCoordExtent(r.wrappedTileCoord),r.getReplayState(e).renderedResolution,j),r.hitDetectionImageData[s]=g}n(rj(w,b,g))}}.bind(this))},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.Wf&&t.changed()},n.prototype.Tf=function(t){this.renderIfReadyAndVisible()},n.prototype.renderDeclutter=function(t){var n=this.context,i=n.globalAlpha;n.globalAlpha=this.getLayer().getOpacity();for(var r=t.viewHints,e=!(r[Pa]||r[Ia]),s=this.renderedTiles,a=0,u=s.length;a<u;++a){var c=s[a],h=c.declutterExecutorGroups[o(this.getLayer())];if(h)for(var f=h.length-1;f>=0;--f)h[f].execute(this.context,1,this.getTileRenderTransform(c,t),t.viewState.rotation,e,void 0,t.declutterTree)}n.globalAlpha=i},n.prototype.getTileRenderTransform=function(t,n){var i=n.pixelRatio,r=n.viewState,e=r.center,o=r.resolution,s=r.rotation,a=n.size,u=Math.round(a[0]*i),c=Math.round(a[1]*i),h=this.getLayer().getSource().getTileGridForProjection(n.viewState.projection),f=t.tileCoord,l=h.getTileCoordExtent(t.wrappedTileCoord),v=h.getTileCoordExtent(f,this.tmpExtent)[0]-l[0];return $t(en(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(e,o,s,i,u,c,v))},n.prototype.renderFrame=function(n,i){var r=n.viewHints,e=!(r[Pa]||r[Ia]);t.prototype.renderFrame.call(this,n,i),this.Bf=n.pixelToCoordinateTransform.slice(),this.Nf=n.viewState.rotation;var s=this.getLayer(),a=s.getRenderMode(),u=this.context,c=u.globalAlpha;u.globalAlpha=s.getOpacity();for(var h=vj[a],f=n.viewState,l=f.rotation,v=s.getSource(),d=v.getTileGridForProjection(f.projection).getZForResolution(f.resolution,v.zDirection),p=this.renderedTiles,y=[],m=[],w=p.length-1;w>=0;--w){var b=p[w],g=b.executorGroups[o(s)].filter((function(t){return t.hasExecutors(h)}));if(0!==g.length){for(var x=this.getTileRenderTransform(b,n),j=b.tileCoord[0],S=!1,k=g[0].getClipCoords(x),M=0,_=y.length;M<_;++M)if(d!==j&&j<m[M]){var O=y[M];ti([k[0],k[3],k[4],k[7]],[O[0],O[3],O[4],O[7]])&&(S||(u.save(),S=!0),u.beginPath(),u.moveTo(k[0],k[1]),u.lineTo(k[2],k[3]),u.lineTo(k[4],k[5]),u.lineTo(k[6],k[7]),u.moveTo(O[6],O[7]),u.lineTo(O[4],O[5]),u.lineTo(O[2],O[3]),u.lineTo(O[0],O[1]),u.clip())}y.push(k),m.push(j);for(var T=0,E=g.length;T<E;++T){g[T].execute(u,1,x,l,e,h)}S&&u.restore()}}return u.globalAlpha=c,this.container},n.prototype.renderFeature=function(t,n,i,r,e){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var s=0,a=i.length;s<a;++s)o=Ph(r,t,i[s],n,this.Of,void 0,e)||o;else o=Ph(r,t,i,n,this.Of,void 0,e);return o},n.prototype.Hf=function(t){var n=this.getLayer();if(n.getRenderMode()===hj)return!1;var i=t.getReplayState(n),r=n.getRevision(),e=t.wantedResolution;return i.renderedTileResolution!==e||i.renderedTileRevision!==r},n.prototype.Jf=function(t,n){var i=this.getLayer(),r=t.getReplayState(i),e=i.getRevision(),s=t.executorGroups[o(i)];r.renderedTileRevision=e;var a=t.wrappedTileCoord,u=a[0],c=i.getSource(),h=n.pixelRatio,f=n.viewState.projection,l=c.getTileGridForProjection(f),v=l.getResolution(t.tileCoord[0]),d=n.pixelRatio/t.wantedResolution*v,p=l.getResolution(u),y=t.getContext(i);h=Math.round(Math.max(h,d/h));var m=c.getTilePixelSize(u,h,f);y.canvas.width=m[0],y.canvas.height=m[1];var w=h/d;if(1!==w){var b=Zt(this.Vf);en(b,w,w),y.setTransform.apply(y,b)}var g=l.getTileCoordExtent(a,this.tmpExtent),x=d/p,j=Zt(this.Vf);en(j,x,-x),sn(j,-g[0],-g[3]);for(var S=0,k=s.length;S<k;++S){s[S].execute(y,w,j,0,!0,lj[i.getRenderMode()])}r.renderedTileResolution=t.wantedResolution},n}(Tg),pj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),yj=function(t){function n(n,i){var r=t.call(this)||this;return i&&!Array.isArray(n[0])?r.setFlatCoordinates(i,n):r.setCoordinates(n,i),r}return pj(n,t),n.prototype.appendPoint=function(t){this.flatCoordinates?b(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){if(r<kn(this.getExtent(),t,n))return r;for(var e=this.flatCoordinates,o=this.stride,s=0,a=e.length;s<a;s+=o){var u=li(t,n,e[s],e[s+1]);if(u<r){r=u;for(var c=0;c<o;++c)i[c]=e[s+c];i.length=o}}return r},n.prototype.getCoordinates=function(){return we(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getPoint=function(t){var n=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||n<=t?null:new Oe(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},n.prototype.getPoints=function(){for(var t=this.flatCoordinates,n=this.layout,i=this.stride,r=[],e=0,o=t.length;e<o;e+=i){var s=new Oe(t.slice(e,e+i),n);r.push(s)}return r},n.prototype.getType=function(){return Pt.MULTI_POINT},n.prototype.intersectsExtent=function(t){for(var n=this.flatCoordinates,i=this.stride,r=0,e=n.length;r<e;r+=i){if(On(t,n[r],n[r+1]))return!0}return!1},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ue(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Qr);function mj(t,n,i,r,e,o,s){var a,u,c=(i-n)/r;if(1===c)a=n;else if(2===c)a=n,u=e;else if(0!==c){for(var h=t[n],f=t[n+1],l=0,v=[0],p=n+r;p<i;p+=r){var y=t[p],m=t[p+1];l+=Math.sqrt((y-h)*(y-h)+(m-f)*(m-f)),v.push(l),h=y,f=m}var w=e*l,b=d(v,w);b<0?(u=(w-v[-b-2])/(v[-b-1]-v[-b-2]),a=n+(-b-2)*r):a=n+b*r}var g=s>1?s:2,x=o||new Array(g);for(p=0;p<g;++p)x[p]=void 0===a?NaN:void 0===u?t[a+p]:mi(t[a+p],t[a+r+p],u);return x}function wj(t,n,i,r,e,o){if(i==n)return null;var s;if(e<t[n+r-1])return o?((s=t.slice(n,n+r))[r-1]=e,s):null;if(t[i-1]<e)return o?((s=t.slice(i-r,i))[r-1]=e,s):null;if(e==t[n+r-1])return t.slice(n,n+r);for(var a=n/r,u=i/r;a<u;){var c=a+u>>1;e<t[(c+1)*r-1]?u=c:a=c+1}var h=t[a*r-1];if(e==h)return t.slice((a-1)*r,(a-1)*r+r);var f=(e-h)/(t[(a+1)*r-1]-h);s=[];for(var l=0;l<r-1;++l)s.push(mi(t[(a-1)*r+l],t[a*r+l],f));return s.push(e),s}function bj(t,n,i,r,e,o,s){if(s)return wj(t,n,i[i.length-1],r,e,o);var a;if(e<t[r-1])return o?((a=t.slice(0,r))[r-1]=e,a):null;if(t[t.length-1]<e)return o?((a=t.slice(t.length-r))[r-1]=e,a):null;for(var u=0,c=i.length;u<c;++u){var h=i[u];if(n!=h){if(e<t[n+r-1])return null;if(e<=t[h-1])return wj(t,n,h,r,e,!1);n=h}}return null}var gj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xj=function(t){function n(n,i){var r=t.call(this)||this;return r.Kf=null,r.Yf=-1,r.wt=-1,r.bt=-1,void 0===i||Array.isArray(n[0])?r.setCoordinates(n,i):r.setFlatCoordinates(i,n),r}return gj(n,t),n.prototype.appendCoordinate=function(t){this.flatCoordinates?b(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){return r<kn(this.getExtent(),t,n)?r:(this.bt!=this.getRevision()&&(this.wt=Math.sqrt(ne(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.bt=this.getRevision()),ee(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.wt,!1,t,n,i,r))},n.prototype.forEachSegment=function(t){return Ie(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.getCoordinateAtM=function(t,n){if(this.layout!=Ct&&this.layout!=Rt)return null;var i=void 0!==n&&n;return wj(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},n.prototype.getCoordinates=function(){return we(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getCoordinateAt=function(t,n){return mj(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,this.stride)},n.prototype.getLength=function(){return Gx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getFlatMidpoint=function(){return this.Yf!=this.getRevision()&&(this.Kf=this.getCoordinateAt(.5,this.Kf),this.Yf=this.getRevision()),this.Kf},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=fe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new n(i,Et)},n.prototype.getType=function(){return Pt.LINE_STRING},n.prototype.intersectsExtent=function(t){return Ne(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ue(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Qr),jj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Sj=function(t){function n(n,i,r){var e=t.call(this)||this;if(e.gt=[],e.wt=-1,e.bt=-1,Array.isArray(n[0]))e.setCoordinates(n,i);else if(void 0!==i&&r)e.setFlatCoordinates(i,n),e.gt=r;else{for(var o=e.getLayout(),s=n,a=[],u=[],c=0,h=s.length;c<h;++c){var f=s[c];0===c&&(o=f.getLayout()),b(a,f.getFlatCoordinates()),u.push(a.length)}e.setFlatCoordinates(o,a),e.gt=u}return e}return jj(n,t),n.prototype.appendLineString=function(t){this.flatCoordinates?b(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.gt.push(this.flatCoordinates.length),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout,this.gt.slice());return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){return r<kn(this.getExtent(),t,n)?r:(this.bt!=this.getRevision()&&(this.wt=Math.sqrt(ie(this.flatCoordinates,0,this.gt,this.stride,0)),this.bt=this.getRevision()),oe(this.flatCoordinates,0,this.gt,this.stride,this.wt,!1,t,n,i,r))},n.prototype.getCoordinateAtM=function(t,n,i){if(this.layout!=Ct&&this.layout!=Rt||0===this.flatCoordinates.length)return null;var r=void 0!==n&&n,e=void 0!==i&&i;return bj(this.flatCoordinates,0,this.gt,this.stride,t,r,e)},n.prototype.getCoordinates=function(){return be(this.flatCoordinates,0,this.gt,this.stride)},n.prototype.getEnds=function(){return this.gt},n.prototype.getLineString=function(t){return t<0||this.gt.length<=t?null:new xj(this.flatCoordinates.slice(0===t?0:this.gt[t-1],this.gt[t]),this.layout)},n.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,n=this.gt,i=this.layout,r=[],e=0,o=0,s=n.length;o<s;++o){var a=n[o],u=new xj(t.slice(e,a),i);r.push(u),e=a}return r},n.prototype.getFlatMidpoints=function(){for(var t=[],n=this.flatCoordinates,i=0,r=this.gt,e=this.stride,o=0,s=r.length;o<s;++o){var a=r[o];b(t,mj(n,i,a,e,.5)),i=a}return t},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=le(this.flatCoordinates,0,this.gt,this.stride,t,i,0,r),new n(i,Et,r)},n.prototype.getType=function(){return Pt.MULTI_LINE_STRING},n.prototype.intersectsExtent=function(t){return ze(this.flatCoordinates,0,this.gt,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=ce(this.flatCoordinates,0,t,this.stride,this.gt);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},n}(Qr);function kj(t,n,i,r){for(var e=[],o=[1/0,1/0,-1/0,-1/0],s=0,a=i.length;s<a;++s){var u=i[s];o=Pn(t,n,u[0],r),e.push((o[0]+o[2])/2,(o[1]+o[3])/2),n=u[u.length-1]}return e}var Mj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_j=function(t){function n(n,i,r){var e=t.call(this)||this;if(e.Zf=[],e.$f=-1,e.Qf=null,e.wt=-1,e.bt=-1,e.St=-1,e.kt=null,!r&&!Array.isArray(n[0])){for(var o=e.getLayout(),s=n,a=[],u=[],c=0,h=s.length;c<h;++c){var f=s[c];0===c&&(o=f.getLayout());for(var l=a.length,v=f.getEnds(),d=0,p=v.length;d<p;++d)v[d]+=l;b(a,f.getFlatCoordinates()),u.push(v)}i=o,n=a,r=u}return void 0!==i&&r?(e.setFlatCoordinates(i,n),e.Zf=r):e.setCoordinates(n,i),e}return Mj(n,t),n.prototype.appendPolygon=function(t){var n;if(this.flatCoordinates){var i=this.flatCoordinates.length;b(this.flatCoordinates,t.getFlatCoordinates());for(var r=0,e=(n=t.getEnds().slice()).length;r<e;++r)n[r]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),n=t.getEnds().slice(),this.Zf.push();this.Zf.push(n),this.changed()},n.prototype.clone=function(){for(var t=this.Zf.length,i=new Array(t),r=0;r<t;++r)i[r]=this.Zf[r].slice();var e=new n(this.flatCoordinates.slice(),this.layout,i);return e.applyProperties(this),e},n.prototype.closestPointXY=function(t,n,i,r){return r<kn(this.getExtent(),t,n)?r:(this.bt!=this.getRevision()&&(this.wt=Math.sqrt(re(this.flatCoordinates,0,this.Zf,this.stride,0)),this.bt=this.getRevision()),se(this.getOrientedFlatCoordinates(),0,this.Zf,this.stride,this.wt,!0,t,n,i,r))},n.prototype.containsXY=function(t,n){return Ce(this.getOrientedFlatCoordinates(),0,this.Zf,this.stride,t,n)},n.prototype.getArea=function(){return Se(this.getOrientedFlatCoordinates(),0,this.Zf,this.stride)},n.prototype.getCoordinates=function(t){var n;return void 0!==t?Ve(n=this.getOrientedFlatCoordinates().slice(),0,this.Zf,this.stride,t):n=this.flatCoordinates,ge(n,0,this.Zf,this.stride)},n.prototype.getEndss=function(){return this.Zf},n.prototype.getFlatInteriorPoints=function(){if(this.$f!=this.getRevision()){var t=kj(this.flatCoordinates,0,this.Zf,this.stride);this.Qf=Pe(this.getOrientedFlatCoordinates(),0,this.Zf,this.stride,t),this.$f=this.getRevision()}return this.Qf},n.prototype.getInteriorPoints=function(){return new yj(this.getFlatInteriorPoints().slice(),Ct)},n.prototype.getOrientedFlatCoordinates=function(){if(this.St!=this.getRevision()){var t=this.flatCoordinates;Be(t,0,this.Zf,this.stride)?this.kt=t:(this.kt=t.slice(),this.kt.length=Ve(this.kt,0,this.Zf,this.stride)),this.St=this.getRevision()}return this.kt},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=me(this.flatCoordinates,0,this.Zf,this.stride,Math.sqrt(t),i,0,r),new n(i,Et,r)},n.prototype.getPolygon=function(t){if(t<0||this.Zf.length<=t)return null;var n;if(0===t)n=0;else{var i=this.Zf[t-1];n=i[i.length-1]}var r=this.Zf[t].slice(),e=r[r.length-1];if(0!==n)for(var o=0,s=r.length;o<s;++o)r[o]-=n;return new Ke(this.flatCoordinates.slice(n,e),this.layout,r)},n.prototype.getPolygons=function(){for(var t=this.layout,n=this.flatCoordinates,i=this.Zf,r=[],e=0,o=0,s=i.length;o<s;++o){var a=i[o].slice(),u=a[a.length-1];if(0!==e)for(var c=0,h=a.length;c<h;++c)a[c]-=e;var f=new Ke(n.slice(e,u),t,a);r.push(f),e=u}return r},n.prototype.getType=function(){return Pt.MULTI_POLYGON},n.prototype.intersectsExtent=function(t){return Ge(this.getOrientedFlatCoordinates(),0,this.Zf,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=he(this.flatCoordinates,0,t,this.stride,this.Zf);if(0===i.length)this.flatCoordinates.length=0;else{var r=i[i.length-1];this.flatCoordinates.length=0===r.length?0:r[r.length-1]}this.changed()},n}(Qr),Oj=[1,0,0,1,0,0],Tj=function(){function t(t,n,i,r,e){this.styleFunction,this.st,this.V=e,this.tl=t,this.nl=n,this.Qf=null,this.il=null,this.gt=i,this.rl=r}return t.prototype.get=function(t){return this.rl[t]},t.prototype.getExtent=function(){return this.st||(this.st=this.tl===Pt.POINT?Rn(this.nl):Pn(this.nl,0,this.nl.length,2)),this.st},t.prototype.getFlatInteriorPoint=function(){if(!this.Qf){var t=Xn(this.getExtent());this.Qf=Re(this.nl,0,this.gt,2,t,0)}return this.Qf},t.prototype.getFlatInteriorPoints=function(){if(!this.Qf){var t=kj(this.nl,0,this.gt,2);this.Qf=Pe(this.nl,0,this.gt,2,t)}return this.Qf},t.prototype.getFlatMidpoint=function(){return this.il||(this.il=mj(this.nl,0,this.nl.length,2,.5)),this.il},t.prototype.getFlatMidpoints=function(){if(!this.il){this.il=[];for(var t=this.nl,n=0,i=this.gt,r=0,e=i.length;r<e;++r){var o=i[r],s=mj(t,n,o,2,.5);b(this.il,s),n=o}}return this.il},t.prototype.getId=function(){return this.V},t.prototype.getOrientedFlatCoordinates=function(){return this.nl},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,n){return this},t.prototype.getProperties=function(){return this.rl},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){return this.styleFunction},t.prototype.getType=function(){return this.tl},t.prototype.transform=function(t){var n=(t=br(t)).getExtent(),i=t.getWorldExtent();if(n&&i){var r=Kn(i)/Kn(n);an(Oj,i[0],i[3],r,-r,0,0,0),Br(this.nl,0,this.nl.length,2,Oj,this.nl)}},t.prototype.getEnds=function(){return this.gt},t}();function Ej(t){var n=t.getType();switch(n){case Pt.POINT:return new Oe(t.getFlatCoordinates());case Pt.MULTI_POINT:return new yj(t.getFlatCoordinates(),Et);case Pt.LINE_STRING:return new xj(t.getFlatCoordinates(),Et);case Pt.MULTI_LINE_STRING:return new Sj(t.getFlatCoordinates(),Et,t.getEnds());case Pt.POLYGON:var i=t.getFlatCoordinates(),r=t.getEnds(),e=Xe(i,r);return e.length>1?new _j(i,Et,e):new Ke(i,Et,r);default:throw new Error("Invalid geometry type:"+n)}}Tj.prototype.getEndss=Tj.prototype.getEnds,Tj.prototype.getFlatCoordinates=Tj.prototype.getOrientedFlatCoordinates;var Aj=Tj;var Cj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rj=function(t){function n(n){return t.call(this,n)||this}return Cj(n,t),n.prototype.createRenderer=function(){return new oj(this)},n}(px);function Pj(t,n,i){for(var r,e,o,s,a,u,c=[],h=t(0),f=t(1),l=n(h),v=n(f),d=[f,h],p=[v,l],y=[1,0],m={},w=1e5;--w>0&&y.length>0;)o=y.pop(),h=d.pop(),l=p.pop(),(u=o.toString())in m||(c.push(l[0],l[1]),m[u]=!0),s=y.pop(),f=d.pop(),v=p.pop(),fi((e=n(r=t(a=(o+s)/2)))[0],e[1],l[0],l[1],v[0],v[1])<i?(c.push(v[0],v[1]),m[u=s.toString()]=!0):(y.push(s,a,a,o),p.push(v,e,e,l),d.push(f,r,r,h));return c}function Ij(t,n,i,r,e){return Pj((function(r){return[t,n+(i-n)*r]}),Er(br("EPSG:4326"),r),e)}function Nj(t,n,i,r,e){return Pj((function(r){return[n+(i-n)*r,t]}),Er(br("EPSG:4326"),r),e)}var zj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Fj=new qv({color:"rgba(0,0,0,0.2)"}),Lj=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],Gj=function(t){function n(n){var i=this,r=n||{},e=E({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},r);return delete e.maxLines,delete e.strokeStyle,delete e.targetSize,delete e.showLabels,delete e.lonLabelFormatter,delete e.latLabelFormatter,delete e.lonLabelPosition,delete e.latLabelPosition,delete e.lonLabelStyle,delete e.latLabelStyle,delete e.intervals,(i=t.call(this,e)||this).di=null,i.el=1/0,i.sl=1/0,i.al=-1/0,i.ul=-1/0,i.cl=1/0,i.hl=1/0,i.fl=-1/0,i.ll=-1/0,i.vl=void 0!==r.targetSize?r.targetSize:100,i.dl=void 0!==r.maxLines?r.maxLines:100,i.pl=[],i.yl=[],i.ml=void 0!==r.strokeStyle?r.strokeStyle:Fj,i.wl=void 0,i.bl=void 0,i.gl=null,i.xl=null,i.jl=null,i.Sl=null,i.kl=null,i.Ml=null,i._l=null,r.showLabels&&(i.Ol=null==r.lonLabelFormatter?Zi.bind(i,"EW"):r.lonLabelFormatter,i.Tl=null==r.latLabelFormatter?Zi.bind(i,"NS"):r.latLabelFormatter,i.El=null==r.lonLabelPosition?0:r.lonLabelPosition,i.Al=null==r.latLabelPosition?1:r.latLabelPosition,i.Cl=new Yv({text:void 0!==r.lonLabelStyle?r.lonLabelStyle.clone():new Qv({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new Tv({color:"rgba(0,0,0,1)"}),stroke:new qv({color:"rgba(255,255,255,1)",width:3})})}),i.Rl=function(t){var n=t.get("graticule_label");return this.Cl.getText().setText(n),this.Cl}.bind(i),i.Pl=new Yv({text:void 0!==r.latLabelStyle?r.latLabelStyle.clone():new Qv({font:"12px Calibri,sans-serif",textAlign:"right",fill:new Tv({color:"rgba(0,0,0,1)"}),stroke:new qv({color:"rgba(255,255,255,1)",width:3})})}),i.Il=function(t){var n=t.get("graticule_label");return this.Pl.getText().setText(n),this.Pl}.bind(i),i.Ml=[],i._l=[],i.addEventListener(cs,i.Nl.bind(i))),i.zl=void 0!==r.intervals?r.intervals:Lj,i.setSource(new Id({loader:i.loaderFunction.bind(i),strategy:i.strategyFunction.bind(i),features:new ft,overlaps:!1,useSpatialIndex:!1,wrapX:r.wrapX})),i.Fl=[],i.Ll=new Yv({stroke:i.ml}),i.Gl=null,i.Nc=null,i.Pf=null,i.setRenderOrder(null),i}return zj(n,t),n.prototype.strategyFunction=function(t,n){var i=t.slice();return this.di&&this.getSource().getWrapX()&&si(i,this.di),this.Gl&&(Nn(this.Gl,i,n)?i=this.Gl.slice():this.getSource().removeLoadedExtent(this.Gl)),[i]},n.prototype.loaderFunction=function(t,n,i){this.Gl=t;var r=this.getSource(),e=Yn(this.getExtent()||[-1/0,-1/0,1/0,1/0],t);if(!(this.Nc&&In(this.Nc,e)&&this.Pf===n||(this.Nc=e,this.Pf=n,ni(e)))){var o=Xn(e),s=n*n/4;(!this.di||!Or(this.di,i))&&this.Dl(i),this.Ul(e,o,n,s);var a,u=this.pl.length+this.yl.length;for(this.Ml&&(u+=this.pl.length),this._l&&(u+=this.yl.length);u>this.Fl.length;)a=new Tt,this.Fl.push(a);var c=r.getFeaturesCollection();c.clear();var h,f,l=0;for(h=0,f=this.pl.length;h<f;++h)(a=this.Fl[l++]).setGeometry(this.pl[h]),a.setStyle(this.Ll),c.push(a);for(h=0,f=this.yl.length;h<f;++h)(a=this.Fl[l++]).setGeometry(this.yl[h]),a.setStyle(this.Ll),c.push(a)}},n.prototype.ql=function(t,n,i,r,e,o){var s=this.Bl(t,n,i,r,o);if(ti(s.getExtent(),e)){if(this.Ml){var a=this.Ol(t);o in this.Ml?this.Ml[o].text=a:this.Ml[o]={geom:new Oe([]),text:a}}this.pl[o++]=s}return o},n.prototype.Wl=function(t,n,i,r,e,o){var s=this.Vl(t,n,i,r,o);if(ti(s.getExtent(),e)){if(this._l){var a=this.Tl(t);o in this._l?this._l[o].text=a:this._l[o]={geom:new Oe([]),text:a}}this.yl[o++]=s}return o},n.prototype.Nl=function(t){var n=t.frameState.viewState.rotation,i=t.frameState.viewState.resolution,r=t.frameState.size,e=t.frameState.extent,o=Xn(e),s=e;if(n){var a=r[0]*i,u=r[1]*i;s=[o[0]-a/2,o[1]-u/2,o[0]+a/2,o[1]+u/2]}var c=0,h=0,f=this.Al<.5,l=this.di.getExtent(),v=Qn(l);this.getSource().getWrapX()&&this.di.canWrapX()&&!_n(l,e)&&(c=Math.floor((e[0]-l[0])/v),h=Math.ceil((e[2]-l[2])/v),f=f!==Math.abs(n)>Math.PI/2);for(var d=Nh(t),p=c;p<=h;++p){var y=this.pl.length+this.yl.length,m=void 0,w=void 0,b=void 0,g=void 0;if(this.Ml)for(w=0,b=this.Ml.length;w<b;++w){var x=this.pl[w];if(n||0!==p)(j=x.clone()).translate(p*v,0),j.rotate(-n,o),(g=this.Xl(j,s,w)).rotate(n,o);else g=this.Xl(x,e,w);(m=this.Fl[y++]).setGeometry(g),m.set("graticule_label",this.Ml[w].text),d.drawFeature(m,this.Rl(m))}if(this._l&&(p===c&&f||p===h&&!f))for(w=0,b=this.yl.length;w<b;++w){var j;x=this.yl[w];if(n||0!==p)(j=x.clone()).translate(p*v,0),j.rotate(-n,o),(g=this.Hl(j,s,w)).rotate(n,o);else g=this.Hl(x,e,w);(m=this.Fl[y++]).setGeometry(g),m.set("graticule_label",this._l[w].text),d.drawFeature(m,this.Il(m))}}},n.prototype.Ul=function(t,n,i,r){var e=this.Jl(i);if(-1==e)return this.pl.length=0,this.yl.length=0,this.Ml&&(this.Ml.length=0),void(this._l&&(this._l.length=0));var o=!1,s=this.di.getExtent(),a=Qn(s);this.getSource().getWrapX()&&this.di.canWrapX()&&!_n(s,t)&&(Qn(t)>=a?(t[0]=s[0],t[2]=s[2]):o=!0);var u=[ui(n[0],this.fl,this.cl),ui(n[1],this.ll,this.hl)],c=this.bl(u);isNaN(c[1])&&(c[1]=Math.abs(this.el)>=Math.abs(this.al)?this.el:this.al);var h,f,l,v,d=ui(c[0],this.ul,this.sl),p=ui(c[1],this.al,this.el),y=this.dl,m=t;o||(m=[ui(t[0],this.fl,this.cl),ui(t[1],this.ll,this.hl),ui(t[2],this.fl,this.cl),ui(t[3],this.ll,this.hl)]);var w=oi(m,this.bl,void 0,8),b=w[3],g=w[2],x=w[1],j=w[0];if(o||(Mn(m,this.xl)&&(j=this.ul,x=this.al),Mn(m,this.jl)&&(g=this.sl,x=this.al),Mn(m,this.Sl)&&(j=this.ul,b=this.el),Mn(m,this.kl)&&(g=this.sl,b=this.el),b=ui(b,p,this.el),g=ui(g,d,this.sl),x=ui(x,this.al,p),j=ui(j,this.ul,d)),v=ui(d=Math.floor(d/e)*e,this.ul,this.sl),f=this.ql(v,x,b,r,t,0),h=0,o)for(;(v-=e)>=j&&h++<y;)f=this.ql(v,x,b,r,t,f);else for(;v!=this.ul&&h++<y;)v=Math.max(v-e,this.ul),f=this.ql(v,x,b,r,t,f);if(v=ui(d,this.ul,this.sl),h=0,o)for(;(v+=e)<=g&&h++<y;)f=this.ql(v,x,b,r,t,f);else for(;v!=this.sl&&h++<y;)v=Math.min(v+e,this.sl),f=this.ql(v,x,b,r,t,f);for(this.pl.length=f,this.Ml&&(this.Ml.length=f),l=ui(p=Math.floor(p/e)*e,this.al,this.el),f=this.Wl(l,j,g,r,t,0),h=0;l!=this.al&&h++<y;)l=Math.max(l-e,this.al),f=this.Wl(l,j,g,r,t,f);for(l=ui(p,this.al,this.el),h=0;l!=this.el&&h++<y;)l=Math.min(l+e,this.el),f=this.Wl(l,j,g,r,t,f);this.yl.length=f,this._l&&(this._l.length=f)},n.prototype.Jl=function(t){for(var n=this.gl[0],i=this.gl[1],r=-1,e=Math.pow(this.vl*t,2),o=[],s=[],a=0,u=this.zl.length;a<u;++a){var c=ui(this.zl[a]/2,0,90),h=ui(i,-90+c,90-c);if(o[0]=n-c,o[1]=h-c,s[0]=n+c,s[1]=h+c,this.wl(o,o),this.wl(s,s),Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)<=e)break;r=this.zl[a]}return r},n.prototype.Bl=function(t,n,i,r,e){var o=Ij(t,n,i,this.di,r),s=this.pl[e];return s?(s.setFlatCoordinates(Et,o),s.changed()):(s=new xj(o,Et),this.pl[e]=s),s},n.prototype.Xl=function(t,n,i){var r=t.getFlatCoordinates(),e=1,o=r.length-1;r[e]>r[o]&&(e=o,o=1);var s=Math.max(n[1],r[e]),a=Math.min(n[3],r[o]),u=ui(n[1]+Math.abs(n[1]-n[3])*this.El,s,a),c=[r[e-1]+(r[o-1]-r[e-1])*(u-r[e])/(r[o]-r[e]),u],h=this.Ml[i].geom;return h.setCoordinates(c),h},n.prototype.getMeridians=function(){return this.pl},n.prototype.Vl=function(t,n,i,r,e){var o=Nj(t,n,i,this.di,r),s=this.yl[e];return s?(s.setFlatCoordinates(Et,o),s.changed()):s=new xj(o,Et),s},n.prototype.Hl=function(t,n,i){var r=t.getFlatCoordinates(),e=0,o=r.length-2;r[e]>r[o]&&(e=o,o=0);var s=Math.max(n[0],r[e]),a=Math.min(n[2],r[o]),u=ui(n[0]+Math.abs(n[0]-n[2])*this.Al,s,a),c=[u,r[e+1]+(r[o+1]-r[e+1])*(u-r[e])/(r[o]-r[e])],h=this._l[i].geom;return h.setCoordinates(c),h},n.prototype.getParallels=function(){return this.yl},n.prototype.Dl=function(t){var n=br("EPSG:4326"),i=t.getWorldExtent();this.el=i[3],this.sl=i[2],this.al=i[1],this.ul=i[0];var r=Er(t,n);if(this.ul<this.sl)this.bl=r;else{var e=this.ul+this.sl/2;this.sl+=360,this.bl=function(t,n,i){for(var o=i||2,s=r(t,n,o),a=0,u=s.length;a<u;a+=o)s[a]<e&&(s[a]+=360);return s}}this.wl=Er(n,t);var o=oi([this.ul,this.al,this.sl,this.el],this.wl,void 0,8);this.fl=o[0],this.cl=o[2],this.ll=o[1],this.hl=o[3],this.xl=this.wl([this.ul,this.al]),this.jl=this.wl([this.sl,this.al]),this.Sl=this.wl([this.ul,this.el]),this.kl=this.wl([this.sl,this.el]),this.gl=this.bl(Xn(t.getExtent())),isNaN(this.gl[1])&&(this.gl[1]=Math.abs(this.el)>=Math.abs(this.al)?this.el:this.al),this.di=t},n}(Rj),Dj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Uj="blur",qj="gradient",Bj="radius",Wj=["#00f","#0ff","#0f0","#ff0","#f00"];var Vj=function(t){function n(n){var i=this,r=n||{},e=E({},r);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,(i=t.call(this,e)||this).Kl=null,i.addChangeListener(qj,i.Yl),i.setGradient(r.gradient?r.gradient:Wj),i.setBlur(void 0!==r.blur?r.blur:15),i.setRadius(void 0!==r.radius?r.radius:8);var o=r.weight?r.weight:"weight";return i.Zl="string"==typeof o?function(t){return t.get(o)}:o,i.setRenderOrder(null),i}return Dj(n,t),n.prototype.getBlur=function(){return this.get(Uj)},n.prototype.getGradient=function(){return this.get(qj)},n.prototype.getRadius=function(){return this.get(Bj)},n.prototype.Yl=function(){this.Kl=function(t){for(var n=1,i=256,r=_o(n,i),e=r.createLinearGradient(0,0,n,i),o=1/(t.length-1),s=0,a=t.length;s<a;++s)e.addColorStop(s*o,t[s]);return r.fillStyle=e,r.fillRect(0,0,n,i),r.canvas}(this.getGradient())},n.prototype.setBlur=function(t){this.set(Uj,t)},n.prototype.setGradient=function(t){this.set(qj,t)},n.prototype.setRadius=function(t){this.set(Bj,t)},n.prototype.createRenderer=function(){return new mx(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.Zl(t);return void 0!==n?ui(n,0,1):1}.bind(this)}],vertexShader:"\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_weight = a_weight;\n }",fragmentShader:"\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n }",hitVertexShader:"\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n attribute vec4 a_hitColor;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_hitColor = a_hitColor;\n v_weight = a_weight;\n }",hitFragmentShader:"\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n if (alpha < 0.05) {\n discard;\n }\n\n gl_FragColor = v_hitColor;\n }",uniforms:{u_size:function(){return 2*(this.get(Bj)+this.get(Uj))}.bind(this),u_blurSlope:function(){return this.get(Bj)/Math.max(1,this.get(Uj))}.bind(this)},postProcesses:[{fragmentShader:"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",uniforms:{u_gradientTexture:function(){return this.Kl}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},n.prototype.renderDeclutter=function(){},n}(px),Xj=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return t.prototype.getReadOptions=function(t,n){var i;if(n){var r=n.dataProjection?br(n.dataProjection):this.readProjection(t);n.extent&&r&&r.getUnits()===Gt.TILE_PIXELS&&(r=br(r)).setWorldExtent(n.extent),i={dataProjection:r,featureProjection:n.featureProjection}}return this.adaptOptions(i)},t.prototype.adaptOptions=function(t){return E({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return r()},t.prototype.readFeature=function(t,n){return r()},t.prototype.readFeatures=function(t,n){return r()},t.prototype.readGeometry=function(t,n){return r()},t.prototype.readProjection=function(t){return r()},t.prototype.writeFeature=function(t,n){return r()},t.prototype.writeFeatures=function(t,n){return r()},t.prototype.writeGeometry=function(t,n){return r()},t}();function Hj(t,n,i){var r,e=i?br(i.featureProjection):null,o=i?br(i.dataProjection):null;if(r=e&&o&&!Or(e,o)?(n?t.clone():t).transform(n?e:o,n?o:e):t,n&&i&&void 0!==i.decimals){var s=Math.pow(10,i.decimals);r===t&&(r=t.clone()),r.applyTransform((function(t){for(var n=0,i=t.length;n<i;++n)t[n]=Math.round(t[n]*s)/s;return t}))}return r}function Jj(t,n){var i=n?br(n.featureProjection):null,r=n?br(n.dataProjection):null;return i&&r&&!Or(i,r)?Cr(t,r,i):t}var Kj=i(98),Yj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Zj(t,n,i){if(3===t){var r={keys:[],values:[],features:[]},e=i.readVarint()+i.pos;i.readFields($j,r,e),r.length=r.features.length,r.length&&(n[r.name]=r)}}function $j(t,n,i){if(15===t)n.version=i.readVarint();else if(1===t)n.name=i.readString();else if(5===t)n.extent=i.readVarint();else if(2===t)n.features.push(i.pos);else if(3===t)n.keys.push(i.readString());else if(4===t){for(var r=null,e=i.readVarint()+i.pos;i.pos<e;)r=1===(t=i.readVarint()>>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;n.values.push(r)}}function Qj(t,n,i){if(1==t)n.id=i.readVarint();else if(2==t)for(var r=i.readVarint()+i.pos;i.pos<r;){var e=n.layer.keys[i.readVarint()],o=n.layer.values[i.readVarint()];n.properties[e]=o}else 3==t?n.type=i.readVarint():4==t&&(n.geometry=i.pos)}function tS(t,n,i){t.pos=n.features[i];var r=t.readVarint()+t.pos,e={layer:n,type:0,properties:{}};return t.readFields(Qj,e,r),e}var nS=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=new ai({code:"",units:Gt.TILE_PIXELS}),i.$l=r.featureClass?r.featureClass:Aj,i.H=r.geometryName,i.Ql=r.layerName?r.layerName:"layer",i.Uc=r.layers?r.layers:null,i.tv=r.idProperty,i.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],i}return Yj(n,t),n.prototype.nv=function(t,n,i,r){t.pos=n.geometry;for(var e=t.readVarint()+t.pos,o=1,s=0,a=0,u=0,c=0,h=0;t.pos<e;){if(!s){var f=t.readVarint();o=7&f,s=f>>3}s--,1===o||2===o?(a+=t.readSVarint(),u+=t.readSVarint(),1===o&&c>h&&(r.push(c),h=c),i.push(a,u),c+=2):7===o?c>h&&(i.push(i[h],i[h+1]),c+=2):Mt(!1,59)}c>h&&(r.push(c),h=c)},n.prototype.iv=function(t,n,i){var r,e=n.type;if(0===e)return null;var o,s=n.properties;this.tv?(o=s[this.tv],delete s[this.tv]):o=n.id,s[this.Ql]=n.layer.name;var a=[],u=[];this.nv(t,n,a,u);var c=function(t,n){var i;1===t?i=1===n?Pt.POINT:Pt.MULTI_POINT:2===t?i=1===n?Pt.LINE_STRING:Pt.MULTI_LINE_STRING:3===t&&(i=Pt.POLYGON);return i}(e,u.length);if(this.$l===Aj)(r=new this.$l(c,a,u,s,o)).transform(i.dataProjection);else{var h=void 0;if(c==Pt.POLYGON){var f=Xe(a,u);h=f.length>1?new _j(a,Et,f):new Ke(a,Et,u)}else h=c===Pt.POINT?new Oe(a,Et):c===Pt.LINE_STRING?new xj(a,Et):c===Pt.POLYGON?new Ke(a,Et,u):c===Pt.MULTI_POINT?new yj(a,Et):c===Pt.MULTI_LINE_STRING?new Sj(a,Et,u):null;r=new(0,this.$l),this.H&&r.setGeometryName(this.H);var l=Hj(h,!1,i);r.setGeometry(l),void 0!==o&&r.setId(o),r.setProperties(s,!0)}return r},n.prototype.getType=function(){return oh},n.prototype.readFeatures=function(t,n){var i=this.Uc,r=this.adaptOptions(n),e=br(r.dataProjection);e.setWorldExtent(r.extent),r.dataProjection=e;var o=new Kj(t),s=o.readFields(Zj,{}),a=[];for(var u in s)if(!i||-1!=i.indexOf(u)){var c=s[u],h=c?[0,0,c.extent,c.extent]:null;e.setExtent(h);for(var f=0,l=c.length;f<l;++f){var v=tS(o,c,f),d=this.iv(o,v,r);null!==d&&a.push(d)}}return a},n.prototype.readProjection=function(t){return this.dataProjection},n.prototype.setLayers=function(t){this.Uc=t},n}(Xj),iS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rS=function(t){function n(n){var i=this,r=n||{},e=E({},r);delete e.preload,delete e.useInterimTilesOnError,(i=t.call(this,e)||this).on,i.once,i.un,r.renderMode===uj&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),r.renderMode=void 0);var o=r.renderMode||cj;return Mt(o==cj||o==hj,28),i.rv=o,i.setPreload(r.preload?r.preload:0),i.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),i.getBackground,i.setBackground,i}return iS(n,t),n.prototype.createRenderer=function(){return new dj(this)},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderMode=function(){return this.rv},n.prototype.getPreload=function(){return this.get(Sg)},n.prototype.getUseInterimTilesOnError=function(){return this.get(kg)},n.prototype.setPreload=function(t){this.set(Sg,t)},n.prototype.setUseInterimTilesOnError=function(t){this.set(kg,t)},n}(px),eS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function oS(t){for(var n=[],i=0,r=t.length;i<r;++i)n.push(t[i].clone());return n}var sS=function(t){function n(n){var i=t.call(this)||this;return i.ev=n||null,i.ov=[],i.sv(),i}return eS(n,t),n.prototype.av=function(){this.ov.forEach($),this.ov.length=0},n.prototype.sv=function(){if(this.ev)for(var t=0,n=this.ev.length;t<n;++t)this.ov.push(Y(this.ev[t],N,this.changed,this))},n.prototype.clone=function(){var t=new n(null);return t.setGeometries(this.ev),t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){if(r<kn(this.getExtent(),t,n))return r;for(var e=this.ev,o=0,s=e.length;o<s;++o)r=e[o].closestPointXY(t,n,i,r);return r},n.prototype.containsXY=function(t,n){for(var i=this.ev,r=0,e=i.length;r<e;++r)if(i[r].containsXY(t,n))return!0;return!1},n.prototype.computeExtent=function(t){Cn(t);for(var n=this.ev,i=0,r=n.length;i<r;++i)zn(t,n[i].getExtent());return t},n.prototype.getGeometries=function(){return oS(this.ev)},n.prototype.getGeometriesArray=function(){return this.ev},n.prototype.getGeometriesArrayRecursive=function(){for(var t=[],n=this.ev,i=0,r=n.length;i<r;++i)n[i].getType()===this.getType()?t=t.concat(n[i].getGeometriesArrayRecursive()):t.push(n[i]);return t},n.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var i=[],r=this.ev,e=!1,o=0,s=r.length;o<s;++o){var a=r[o],u=a.getSimplifiedGeometry(t);i.push(u),u!==a&&(e=!0)}if(e){var c=new n(null);return c.setGeometriesArray(i),c}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},n.prototype.getType=function(){return Pt.GEOMETRY_COLLECTION},n.prototype.intersectsExtent=function(t){for(var n=this.ev,i=0,r=n.length;i<r;++i)if(n[i].intersectsExtent(t))return!0;return!1},n.prototype.isEmpty=function(){return 0===this.ev.length},n.prototype.rotate=function(t,n){for(var i=this.ev,r=0,e=i.length;r<e;++r)i[r].rotate(t,n);this.changed()},n.prototype.scale=function(t,n,i){var r=i;r||(r=Xn(this.getExtent()));for(var e=this.ev,o=0,s=e.length;o<s;++o)e[o].scale(t,n,r);this.changed()},n.prototype.setGeometries=function(t){this.setGeometriesArray(oS(t))},n.prototype.setGeometriesArray=function(t){this.av(),this.ev=t,this.sv(),this.changed()},n.prototype.applyTransform=function(t){for(var n=this.ev,i=0,r=n.length;i<r;++i)n[i].applyTransform(t);this.changed()},n.prototype.translate=function(t,n){for(var i=this.ev,r=0,e=i.length;r<e;++r)i[r].translate(t,n);this.changed()},n.prototype.disposeInternal=function(){this.av(),t.prototype.disposeInternal.call(this)},n}(Kr),aS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function uS(t){if("string"==typeof t){var n=JSON.parse(t);return n||null}return null!==t?t:null}var cS=function(t){function n(){return t.call(this)||this}return aS(n,t),n.prototype.getType=function(){return sh},n.prototype.readFeature=function(t,n){return this.readFeatureFromObject(uS(t),this.getReadOptions(t,n))},n.prototype.readFeatures=function(t,n){return this.readFeaturesFromObject(uS(t),this.getReadOptions(t,n))},n.prototype.readFeatureFromObject=function(t,n){return r()},n.prototype.readFeaturesFromObject=function(t,n){return r()},n.prototype.readGeometry=function(t,n){return this.readGeometryFromObject(uS(t),this.getReadOptions(t,n))},n.prototype.readGeometryFromObject=function(t,n){return r()},n.prototype.readProjection=function(t){return this.readProjectionFromObject(uS(t))},n.prototype.readProjectionFromObject=function(t){return r()},n.prototype.writeFeature=function(t,n){return JSON.stringify(this.writeFeatureObject(t,n))},n.prototype.writeFeatureObject=function(t,n){return r()},n.prototype.writeFeatures=function(t,n){return JSON.stringify(this.writeFeaturesObject(t,n))},n.prototype.writeFeaturesObject=function(t,n){return r()},n.prototype.writeGeometry=function(t,n){return JSON.stringify(this.writeGeometryObject(t,n))},n.prototype.writeGeometryObject=function(t,n){return r()},n}(Xj),hS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function fS(t,n){if(!t)return null;var i;switch(t.type){case Pt.POINT:i=function(t){return new Oe(t.coordinates)}(t);break;case Pt.LINE_STRING:i=function(t){return new xj(t.coordinates)}(t);break;case Pt.POLYGON:i=function(t){return new Ke(t.coordinates)}(t);break;case Pt.MULTI_POINT:i=function(t){return new yj(t.coordinates)}(t);break;case Pt.MULTI_LINE_STRING:i=function(t){return new Sj(t.coordinates)}(t);break;case Pt.MULTI_POLYGON:i=function(t){return new _j(t.coordinates)}(t);break;case Pt.GEOMETRY_COLLECTION:i=function(t,n){var i=t.geometries.map((function(t){return fS(t,n)}));return new sS(i)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return Hj(i,!1,n)}function lS(t,n){var i,r=(t=Hj(t,!0,n)).getType();switch(r){case Pt.POINT:i=function(t,n){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case Pt.LINE_STRING:i=function(t,n){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case Pt.POLYGON:i=function(t,n){var i;n&&(i=n.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,n);break;case Pt.MULTI_POINT:i=function(t,n){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case Pt.MULTI_LINE_STRING:i=function(t,n){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case Pt.MULTI_POLYGON:i=function(t,n){var i;n&&(i=n.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,n);break;case Pt.GEOMETRY_COLLECTION:i=function(t,n){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var i=E({},n);return delete i.featureProjection,lS(t,i)}))}}(t,n);break;case Pt.CIRCLE:i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+r)}return i}var vS=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this)||this).dataProjection=br(r.dataProjection?r.dataProjection:"EPSG:4326"),r.featureProjection&&(i.defaultFeatureProjection=br(r.featureProjection)),i.H=r.geometryName,i.uv=r.extractGeometryName,i.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],i}return hS(n,t),n.prototype.readFeatureFromObject=function(t,n){var i=null,r=fS((i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,n),e=new Tt;return this.H?e.setGeometryName(this.H):this.uv&&"geometry_name"in i!==void 0&&e.setGeometryName(i.geometry_name),e.setGeometry(r),"id"in i&&e.setId(i.id),i.properties&&e.setProperties(i.properties,!0),e},n.prototype.readFeaturesFromObject=function(t,n){var i=null;if("FeatureCollection"===t.type){i=[];for(var r=t.features,e=0,o=r.length;e<o;++e)i.push(this.readFeatureFromObject(r[e],n))}else i=[this.readFeatureFromObject(t,n)];return i},n.prototype.readGeometryFromObject=function(t,n){return fS(t,n)},n.prototype.readProjectionFromObject=function(t){var n,i=t.crs;return i?"name"==i.type?n=br(i.properties.name):"EPSG"===i.type?n=br("EPSG:"+i.properties.code):Mt(!1,36):n=this.dataProjection,n},n.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var i={type:"Feature",geometry:null,properties:null},r=t.getId();if(void 0!==r&&(i.id=r),!t.hasProperties())return i;var e=t.getProperties(),o=t.getGeometry();return o&&(i.geometry=lS(o,n),delete e[t.getGeometryName()]),R(e)||(i.properties=e),i},n.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var i=[],r=0,e=t.length;r<e;++r)i.push(this.writeFeatureObject(t[r],n));return{type:"FeatureCollection",features:i}},n.prototype.writeGeometryObject=function(t,n){return lS(t,this.adaptOptions(n))},n}(cS),dS=i(63);function pS(t){return function(t){if(Array.isArray(t))return CS(t)}(t)||yS(t)||AS(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yS(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function mS(t,n){return bS(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||AS(t,n)||wS()}function wS(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bS(t){if(Array.isArray(t))return t}function gS(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xS(t,n,i){return n&&gS(t.prototype,n),i&&gS(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function jS(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function SS(t,n){if(n&&("object"===RS(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kS(t){var n="function"==typeof Map?new Map:void 0;return(kS=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return MS(t,arguments,TS(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),OS(r,t)})(t)}function MS(t,n,i){return(MS=_S()?Reflect.construct:function(t,n,i){var r=[null];r.push.apply(r,n);var e=new(Function.bind.apply(t,r));return i&&OS(e,i.prototype),e}).apply(null,arguments)}function _S(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function OS(t,n){return(OS=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function TS(t){return(TS=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ES(t,n){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=AS(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function AS(t,n){if(t){if("string"==typeof t)return CS(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?CS(t,n):void 0}}function CS(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i<n;i++)r[i]=t[i];return r}function RS(t){return(RS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var PS={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesnt support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ... fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},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"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},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,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.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,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0"}},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,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0"}},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,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0"}},"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,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0"}},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,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var IS="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function NS(t){var n={exports:{}};return t(n,n.exports),n.exports}var zS=NS((function(t,n){!function(i){var r=n&&!n.nodeType&&n,e=t&&!t.nodeType&&t,o="object"==RS(IS)&&IS;o.global!==o&&o.window!==o&&o.self!==o||(i=o);var s,a,u=2147483647,c=36,h=/^xn--/,f=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw RangeError(v[t])}function m(t,n){for(var i=t.length,r=[];i--;)r[i]=n(t[i]);return r}function w(t,n){var i=t.split("@"),r="";return i.length>1&&(r=i[0]+"@",t=i[1]),r+m((t=t.replace(l,".")).split("."),n).join(".")}function b(t){for(var n,i,r=[],e=0,o=t.length;e<o;)(n=t.charCodeAt(e++))>=55296&&n<=56319&&e<o?56320==(64512&(i=t.charCodeAt(e++)))?r.push(((1023&n)<<10)+(1023&i)+65536):(r.push(n),e--):r.push(n);return r}function g(t){return m(t,(function(t){var n="";return t>65535&&(n+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),n+=p(t)})).join("")}function x(t,n){return t+22+75*(t<26)-((0!=n)<<5)}function j(t,n,i){var r=0;for(t=i?d(t/700):t>>1,t+=d(t/n);t>455;r+=c)t=d(t/35);return d(r+36*t/(t+38))}function S(t){var n,i,r,e,o,s,a,h,f,l,v,p=[],m=t.length,w=0,b=128,x=72;for((i=t.lastIndexOf("-"))<0&&(i=0),r=0;r<i;++r)t.charCodeAt(r)>=128&&y("not-basic"),p.push(t.charCodeAt(r));for(e=i>0?i+1:0;e<m;){for(o=w,s=1,a=c;e>=m&&y("invalid-input"),((h=(v=t.charCodeAt(e++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:c)>=c||h>d((u-w)/s))&&y("overflow"),w+=h*s,!(h<(f=a<=x?1:a>=x+26?26:a-x));a+=c)s>d(u/(l=c-f))&&y("overflow"),s*=l;x=j(w-o,n=p.length+1,0==o),d(w/n)>u-b&&y("overflow"),b+=d(w/n),w%=n,p.splice(w++,0,b)}return g(p)}function k(t){var n,i,r,e,o,s,a,h,f,l,v,m,w,g,S,k=[];for(m=(t=b(t)).length,n=128,i=0,o=72,s=0;s<m;++s)(v=t[s])<128&&k.push(p(v));for(r=e=k.length,e&&k.push("-");r<m;){for(a=u,s=0;s<m;++s)(v=t[s])>=n&&v<a&&(a=v);for(a-n>d((u-i)/(w=r+1))&&y("overflow"),i+=(a-n)*w,n=a,s=0;s<m;++s)if((v=t[s])<n&&++i>u&&y("overflow"),v==n){for(h=i,f=c;!(h<(l=f<=o?1:f>=o+26?26:f-o));f+=c)S=h-l,g=c-l,k.push(p(x(l+S%g,0))),h=d(S/g);k.push(p(x(h,0))),o=j(i,w,r==e),i=0,++r}++i,++n}return k.join("")}if(s={version:"1.3.2",ucs2:{decode:b,encode:g},decode:S,encode:k,toASCII:function(t){return w(t,(function(t){return f.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return w(t,(function(t){return h.test(t)?S(t.slice(4).toLowerCase()):t}))}},r&&e)if(t.exports==r)e.exports=s;else for(a in s)s.hasOwnProperty(a)&&(r[a]=s[a]);else i.punycode=s}(IS)})),FS=function(t){return"string"==typeof t},LS=function(t){return"object"===RS(t)&&null!==t},GS=function(t){return null===t},DS=function(t){return null==t};function US(t,n){return Object.prototype.hasOwnProperty.call(t,n)}var qS=function(t,n,i,r){n=n||"&",i=i||"=";var e={};if("string"!=typeof t||0===t.length)return e;var o=/\+/g;t=t.split(n);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var u=0;u<a;++u){var c,h,f,l,v=t[u].replace(o,"%20"),d=v.indexOf(i);d>=0?(c=v.substr(0,d),h=v.substr(d+1)):(c=v,h=""),f=decodeURIComponent(c),l=decodeURIComponent(h),US(e,f)?Array.isArray(e[f])?e[f].push(l):e[f]=[e[f],l]:e[f]=l}return e},BS=function(t){switch(RS(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},WS=function(t,n,i,r){return n=n||"&",i=i||"=",null===t&&(t=void 0),"object"===RS(t)?Object.keys(t).map((function(r){var e=encodeURIComponent(BS(r))+i;return Array.isArray(t[r])?t[r].map((function(t){return e+encodeURIComponent(BS(t))})).join(n):e+encodeURIComponent(BS(t[r]))})).join(n):r?encodeURIComponent(BS(r))+i+encodeURIComponent(BS(t)):""},VS=NS((function(t,n){n.decode=n.parse=qS,n.encode=n.stringify=WS}));function XS(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var HS=/^([a-z0-9.+-]+:)/i,JS=/:[0-9]*$/,KS=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,YS=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),ZS=["'"].concat(YS),$S=["%","/","?",";","#"].concat(ZS),QS=["/","?","#"],tk=/^[+a-z0-9A-Z_-]{0,63}$/,nk=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ik={javascript:!0,"javascript:":!0},rk={javascript:!0,"javascript:":!0},ek={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ok(t,n,i){if(t&&LS(t)&&t instanceof XS)return t;var r=new XS;return r.parse(t,n,i),r}XS.prototype.parse=function(t,n,i){if(!FS(t))throw new TypeError("Parameter 'url' must be a string, not "+RS(t));var r=t.indexOf("?"),e=-1!==r&&r<t.indexOf("#")?"?":"#",o=t.split(e);o[0]=o[0].replace(/\\/g,"/");var s=t=o.join(e);if(s=s.trim(),!i&&1===t.split("#").length){var a=KS.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=n?VS.parse(this.search.substr(1)):this.search.substr(1)):n&&(this.search="",this.query={}),this}var u=HS.exec(s);if(u){var c=(u=u[0]).toLowerCase();this.protocol=c,s=s.substr(u.length)}if(i||u||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var h="//"===s.substr(0,2);!h||u&&rk[u]||(s=s.substr(2),this.slashes=!0)}if(!rk[u]&&(h||u&&!ek[u])){for(var f,l,v=-1,d=0;d<QS.length;d++){-1!==(p=s.indexOf(QS[d]))&&(-1===v||p<v)&&(v=p)}-1!==(l=-1===v?s.lastIndexOf("@"):s.lastIndexOf("@",v))&&(f=s.slice(0,l),s=s.slice(l+1),this.auth=decodeURIComponent(f)),v=-1;for(d=0;d<$S.length;d++){var p;-1!==(p=s.indexOf($S[d]))&&(-1===v||p<v)&&(v=p)}-1===v&&(v=s.length),this.host=s.slice(0,v),s=s.slice(v),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var m=this.hostname.split(/\./),w=(d=0,m.length);d<w;d++){var b=m[d];if(b&&!b.match(tk)){for(var g="",x=0,j=b.length;x<j;x++)b.charCodeAt(x)>127?g+="x":g+=b[x];if(!g.match(tk)){var S=m.slice(0,d),k=m.slice(d+1),M=b.match(nk);M&&(S.push(M[1]),k.unshift(M[2])),k.length&&(s="/"+k.join(".")+s),this.hostname=S.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=zS.toASCII(this.hostname));var _=this.port?":"+this.port:"",O=this.hostname||"";this.host=O+_,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!ik[c])for(d=0,w=ZS.length;d<w;d++){var T=ZS[d];if(-1!==s.indexOf(T)){var E=encodeURIComponent(T);E===T&&(E=escape(T)),s=s.split(T).join(E)}}var A=s.indexOf("#");-1!==A&&(this.hash=s.substr(A),s=s.slice(0,A));var C=s.indexOf("?");if(-1!==C?(this.search=s.substr(C),this.query=s.substr(C+1),n&&(this.query=VS.parse(this.query)),s=s.slice(0,C)):n&&(this.search="",this.query={}),s&&(this.pathname=s),ek[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){_=this.pathname||"";var R=this.search||"";this.path=_+R}return this.href=this.format(),this},XS.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var n=this.protocol||"",i=this.pathname||"",r=this.hash||"",e=!1,o="";this.host?e=t+this.host:this.hostname&&(e=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&LS(this.query)&&Object.keys(this.query).length&&(o=VS.stringify(this.query));var s=this.search||o&&"?"+o||"";return n&&":"!==n.substr(-1)&&(n+=":"),this.slashes||(!n||ek[n])&&!1!==e?(e="//"+(e||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):e||(e=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n+e+(i=i.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+r},XS.prototype.resolve=function(t){return this.resolveObject(ok(t,!1,!0)).format()},XS.prototype.resolveObject=function(t){if(FS(t)){var n=new XS;n.parse(t,!1,!0),t=n}for(var i=new XS,r=Object.keys(this),e=0;e<r.length;e++){var o=r[e];i[o]=this[o]}if(i.hash=t.hash,""===t.href)return i.href=i.format(),i;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),a=0;a<s.length;a++){var u=s[a];"protocol"!==u&&(i[u]=t[u])}return ek[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(t.protocol&&t.protocol!==i.protocol){if(!ek[t.protocol]){for(var c=Object.keys(t),h=0;h<c.length;h++){var f=c[h];i[f]=t[f]}return i.href=i.format(),i}if(i.protocol=t.protocol,t.host||rk[t.protocol])i.pathname=t.pathname;else{for(var l=(t.pathname||"").split("/");l.length&&!(t.host=l.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==l[0]&&l.unshift(""),l.length<2&&l.unshift(""),i.pathname=l.join("/")}if(i.search=t.search,i.query=t.query,i.host=t.host||"",i.auth=t.auth,i.hostname=t.hostname||t.host,i.port=t.port,i.pathname||i.search){var v=i.pathname||"",d=i.search||"";i.path=v+d}return i.slashes=i.slashes||t.slashes,i.href=i.format(),i}var p=i.pathname&&"/"===i.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),m=y||p||i.host&&t.pathname,w=m,b=i.pathname&&i.pathname.split("/")||[],g=(l=t.pathname&&t.pathname.split("/")||[],i.protocol&&!ek[i.protocol]);if(g&&(i.hostname="",i.port=null,i.host&&(""===b[0]?b[0]=i.host:b.unshift(i.host)),i.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===l[0]?l[0]=t.host:l.unshift(t.host)),t.host=null),m=m&&(""===l[0]||""===b[0])),y)i.host=t.host||""===t.host?t.host:i.host,i.hostname=t.hostname||""===t.hostname?t.hostname:i.hostname,i.search=t.search,i.query=t.query,b=l;else if(l.length)b||(b=[]),b.pop(),b=b.concat(l),i.search=t.search,i.query=t.query;else if(!DS(t.search)){if(g)i.hostname=i.host=b.shift(),(M=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=M.shift(),i.host=i.hostname=M.shift());return i.search=t.search,i.query=t.query,GS(i.pathname)&&GS(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!b.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var x=b.slice(-1)[0],j=(i.host||t.host||b.length>1)&&("."===x||".."===x)||""===x,S=0,k=b.length;k>=0;k--)"."===(x=b[k])?b.splice(k,1):".."===x?(b.splice(k,1),S++):S&&(b.splice(k,1),S--);if(!m&&!w)for(;S--;S)b.unshift("..");!m||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),j&&"/"!==b.join("/").substr(-1)&&b.push("");var M,_=""===b[0]||b[0]&&"/"===b[0].charAt(0);g&&(i.hostname=i.host=_?"":b.length?b.shift():"",(M=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=M.shift(),i.host=i.hostname=M.shift()));return(m=m||i.host&&b.length)&&!_&&b.unshift(""),b.length?i.pathname=b.join("/"):(i.pathname=null,i.path=null),GS(i.pathname)&&GS(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},XS.prototype.parseHost=function(){var t=this.host,n=JS.exec(t);n&&(":"!==(n=n[0])&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};function sk(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];for(var e=0,o=i;e<o.length;e++){var s=o[e];for(var a in s)t[a]=s[a]}return t}var ak=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&OS(t,n)}(e,t);var n,i,r=(n=e,i=_S(),function(){var t,r=TS(n);if(i){var e=TS(this).constructor;t=Reflect.construct(r,arguments,e)}else t=r.apply(this,arguments);return SS(this,t)});function e(t,n){var i;return jS(this,e),(i=r.call(this,n)).message=n,i.key=t,i}return xS(e)}(kS(Error)),uk=function(){function t(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];jS(this,t),this.parent=n,this.bindings={};var r,e=ES(i);try{for(e.s();!(r=e.n()).done;){var o=mS(r.value,2),s=o[0],a=o[1];this.bindings[s]=a}}catch(t){e.e(t)}finally{e.f()}}return xS(t,[{key:"concat",value:function(n){return new t(this,n)}},{key:"get",value:function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error("".concat(t," not found in scope."))}},{key:"has",value:function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}]),t}(),ck={kind:"null"},hk={kind:"number"},fk={kind:"string"},lk={kind:"boolean"},vk={kind:"color"},dk={kind:"object"},pk={kind:"value"},yk={kind:"collator"},mk={kind:"formatted"},wk={kind:"resolvedImage"};function bk(t,n){return{kind:"array",itemType:t,N:n}}function gk(t){if("array"===t.kind){var n=gk(t.itemType);return"number"==typeof t.N?"array<".concat(n,", ").concat(t.N,">"):"value"===t.itemType.kind?"array":"array<".concat(n,">")}return t.kind}var xk=[ck,hk,fk,lk,vk,mk,dk,bk(pk),wk];function jk(t,n){if("error"===n.kind)return null;if("array"===t.kind){if("array"===n.kind&&(0===n.N&&"value"===n.itemType.kind||!jk(t.itemType,n.itemType))&&("number"!=typeof t.N||t.N===n.N))return null}else{if(t.kind===n.kind)return null;if("value"===t.kind){var i,r=ES(xk);try{for(r.s();!(i=r.n()).done;){if(!jk(i.value,n))return null}}catch(t){r.e(t)}finally{r.f()}}}return"Expected ".concat(gk(t)," but found ").concat(gk(n)," instead.")}function Sk(t,n){return n.some((function(n){return n.kind===t.kind}))}function kk(t,n){return n.some((function(n){return"null"===n?null===t:"array"===n?Array.isArray(t):"object"===n?t&&!Array.isArray(t)&&"object"===RS(t):n===RS(t)}))}var Mk=NS((function(t,n){var i={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function e(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function s(t){return"%"===t[t.length-1]?e(parseFloat(t)/100):e(parseFloat(t))}function a(t,n,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(n-t)*i*6:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t}try{n.parseCSSColor=function(t){var n,e=t.replace(/ /g,"").toLowerCase();if(e in i)return i[e].slice();if("#"===e[0])return 4===e.length?(n=parseInt(e.substr(1),16))>=0&&n<=4095?[(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1]:null:7===e.length&&(n=parseInt(e.substr(1),16))>=0&&n<=16777215?[(16711680&n)>>16,(65280&n)>>8,255&n,1]:null;var u=e.indexOf("("),c=e.indexOf(")");if(-1!==u&&c+1===e.length){var h=e.substr(0,u),f=e.substr(u+1,c-(u+1)).split(","),l=1;switch(h){case"rgba":if(4!==f.length)return null;l=s(f.pop());case"rgb":return 3!==f.length?null:[o(f[0]),o(f[1]),o(f[2]),l];case"hsla":if(4!==f.length)return null;l=s(f.pop());case"hsl":if(3!==f.length)return null;var v=(parseFloat(f[0])%360+360)%360/360,d=s(f[1]),p=s(f[2]),y=p<=.5?p*(d+1):p+d-p*d,m=2*p-y;return[r(255*a(m,y,v+1/3)),r(255*a(m,y,v)),r(255*a(m,y,v-1/3)),l];default:return null}}return null}}catch(t){}})),_k=function(){function t(n,i,r){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;jS(this,t),this.r=n,this.g=i,this.b=r,this.a=e}return xS(t,[{key:"toString",value:function(){var t=mS(this.toArray(),4),n=t[0],i=t[1],r=t[2],e=t[3];return"rgba(".concat(Math.round(n),",").concat(Math.round(i),",").concat(Math.round(r),",").concat(e,")")}},{key:"toArray",value:function(){var t=this.r,n=this.g,i=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*n/r,255*i/r,r]}}],[{key:"parse",value:function(n){if(n){if(n instanceof t)return n;if("string"==typeof n){var i=Mk.parseCSSColor(n);if(i)return new t(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3])}}}}]),t}();_k.black=new _k(0,0,0,1),_k.white=new _k(1,1,1,1),_k.transparent=new _k(0,0,0,0),_k.red=new _k(1,0,0,1),_k.blue=new _k(0,0,1,1);var Ok=function(){function t(n,i,r){jS(this,t),this.sensitivity=n?i?"variant":"case":i?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}return xS(t,[{key:"compare",value:function(t,n){return this.collator.compare(t,n)}},{key:"resolvedLocale",value:function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}]),t}(),Tk=xS((function t(n,i,r,e,o){jS(this,t),this.text=n,this.image=i,this.scale=r,this.fontStack=e,this.textColor=o})),Ek=function(){function t(n){jS(this,t),this.sections=n}return xS(t,[{key:"isEmpty",value:function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))}},{key:"toString",value:function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")}},{key:"serialize",value:function(){var t,n=["format"],i=ES(this.sections);try{for(i.s();!(t=i.n()).done;){var r=t.value;if(r.image)n.push(["image",r.image.name]);else{n.push(r.text);var e={};r.fontStack&&(e["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(e["font-scale"]=r.scale),r.textColor&&(e["text-color"]=["rgba"].concat(r.textColor.toArray())),n.push(e)}}}catch(t){i.e(t)}finally{i.f()}return n}}],[{key:"fromString",value:function(n){return new t([new Tk(n,null,null,null,null)])}},{key:"factory",value:function(n){return n instanceof t?n:t.fromString(n)}}]),t}(),Ak=function(){function t(n){jS(this,t),this.name=n.name,this.available=n.available}return xS(t,[{key:"toString",value:function(){return this.name}},{key:"serialize",value:function(){return["image",this.name]}}],[{key:"fromString",value:function(n){return n?new t({name:n,available:!1}):null}}]),t}();function Ck(t,n,i,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value [".concat([t,n,i,r].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof r?[t,n,i,r]:[t,n,i]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")}function Rk(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 _k)return!0;if(t instanceof Ok)return!0;if(t instanceof Ek)return!0;if(t instanceof Ak)return!0;if(Array.isArray(t)){var n,i=ES(t);try{for(i.s();!(n=i.n()).done;){if(!Rk(n.value))return!1}}catch(t){i.e(t)}finally{i.f()}return!0}if("object"===RS(t)){for(var r in t)if(!Rk(t[r]))return!1;return!0}return!1}function Pk(t){if(null===t)return ck;if("string"==typeof t)return fk;if("boolean"==typeof t)return lk;if("number"==typeof t)return hk;if(t instanceof _k)return vk;if(t instanceof Ok)return yk;if(t instanceof Ek)return mk;if(t instanceof Ak)return wk;if(Array.isArray(t)){var n,i,r=t.length,e=ES(t);try{for(e.s();!(i=e.n()).done;){var o=Pk(i.value);if(n){if(n===o)continue;n=pk;break}n=o}}catch(t){e.e(t)}finally{e.f()}return bk(n||pk,r)}return dk}function Ik(t){var n=RS(t);return null===t?"":"string"===n||"number"===n||"boolean"===n?String(t):t instanceof _k||t instanceof Ek||t instanceof Ak?t.toString():JSON.stringify(t)}var Nk=function(){function t(n,i){jS(this,t),this.type=n,this.value=i}return xS(t,[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof _k?["rgba"].concat(this.value.toArray()):this.value instanceof Ek?this.value.serialize():this.value}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("'literal' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(!Rk(n[1]))return i.error("invalid value");var r=n[1],e=Pk(r),o=i.expectedType;return"array"!==e.kind||0!==e.N||!o||"array"!==o.kind||"number"==typeof o.N&&0!==o.N||(e=o),new t(e,r)}}]),t}(),zk=function(){function t(n){jS(this,t),this.name="ExpressionEvaluationError",this.message=n}return xS(t,[{key:"toJSON",value:function(){return this.message}}]),t}(),Fk={string:fk,number:hk,boolean:lk,object:dk},Lk=function(){function t(n,i){jS(this,t),this.type=n,this.args=i}return xS(t,[{key:"evaluate",value:function(t){for(var n=0;n<this.args.length;n++){var i=this.args[n].evaluate(t);if(!jk(this.type,Pk(i)))return i;if(n===this.args.length-1)throw new zk("Expected value to be of type ".concat(gk(this.type),", but found ").concat(gk(Pk(i))," instead."))}return null}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t=this.type,n=[t.kind];if("array"===t.kind){var i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){n.push(i.kind);var r=t.N;("number"==typeof r||this.args.length>1)&&n.push(r)}}return n.concat(this.args.map((function(t){return t.serialize()})))}}],[{key:"parse",value:function(n,i){if(n.length<2)return i.error("Expected at least one argument.");var r,e=1,o=n[0];if("array"===o){var s,a;if(n.length>2){var u=n[1];if("string"!=typeof u||!(u in Fk)||"object"===u)return i.error('The item type argument of "array" must be one of string, number, boolean',1);s=Fk[u],e++}else s=pk;if(n.length>3){if(null!==n[2]&&("number"!=typeof n[2]||n[2]<0||n[2]!==Math.floor(n[2])))return i.error('The length argument to "array" must be a positive integer literal',2);a=n[2],e++}r=bk(s,a)}else r=Fk[o];for(var c=[];e<n.length;e++){var h=i.parse(n[e],e,pk);if(!h)return null;c.push(h)}return new t(r,c)}}]),t}(),Gk=function(){function t(n){jS(this,t),this.type=mk,this.sections=n}return xS(t,[{key:"evaluate",value:function(t){return new Ek(this.sections.map((function(n){var i=n.content.evaluate(t);return Pk(i)===wk?new Tk("",i,null,null,null):new Tk(Ik(i),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)})))}},{key:"eachChild",value:function(t){var n,i=ES(this.sections);try{for(i.s();!(n=i.n()).done;){var r=n.value;t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}}catch(t){i.e(t)}finally{i.f()}}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t,n=["format"],i=ES(this.sections);try{for(i.s();!(t=i.n()).done;){var r=t.value;n.push(r.content.serialize());var e={};r.scale&&(e["font-scale"]=r.scale.serialize()),r.font&&(e["text-font"]=r.font.serialize()),r.textColor&&(e["text-color"]=r.textColor.serialize()),n.push(e)}}catch(t){i.e(t)}finally{i.f()}return n}}],[{key:"parse",value:function(n,i){if(n.length<2)return i.error("Expected at least one argument.");var r=n[1];if(!Array.isArray(r)&&"object"===RS(r))return i.error("First argument must be an image or text section.");for(var e=[],o=!1,s=1;s<=n.length-1;++s){var a=n[s];if(o&&"object"===RS(a)&&!Array.isArray(a)){o=!1;var u=null;if(a["font-scale"]&&!(u=i.parse(a["font-scale"],1,hk)))return null;var c=null;if(a["text-font"]&&!(c=i.parse(a["text-font"],1,bk(fk))))return null;var h=null;if(a["text-color"]&&!(h=i.parse(a["text-color"],1,vk)))return null;var f=e[e.length-1];f.scale=u,f.font=c,f.textColor=h}else{var l=i.parse(n[s],1,pk);if(!l)return null;var v=l.type.kind;if("string"!==v&&"value"!==v&&"null"!==v&&"resolvedImage"!==v)return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,e.push({content:l,scale:null,font:null,textColor:null})}}return new t(e)}}]),t}(),Dk=function(){function t(n){jS(this,t),this.type=wk,this.input=n}return xS(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t),i=Ak.fromString(n);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(n)>-1),i}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["image",this.input.serialize()]}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("Expected two arguments.");var r=i.parse(n[1],1,fk);return r?new t(r):i.error("No image name provided.")}}]),t}(),Uk={"to-boolean":lk,"to-color":vk,"to-number":hk,"to-string":fk},qk=function(){function t(n,i){jS(this,t),this.type=n,this.args=i}return xS(t,[{key:"evaluate",value:function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){var n,i,r,e=ES(this.args);try{for(e.s();!(r=e.n()).done;){if(n=r.value.evaluate(t),i=null,n instanceof _k)return n;if("string"==typeof n){var o=t.parseColor(n);if(o)return o}else if(Array.isArray(n)&&!(i=n.length<3||n.length>4?"Invalid rbga value ".concat(JSON.stringify(n),": expected an array containing either three or four numeric values."):Ck(n[0],n[1],n[2],n[3])))return new _k(n[0]/255,n[1]/255,n[2]/255,n[3])}}catch(t){e.e(t)}finally{e.f()}throw new zk(i||"Could not parse color from value '".concat("string"==typeof n?n:String(JSON.stringify(n)),"'"))}if("number"===this.type.kind){var s,a=null,u=ES(this.args);try{for(u.s();!(s=u.n()).done;){if(null===(a=s.value.evaluate(t)))return 0;var c=Number(a);if(!isNaN(c))return c}}catch(t){u.e(t)}finally{u.f()}throw new zk("Could not convert ".concat(JSON.stringify(a)," to number."))}return"formatted"===this.type.kind?Ek.fromString(Ik(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?Ak.fromString(Ik(this.args[0].evaluate(t))):Ik(this.args[0].evaluate(t))}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){if("formatted"===this.type.kind)return new Gk([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Dk(this.args[0]).serialize();var t=["to-".concat(this.type.kind)];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,i){if(n.length<2)return i.error("Expected at least one argument.");var r=n[0];if(("to-boolean"===r||"to-string"===r)&&2!==n.length)return i.error("Expected one argument.");for(var e=Uk[r],o=[],s=1;s<n.length;s++){var a=i.parse(n[s],s,pk);if(!a)return null;o.push(a)}return new t(e,o)}}]),t}(),Bk=["Unknown","Point","LineString","Polygon"],Wk=function(){function t(){jS(this,t),this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}return xS(t,[{key:"id",value:function(){return this.feature&&"id"in this.feature?this.feature.id:null}},{key:"geometryType",value:function(){return this.feature?"number"==typeof this.feature.type?Bk[this.feature.type]:this.feature.type:null}},{key:"geometry",value:function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}},{key:"canonicalID",value:function(){return this.canonical}},{key:"properties",value:function(){return this.feature&&this.feature.properties||{}}},{key:"parseColor",value:function(t){var n=this._parseColorCache[t];return n||(n=this._parseColorCache[t]=_k.parse(t)),n}}]),t}(),Vk=function(){function t(n,i,r,e){jS(this,t),this.name=n,this.type=i,this._evaluate=r,this.args=e}return xS(t,[{key:"evaluate",value:function(t){return this._evaluate(t,this.args)}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))}}],[{key:"parse",value:function(n,i){var r=n[0],e=t.definitions[r];if(!e)return i.error('Unknown expression "'.concat(r,'". If you wanted a literal array, use ["literal", [...]].'),0);var o,s=Array.isArray(e)?e[0]:e.type,a=Array.isArray(e)?[[e[1],e[2]]]:e.overloads,u=a.filter((function(t){var i=mS(t,1)[0];return!Array.isArray(i)||i.length===n.length-1})),c=null,h=ES(u);try{for(h.s();!(o=h.n()).done;){var f=mS(o.value,2),l=f[0],v=f[1];c=new pM(i.registry,i.path,null,i.scope);for(var d=[],p=!1,y=1;y<n.length;y++){var m=n[y],w=Array.isArray(l)?l[y-1]:l.type,b=c.parse(m,1+d.length,w);if(!b){p=!0;break}d.push(b)}if(!p)if(Array.isArray(l)&&l.length!==d.length)c.error("Expected ".concat(l.length," arguments, but found ").concat(d.length," instead."));else{for(var g=0;g<d.length;g++){var x=Array.isArray(l)?l[g]:l.type,j=d[g];c.concat(g+1).checkSubtype(x,j.type)}if(0===c.errors.length)return new t(r,s,v,d)}}}catch(t){h.e(t)}finally{h.f()}if(1===u.length){var S;(S=i.errors).push.apply(S,pS(c.errors))}else{for(var k=(u.length?u:a).map((function(t){var n,i=mS(t,1)[0];return n=i,Array.isArray(n)?"(".concat(n.map(gk).join(", "),")"):"(".concat(gk(n.type),"...)")})).join(" | "),M=[],_=1;_<n.length;_++){var O=i.parse(n[_],1+M.length);if(!O)return null;M.push(gk(O.type))}i.error("Expected arguments of type ".concat(k,", but found (").concat(M.join(", "),") instead."))}return null}},{key:"register",value:function(n,i){for(var r in t.definitions=i,i)n[r]=t}}]),t}();var Xk=function(){function t(n,i,r){jS(this,t),this.type=yk,this.locale=r,this.caseSensitive=n,this.diacriticSensitive=i}return xS(t,[{key:"evaluate",value:function(t){return new Ok(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}},{key:"eachChild",value:function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("Expected one argument.");var r=n[1];if("object"!==RS(r)||Array.isArray(r))return i.error("Collator options argument must be an object.");var e=i.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,lk);if(!e)return null;var o=i.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,lk);if(!o)return null;var s=null;return r.locale&&!(s=i.parse(r.locale,1,fk))?null:new t(e,o,s)}}]),t}(),Hk=8192;function Jk(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[0]),t[3]=Math.max(t[3],n[1])}function Kk(t,n){return!(t[0]<=n[0])&&(!(t[2]>=n[2])&&(!(t[1]<=n[1])&&!(t[3]>=n[3])))}function Yk(t,n){var i,r=(180+t[0])/360,e=(i=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360),o=Math.pow(2,n.z);return[Math.round(r*o*Hk),Math.round(e*o*Hk)]}function Zk(t,n,i){var r=t[0]-n[0],e=t[1]-n[1],o=t[0]-i[0],s=t[1]-i[1];return r*s-o*e==0&&r*o<=0&&e*s<=0}function $k(t,n,i){return n[1]>t[1]!=i[1]>t[1]&&t[0]<(i[0]-n[0])*(t[1]-n[1])/(i[1]-n[1])+n[0]}function Qk(t,n){for(var i=!1,r=0,e=n.length;r<e;r++)for(var o=n[r],s=0,a=o.length;s<a-1;s++){if(Zk(t,o[s],o[s+1]))return!1;$k(t,o[s],o[s+1])&&(i=!i)}return i}function tM(t,n){for(var i=0;i<n.length;i++)if(Qk(t,n[i]))return!0;return!1}function nM(t,n,i,r){var e=t[0]-i[0],o=t[1]-i[1],s=n[0]-i[0],a=n[1]-i[1],u=r[0]-i[0],c=r[1]-i[1],h=e*c-u*o,f=s*c-u*a;return h>0&&f<0||h<0&&f>0}function iM(t,n,i){var r,e,o,s,a,u,c,h,f,l=ES(i);try{for(l.s();!(r=l.n()).done;)for(var v=r.value,d=0;d<v.length-1;++d)if(e=t,o=n,s=v[d],a=v[d+1],u=void 0,c=void 0,h=void 0,f=void 0,h=[o[0]-e[0],o[1]-e[1]],f=[a[0]-s[0],a[1]-s[1]],0!=(u=f)[0]*(c=h)[1]-u[1]*c[0]&&nM(e,o,s,a)&&nM(s,a,e,o))return!0}catch(t){l.e(t)}finally{l.f()}return!1}function rM(t,n){for(var i=0;i<t.length;++i)if(!Qk(t[i],n))return!1;for(var r=0;r<t.length-1;++r)if(iM(t[r],t[r+1],n))return!1;return!0}function eM(t,n){for(var i=0;i<n.length;i++)if(rM(t,n[i]))return!0;return!1}function oM(t,n,i){for(var r=[],e=0;e<t.length;e++){for(var o=[],s=0;s<t[e].length;s++){var a=Yk(t[e][s],i);Jk(n,a),o.push(a)}r.push(o)}return r}function sM(t,n,i){for(var r=[],e=0;e<t.length;e++){var o=oM(t[e],n,i);r.push(o)}return r}function aM(t,n,i,r){if(t[0]<i[0]||t[0]>i[2]){var e=.5*r,o=t[0]-i[0]>e?-r:i[0]-t[0]>e?r:0;0===o&&(o=t[0]-i[2]>e?-r:i[2]-t[0]>e?r:0),t[0]+=o}Jk(n,t)}function uM(t,n,i,r){var e,o=Math.pow(2,r.z)*Hk,s=[r.x*Hk,r.y*Hk],a=[],u=ES(t);try{for(u.s();!(e=u.n()).done;){var c,h=ES(e.value);try{for(h.s();!(c=h.n()).done;){var f=c.value,l=[f.x+s[0],f.y+s[1]];aM(l,n,i,o),a.push(l)}}catch(t){h.e(t)}finally{h.f()}}}catch(t){u.e(t)}finally{u.f()}return a}function cM(t,n,i,r){var e,o=Math.pow(2,r.z)*Hk,s=[r.x*Hk,r.y*Hk],a=[],u=ES(t);try{for(u.s();!(e=u.n()).done;){var c,h=e.value,f=[],l=ES(h);try{for(l.s();!(c=l.n()).done;){var v=c.value,d=[v.x+s[0],v.y+s[1]];Jk(n,d),f.push(d)}}catch(t){l.e(t)}finally{l.f()}a.push(f)}}catch(t){u.e(t)}finally{u.f()}if(n[2]-n[0]<=o/2){!function(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}(n);var p,y=ES(a);try{for(y.s();!(p=y.n()).done;){var m,w=ES(p.value);try{for(w.s();!(m=w.n()).done;){aM(m.value,n,i,o)}}catch(t){w.e(t)}finally{w.f()}}}catch(t){y.e(t)}finally{y.f()}}return a}var hM=function(){function t(n,i){jS(this,t),this.type=lk,this.geojson=n,this.geometries=i}return xS(t,[{key:"evaluate",value:function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,n){var i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],e=t.canonicalID();if("Polygon"===n.type){var o=oM(n.coordinates,r,e),s=uM(t.geometry(),i,r,e);if(!Kk(i,r))return!1;var a,u=ES(s);try{for(u.s();!(a=u.n()).done;)if(!Qk(a.value,o))return!1}catch(t){u.e(t)}finally{u.f()}}if("MultiPolygon"===n.type){var c=sM(n.coordinates,r,e),h=uM(t.geometry(),i,r,e);if(!Kk(i,r))return!1;var f,l=ES(h);try{for(l.s();!(f=l.n()).done;)if(!tM(f.value,c))return!1}catch(t){l.e(t)}finally{l.f()}}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,n){var i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],e=t.canonicalID();if("Polygon"===n.type){var o=oM(n.coordinates,r,e),s=cM(t.geometry(),i,r,e);if(!Kk(i,r))return!1;var a,u=ES(s);try{for(u.s();!(a=u.n()).done;)if(!rM(a.value,o))return!1}catch(t){u.e(t)}finally{u.f()}}if("MultiPolygon"===n.type){var c=sM(n.coordinates,r,e),h=cM(t.geometry(),i,r,e);if(!Kk(i,r))return!1;var f,l=ES(h);try{for(l.s();!(f=l.n()).done;)if(!eM(f.value,c))return!1}catch(t){l.e(t)}finally{l.f()}}return!0}(t,this.geometries)}return!1}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["within",this.geojson]}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("'within' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(Rk(n[1])){var r=n[1];if("FeatureCollection"===r.type)for(var e=0;e<r.features.length;++e){var o=r.features[e].geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new t(r,r.features[e].geometry)}else if("Feature"===r.type){var s=r.geometry.type;if("Polygon"===s||"MultiPolygon"===s)return new t(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new t(r,r)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}}]),t}();function fM(t){if(t instanceof Vk){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof hM)return!1;var n=!0;return t.eachChild((function(t){n&&!fM(t)&&(n=!1)})),n}function lM(t){if(t instanceof Vk&&"feature-state"===t.name)return!1;var n=!0;return t.eachChild((function(t){n&&!lM(t)&&(n=!1)})),n}function vM(t,n){if(t instanceof Vk&&n.indexOf(t.name)>=0)return!1;var i=!0;return t.eachChild((function(t){i&&!vM(t,n)&&(i=!1)})),i}var dM=function(){function t(n,i){jS(this,t),this.type=i.type,this.name=n,this.boundExpression=i}return xS(t,[{key:"evaluate",value:function(t){return this.boundExpression.evaluate(t)}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["var",this.name]}}],[{key:"parse",value:function(n,i){if(2!==n.length||"string"!=typeof n[1])return i.error("'var' expression requires exactly one string literal argument.");var r=n[1];return i.scope.has(r)?new t(r,i.scope.get(r)):i.error('Unknown variable "'.concat(r,'". Make sure "').concat(r,'" has been bound in an enclosing "let" expression before using it.'),1)}}]),t}(),pM=function(){function t(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new uk,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];jS(this,t),this.registry=n,this.path=i,this.key=i.map((function(t){return"[".concat(t,"]")})).join(""),this.scope=e,this.errors=o,this.expectedType=r}return xS(t,[{key:"parse",value:function(t,n,i,r){var e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return n?this.concat(n,i,r)._parse(t,e):this._parse(t,e)}},{key:"_parse",value:function(t,n){function i(t,n,i){return"assert"===i?new Lk(n,[t]):"coerce"===i?new qk(n,[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 r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found ".concat(RS(r),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var e=this.registry[r];if(e){var o=e.parse(t,this);if(!o)return null;if(this.expectedType){var s=this.expectedType,a=o.type;if("string"!==s.kind&&"number"!==s.kind&&"boolean"!==s.kind&&"object"!==s.kind&&"array"!==s.kind||"value"!==a.kind)if("color"!==s.kind&&"formatted"!==s.kind&&"resolvedImage"!==s.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(s,a))return null}else o=i(o,s,n.typeAnnotation||"coerce");else o=i(o,s,n.typeAnnotation||"assert")}if(!(o instanceof Nk)&&"resolvedImage"!==o.type.kind&&yM(o)){var u=new Wk;try{o=new Nk(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'.concat(r,'". If you wanted a literal array, use ["literal", [...]].'),0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"===RS(t)?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found ".concat(RS(t)," instead."))}},{key:"concat",value:function(n,i,r){var e="number"==typeof n?this.path.concat(n):this.path,o=r?this.scope.concat(r):this.scope;return new t(this.registry,e,i||null,o,this.errors)}},{key:"error",value:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];var e="".concat(this.key).concat(i.map((function(t){return"[".concat(t,"]")})).join(""));this.errors.push(new ak(e,t))}},{key:"checkSubtype",value:function(t,n){var i=jk(t,n);return i&&this.error(i),i}}]),t}();function yM(t){if(t instanceof dM)return yM(t.boundExpression);if(t instanceof Vk&&"error"===t.name)return!1;if(t instanceof Xk)return!1;if(t instanceof hM)return!1;var n=t instanceof qk||t instanceof Lk,i=!0;return t.eachChild((function(t){i=n?i&&yM(t):i&&t instanceof Nk})),!!i&&(fM(t)&&vM(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"]))}function mM(t,n){for(var i,r,e=t.length-1,o=0,s=e,a=0;o<=s;)if(i=t[a=Math.floor((o+s)/2)],r=t[a+1],i<=n){if(a===e||n<r)return a;o=a+1}else{if(!(i>n))throw new zk("Input is not a number.");s=a-1}return 0}var wM=function(){function t(n,i,r){jS(this,t),this.type=n,this.input=i,this.labels=[],this.outputs=[];var e,o=ES(r);try{for(o.s();!(e=o.n()).done;){var s=mS(e.value,2),a=s[0],u=s[1];this.labels.push(a),this.outputs.push(u)}}catch(t){o.e(t)}finally{o.f()}}return xS(t,[{key:"evaluate",value:function(t){var n=this.labels,i=this.outputs;if(1===n.length)return i[0].evaluate(t);var r=this.input.evaluate(t);if(r<=n[0])return i[0].evaluate(t);var e=n.length;return r>=n[e-1]?i[e-1].evaluate(t):i[mM(n,r)].evaluate(t)}},{key:"eachChild",value:function(t){t(this.input);var n,i=ES(this.outputs);try{for(i.s();!(n=i.n()).done;){t(n.value)}}catch(t){i.e(t)}finally{i.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){for(var t=["step",this.input.serialize()],n=0;n<this.labels.length;n++)n>0&&t.push(this.labels[n]),t.push(this.outputs[n].serialize());return t}}],[{key:"parse",value:function(n,i){if(n.length-1<4)return i.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if((n.length-1)%2!=0)return i.error("Expected an even number of arguments.");var r=i.parse(n[1],1,hk);if(!r)return null;var e=[],o=null;i.expectedType&&"value"!==i.expectedType.kind&&(o=i.expectedType);for(var s=1;s<n.length;s+=2){var a=1===s?-1/0:n[s],u=n[s+1],c=s,h=s+1;if("number"!=typeof a)return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(e.length&&e[e.length-1][0]>=a)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var f=i.parse(u,h,o);if(!f)return null;o=o||f.type,e.push([a,f])}return new t(o,r,e)}}]),t}(),bM=gM;function gM(t,n,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(r-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=i,this.p2y=r}function xM(t,n,i){return t*(1-i)+n*i}gM.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},gM.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},gM.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},gM.prototype.solveCurveX=function(t,n){var i,r,e,o,s;for(void 0===n&&(n=1e-6),e=t,s=0;s<8;s++){if(o=this.sampleCurveX(e)-t,Math.abs(o)<n)return e;var a=this.sampleCurveDerivativeX(e);if(Math.abs(a)<1e-6)break;e-=o/a}if((e=t)<(i=0))return i;if(e>(r=1))return r;for(;i<r;){if(o=this.sampleCurveX(e),Math.abs(o-t)<n)return e;t>o?i=e:r=e,e=.5*(r-i)+i}return e},gM.prototype.solve=function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))};var jM=Object.freeze({__proto__:null,number:xM,color:function(t,n,i){return new _k(xM(t.r,n.r,i),xM(t.g,n.g,i),xM(t.b,n.b,i),xM(t.a,n.a,i))},array:function(t,n,i){return t.map((function(t,r){return xM(t,n[r],i)}))}}),SM=.95047,kM=1.08883,MM=4/29,_M=6/29,OM=3*_M*_M,TM=Math.PI/180,EM=180/Math.PI;function AM(t){return t>.008856451679035631?Math.pow(t,1/3):t/OM+MM}function CM(t){return t>_M?t*t*t:OM*(t-MM)}function RM(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function PM(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function IM(t){var n=PM(t.r),i=PM(t.g),r=PM(t.b),e=AM((.4124564*n+.3575761*i+.1804375*r)/SM),o=AM((.2126729*n+.7151522*i+.072175*r)/1);return{l:116*o-16,a:500*(e-o),b:200*(o-AM((.0193339*n+.119192*i+.9503041*r)/kM)),alpha:t.a}}function NM(t){var n=(t.l+16)/116,i=isNaN(t.a)?n:n+t.a/500,r=isNaN(t.b)?n:n-t.b/200;return n=1*CM(n),i=SM*CM(i),r=kM*CM(r),new _k(RM(3.2404542*i-1.5371385*n-.4985314*r),RM(-.969266*i+1.8760108*n+.041556*r),RM(.0556434*i-.2040259*n+1.0572252*r),t.alpha)}function zM(t,n,i){var r=n-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}var FM={forward:IM,reverse:NM,interpolate:function(t,n,i){return{l:xM(t.l,n.l,i),a:xM(t.a,n.a,i),b:xM(t.b,n.b,i),alpha:xM(t.alpha,n.alpha,i)}}},LM={forward:function(t){var n=IM(t),i=n.l,r=n.a,e=n.b,o=Math.atan2(e,r)*EM;return{h:o<0?o+360:o,c:Math.sqrt(r*r+e*e),l:i,alpha:t.a}},reverse:function(t){var n=t.h*TM,i=t.c;return NM({l:t.l,a:Math.cos(n)*i,b:Math.sin(n)*i,alpha:t.alpha})},interpolate:function(t,n,i){return{h:zM(t.h,n.h,i),c:xM(t.c,n.c,i),l:xM(t.l,n.l,i),alpha:xM(t.alpha,n.alpha,i)}}},GM=function(){function t(n,i,r,e,o){jS(this,t),this.type=n,this.operator=i,this.interpolation=r,this.input=e,this.labels=[],this.outputs=[];var s,a=ES(o);try{for(a.s();!(s=a.n()).done;){var u=mS(s.value,2),c=u[0],h=u[1];this.labels.push(c),this.outputs.push(h)}}catch(t){a.e(t)}finally{a.f()}}return xS(t,[{key:"evaluate",value:function(n){var i=this.labels,r=this.outputs;if(1===i.length)return r[0].evaluate(n);var e=this.input.evaluate(n);if(e<=i[0])return r[0].evaluate(n);var o=i.length;if(e>=i[o-1])return r[o-1].evaluate(n);var s=mM(i,e),a=i[s],u=i[s+1],c=t.interpolationFactor(this.interpolation,e,a,u),h=r[s].evaluate(n),f=r[s+1].evaluate(n);return"interpolate"===this.operator?jM[this.type.kind.toLowerCase()](h,f,c):"interpolate-hcl"===this.operator?LM.reverse(LM.interpolate(LM.forward(h),LM.forward(f),c)):FM.reverse(FM.interpolate(FM.forward(h),FM.forward(f),c))}},{key:"eachChild",value:function(t){t(this.input);var n,i=ES(this.outputs);try{for(i.s();!(n=i.n()).done;){t(n.value)}}catch(t){i.e(t)}finally{i.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var n=[this.operator,t,this.input.serialize()],i=0;i<this.labels.length;i++)n.push(this.labels[i],this.outputs[i].serialize());return n}}],[{key:"interpolationFactor",value:function(t,n,i,r){var e=0;if("exponential"===t.name)e=DM(n,t.base,i,r);else if("linear"===t.name)e=DM(n,1,i,r);else if("cubic-bezier"===t.name){var o=t.controlPoints;e=new bM(o[0],o[1],o[2],o[3]).solve(DM(n,1,i,r))}return e}},{key:"parse",value:function(n,i){var r,e=bS(r=n)||yS(r)||AS(r)||wS(),o=e[0],s=e[1],a=e[2],u=e.slice(3);if(!Array.isArray(s)||0===s.length)return i.error("Expected an interpolation type expression.",1);if("linear"===s[0])s={name:"linear"};else if("exponential"===s[0]){var c=s[1];if("number"!=typeof c)return i.error("Exponential interpolation requires a numeric base.",1,1);s={name:"exponential",base:c}}else{if("cubic-bezier"!==s[0])return i.error("Unknown interpolation type ".concat(String(s[0])),1,0);var h=s.slice(1);if(4!==h.length||h.some((function(t){return"number"!=typeof t||t<0||t>1})))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);s={name:"cubic-bezier",controlPoints:h}}if(n.length-1<4)return i.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if((n.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(!(a=i.parse(a,2,hk)))return null;var f=[],l=null;"interpolate-hcl"===o||"interpolate-lab"===o?l=vk:i.expectedType&&"value"!==i.expectedType.kind&&(l=i.expectedType);for(var v=0;v<u.length;v+=2){var d=u[v],p=u[v+1],y=v+3,m=v+4;if("number"!=typeof d)return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',y);if(f.length&&f[f.length-1][0]>=d)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',y);var w=i.parse(p,m,l);if(!w)return null;l=l||w.type,f.push([d,w])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new t(l,o,s,a,f):i.error("Type ".concat(gk(l)," is not interpolatable."))}}]),t}();function DM(t,n,i,r){var e=r-i,o=t-i;return 0===e?0:1===n?o/e:(Math.pow(n,o)-1)/(Math.pow(n,e)-1)}var UM=function(){function t(n,i){jS(this,t),this.type=n,this.args=i}return xS(t,[{key:"evaluate",value:function(t){var n,i,r=null,e=0,o=ES(this.args);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(e++,(r=s.evaluate(t))&&r instanceof Ak&&!r.available&&(n||(n=r.name),r=null,e===this.args.length&&(r=n)),null!==r)break}}catch(t){o.e(t)}finally{o.f()}return r}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t=["coalesce"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,i){if(n.length<2)return i.error("Expectected at least one argument.");var r=null,e=i.expectedType;e&&"value"!==e.kind&&(r=e);var o,s=[],a=ES(n.slice(1));try{for(a.s();!(o=a.n()).done;){var u=o.value,c=i.parse(u,1+s.length,r,void 0,{typeAnnotation:"omit"});if(!c)return null;r=r||c.type,s.push(c)}}catch(t){a.e(t)}finally{a.f()}return new t(e&&s.some((function(t){return jk(e,t.type)}))?pk:r,s)}}]),t}(),qM=function(){function t(n,i){jS(this,t),this.type=i.type,this.bindings=[].concat(n),this.result=i}return xS(t,[{key:"evaluate",value:function(t){return this.result.evaluate(t)}},{key:"eachChild",value:function(t){var n,i=ES(this.bindings);try{for(i.s();!(n=i.n()).done;){t(n.value[1])}}catch(t){i.e(t)}finally{i.f()}t(this.result)}},{key:"outputDefined",value:function(){return this.result.outputDefined()}},{key:"serialize",value:function(){var t,n=["let"],i=ES(this.bindings);try{for(i.s();!(t=i.n()).done;){var r=mS(t.value,2),e=r[0],o=r[1];n.push(e,o.serialize())}}catch(t){i.e(t)}finally{i.f()}return n.push(this.result.serialize()),n}}],[{key:"parse",value:function(n,i){if(n.length<4)return i.error("Expected at least 3 arguments, but found ".concat(n.length-1," instead."));for(var r=[],e=1;e<n.length-1;e+=2){var o=n[e];if("string"!=typeof o)return i.error("Expected string, but found ".concat(RS(o)," instead."),e);if(/[^a-zA-Z0-9_]/.test(o))return i.error("Variable names must contain only alphanumeric characters or '_'.",e);var s=i.parse(n[e+1],e+1);if(!s)return null;r.push([o,s])}var a=i.parse(n[n.length-1],n.length-1,i.expectedType,r);return a?new t(r,a):null}}]),t}(),BM=function(){function t(n,i,r){jS(this,t),this.type=n,this.index=i,this.input=r}return xS(t,[{key:"evaluate",value:function(t){var n=this.index.evaluate(t),i=this.input.evaluate(t);if(n<0)throw new zk("Array index out of bounds: ".concat(n," < 0."));if(n>=i.length)throw new zk("Array index out of bounds: ".concat(n," > ").concat(i.length-1,"."));if(n!==Math.floor(n))throw new zk("Array index must be an integer, but found ".concat(n," instead."));return i[n]}},{key:"eachChild",value:function(t){t(this.index),t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["at",this.index.serialize(),this.input.serialize()]}}],[{key:"parse",value:function(n,i){if(3!==n.length)return i.error("Expected 2 arguments, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1,hk),e=i.parse(n[2],2,bk(i.expectedType||pk));return r&&e?new t(e.type.itemType,r,e):null}}]),t}(),WM=function(){function t(n,i){jS(this,t),this.type=lk,this.needle=n,this.haystack=i}return xS(t,[{key:"evaluate",value:function(t){var n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!kk(n,["boolean","string","number","null"]))throw new zk("Expected first argument to be of type boolean, string, number or null, but found ".concat(gk(Pk(n))," instead."));if(!kk(i,["string","array"]))throw new zk("Expected second argument to be of type array or string, but found ".concat(gk(Pk(i))," instead."));return i.indexOf(n)>=0}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["in",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(n,i){if(3!==n.length)return i.error("Expected 2 arguments, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1,pk),e=i.parse(n[2],2,pk);return r&&e?Sk(r.type,[lk,fk,hk,ck,pk])?new t(r,e):i.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(gk(r.type)," instead")):null}}]),t}(),VM=function(){function t(n,i,r){jS(this,t),this.type=hk,this.needle=n,this.haystack=i,this.fromIndex=r}return xS(t,[{key:"evaluate",value:function(t){var n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!kk(n,["boolean","string","number","null"]))throw new zk("Expected first argument to be of type boolean, string, number or null, but found ".concat(gk(Pk(n))," instead."));if(!kk(i,["string","array"]))throw new zk("Expected second argument to be of type array or string, but found ".concat(gk(Pk(i))," instead."));if(this.fromIndex){var r=this.fromIndex.evaluate(t);return i.indexOf(n,r)}return i.indexOf(n)}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value: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()]}}],[{key:"parse",value:function(n,i){if(n.length<=2||n.length>=5)return i.error("Expected 3 or 4 arguments, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1,pk),e=i.parse(n[2],2,pk);if(!r||!e)return null;if(!Sk(r.type,[lk,fk,hk,ck,pk]))return i.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(gk(r.type)," instead"));if(4===n.length){var o=i.parse(n[3],3,hk);return o?new t(r,e,o):null}return new t(r,e)}}]),t}(),XM=function(){function t(n,i,r,e,o,s){jS(this,t),this.inputType=n,this.type=i,this.input=r,this.cases=e,this.outputs=o,this.otherwise=s}return xS(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t);return(Pk(n)===this.inputType&&this.outputs[this.cases[n]]||this.otherwise).evaluate(t)}},{key:"eachChild",value:function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t,n=this,i=["match",this.input.serialize()],r=[],e={},o=ES(Object.keys(this.cases).sort());try{for(o.s();!(t=o.n()).done;){var s=t.value,a=e[this.cases[s]];void 0===a?(e[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[a][1].push(s)}}catch(t){o.e(t)}finally{o.f()}for(var u=function(t){return"number"===n.inputType.kind?Number(t):t},c=0,h=r;c<h.length;c++){var f=mS(h[c],2),l=f[0],v=f[1];1===v.length?i.push(u(v[0])):i.push(v.map(u)),i.push(this.outputs[l].serialize())}return i.push(this.otherwise.serialize()),i}}],[{key:"parse",value:function(n,i){if(n.length<5)return i.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if(n.length%2!=1)return i.error("Expected an even number of arguments.");var r,e;i.expectedType&&"value"!==i.expectedType.kind&&(e=i.expectedType);for(var o={},s=[],a=2;a<n.length-1;a+=2){var u=n[a],c=n[a+1];Array.isArray(u)||(u=[u]);var h=i.concat(a);if(0===u.length)return h.error("Expected at least one branch label.");var f,l=ES(u);try{for(l.s();!(f=l.n()).done;){var v=f.value;if("number"!=typeof v&&"string"!=typeof v)return h.error("Branch labels must be numbers or strings.");if("number"==typeof v&&Math.abs(v)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof v&&Math.floor(v)!==v)return h.error("Numeric branch labels must be integer values.");if(r){if(h.checkSubtype(r,Pk(v)))return null}else r=Pk(v);if(void 0!==o[String(v)])return h.error("Branch labels must be unique.");o[String(v)]=s.length}}catch(t){l.e(t)}finally{l.f()}var d=i.parse(c,a,e);if(!d)return null;e=e||d.type,s.push(d)}var p=i.parse(n[1],1,pk);if(!p)return null;var y=i.parse(n[n.length-1],n.length-1,e);return y?"value"!==p.type.kind&&i.concat(1).checkSubtype(r,p.type)?null:new t(r,e,p,o,s,y):null}}]),t}(),HM=function(){function t(n,i,r){jS(this,t),this.type=n,this.branches=i,this.otherwise=r}return xS(t,[{key:"evaluate",value:function(t){var n,i=ES(this.branches);try{for(i.s();!(n=i.n()).done;){var r=mS(n.value,2),e=r[0],o=r[1];if(e.evaluate(t))return o.evaluate(t)}}catch(t){i.e(t)}finally{i.f()}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var n,i=ES(this.branches);try{for(i.s();!(n=i.n()).done;){var r=mS(n.value,2),e=r[0],o=r[1];t(e),t(o)}}catch(t){i.e(t)}finally{i.f()}t(this.otherwise)}},{key:"outputDefined",value:function(){return this.branches.every((function(t){var n=mS(t,2);n[0];return n[1].outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t=["case"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,i){if(n.length<4)return i.error("Expected at least 3 arguments, but found only ".concat(n.length-1,"."));if(n.length%2!=0)return i.error("Expected an odd number of arguments.");var r;i.expectedType&&"value"!==i.expectedType.kind&&(r=i.expectedType);for(var e=[],o=1;o<n.length-1;o+=2){var s=i.parse(n[o],o,lk);if(!s)return null;var a=i.parse(n[o+1],o+1,r);if(!a)return null;e.push([s,a]),r=r||a.type}var u=i.parse(n[n.length-1],n.length-1,r);return u?new t(r,e,u):null}}]),t}(),JM=function(){function t(n,i,r,e){jS(this,t),this.type=n,this.input=i,this.beginIndex=r,this.endIndex=e}return xS(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!kk(n,["string","array"]))throw new zk("Expected first argument to be of type array or string, but found ".concat(gk(Pk(n))," instead."));if(this.endIndex){var r=this.endIndex.evaluate(t);return n.slice(i,r)}return n.slice(i)}},{key:"eachChild",value:function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value: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()]}}],[{key:"parse",value:function(n,i){if(n.length<=2||n.length>=5)return i.error("Expected 3 or 4 arguments, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1,pk),e=i.parse(n[2],2,hk);if(!r||!e)return null;if(!Sk(r.type,[bk(pk),fk,pk]))return i.error("Expected first argument to be of type array or string, but found ".concat(gk(r.type)," instead"));if(4===n.length){var o=i.parse(n[3],3,hk);return o?new t(r.type,r,e,o):null}return new t(r.type,r,e)}}]),t}();function KM(t,n){return"=="===t||"!="===t?"boolean"===n.kind||"string"===n.kind||"number"===n.kind||"null"===n.kind||"value"===n.kind:"string"===n.kind||"number"===n.kind||"value"===n.kind}function YM(t,n,i,r){return 0===r.compare(n,i)}function ZM(t,n,i){var r="=="!==t&&"!="!==t;return function(){function e(t,n,i){jS(this,e),this.type=lk,this.lhs=t,this.rhs=n,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===n.type.kind}return xS(e,[{key:"evaluate",value:function(e){var o=this.lhs.evaluate(e),s=this.rhs.evaluate(e);if(r&&this.hasUntypedArgument){var a=Pk(o),u=Pk(s);if(a.kind!==u.kind||"string"!==a.kind&&"number"!==a.kind)throw new zk('Expected arguments for "'.concat(t,'" to be (string, string) or (number, number), but found (').concat(a.kind,", ").concat(u.kind,") instead."))}if(this.collator&&!r&&this.hasUntypedArgument){var c=Pk(o),h=Pk(s);if("string"!==c.kind||"string"!==h.kind)return n(e,o,s)}return this.collator?i(e,o,s,this.collator.evaluate(e)):n(e,o,s)}},{key:"eachChild",value:function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){var n=[t];return this.eachChild((function(t){n.push(t.serialize())})),n}}],[{key:"parse",value:function(t,n){if(3!==t.length&&4!==t.length)return n.error("Expected two or three arguments.");var i=t[0],o=n.parse(t[1],1,pk);if(!o)return null;if(!KM(i,o.type))return n.concat(1).error('"'.concat(i,"\" comparisons are not supported for type '").concat(gk(o.type),"'."));var s=n.parse(t[2],2,pk);if(!s)return null;if(!KM(i,s.type))return n.concat(2).error('"'.concat(i,"\" comparisons are not supported for type '").concat(gk(s.type),"'."));if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot compare types '".concat(gk(o.type),"' and '").concat(gk(s.type),"'."));r&&("value"===o.type.kind&&"value"!==s.type.kind?o=new Lk(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new Lk(o.type,[s])));var a=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot use collator to compare non-string types.");if(!(a=n.parse(t[3],3,yk)))return null}return new e(o,s,a)}}]),e}()}var $M=ZM("==",(function(t,n,i){return n===i}),YM),QM=ZM("!=",(function(t,n,i){return n!==i}),(function(t,n,i,r){return!YM(0,n,i,r)})),t_=ZM("<",(function(t,n,i){return n<i}),(function(t,n,i,r){return r.compare(n,i)<0})),n_=ZM(">",(function(t,n,i){return n>i}),(function(t,n,i,r){return r.compare(n,i)>0})),i_=ZM("<=",(function(t,n,i){return n<=i}),(function(t,n,i,r){return r.compare(n,i)<=0})),r_=ZM(">=",(function(t,n,i){return n>=i}),(function(t,n,i,r){return r.compare(n,i)>=0})),e_=function(){function t(n,i,r,e,o){jS(this,t),this.type=fk,this.number=n,this.locale=i,this.currency=r,this.minFractionDigits=e,this.maxFractionDigits=o}return xS(t,[{key:"evaluate",value: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))}},{key:"eachChild",value: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)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value: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]}}],[{key:"parse",value:function(n,i){if(3!==n.length)return i.error("Expected two arguments.");var r=i.parse(n[1],1,hk);if(!r)return null;var e=n[2];if("object"!==RS(e)||Array.isArray(e))return i.error("NumberFormat options argument must be an object.");var o=null;if(e.locale&&!(o=i.parse(e.locale,1,fk)))return null;var s=null;if(e.currency&&!(s=i.parse(e.currency,1,fk)))return null;var a=null;if(e["min-fraction-digits"]&&!(a=i.parse(e["min-fraction-digits"],1,hk)))return null;var u=null;return e["max-fraction-digits"]&&!(u=i.parse(e["max-fraction-digits"],1,hk))?null:new t(r,o,s,a,u)}}]),t}(),o_={"==":$M,"!=":QM,">":n_,"<":t_,">=":r_,"<=":i_,array:Lk,at:BM,boolean:Lk,case:HM,coalesce:UM,collator:Xk,format:Gk,image:Dk,in:WM,"index-of":VM,interpolate:GM,"interpolate-hcl":GM,"interpolate-lab":GM,length:function(){function t(n){jS(this,t),this.type=hk,this.input=n}return xS(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t);if("string"==typeof n)return n.length;if(Array.isArray(n))return n.length;throw new zk("Expected value to be of type string or array, but found ".concat(gk(Pk(n))," instead."))}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t=["length"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("Expected 1 argument, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?i.error("Expected argument of type string or array, but found ".concat(gk(r.type)," instead.")):new t(r):null}}]),t}(),let:qM,literal:Nk,match:XM,number:Lk,"number-format":e_,object:Lk,slice:JM,step:wM,string:Lk,"to-boolean":qk,"to-color":qk,"to-number":qk,"to-string":qk,var:dM,within:hM};function s_(t,n){var i=mS(n,4),r=i[0],e=i[1],o=i[2],s=i[3];r=r.evaluate(t),e=e.evaluate(t),o=o.evaluate(t);var a=s?s.evaluate(t):1,u=Ck(r,e,o,a);if(u)throw new zk(u);return new _k(r/255*a,e/255*a,o/255*a,a)}function a_(t,n){return t in n}function u_(t,n){var i=n[t];return void 0===i?null:i}function c_(t){return{type:t}}function h_(t){return{result:"success",value:t}}function f_(t){return{result:"error",value:t}}function l_(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function v_(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function d_(t){return!!t.expression&&t.expression.interpolated}function p_(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":RS(t)}function y_(t){return"object"===RS(t)&&null!==t&&!Array.isArray(t)}Vk.register(o_,{error:[{kind:"error"},[fk],function(t,n){var i=mS(n,1)[0];throw new zk(i.evaluate(t))}],typeof:[fk,[pk],function(t,n){return gk(Pk(mS(n,1)[0].evaluate(t)))}],"to-rgba":[bk(hk,4),[vk],function(t,n){return mS(n,1)[0].evaluate(t).toArray()}],rgb:[vk,[hk,hk,hk],s_],rgba:[vk,[hk,hk,hk,hk],s_],has:{type:lk,overloads:[[[fk],function(t,n){return a_(mS(n,1)[0].evaluate(t),t.properties())}],[[fk,dk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return a_(r.evaluate(t),e.evaluate(t))}]]},get:{type:pk,overloads:[[[fk],function(t,n){return u_(mS(n,1)[0].evaluate(t),t.properties())}],[[fk,dk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return u_(r.evaluate(t),e.evaluate(t))}]]},"feature-state":[pk,[fk],function(t,n){return u_(mS(n,1)[0].evaluate(t),t.featureState||{})}],properties:[dk,[],function(t){return t.properties()}],"geometry-type":[fk,[],function(t){return t.geometryType()}],id:[pk,[],function(t){return t.id()}],zoom:[hk,[],function(t){return t.globals.zoom}],"heatmap-density":[hk,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[hk,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[hk,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[pk,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[hk,c_(hk),function(t,n){var i,r=0,e=ES(n);try{for(e.s();!(i=e.n()).done;){r+=i.value.evaluate(t)}}catch(t){e.e(t)}finally{e.f()}return r}],"*":[hk,c_(hk),function(t,n){var i,r=1,e=ES(n);try{for(e.s();!(i=e.n()).done;){r*=i.value.evaluate(t)}}catch(t){e.e(t)}finally{e.f()}return r}],"-":{type:hk,overloads:[[[hk,hk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)-e.evaluate(t)}],[[hk],function(t,n){return-mS(n,1)[0].evaluate(t)}]]},"/":[hk,[hk,hk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)/e.evaluate(t)}],"%":[hk,[hk,hk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)%e.evaluate(t)}],ln2:[hk,[],function(){return Math.LN2}],pi:[hk,[],function(){return Math.PI}],e:[hk,[],function(){return Math.E}],"^":[hk,[hk,hk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return Math.pow(r.evaluate(t),e.evaluate(t))}],sqrt:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.sqrt(i.evaluate(t))}],log10:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.log(i.evaluate(t))/Math.LN10}],ln:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.log(i.evaluate(t))}],log2:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.log(i.evaluate(t))/Math.LN2}],sin:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.sin(i.evaluate(t))}],cos:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.cos(i.evaluate(t))}],tan:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.tan(i.evaluate(t))}],asin:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.asin(i.evaluate(t))}],acos:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.acos(i.evaluate(t))}],atan:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.atan(i.evaluate(t))}],min:[hk,c_(hk),function(t,n){return Math.min.apply(Math,pS(n.map((function(n){return n.evaluate(t)}))))}],max:[hk,c_(hk),function(t,n){return Math.max.apply(Math,pS(n.map((function(n){return n.evaluate(t)}))))}],abs:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.abs(i.evaluate(t))}],round:[hk,[hk],function(t,n){var i=mS(n,1)[0].evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.floor(i.evaluate(t))}],ceil:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.ceil(i.evaluate(t))}],"filter-==":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return t.properties()[r.value]===e.value}],"filter-id-==":[lk,[pk],function(t,n){var i=mS(n,1)[0];return t.id()===i.value}],"filter-type-==":[lk,[fk],function(t,n){var i=mS(n,1)[0];return t.geometryType()===i.value}],"filter-<":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1],o=t.properties()[r.value],s=e.value;return RS(o)===RS(s)&&o<s}],"filter-id-<":[lk,[pk],function(t,n){var i=mS(n,1)[0],r=t.id(),e=i.value;return RS(r)===RS(e)&&r<e}],"filter->":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1],o=t.properties()[r.value],s=e.value;return RS(o)===RS(s)&&o>s}],"filter-id->":[lk,[pk],function(t,n){var i=mS(n,1)[0],r=t.id(),e=i.value;return RS(r)===RS(e)&&r>e}],"filter-<=":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1],o=t.properties()[r.value],s=e.value;return RS(o)===RS(s)&&o<=s}],"filter-id-<=":[lk,[pk],function(t,n){var i=mS(n,1)[0],r=t.id(),e=i.value;return RS(r)===RS(e)&&r<=e}],"filter->=":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1],o=t.properties()[r.value],s=e.value;return RS(o)===RS(s)&&o>=s}],"filter-id->=":[lk,[pk],function(t,n){var i=mS(n,1)[0],r=t.id(),e=i.value;return RS(r)===RS(e)&&r>=e}],"filter-has":[lk,[pk],function(t,n){return mS(n,1)[0].value in t.properties()}],"filter-has-id":[lk,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[lk,[bk(fk)],function(t,n){return mS(n,1)[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[lk,[bk(pk)],function(t,n){return mS(n,1)[0].value.indexOf(t.id())>=0}],"filter-in-small":[lk,[fk,bk(pk)],function(t,n){var i=mS(n,2),r=i[0];return i[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[lk,[fk,bk(pk)],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return function(t,n,i,r){for(;i<=r;){var e=i+r>>1;if(n[e]===t)return!0;n[e]>t?r=e-1:i=e+1}return!1}(t.properties()[r.value],e.value,0,e.value.length-1)}],all:{type:lk,overloads:[[[lk,lk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)&&e.evaluate(t)}],[c_(lk),function(t,n){var i,r=ES(n);try{for(r.s();!(i=r.n()).done;){if(!i.value.evaluate(t))return!1}}catch(t){r.e(t)}finally{r.f()}return!0}]]},any:{type:lk,overloads:[[[lk,lk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)||e.evaluate(t)}],[c_(lk),function(t,n){var i,r=ES(n);try{for(r.s();!(i=r.n()).done;){if(i.value.evaluate(t))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}]]},"!":[lk,[lk],function(t,n){return!mS(n,1)[0].evaluate(t)}],"is-supported-script":[lk,[fk],function(t,n){var i=mS(n,1)[0],r=t.globals&&t.globals.isSupportedScript;return!r||r(i.evaluate(t))}],upcase:[fk,[fk],function(t,n){return mS(n,1)[0].evaluate(t).toUpperCase()}],downcase:[fk,[fk],function(t,n){return mS(n,1)[0].evaluate(t).toLowerCase()}],concat:[fk,c_(pk),function(t,n){return n.map((function(n){return Ik(n.evaluate(t))})).join("")}],"resolved-locale":[fk,[yk],function(t,n){return mS(n,1)[0].evaluate(t).resolvedLocale()}]});var m_=function(){function t(n,i){var r;jS(this,t),this.expression=n,this._warningHistory={},this._evaluator=new Wk,this._defaultValue=i?"color"===(r=i).type&&y_(r.default)?new _k(0,0,0,0):"color"===r.type?_k.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=i&&"enum"===i.type?i.values:null}return xS(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,i,r,e,o){return this._evaluator.globals=t,this._evaluator.feature=n,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=e||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}},{key:"evaluate",value:function(t,n,i,r,e,o){this._evaluator.globals=t,this._evaluator.feature=n||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r,this._evaluator.availableImages=e||null,this._evaluator.formattedSection=o||null;try{var s=this.expression.evaluate(this._evaluator);if(null==s||"number"==typeof s&&s!=s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new zk("Expected value to be one of ".concat(Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", "),", but found ").concat(JSON.stringify(s)," instead."));return s}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}]),t}();function w_(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in o_}function b_(t,n){var i=new pM(o_,[],n?function(t){var n={color:vk,string:fk,number:hk,enum:fk,boolean:lk,formatted:mk,resolvedImage:wk};if("array"===t.type)return bk(n[t.value]||pk,t.length);return n[t.type]}(n):void 0),r=i.parse(t,void 0,void 0,void 0,n&&"string"===n.type?{typeAnnotation:"coerce"}:void 0);return r?h_(new m_(r,n)):f_(i.errors)}var g_=function(){function t(n,i){jS(this,t),this.kind=n,this._styleExpression=i,this.isStateDependent="constant"!==n&&!lM(i.expression)}return xS(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,i,r,e,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,i,r,e,o)}},{key:"evaluate",value:function(t,n,i,r,e,o){return this._styleExpression.evaluate(t,n,i,r,e,o)}}]),t}(),x_=function(){function t(n,i,r,e){jS(this,t),this.kind=n,this.zoomStops=r,this._styleExpression=i,this.isStateDependent="camera"!==n&&!lM(i.expression),this.interpolationType=e}return xS(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,i,r,e,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,i,r,e,o)}},{key:"evaluate",value:function(t,n,i,r,e,o){return this._styleExpression.evaluate(t,n,i,r,e,o)}},{key:"interpolationFactor",value:function(t,n,i){return this.interpolationType?GM.interpolationFactor(this.interpolationType,t,n,i):0}}]),t}();function j_(t,n){if("error"===(t=b_(t,n)).result)return t;var i=t.value.expression,r=fM(i);if(!r&&!l_(n))return f_([new ak("","data expressions not supported")]);var e=vM(i,["zoom"]);if(!e&&!v_(n))return f_([new ak("","zoom expressions not supported")]);var o=S_(i);if(!o&&!e)return f_([new ak("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof ak)return f_([o]);if(o instanceof GM&&!d_(n))return f_([new ak("",'"interpolate" expressions cannot be used with this property')]);if(!o)return h_(new g_(r?"constant":"source",t.value));var s=o instanceof GM?o.interpolation:void 0;return h_(new x_(r?"camera":"composite",t.value,o.labels,s))}function S_(t){var n=null;if(t instanceof qM)n=S_(t.result);else if(t instanceof UM){var i,r=ES(t.args);try{for(r.s();!(i=r.n()).done;){var e=i.value;if(n=S_(e))break}}catch(t){r.e(t)}finally{r.f()}}else(t instanceof wM||t instanceof GM)&&t.input instanceof Vk&&"zoom"===t.input.name&&(n=t);return n instanceof ak||t.eachChild((function(t){var i=S_(t);i instanceof ak?n=i:!n&&i?n=new ak("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&i&&n!==i&&(n=new ak("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),n}function k_(t){return"object"===RS(t)?["literal",t]:t}function M_(t,n){var i=t.stops;if(!i)return function(t,n){var i=["get",t.property];if(void 0===t.default)return"string"===n.type?["string",i]:i;if("enum"===n.type)return["match",i,Object.keys(n.values),i,t.default];var r=["color"===n.type?"to-color":n.type,i,k_(t.default)];return"array"===n.type&&r.splice(1,0,n.value,n.length||null),r}(t,n);var r=i&&"object"===RS(i[0][0]),e=r||void 0!==t.property,o=r||!e;return i=i.map((function(t){return!e&&n.tokens&&"string"==typeof t[1]?[t[0],R_(t[1])]:[t[0],k_(t[1])]})),r?function(t,n,i){for(var r={},e={},o=[],s=0;s<i.length;s++){var a=i[s],u=a[0].zoom;void 0===r[u]&&(r[u]={zoom:u,type:t.type,property:t.property,default:t.default},e[u]=[],o.push(u)),e[u].push([a[0].value,a[1]])}if("exponential"===C_({},n)){var c,h=[__(t),["linear"],["zoom"]],f=ES(o);try{for(f.s();!(c=f.n()).done;){var l=c.value;A_(h,l,T_(r[l],n,e[l]),!1)}}catch(t){f.e(t)}finally{f.f()}return h}var v,d=["step",["zoom"]],p=ES(o);try{for(p.s();!(v=p.n()).done;){var y=v.value;A_(d,y,T_(r[y],n,e[y]),!0)}}catch(t){p.e(t)}finally{p.f()}return E_(d),d}(t,n,i):o?function(t,n,i){var r,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["zoom"],o=C_(t,n),s=!1;if("interval"===o)r=["step",e],s=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'.concat(o,'"'));var a=void 0!==t.base?t.base:1;r=[__(t),1===a?["linear"]:["exponential",a],e]}var u,c=ES(i);try{for(c.s();!(u=c.n()).done;){var h=u.value;A_(r,h[0],h[1],s)}}catch(t){c.e(t)}finally{c.f()}return E_(r),r}(t,n,i):T_(t,n,i)}function __(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function O_(t,n){var i,r,e=k_((i=t.default,r=n.default,void 0!==i?i:void 0!==r?r:void 0));return void 0===e&&"resolvedImage"===n.type?"":e}function T_(t,n,i){var r=C_(t,n),e=["get",t.property];if("categorical"===r&&"boolean"==typeof i[0][0]){var o,s=["case"],a=ES(i);try{for(a.s();!(o=a.n()).done;){var u=o.value;s.push(["==",e,u[0]],u[1])}}catch(t){a.e(t)}finally{a.f()}return s.push(O_(t,n)),s}if("categorical"===r){var c,h=["match",e],f=ES(i);try{for(f.s();!(c=f.n()).done;){var l=c.value;A_(h,l[0],l[1],!1)}}catch(t){f.e(t)}finally{f.f()}return h.push(O_(t,n)),h}if("interval"===r){var v,d=["step",["number",e]],p=ES(i);try{for(p.s();!(v=p.n()).done;){var y=v.value;A_(d,y[0],y[1],!0)}}catch(t){p.e(t)}finally{p.f()}return E_(d),void 0===t.default?d:["case",["==",["typeof",e],"number"],d,k_(t.default)]}if("exponential"===r){var m,w=void 0!==t.base?t.base:1,b=[__(t),1===w?["linear"]:["exponential",w],["number",e]],g=ES(i);try{for(g.s();!(m=g.n()).done;){var x=m.value;A_(b,x[0],x[1],!1)}}catch(t){g.e(t)}finally{g.f()}return void 0===t.default?b:["case",["==",["typeof",e],"number"],b,k_(t.default)]}throw new Error("Unknown property function type ".concat(r))}function E_(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function A_(t,n,i,r){t.length>3&&n===t[t.length-2]||(r&&2===t.length||t.push(n),t.push(i))}function C_(t,n){return t.type?t.type:n.expression.interpolated?"exponential":"interval"}function R_(t){for(var n=["concat"],i=/{([^{}]+)}/g,r=0,e=i.exec(t);null!==e;e=i.exec(t)){var o=t.slice(r,i.lastIndex-e[0].length);r=i.lastIndex,o.length>0&&n.push(o),n.push(["get",e[1]])}if(1===n.length)return t;if(r<t.length)n.push(t.slice(r));else if(2===n.length)return["to-string",n[1]];return n}function P_(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":var n,i=ES(t.slice(1));try{for(i.s();!(n=i.n()).done;){var r=n.value;if(!P_(r)&&"boolean"!=typeof r)return!1}}catch(t){i.e(t)}finally{i.f()}return!0;default:return!0}}var I_={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function N_(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};P_(t)||(t=L_(t));var n=b_(t,I_);if("error"===n.result)throw new Error(n.value.map((function(t){return"".concat(t.key,": ").concat(t.message)})).join(", "));return{filter:function(t,i,r){return n.value.evaluate(t,i,{},r)},needGeometry:F_(t)}}function z_(t,n){return t<n?-1:t>n?1:0}function F_(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var n=1;n<t.length;n++)if(F_(t[n]))return!0;return!1}function L_(t){if(!t)return!0;var n,i=t[0];return t.length<=1?"any"!==i:"=="===i?G_(t[1],t[2],"=="):"!="===i?q_(G_(t[1],t[2],"==")):"<"===i||">"===i||"<="===i||">="===i?G_(t[1],t[2],i):"any"===i?(n=t.slice(1),["any"].concat(n.map(L_))):"all"===i?["all"].concat(t.slice(1).map(L_)):"none"===i?["all"].concat(t.slice(1).map(L_).map(q_)):"in"===i?D_(t[1],t.slice(2)):"!in"===i?q_(D_(t[1],t.slice(2))):"has"===i?U_(t[1]):"!has"===i?q_(U_(t[1])):"within"!==i||t}function G_(t,n,i){switch(t){case"$type":return["filter-type-".concat(i),n];case"$id":return["filter-id-".concat(i),n];default:return["filter-".concat(i),t,n]}}function D_(t,n){if(0===n.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",n]];case"$id":return["filter-id-in",["literal",n]];default:return n.length>200&&!n.some((function(t){return RS(t)!==RS(n[0])}))?["filter-in-large",t,["literal",n.sort(z_)]]:["filter-in-small",t,["literal",n]]}}function U_(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function q_(t){return["!",t]}var B_=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function W_(t,n){var i={};for(var r in t)"ref"!==r&&(i[r]=t[r]);return B_.forEach((function(t){t in n&&(i[t]=n[t])})),i}var V_=xS((function t(n,i,r,e){jS(this,t),this.message=(n?"".concat(n,": "):"")+r,e&&(this.identifier=e),null!=i&&i.cv&&(this.line=i.cv)})),X_=xS((function t(n){jS(this,t),this.error=n,this.message=n.message;var i=n.message.match(/line (\d+)/);this.line=i?parseInt(i[1],10):0}));function H_(t){var n=t.key,i=t.value;return i?[new V_(n,i,"constants have been deprecated as of v8")]:[]}function J_(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function K_(t){if(Array.isArray(t))return t.map(K_);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var n={};for(var i in t)n[i]=K_(t[i]);return n}return J_(t)}function Y_(t){var n=t.key,i=t.value,r=t.valueSpec||{},e=t.objectElementValidators||{},o=t.style,s=t.styleSpec,a=[],u=p_(i);if("object"!==u)return[new V_(n,i,"object expected, ".concat(u," found"))];for(var c in i){var h=c.split(".")[0],f=r[h]||r["*"],l=void 0;if(e[h])l=e[h];else if(r[h])l=pO;else if(e["*"])l=e["*"];else{if(!r["*"]){a.push(new V_(n,i[c],'unknown property "'.concat(c,'"')));continue}l=pO}a=a.concat(l({key:(n?"".concat(n,"."):n)+c,value:i[c],valueSpec:f,style:o,styleSpec:s,object:i,objectKey:c},i))}for(var v in r)e[v]||r[v].required&&void 0===r[v].default&&void 0===i[v]&&a.push(new V_(n,i,'missing required property "'.concat(v,'"')));return a}function Z_(t){var n=t.value,i=t.valueSpec,r=t.style,e=t.styleSpec,o=t.key,s=t.arrayElementValidator||pO;if("array"!==p_(n))return[new V_(o,n,"array expected, ".concat(p_(n)," found"))];if(i.length&&n.length!==i.length)return[new V_(o,n,"array length ".concat(i.length," expected, length ").concat(n.length," found"))];if(i["min-length"]&&n.length<i["min-length"])return[new V_(o,n,"array length at least ".concat(i["min-length"]," expected, length ").concat(n.length," found"))];var a={type:i.value,values:i.values,minimum:i.minimum,maximum:i.maximum};e.$version<7&&(a.function=i.function),"object"===p_(i.value)&&(a=i.value);for(var u=[],c=0;c<n.length;c++)u=u.concat(s({array:n,arrayIndex:c,value:n[c],valueSpec:a,style:r,styleSpec:e,key:"".concat(o,"[").concat(c,"]")}));return u}function $_(t){var n=t.key,i=t.value,r=t.valueSpec,e=p_(i);if("number"===e&&i!=i&&(e="NaN"),"number"!==e)return[new V_(n,i,"number expected, ".concat(e," found"))];if("minimum"in r){var o=r.minimum;if("array"===p_(r.minimum)){var s=t.arrayIndex;o=r.minimum[s]}if(i<o)return[new V_(n,i,"".concat(i," is less than the minimum value ").concat(o))]}if("maximum"in r){var a=r.maximum;if("array"===p_(r.maximum)){var u=t.arrayIndex;a=r.maximum[u]}if(i>a)return[new V_(n,i,"".concat(i," is greater than the maximum value ").concat(a))]}return[]}function Q_(t){var n,i,r,e=t.valueSpec,o=J_(t.value.type),s={},a="categorical"!==o&&void 0===t.value.property,u=!a,c="array"===p_(t.value.stops)&&"array"===p_(t.value.stops[0])&&"object"===p_(t.value.stops[0][0]),h=Y_({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new V_(t.key,t.value,'identity function may not have a "stops" property')];var n=[],i=t.value;n=n.concat(Z_({key:t.key,value:i,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),"array"===p_(i)&&0===i.length&&n.push(new V_(t.key,i,"array must have at least one stop"));return n},default:function(t){return pO({key:t.key,value:t.value,valueSpec:e,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&a&&h.push(new V_(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||h.push(new V_(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!d_(t.valueSpec)&&h.push(new V_(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!l_(t.valueSpec)?h.push(new V_(t.key,t.value,"property functions not supported")):a&&!v_(t.valueSpec)&&h.push(new V_(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==t.value.property||h.push(new V_(t.key,t.value,'"property" property is required')),h;function f(t){var n=[],o=t.value,a=t.key;if("array"!==p_(o))return[new V_(a,o,"array expected, ".concat(p_(o)," found"))];if(2!==o.length)return[new V_(a,o,"array length 2 expected, length ".concat(o.length," found"))];if(c){if("object"!==p_(o[0]))return[new V_(a,o,"object expected, ".concat(p_(o[0])," found"))];if(void 0===o[0].zoom)return[new V_(a,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new V_(a,o,"object stop key must have value")];if(r&&r>J_(o[0].zoom))return[new V_(a,o[0].zoom,"stop zoom values must appear in ascending order")];J_(o[0].zoom)!==r&&(r=J_(o[0].zoom),i=void 0,s={}),n=n.concat(Y_({key:"".concat(a,"[0]"),value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:$_,value:l}}))}else n=n.concat(l({key:"".concat(a,"[0]"),value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return w_(K_(o[1]))?n.concat([new V_("".concat(a,"[1]"),o[1],"expressions are not allowed in function stops.")]):n.concat(pO({key:"".concat(a,"[1]"),value:o[1],valueSpec:e,style:t.style,styleSpec:t.styleSpec}))}function l(t,r){var a=p_(t.value),u=J_(t.value),c=null!==t.value?t.value:r;if(n){if(a!==n)return[new V_(t.key,c,"".concat(a," stop domain type must match previous stop domain type ").concat(n))]}else n=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new V_(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==o){var h="number expected, ".concat(a," found");return l_(e)&&void 0===o&&(h+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new V_(t.key,c,h)]}return"categorical"!==o||"number"!==a||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===a&&void 0!==i&&u<i?[new V_(t.key,c,"stop domain values must appear in ascending order")]:(i=u,"categorical"===o&&u in s?[new V_(t.key,c,"stop domain values must be unique")]:(s[u]=!0,[])):[new V_(t.key,c,"integer expected, found ".concat(u))]}}function tO(t){var n=("property"===t.expressionContext?j_:b_)(K_(t.value),t.valueSpec);if("error"===n.result)return n.value.map((function(n){return new V_("".concat(t.key).concat(n.key),t.value,n.message)}));var i=n.value.expression||n.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!i.outputDefined())return[new V_(t.key,t.value,'Invalid data expression for "'.concat(t.propertyKey,'". Output values must be contained as literals within the expression.'))];if("property"===t.expressionContext&&"layout"===t.propertyType&&!lM(i))return[new V_(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!lM(i))return[new V_(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!vM(i,["zoom","feature-state"]))return[new V_(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!fM(i))return[new V_(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function nO(t){var n=t.key,i=t.value,r=t.valueSpec,e=[];return Array.isArray(r.values)?-1===r.values.indexOf(J_(i))&&e.push(new V_(n,i,"expected one of [".concat(r.values.join(", "),"], ").concat(JSON.stringify(i)," found"))):-1===Object.keys(r.values).indexOf(J_(i))&&e.push(new V_(n,i,"expected one of [".concat(Object.keys(r.values).join(", "),"], ").concat(JSON.stringify(i)," found"))),e}function iO(t){return P_(K_(t.value))?tO(sk({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):rO(t)}function rO(t){var n=t.value,i=t.key;if("array"!==p_(n))return[new V_(i,n,"array expected, ".concat(p_(n)," found"))];var r,e=t.styleSpec,o=[];if(n.length<1)return[new V_(i,n,"filter array must have at least 1 element")];switch(o=o.concat(nO({key:"".concat(i,"[0]"),value:n[0],valueSpec:e.filter_operator,style:t.style,styleSpec:t.styleSpec})),J_(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===J_(n[1])&&o.push(new V_(i,n,'"$type" cannot be use with operator "'.concat(n[0],'"')));case"==":case"!=":3!==n.length&&o.push(new V_(i,n,'filter array for operator "'.concat(n[0],'" must have 3 elements')));case"in":case"!in":n.length>=2&&"string"!==(r=p_(n[1]))&&o.push(new V_("".concat(i,"[1]"),n[1],"string expected, ".concat(r," found")));for(var s=2;s<n.length;s++)r=p_(n[s]),"$type"===J_(n[1])?o=o.concat(nO({key:"".concat(i,"[").concat(s,"]"),value:n[s],valueSpec:e.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==r&&"number"!==r&&"boolean"!==r&&o.push(new V_("".concat(i,"[").concat(s,"]"),n[s],"string, number, or boolean expected, ".concat(r," found")));break;case"any":case"all":case"none":for(var a=1;a<n.length;a++)o=o.concat(rO({key:"".concat(i,"[").concat(a,"]"),value:n[a],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":r=p_(n[1]),2!==n.length?o.push(new V_(i,n,'filter array for "'.concat(n[0],'" operator must have 2 elements'))):"string"!==r&&o.push(new V_("".concat(i,"[1]"),n[1],"string expected, ".concat(r," found")));break;case"within":r=p_(n[1]),2!==n.length?o.push(new V_(i,n,'filter array for "'.concat(n[0],'" operator must have 2 elements'))):"object"!==r&&o.push(new V_("".concat(i,"[1]"),n[1],"object expected, ".concat(r," found")))}return o}function eO(t,n){var i=t.key,r=t.style,e=t.styleSpec,o=t.value,s=t.objectKey,a=e["".concat(n,"_").concat(t.layerType)];if(!a)return[];var u=s.match(/^(.*)-transition$/);if("paint"===n&&u&&a[u[1]]&&a[u[1]].transition)return pO({key:i,value:o,valueSpec:e.transition,style:r,styleSpec:e});var c,h=t.valueSpec||a[s];if(!h)return[new V_(i,o,'unknown property "'.concat(s,'"'))];if("string"===p_(o)&&l_(h)&&!h.tokens&&(c=/^{([^}]+)}$/.exec(o)))return[new V_(i,o,'"'.concat(s,'" does not support interpolation syntax\n')+'Use an identity property function instead: `{ "type": "identity", "property": '.concat(JSON.stringify(c[1])," }`."))];var f=[];return"symbol"===t.layerType&&("text-field"===s&&r&&!r.glyphs&&f.push(new V_(i,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===s&&y_(K_(o))&&"identity"===J_(o.type)&&f.push(new V_(i,o,'"text-font" does not support identity functions'))),f.concat(pO({key:t.key,value:o,valueSpec:h,style:r,styleSpec:e,expressionContext:"property",propertyType:n,propertyKey:s}))}function oO(t){return eO(t,"paint")}function sO(t){return eO(t,"layout")}function aO(t){var n=[],i=t.value,r=t.key,e=t.style,o=t.styleSpec;i.type||i.ref||n.push(new V_(r,i,'either "type" or "ref" is required'));var s,a=J_(i.type),u=J_(i.ref);if(i.id)for(var c=J_(i.id),h=0;h<t.arrayIndex;h++){var f=e.layers[h];J_(f.id)===c&&n.push(new V_(r,i.id,'duplicate layer id "'.concat(i.id,'", previously used at line ').concat(f.id.cv)))}if("ref"in i)["type","source","source-layer","filter","layout"].forEach((function(t){t in i&&n.push(new V_(r,i[t],'"'.concat(t,'" is prohibited for ref layers')))})),e.layers.forEach((function(t){J_(t.id)===u&&(s=t)})),s?s.ref?n.push(new V_(r,i.ref,"ref cannot reference another ref layer")):a=J_(s.type):n.push(new V_(r,i.ref,'ref layer "'.concat(u,'" not found')));else if("background"!==a&&"sky"!==a)if(i.source){var l=e.sources&&e.sources[i.source],v=l&&J_(l.type);l?"vector"===v&&"raster"===a?n.push(new V_(r,i.source,'layer "'.concat(i.id,'" requires a raster source'))):"raster"===v&&"raster"!==a?n.push(new V_(r,i.source,'layer "'.concat(i.id,'" requires a vector source'))):"vector"!==v||i["source-layer"]?"raster-dem"===v&&"hillshade"!==a?n.push(new V_(r,i.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!i.paint||!i.paint["line-gradient"]||"geojson"===v&&l.lineMetrics||n.push(new V_(r,i,'layer "'.concat(i.id,'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.'))):n.push(new V_(r,i,'layer "'.concat(i.id,'" must specify a "source-layer"'))):n.push(new V_(r,i.source,'source "'.concat(i.source,'" not found')))}else n.push(new V_(r,i,'missing required property "source"'));return n=n.concat(Y_({key:r,value:i,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return pO({key:"".concat(r,".type"),value:i.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:i,objectKey:"type"})},filter:iO,layout:function(t){return Y_({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return sO(sk({layerType:a},t))}}})},paint:function(t){return Y_({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return oO(sk({layerType:a},t))}}})}}}))}function uO(t){var n=t.value,i=t.key,r=p_(n);return"string"!==r?[new V_(i,n,"string expected, ".concat(r," found"))]:[]}var cO={promoteId:function(t){var n=t.key,i=t.value;if("string"===p_(i))return uO({key:n,value:i});var r=[];for(var e in i)r.push.apply(r,pS(uO({key:"".concat(n,".").concat(e),value:i[e]})));return r}};function hO(t){var n=t.value,i=t.key,r=t.styleSpec,e=t.style;if(!n.type)return[new V_(i,n,'"type" is required')];var o,s=J_(n.type);switch(s){case"vector":case"raster":case"raster-dem":return o=Y_({key:i,value:n,valueSpec:r["source_".concat(s.replace("-","_"))],style:t.style,styleSpec:r,objectElementValidators:cO});case"geojson":if(o=Y_({key:i,value:n,valueSpec:r.source_geojson,style:e,styleSpec:r,objectElementValidators:cO}),n.cluster)for(var a in n.clusterProperties){var u,c,h=mS(n.clusterProperties[a],2),f=h[0],l=h[1],v="string"==typeof f?[f,["accumulated"],["get",a]]:f;(u=o).push.apply(u,pS(tO({key:"".concat(i,".").concat(a,".map"),value:l,expressionContext:"cluster-map"}))),(c=o).push.apply(c,pS(tO({key:"".concat(i,".").concat(a,".reduce"),value:v,expressionContext:"cluster-reduce"})))}return o;case"video":return Y_({key:i,value:n,valueSpec:r.source_video,style:e,styleSpec:r});case"image":return Y_({key:i,value:n,valueSpec:r.source_image,style:e,styleSpec:r});case"canvas":return[new V_(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return nO({key:"".concat(i,".type"),value:n.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:e,styleSpec:r})}}function fO(t){var n=t.value,i=t.styleSpec,r=i.light,e=t.style,o=[],s=p_(n);if(void 0===n)return o;if("object"!==s)return o=o.concat([new V_("light",n,"object expected, ".concat(s," found"))]);for(var a in n){var u=a.match(/^(.*)-transition$/);o=u&&r[u[1]]&&r[u[1]].transition?o.concat(pO({key:a,value:n[a],valueSpec:i.transition,style:e,styleSpec:i})):r[a]?o.concat(pO({key:a,value:n[a],valueSpec:r[a],style:e,styleSpec:i})):o.concat([new V_(a,n[a],'unknown property "'.concat(a,'"'))])}return o}function lO(t){var n=t.value,i=t.key,r=t.style,e=t.styleSpec,o=e.terrain,s=[],a=p_(n);if(void 0===n)return s;if("object"!==a)return s=s.concat([new V_("terrain",n,"object expected, ".concat(a," found"))]);for(var u in n){var c=u.match(/^(.*)-transition$/);s=c&&o[c[1]]&&o[c[1]].transition?s.concat(pO({key:u,value:n[u],valueSpec:e.transition,style:r,styleSpec:e})):o[u]?s.concat(pO({key:u,value:n[u],valueSpec:o[u],style:r,styleSpec:e})):s.concat([new V_(u,n[u],'unknown property "'.concat(u,'"'))])}if(n.source){var h=r.sources&&r.sources[n.source],f=h&&J_(h.type);h?"raster-dem"!==f&&s.push(new V_(i,n.source,"terrain cannot be used with a source of type ".concat(f,', it only be used with a "raster-dem" source type'))):s.push(new V_(i,n.source,'source "'.concat(n.source,'" not found')))}else s.push(new V_(i,n,'terrain is missing required property "source"'));return s}function vO(t){var n=t.value,i=t.style,r=t.styleSpec,e=r.fog,o=[],s=p_(n);if(void 0===n)return o;if("object"!==s)return o=o.concat([new V_("fog",n,"object expected, ".concat(s," found"))]);for(var a in n){var u=a.match(/^(.*)-transition$/);o=u&&e[u[1]]&&e[u[1]].transition?o.concat(pO({key:a,value:n[a],valueSpec:r.transition,style:i,styleSpec:r})):e[a]?o.concat(pO({key:a,value:n[a],valueSpec:e[a],style:i,styleSpec:r})):o.concat([new V_(a,n[a],'unknown property "'.concat(a,'"'))])}return o}var dO={"*":function(){return[]},array:Z_,boolean:function(t){var n=t.value,i=t.key,r=p_(n);return"boolean"!==r?[new V_(i,n,"boolean expected, ".concat(r," found"))]:[]},number:$_,color:function(t){var n=t.key,i=t.value,r=p_(i);return"string"!==r?[new V_(n,i,"color expected, ".concat(r," found"))]:null===Mk.parseCSSColor(i)?[new V_(n,i,'color expected, "'.concat(i,'" found'))]:[]},constants:H_,enum:nO,filter:iO,function:Q_,layer:aO,object:Y_,source:hO,light:fO,terrain:lO,fog:vO,string:uO,formatted:function(t){return 0===uO(t).length?[]:tO(t)},resolvedImage:function(t){return 0===uO(t).length?[]:tO(t)}};function pO(t){var n=t.value,i=t.valueSpec,r=t.styleSpec;return i.expression&&y_(J_(n))?Q_(t):i.expression&&w_(K_(n))?tO(t):i.type&&dO[i.type]?dO[i.type](t):Y_(sk({},t,{valueSpec:i.type?r[i.type]:i}))}function yO(t){var n=t.value,i=t.key,r=uO(t);return r.length||(-1===n.indexOf("{fontstack}")&&r.push(new V_(i,n,'"glyphs" url must include a "{fontstack}" token')),-1===n.indexOf("{range}")&&r.push(new V_(i,n,'"glyphs" url must include a "{range}" token'))),r}function mO(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PS,i=[];return i=i.concat(pO({key:"",value:t,valueSpec:n.$root,styleSpec:n,style:t,objectElementValidators:{glyphs:yO,"*":function(){return[]}}})),t.constants&&(i=i.concat(H_({key:"constants",value:t.constants,style:t,styleSpec:n}))),wO(i)}function wO(t){return[].concat(t).sort((function(t,n){return t.line-n.line}))}function bO(t){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return wO(t.apply(this,i))}}mO.source=bO(hO),mO.light=bO(fO),mO.terrain=bO(lO),mO.fog=bO(vO),mO.layer=bO(aO),mO.filter=bO(iO),mO.paintProperty=bO(oO),mO.layoutProperty=bO(sO);var gO=NS((function(t,n){var i=function(){var t=function(t,n,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=n);return i},n=[1,12],i=[1,13],r=[1,9],e=[1,10],o=[1,11],s=[1,14],a=[1,15],u=[14,18,22,24],c=[18,22],h=[22,24],f={trace:function(){},yy:{},hv:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},fv:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},lv:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,n,i,r,e,o,s){var a=o.length-1;switch(e){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.cv=this._$.first_line;break;case 2:this.$=new Number(t),this.$.cv=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.cv=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.cv=this._$.first_line;break;case 6:return this.$=o[a-1];case 13:this.$={},Object.defineProperty(this.$,"cv",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[a-1],Object.defineProperty(this.$,"cv",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[a-2],o[a]];break;case 16:this.$={},this.$[o[a][0]]=o[a][1];break;case 17:this.$=o[a-2],o[a-2][o[a][0]]=o[a][1];break;case 18:this.$=[],Object.defineProperty(this.$,"cv",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[a]];break;case 21:this.$=o[a-2],o[a-2].push(o[a])}},table:[{3:5,4:n,5:6,6:i,7:3,8:r,9:4,10:e,11:o,12:1,13:2,15:7,16:8,17:s,23:a},{1:[3]},{14:[1,16]},t(u,[2,7]),t(u,[2,8]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),t(u,[2,3]),t(u,[2,4]),t(u,[2,5]),t([14,18,21,22,24],[2,1]),t(u,[2,2]),{3:20,4:n,18:[1,17],19:18,20:19},{3:5,4:n,5:6,6:i,7:3,8:r,9:4,10:e,11:o,13:23,15:7,16:8,17:s,23:a,24:[1,21],25:22},{1:[2,6]},t(u,[2,13]),{18:[1,24],22:[1,25]},t(c,[2,16]),{21:[1,26]},t(u,[2,18]),{22:[1,28],24:[1,27]},t(h,[2,20]),t(u,[2,14]),{3:20,4:n,20:29},{3:5,4:n,5:6,6:i,7:3,8:r,9:4,10:e,11:o,13:30,15:7,16:8,17:s,23:a},t(u,[2,19]),{3:5,4:n,5:6,6:i,7:3,8:r,9:4,10:e,11:o,13:31,15:7,16:8,17:s,23:a},t(c,[2,17]),t(c,[2,15]),t(h,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,n){if(!n.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var n=this,i=[0],r=[null],e=[],o=this.table,s="",a=0,u=0,c=2,h=1,f=e.slice.call(arguments,1),l=Object.create(this.lexer),v={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(v.yy[d]=this.yy[d]);l.setInput(t,v.yy),v.yy.lexer=l,v.yy.parser=this,void 0===l.yylloc&&(l.yylloc={});var p=l.yylloc;e.push(p);var y=l.options&&l.options.ranges;function m(){var t;return"number"!=typeof(t=l.lex()||h)&&(t=n.hv[t]||t),t}"function"==typeof v.yy.parseError?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var w,b,g,x,j,S,k,M,_={};;){if(b=i[i.length-1],this.defaultActions[b]?g=this.defaultActions[b]:(null==w&&(w=m()),g=o[b]&&o[b][w]),void 0===g||!g.length||!g[0]){var O="";for(j in M=[],o[b])this.fv[j]&&j>c&&M.push("'"+this.fv[j]+"'");O=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.fv[w]||w)+"'":"Parse error on line "+(a+1)+": Unexpected "+(w==h?"end of input":"'"+(this.fv[w]||w)+"'"),this.parseError(O,{text:l.match,token:this.fv[w]||w,line:l.yylineno,loc:p,expected:M})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+w);switch(g[0]){case 1:i.push(w),r.push(l.yytext),e.push(l.yylloc),i.push(g[1]),w=null,u=l.yyleng,s=l.yytext,a=l.yylineno,p=l.yylloc;break;case 2:if(S=this.lv[g[1]][1],_.$=r[r.length-S],_._$={first_line:e[e.length-(S||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(S||1)].first_column,last_column:e[e.length-1].last_column},y&&(_._$.range=[e[e.length-(S||1)].range[0],e[e.length-1].range[1]]),void 0!==(x=this.performAction.apply(_,[s,u,a,v.yy,g[1],r,e].concat(f))))return x;S&&(i=i.slice(0,-1*S*2),r=r.slice(0,-1*S),e=e.slice(0,-1*S)),i.push(this.lv[g[1]][0]),r.push(_.$),e.push(_._$),k=o[i[i.length-2]][i[i.length-1]],i.push(k);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var i,r,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var o in e)this[o]=e[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,n,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),o=0;o<e.length;o++)if((i=this._input.match(this.rules[e[o]]))&&(!n||i[0].length>n[0].length)){if(n=i,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,e[o])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,e[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,n,i,r){switch(i){case 0:break;case 1:return 6;case 2:return n.yytext=n.yytext.substr(1,n.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function v(){this.yy={}}return f.lexer=l,v.prototype=f,f.Parser=v,new v}();n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)}}));function xO(t){if(t instanceof String||"string"==typeof t||t instanceof Buffer)try{return gO.parse(t.toString())}catch(t){throw new X_(t)}return t}function jO(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PS,i=t;try{i=xO(i)}catch(t){return[t]}return mO(i,n)}new Set(["vector","raster","raster-dem"]);var SO=w_,kO=j_,MO=M_,_O=y_;jO.parsed=jO,jO.latest=jO;var OO="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),r=1,e=arguments.length;r<e;++r){var o=arguments[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(i[s]=o[s])}return i};function TO(t){return t*Math.PI/180}var EO=function(){for(var t=[],n=78271.51696402048;t.length<=24;n/=2)t.push(n);return t}();function AO(t,n){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,n);var i=document.createElement("canvas");return i.width=t,i.height=n,i}var CO,RO=Array(256).join("");function PO(t,n){if(n>=.05){for(var i="",r=t.split("\n"),e=RO.slice(0,Math.round(n/.1)),o=0,s=r.length;o<s;++o)o>0&&(i+="\n"),i+=r[o].split("").join(e);return i}return t}function IO(){return CO||(CO=AO(1,1).getContext("2d")),CO}function NO(t,n){return IO().measureText(t).width+(t.length-1)*n}var zO={};function FO(t,n,i,r){if(-1!==t.indexOf("\n")){for(var e=t.split("\n"),o=[],s=0,a=e.length;s<a;++s)o.push(FO(e[s],n,i,r));return o.join("\n")}var u=i+","+n+","+t+","+r,c=zO[u];if(!c){var h=t.split(" ");if(h.length>1){var f=IO();f.font=n;var l=f.measureText("M").width*i,v="";for(o=[],s=0,a=h.length;s<a;++s){var d=h[s],p=v+(v?" ":"")+d;NO(p,r)<=l?v=p:(v&&o.push(v),v=d)}v&&o.push(v);for(s=0,a=o.length;s<a&&a>1;++s){var y=o[s];if(NO(y,r)<.35*l){var m=s>0?NO(o[s-1],r):1/0,w=s<a-1?NO(o[s+1],r):1/0;o.splice(s,1),a-=1,m<w?(o[s-1]+=" "+y,s-=1):o[s]=y+" "+o[s]}}for(s=0,a=o.length-1;s<a;++s){var b=o[s],g=o[s+1];if(NO(b,r)>.7*l&&NO(g,r)<.6*l){var x=b.split(" "),j=x.pop();NO(j,r)<.2*l&&(o[s]=x.join(" "),o[s+1]=j+" "+g),a-=1}}c=o.join("\n")}else c=t;c=PO(c,r),zO[u]=c}return c}function LO(t){return(LO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Xs&&Y(Xs,F,(function(){zO={}}));var GO,DO,UO=_O,qO=MO,BO=SO,WO=kO,VO={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},XO={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},HO={},JO={zoom:0};function KO(t,n,i,r,e,o){var s=t.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[s]||(o[s]={});var a=o[s];if(!a[i]){var u=(t[n]||HO)[i],c=PS["".concat(n,"_").concat(t.type)][i];void 0===u&&(u=c.default);var h=BO(u);if(!h&&UO(u)&&(u=qO(u,c),h=!0),h){var f=function(t,n){var i=WO(t,n);if("error"===i.result)throw new Error(i.value.map((function(t){return"".concat(t.key,": ").concat(t.message)})).join(", "));return i.value}(u,c);a[i]=f.evaluate.bind(f)}else"color"==c.type&&(u=_k.parse(u)),a[i]=function(){return u}}return JO.zoom=r,a[i](JO,e)}var YO=!1;function ZO(t,n){if(t){if(!YO&&(0===t.a||0===n))return;var i=t.a;return n=void 0===n?1:n,0===i?"transparent":"rgba("+Math.round(255*t.r/i)+","+Math.round(255*t.g/i)+","+Math.round(255*t.b/i)+","+i*n+")"}return t}var $O=/^([^]*)\{(.*)\}([^]*)$/;function QO(t,n){var i;do{if(i=t.match($O)){var r=n[i[2]]||"";t=i[1]+r+i[3]}}while(i);return t}var tT=!1;function nT(t,n,i,r,e,o,s){if(void 0===r&&(r=EO),"string"==typeof n&&(n=JSON.parse(n)),8!=n.version)throw new Error("glStyle version 8 required.");var a,u;if(o)if("undefined"!=typeof Image){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){a=c,u=[c.width,c.height],t.changed(),c.onload=null},c.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(a=t.data.image,u=[a.width,a.height])}))}for(var f,l=function(t){t=t.slice();for(var n=Object.create(null),i=0;i<t.length;i++)n[t[i].id]=t[i];for(var r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=W_(t[r],n[t[r].ref]));return t}(n.layers),v={},d=[],p={},y={},m={},w={},b=0,g=l.length;b<g;++b){var x=l[b],j=x.id;if("string"==typeof i&&x.source==i||-1!==i.indexOf(j)){var S=x["source-layer"];if(!f){f=x.source;var k=n.sources[f];if(!k)throw new Error('Source "'.concat(f,'" is not defined'));var M=k.type;if("vector"!==M&&"geojson"!==M)throw new Error('Source "'.concat(f,'" is not of type "vector" or "geojson", but "').concat(M,'"'))}var _=v[S];_||(_=[],v[S]=_),_.push({layer:x,index:b}),d.push(j)}}var O=new qv,T=new Tv,E=[],A=function(t,n){var i=t.getProperties(),o=v[i.layer];if(o){var c=r.indexOf(n);-1==c&&(c=function(t,n){for(var i=0,r=n.length;i<r;++i)if(n[i]<t&&i+1<r){var e=n[i]/n[i+1];return i+Math.log(n[i]/t)/Math.log(e)}return r-1}(n,r));for(var h,f=VO[t.getGeometry().getType()],l={properties:i,type:f},d=-1,b=function(r,v){var b=o[r],g=b.layer,x=g.id,j=g.layout||HO,S=g.paint||HO;if("none"===j.visibility||"minzoom"in g&&c<g.minzoom||"maxzoom"in g&&c>=g.maxzoom)return"continue";var k=g.filter;if(!k||function(t,n,i,r,e){return e||console.warn("No filterCache provided to evaluateFilter()"),t in e||(e[t]=N_(n).filter),JO.zoom=r,e[t](JO,i)}(x,k,l,c,w)){h=g;var M=void 0,_=void 0,A=void 0,C=void 0,R=void 0,P=void 0,I=b.index;if(3==f&&("fill"==g.type||"fill-extrusion"==g.type))if(_=KO(g,"paint",g.type+"-opacity",c,l,m),g.type+"-pattern"in S){var N=KO(g,"paint",g.type+"-pattern",c,l,m);if(N){var z="string"==typeof N?QO(N,i):N.toString();if(a&&e&&e[z]){++d,(P=E[d])&&P.getFill()&&!P.getStroke()&&!P.getText()||(P=new Yv({fill:new Tv}),E[d]=P),A=P.getFill(),P.setZIndex(I);var F=y[dt=z+"."+_];if(!F){var L=e[z],G=AO(L.width,L.height),D=G.getContext("2d");D.globalAlpha=_,D.drawImage(a,L.x,L.y,L.width,L.height,0,0,L.width,L.height),F=D.createPattern(G,"repeat"),y[dt]=F}A.setColor(F)}}}else M=ZO(KO(g,"paint",g.type+"-color",c,l,m),_),g.type+"-outline-color"in S&&(R=ZO(KO(g,"paint",g.type+"-outline-color",c,l,m),_)),R||(R=M),(M||R)&&(++d,(!(P=E[d])||M&&!P.getFill()||!M&&P.getFill()||R&&!P.getStroke()||!R&&P.getStroke()||P.getText())&&(P=new Yv({fill:M?new Tv:void 0,stroke:R?new qv:void 0}),E[d]=P),M&&(A=P.getFill()).setColor(M),R&&((C=P.getStroke()).setColor(R),C.setWidth(.5)),P.setZIndex(I));if(1!=f&&"line"==g.type){M=!("line-pattern"in S)&&"line-color"in S?ZO(KO(g,"paint","line-color",c,l,m),KO(g,"paint","line-opacity",c,l,m)):void 0;var U=KO(g,"paint","line-width",c,l,m);M&&U>0&&(++d,(P=E[d])&&P.getStroke()&&!P.getFill()&&!P.getText()||(P=new Yv({stroke:new qv}),E[d]=P),(C=P.getStroke()).setLineCap(KO(g,"layout","line-cap",c,l,m)),C.setLineJoin(KO(g,"layout","line-join",c,l,m)),C.setMiterLimit(KO(g,"layout","line-miter-limit",c,l,m)),C.setColor(M),C.setWidth(U),C.setLineDash(S["line-dasharray"]?KO(g,"paint","line-dasharray",c,l,m).map((function(t){return t*U})):null),P.setZIndex(I))}var q=!1,B=null,W=0,V=void 0,X=void 0,H=void 0;if((1==f||2==f)&&"icon-image"in j){var J=KO(g,"layout","icon-image",c,l,m);if(J){V="string"==typeof J?QO(J,i):J.toString();var K=void 0;if(a&&e&&e[V]){var Y=KO(g,"layout","icon-rotation-alignment",c,l,m);if(2==f){var Z=t.getGeometry();if(Z.getFlatMidpoint||Z.getFlatMidpoints){var $=Z.getExtent();if(Math.sqrt(Math.max(Math.pow(($[2]-$[0])/n,2),Math.pow(($[3]-$[1])/n,2)))>150){var Q="MultiLineString"===Z.getType()?Z.getFlatMidpoints():Z.getFlatMidpoint();if(DO||(DO=new Aj("Point",GO=[NaN,NaN],[],{},null)),K=DO,GO[0]=Q[0],GO[1]=Q[1],"line"===(Rt=KO(g,"layout","symbol-placement",c,l,m))&&"map"===Y)for(var tt=Z.getStride(),nt=Z.getFlatCoordinates(),it=0,rt=nt.length-tt;it<rt;it+=tt){var et=nt[it],ot=nt[it+1],st=nt[it+tt],at=nt[it+tt+1],ut=Math.min(et,st),ct=Math.min(ot,at),ht=Math.max(et,st),ft=Math.max(ot,at);if(Q[0]>=ut&&Q[0]<=ht&&Q[1]>=ct&&Q[1]<=ft){W=Math.atan2(ot-at,st-et);break}}}}}if(2!==f||K){var lt=KO(g,"layout","icon-size",c,l,m),vt=void 0!==S["icon-color"]?KO(g,"paint","icon-color",c,l,m):null;if(!vt||0!==vt.a){var dt=V+"."+lt;if(null!==vt&&(dt+="."+vt),!(X=p[dt])){var pt=e[V];X=new Uv({color:vt?[255*vt.r,255*vt.g,255*vt.b,vt.a]:void 0,img:a,imgSize:u,size:[pt.width,pt.height],offset:[pt.x,pt.y],rotateWithView:"map"===Y,scale:lt/pt.pixelRatio,displacement:"icon-offset"in j?KO(g,"layout","icon-offset",c,l,m).map((function(t){return-t*pt.pixelRatio})):void 0}),p[dt]=X}}X&&(++d,(P=E[d])&&P.getImage()&&!P.getFill()&&!P.getStroke()||(P=new Yv,E[d]=P),P.setGeometry(K),X.setRotation(W+TO(KO(g,"layout","icon-rotate",c,l,m))),X.setOpacity(KO(g,"paint","icon-opacity",c,l,m)),X.setAnchor(XO[KO(g,"layout","icon-anchor",c,l,m)]),P.setImage(X),B=P.getText(),P.setText(void 0),P.setZIndex(I),q=!0,H=!1)}else H=!0}}}if(1==f&&"circle"===g.type){++d,(P=E[d])&&P.getImage()&&!P.getFill()&&!P.getStroke()||(P=new Yv,E[d]=P);var yt="circle-radius"in S?KO(g,"paint","circle-radius",c,l,m):5,mt=ZO(KO(g,"paint","circle-stroke-color",c,l,m),KO(g,"paint","circle-stroke-opacity",c,l,m)),wt=ZO(KO(g,"paint","circle-color",c,l,m),KO(g,"paint","circle-opacity",c,l,m)),bt=KO(g,"paint","circle-stroke-width",c,l,m),gt=yt+"."+mt+"."+wt+"."+bt;(X=p[gt])||(X=new Ov({radius:yt,stroke:mt&&bt>0?new qv({width:bt,color:mt}):void 0,fill:wt?new Tv({color:wt}):void 0}),p[gt]=X),P.setImage(X),B=P.getText(),P.setText(void 0),P.setGeometry(void 0),P.setZIndex(I),q=!0}var xt,jt,St,kt,Mt=void 0,_t=void 0;if("text-field"in j){jt=Math.round(KO(g,"layout","text-size",c,l,m));var Ot=KO(g,"layout","text-font",c,l,m);xt=KO(g,"layout","text-line-height",c,l,m),_t=dS(s?s(Ot):Ot,jt,xt),St=KO(g,"layout","text-letter-spacing",c,l,m),kt=KO(g,"layout","text-max-width",c,l,m);var Tt=KO(g,"layout","text-field",c,l,m);Mt="object"===LO(Tt)&&Tt.sections?1===Tt.sections.length?Tt.toString():Tt.sections.reduce((function(t,n,i){var r=n.fontStack?n.fontStack.split(","):Ot,e=dS(s?s(r):r,jt*(n.scale||1),xt),o=n.text;if("\n"===o)return t.push("\n",""),t;if(2!=f){for(var a=0,u=(o=FO(o,e,kt,St).split("\n")).length;a<u;++a)a>0&&t.push("\n",""),t.push(o[a],e);return t}t.push(PO(o,St),e)}),[]):QO(Tt,i).trim(),_=KO(g,"paint","text-opacity",c,l,m)}if(Mt&&_&&!H){q||(++d,(P=E[d])&&P.getText()&&!P.getFill()&&!P.getStroke()||(P=new Yv,E[d]=P),P.setImage(void 0),P.setGeometry(void 0)),P.getText()||P.setText(B||new Qv({padding:[2,2,2,2]})),B=P.getText();var Et=j["text-transform"];"uppercase"==Et?Mt=Array.isArray(Mt)?Mt.map((function(t,n){return n%2?t:t.toUpperCase()})):Mt.toUpperCase():"lowercase"==Et&&(Mt=Array.isArray(Mt)?Mt.map((function(t,n){return n%2?t:t.toLowerCase()})):Mt.toLowerCase());var At=Array.isArray(Mt)?Mt:2==f?PO(Mt,St):FO(Mt,_t,kt,St);B.setText(At),B.setFont(_t),B.setRotation(TO(KO(g,"layout","text-rotate",c,l,m)));var Ct=KO(g,"layout","text-anchor",c,l,m),Rt=q||1==f?"point":KO(g,"layout","symbol-placement",c,l,m);B.setPlacement(Rt);var Pt=KO(g,"paint","text-halo-width",c,l,m),It=KO(g,"layout","text-offset",c,l,m),Nt=KO(g,"paint","text-translate",c,l,m),zt=0,Ft=0;if("point"==Rt){var Lt="center";-1!==Ct.indexOf("left")?(Lt="left",Ft=Pt):-1!==Ct.indexOf("right")&&(Lt="right",Ft=-Pt),B.setTextAlign(Lt);var Gt=KO(g,"layout","text-rotation-alignment",c,l,m);B.setRotateWithView("map"==Gt)}else B.setMaxAngle(TO(KO(g,"layout","text-max-angle",c,l,m))*Mt.length/At.length),B.setTextAlign(),B.setRotateWithView(!1);var Dt="middle";0==Ct.indexOf("bottom")?(Dt="bottom",zt=-Pt-.5*(xt-1)*jt):0==Ct.indexOf("top")&&(Dt="top",zt=Pt+.5*(xt-1)*jt),B.setTextBaseline(Dt),B.setOffsetX(It[0]*jt+Ft+Nt[0]),B.setOffsetY(It[1]*jt+zt+Nt[1]),T.setColor(ZO(KO(g,"paint","text-color",c,l,m),_)),B.setFill(T);var Ut=ZO(KO(g,"paint","text-halo-color",c,l,m),_);if(Ut){O.setColor(Ut),Pt*=2;var qt=.5*jt;O.setWidth(Pt<=qt?Pt:qt),B.setStroke(O)}else B.setStroke(void 0);var Bt=KO(g,"layout","text-padding",c,l,m),Wt=B.getPadding();Bt!==Wt[0]&&(Wt[0]=Bt,Wt[1]=Bt,Wt[2]=Bt,Wt[3]=Bt),P.setZIndex(I)}}},g=0,x=o.length;g<x;++g)b(g);return d>-1?(E.length=d+1,tT&&("function"==typeof t.set?t.set("mapbox-layer",h):t.getProperties()["mapbox-layer"]=h),E):void 0}};return t.setStyle(A),t.set("mapbox-source",f),t.set("mapbox-layers",d),A}var iT=i(338);function rT(t){return(rT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var eT,oT={},sT=/font-family: ?([^;]*);/,aT=/("|')/g;function uT(t){if(!eT){eT={};for(var n=document.styleSheets,i=0,r=n.length;i<r;++i){var e=n[i];try{var o=e.rules||e.cssRules;if(o)for(var s=0,a=o.length;s<a;++s){var u=o[s];if(5==u.type){var c=u.cssText.match(sT);eT[c[1].replace(aT,"")]=!0}}}catch(t){}}}return t in eT}var cT={},hT=iT.getNames();function fT(t){var n=t.toString();if(n in cT)return t;for(var i=t.map((function(t){var n=dS(t,1).split(" ");return[n.slice(3).join(" ").replace(/"/g,""),n[1]+n[0]]})),r=0,e=i.length;r<e;++r){var o=i[r],s=o[0];if(!uT(s)&&-1!==hT.indexOf(s)){var a="https://fonts.googleapis.com/css?family="+s.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+a+'"]')){var u=document.createElement("link");u.href=a,u.rel="stylesheet",document.head.appendChild(u)}}}return cT[n]=!0,t}var lT=/^(.*)(\?.*)$/;function vT(t,n){return n&&0===t.indexOf(".")&&(t=n+t),t}function dT(t,n,i){var r=(t=vT(t,n)).match(lT);return r?r[1]+i+(r.length>2?r[2]:""):t+i}function pT(t,n,i,r,e){return new Promise((function(o,s){if("object"!=rT(n)&&(n=JSON.parse(n)),8!=n.version)return s(new Error("glStyle version 8 required."));if(!(t instanceof Rj||t instanceof rS))return s(new Error("Can only apply to VectorLayer or VectorTileLayer"));var a,u,c;function h(){c||n.sprite&&!a?c?(t.setStyle(c),o()):s(new Error("Something went wrong trying to apply style.")):(c=nT(t,n,i,e,a,u,fT),t.getStyle()?o():s(new Error("Nothing to show for source [".concat(i,"]"))))}if(n.sprite){var f=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",l=dT(n.sprite,r,f+".json");fetch(l,{credentials:"same-origin"}).then((function(t){return t.ok||""===f?t:(l=dT(n.sprite,r,".json"),fetch(l,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();s(new Error("Problem fetching sprite from ".concat(l,": ").concat(t.statusText)))})).then((function(t){if(void 0===t)return s(new Error("No sprites found."));a=t,u=dT(n.sprite,r,f+".png"),h()})).catch((function(t){s(new Error("Sprites cannot be loaded: ".concat(l,": ").concat(t.message)))}))}else h()}))}var yT={};function mT(t,n){var i={id:n.id,type:n.type},r={};function e(e){var o=n.layout||{},s=n.paint||{};i.paint=s;var a,u,c="function"==typeof t.getSource?t.getSource().getTileGrid().getZForResolution(e):t.getView().getZoom(),h="function"==typeof t.getTargetElement?t.getTargetElement():void 0;if(void 0!==s["background-color"]&&(a=KO(i,"paint","background-color",c,yT,r),h&&(h.style.background=_k.parse(a).toString())),void 0!==s["background-opacity"]&&(u=KO(i,"paint","background-opacity",c,yT,r),h&&(h.style.opacity=u)),"none"!=o.visibility)return ZO(a,u);h&&(h.style.backgroundColor="",h.style.opacity="")}if("function"==typeof t.getTargetElement)t.getTargetElement()&&e(),t.on(["change:resolution","change:target"],e);else{if("function"!=typeof t.setBackground)throw new Error("Unable to apply background.");t.setBackground(e)}}function wT(t){var n=t.bounds;if(n){var i=_r([n[0],n[1]]),r=_r([n[2],n[3]]);return[i[0],i[1],r[0],r[1]]}}function bT(t,n){t=OO({},t);var i=[n,JSON.stringify(t)].toString(),r=oT[i];return r||(r=new rx({url:t.tiles?void 0:n,tileJSON:t.tiles?t:void 0}),oT[i]=r),new Promise((function(t){var i=r.on("change",(function(){var e=r.getState();if("ready"===e){var o=r.getTileJSON(),s=Array.isArray(o.tiles)?o.tiles:[o.tiles];if(n)for(var a=0,u=s.length;a<u;++a)s[a]=decodeURI(new URL(s[a],n).href);var c=r.getTileGrid(),h=wT(o),f=o.minzoom||0,l=o.maxzoom||22,v=r.get("ol-source");void 0===v&&(v=new sg({attributions:r.getAttributions(),format:new nS,tileGrid:new Vh({origin:c.getOrigin(0),extent:h||c.getExtent(),minZoom:f,resolutions:EO.slice(0,l+1),tileSize:512}),urls:s}),r.set("ol-source",v)),nt(i),t(v)}else"error"===e&&(r.set("ol-source",null),nt(i),t(void 0))}));"ready"===r.getState()&&r.changed()}))}new vS;var gT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xT="https://api.mapbox.com";function jT(t){var n="mapbox://";return 0!==t.indexOf(n)?"":t.slice(n.length)}function ST(t,n,i){var r=jT(t);if(!r)return decodeURI(new URL(t,i).href);var e="sprites/";if(0!==r.indexOf(e))throw new Error("unexpected sprites url: ".concat(t));var o=r.slice(e.length);return"".concat(xT,"/styles/v1/").concat(o,"/sprite?access_token=").concat(n)}function kT(t,n,i){var r=jT(t);if(!r)return decodeURI(new URL(t,i).href);var e="fonts/";if(0!==r.indexOf(e))throw new Error("unexpected fonts url: ".concat(t));var o=r.slice(e.length);return"".concat(xT,"/fonts/v1/").concat(o,"/0-255.pbf?access_token=").concat(n)}function MT(t,n){var i=jT(t);if(!i)return decodeURI(new URL(t,location.href).href);var r="styles/";if(0!==i.indexOf(r))throw new Error("unexpected style url: ".concat(t));var e=i.slice(r.length);return"".concat(xT,"/styles/v1/").concat(e,"?&access_token=").concat(n)}function _T(t,n,i,r){var e=new URL(t,r),o=jT(t);return o?"https://{a-d}.tiles.mapbox.com/v4/".concat(o,"/{z}/{x}/{y}.vector.pbf?access_token=").concat(n):n?(e.searchParams.set(i,n),decodeURI(e.href)):decodeURI(e.href)}var OT=function(t){function n(n){var i=t.call(this,z)||this;return i.error=n,i}return gT(n,t),n}(f),TT="vector",ET=function(t){function n(n){var i=this,r=!("declutter"in n)||n.declutter,e=new sg({state:ds,format:new nS});((i=t.call(this,{source:e,background:n.background,declutter:r,className:n.className,opacity:n.opacity,visible:n.visible,zIndex:n.zIndex,minResolution:n.minResolution,maxResolution:n.maxResolution,minZoom:n.minZoom,maxZoom:n.maxZoom,renderOrder:n.renderOrder,renderBuffer:n.renderBuffer,renderMode:n.renderMode,map:n.map,updateWhileAnimating:n.updateWhileAnimating,updateWhileInteracting:n.updateWhileInteracting,preload:n.preload,useInterimTilesOnError:n.useInterimTilesOnError,properties:n.properties})||this).vv=void 0===n.maxResolution&&void 0===n.minZoom,i.sourceId=n.source,i.layers=n.layers,n.accessToken)?i.accessToken=n.accessToken:new URL(n.styleUrl,location.href).searchParams.forEach((function(t,n){i.accessToken=t,i.dv=n}));return i.fetchStyle(n.styleUrl),i}return gT(n,t),n.prototype.fetchStyle=function(t){var n=this,i=MT(t,this.accessToken);fetch(i).then((function(t){if(!t.ok)throw new Error("unexpected response when fetching style: ".concat(t.status));return t.json()})).then((function(t){n.onStyleLoad(t,i.startsWith("data:")?location.href:i)})).catch((function(t){n.handleError(t)}))},n.prototype.onStyleLoad=function(t,n){var i,r,e=this;if(this.layers){for(var o={},s=0;s<t.layers.length;++s){var a=t.layers[s];a.source&&(o[a.id]=a.source)}var u=void 0;for(s=0;s<this.layers.length;++s){var c=o[this.layers[s]];if(!c)return void this.handleError(new Error("could not find source for ".concat(this.layers[s])));if(u){if(u!==c)return void this.handleError(new Error("layers can only use a single source, found ".concat(u," and ").concat(c)))}else u=c}i=u,r=this.layers}else i=this.sourceId,r=i;r||(i=Object.keys(t.sources)[0],r=i),t.sprite&&(t.sprite=ST(t.sprite,this.accessToken,n)),t.glyphs&&(t.glyphs=kT(t.glyphs,this.accessToken,n));var h=t.sources[i];if(h.type===TT){var f=this.getSource();h.url&&0===h.url.indexOf("mapbox://")?(f.setUrl(_T(h.url,this.accessToken,this.dv,n)),pT(this,t,r).then((function(){e.configureSource(f,t)})).catch((function(t){e.handleError(t)}))):(h.tiles&&(h.tiles=h.tiles.map((function(t){return _T(t,e.accessToken,e.dv,n)}))),bT(h,h.url?_T(h.url,this.accessToken,this.dv,n):void 0).then((function(n){pT(e,t,r).then((function(){e.configureSource(n,t)})).catch((function(i){e.configureSource(n,t),e.handleError(i)}))})))}else this.handleError(new Error("only works for vector sources, found ".concat(h.type)))},n.prototype.configureSource=function(t,n){var i,r=this.getSource();if(t!==r&&(r.setAttributions(t.getAttributions()),r.setTileUrlFunction(t.getTileUrlFunction()),r.setTileLoadFunction(t.getTileLoadFunction()),r.tileGrid=t.tileGrid),void 0===this.getBackground()&&(i=this,n.layers.some((function(t){if("background"==t.type)return mT(i,t),!0}))),this.vv){var e=r.getTileGrid();this.setMaxResolution(e.getResolution(e.getMinZoom()))}r.setState(ps)},n.prototype.handleError=function(t){this.dispatchEvent(new OT(t)),this.getSource().setState(ys)},n}(rS),AT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),CT=function(t){function n(n){var i=this,r=n||{},e=E({},r);return delete e.imageRatio,(i=t.call(this,e)||this).pv=void 0!==r.imageRatio?r.imageRatio:1,i}return AT(n,t),n.prototype.getImageRatio=function(){return this.pv},n.prototype.createRenderer=function(){return new aj(this)},n}(px),RT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),PT=function(t){function n(n){var i=this,r=E({},n);return(i=t.call(this,r)||this).yv=wv(n.style),i.mv=n.style.variables||{},i.wv=!!n.disableHitDetection,i}return RT(n,t),n.prototype.createRenderer=function(){return new mx(this,{vertexShader:this.yv.builder.getSymbolVertexShader(),fragmentShader:this.yv.builder.getSymbolFragmentShader(),hitVertexShader:!this.wv&&this.yv.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.wv&&this.yv.builder.getSymbolFragmentShader(!0),uniforms:this.yv.uniforms,attributes:this.yv.attributes})},n.prototype.updateStyleVariables=function(t){E(this.mv,t),this.changed()},n}(bs),IT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function NT(t,n){var i="\n attribute vec2 ".concat(Pl.TEXTURE_COORD,";\n uniform mat4 ").concat(Rl.TILE_TRANSFORM,";\n uniform float ").concat(Rl.TEXTURE_PIXEL_WIDTH,";\n uniform float ").concat(Rl.TEXTURE_PIXEL_HEIGHT,";\n uniform float ").concat(Rl.TEXTURE_RESOLUTION,";\n uniform float ").concat(Rl.TEXTURE_ORIGIN_X,";\n uniform float ").concat(Rl.TEXTURE_ORIGIN_Y,";\n uniform float ").concat(Rl.DEPTH,";\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n\n void main() {\n v_textureCoord = ").concat(Pl.TEXTURE_COORD,";\n v_mapCoord = vec2(\n ").concat(Rl.TEXTURE_ORIGIN_X," + ").concat(Rl.TEXTURE_RESOLUTION," * ").concat(Rl.TEXTURE_PIXEL_WIDTH," * v_textureCoord[0],\n ").concat(Rl.TEXTURE_ORIGIN_Y," - ").concat(Rl.TEXTURE_RESOLUTION," * ").concat(Rl.TEXTURE_PIXEL_HEIGHT," * v_textureCoord[1]\n );\n gl_Position = ").concat(Rl.TILE_TRANSFORM," * vec4(").concat(Pl.TEXTURE_COORD,", ").concat(Rl.DEPTH,", 1.0);\n }\n "),r={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:n},e=[];if(void 0!==t.color){var o=iv(r,t.color,Bl);e.push("color = ".concat(o,";"))}if(void 0!==t.contrast){var s=iv(r,t.contrast,Ul);e.push("color.rgb = clamp((".concat(s," + 1.0) * color.rgb - (").concat(s," / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(void 0!==t.exposure){var a=iv(r,t.exposure,Ul);e.push("color.rgb = clamp((".concat(a," + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(void 0!==t.saturation){var u=iv(r,t.saturation,Ul);e.push("\n float saturation = ".concat(u," + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n "))}if(void 0!==t.gamma){var c=iv(r,t.gamma,Ul);e.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(c,"));"))}if(void 0!==t.brightness){var h=iv(r,t.brightness,Ul);e.push("color.rgb = clamp(color.rgb + ".concat(h,", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}var f={},l=r.variables.length;if(l>1&&!t.variables)throw new Error("Missing variables in style (expected ".concat(r.variables,")"));for(var v=function(n){var i=r.variables[n];if(!(i in t.variables))throw new Error("Missing '".concat(i,"' in style variables"));var e=lv(i);f[e]=function(){var n=t.variables[i];return"string"==typeof n&&(n=tv(r,n)),void 0!==n?n:-9999999}},d=0;d<l;++d)v(d);var p=Object.keys(f).map((function(t){return"uniform float ".concat(t,";")})),y=Math.ceil(n/4);p.push("uniform sampler2D ".concat(Rl.TILE_TEXTURE_ARRAY,"[").concat(y,"];")),r.paletteTextures&&p.push("uniform sampler2D ".concat(vv,"[").concat(r.paletteTextures.length,"];"));var m=Object.keys(r.functions).map((function(t){return r.functions[t]}));return{vertexShader:i,fragmentShader:"\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n uniform vec4 ".concat(Rl.RENDER_EXTENT,";\n uniform float ").concat(Rl.TRANSITION_ALPHA,";\n uniform float ").concat(Rl.TEXTURE_PIXEL_WIDTH,";\n uniform float ").concat(Rl.TEXTURE_PIXEL_HEIGHT,";\n uniform float ").concat(Rl.RESOLUTION,";\n uniform float ").concat(Rl.ZOOM,";\n\n ").concat(p.join("\n"),"\n\n ").concat(m.join("\n"),"\n\n void main() {\n if (\n v_mapCoord[0] < ").concat(Rl.RENDER_EXTENT,"[0] ||\n v_mapCoord[1] < ").concat(Rl.RENDER_EXTENT,"[1] ||\n v_mapCoord[0] > ").concat(Rl.RENDER_EXTENT,"[2] ||\n v_mapCoord[1] > ").concat(Rl.RENDER_EXTENT,"[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(").concat(Rl.TILE_TEXTURE_ARRAY,"[0], v_textureCoord);\n\n ").concat(e.join("\n"),"\n\n if (color.a == 0.0) {\n discard;\n }\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ").concat(Rl.TRANSITION_ALPHA,";\n }"),uniforms:f,paletteTextures:r.paletteTextures}}var zT=function(t){function n(n){var i=this,r=n?E({},n):{},e=r.style||{};delete r.style;var o=r.cacheSize;return delete r.cacheSize,(i=t.call(this,r)||this).bv=r.sources,i.Pf=NaN,i.K=e,i.$t=o,i.mv=i.K.variables||{},i.addChangeListener(rs,i.gv),i}return IT(n,t),n.prototype.getSources=function(t,n){var i=this.getSource();return this.bv?"function"==typeof this.bv?this.bv(t,n):this.bv:i?[i]:[]},n.prototype.getRenderSource=function(){return this.getLayerState().source||this.getSource()},n.prototype.getSourceState=function(){var t=this.getRenderSource();return t?t.getState():vs},n.prototype.gv=function(){this.getSource()&&this.setStyle(this.K)},n.prototype.xv=function(){var t=this.getSource();return t&&"bandCount"in t?t.bandCount:4},n.prototype.createRenderer=function(){var t=NT(this.K,this.xv());return new Dl(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.$t,paletteTextures:t.paletteTextures})},n.prototype.renderSources=function(t,n){for(var i,r=this.getRenderer(),e=0,o=n.length;e<o;++e)this.getLayerState().source=n[e],r.prepareFrame(t)&&(i=r.renderFrame(t));return i},n.prototype.render=function(t,n){var i=this;this.rendered=!0;for(var r=t.viewState,e=this.getSources(t.extent,r.resolution),o=!0,s=function(t,n){var r=e[t],s=r.getState();if(s==ds){r.addEventListener("change",(function t(){r.getState()==ps&&(r.removeEventListener("change",t),i.changed())}))}o=o&&s==ps},a=0,u=e.length;a<u;++a)s(a);var c=this.renderSources(t,e);if(this.getRenderer().renderComplete&&o)return this.Pf=r.resolution,c;if(this.Pf>.5*r.resolution){var h=this.getSources(t.extent,this.Pf).filter((function(t){return!e.includes(t)}));if(h.length>0)return this.renderSources(t,h)}return c},n.prototype.setStyle=function(t){this.mv=t.variables||{},this.K=t;var n=NT(this.K,this.xv());this.getRenderer().reset({vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms,paletteTextures:n.paletteTextures}),this.changed()},n.prototype.updateStyleVariables=function(t){E(this.mv,t),this.changed()},n}(_g);zT.prototype.dispose;var FT=zT,LT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),GT="addfeatures",DT=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.features=r,o.file=i,o.projection=e,o}return LT(n,t),n}(f),UT=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{handleEvent:k})||this).on,i.once,i.un,i.jv=!1,i.Sv=[];for(var e=r.formatConstructors?r.formatConstructors:[],o=0,s=e.length;o<s;++o){var a=e[o];"function"==typeof a&&(a=new a),i.Sv.push(a),i.jv=i.jv||a.getType()===oh}return i.di=r.projection?br(r.projection):null,i.kv=null,i.Mv=r.source||null,i.target=r.target?r.target:null,i}return LT(n,t),n.prototype._v=function(t,n){var i,r=n.target.result,e=this.getMap(),o=this.di;o||(o=e.getView().getProjection());for(var s=this.Sv,a=0,u=s.length;a<u;++a){var c=s[a],h=r;this.jv&&c.getType()!==oh&&(void 0===i&&(i=(new TextDecoder).decode(r)),h=i);var f=this.Ov(c,h,{featureProjection:o});if(f&&f.length>0){this.Mv&&(this.Mv.clear(),this.Mv.addFeatures(f)),this.dispatchEvent(new DT(GT,t,f,o));break}}},n.prototype.Tv=function(){var t=this.getMap();if(t){var n=this.target?this.target:t.getViewport();this.kv=[Y(n,B,this.handleDrop,this),Y(n,U,this.handleStop,this),Y(n,q,this.handleStop,this),Y(n,B,this.handleStop,this)]}},n.prototype.setActive=function(n){!this.getActive()&&n&&this.Tv(),this.getActive()&&!n&&this.Ev(),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Ev(),t.prototype.setMap.call(this,n),this.getActive()&&this.Tv()},n.prototype.Ov=function(t,n,i){try{return t.readFeatures(n,i)}catch(t){return null}},n.prototype.Ev=function(){this.kv&&(this.kv.forEach($),this.kv=null)},n.prototype.handleDrop=function(t){for(var n=t.dataTransfer.files,i=0,r=n.length;i<r;++i){var e=n.item(i),o=new FileReader;o.addEventListener(X,this._v.bind(this,e)),this.jv?o.readAsArrayBuffer(e):o.readAsText(e)}},n.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},n}(Su),qT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),BT=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,r)||this).Jr=r.condition?r.condition:Gu,i.Yr=void 0,i.Av=void 0,i._e=0,i.Fr=void 0!==r.duration?r.duration:400,i}return qT(n,t),n.prototype.handleDragEvent=function(t){if(Uu(t)){var n=t.map,i=n.getSize(),r=t.pixel,e=r[0]-i[0]/2,o=i[1]/2-r[1],s=Math.atan2(o,e),a=Math.sqrt(e*e+o*o),u=n.getView();if(void 0!==this.Yr){var c=this.Yr-s;u.adjustRotationInternal(c)}this.Yr=s,void 0!==this.Av&&u.adjustResolutionInternal(this.Av/a),void 0!==this.Av&&(this._e=this.Av/a),this.Av=a}},n.prototype.handleUpEvent=function(t){if(!Uu(t))return!0;var n=t.map.getView(),i=this._e>1?1:-1;return n.endInteraction(this.Fr,i),this._e=0,!1},n.prototype.handleDownEvent=function(t){return!!Uu(t)&&(!!this.Jr(t)&&(t.map.getView().beginInteraction(),this.Yr=void 0,this.Av=void 0,!0))},n}(Tu),WT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),VT=function(t){function n(n,i,r){var e=t.call(this)||this;if(void 0!==r&&void 0===i)e.setFlatCoordinates(r,n);else{var o=i||0;e.setCenterAndRadius(n,o,r)}return e}return WT(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){var e=this.flatCoordinates,o=t-e[0],s=n-e[1],a=o*o+s*s;if(a<r){if(0===a)for(var u=0;u<this.stride;++u)i[u]=e[u];else{var c=this.getRadius()/Math.sqrt(a);i[0]=e[0]+c*o,i[1]=e[1]+c*s;for(u=2;u<this.stride;++u)i[u]=e[u]}return i.length=this.stride,a}return r},n.prototype.containsXY=function(t,n){var i=this.flatCoordinates,r=t-i[0],e=n-i[1];return r*r+e*e<=this.Cv()},n.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},n.prototype.computeExtent=function(t){var n=this.flatCoordinates,i=n[this.stride]-n[0];return An(n[0]-i,n[1]-i,n[0]+i,n[1]+i,t)},n.prototype.getRadius=function(){return Math.sqrt(this.Cv())},n.prototype.Cv=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],n=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+n*n},n.prototype.getType=function(){return Pt.CIRCLE},n.prototype.intersectsExtent=function(t){if(ti(t,this.getExtent())){var n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||(t[1]<=n[1]&&t[3]>=n[1]||qn(t,this.intersectsCoordinate.bind(this)))}return!1},n.prototype.setCenter=function(t){var n=this.stride,i=this.flatCoordinates[n]-this.flatCoordinates[0],r=t.slice();r[n]=r[0]+i;for(var e=1;e<n;++e)r[n+e]=t[e];this.setFlatCoordinates(this.layout,r),this.changed()},n.prototype.setCenterAndRadius=function(t,n,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var r=this.flatCoordinates,e=ae(r,0,t,this.stride);r[e++]=r[0]+n;for(var o=1,s=this.stride;o<s;++o)r[e++]=r[o];r.length=e,this.changed()},n.prototype.getCoordinates=function(){return null},n.prototype.setCoordinates=function(t,n){},n.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},n.prototype.rotate=function(t,n){var i=this.getCenter(),r=this.getStride();this.setCenter(Wr(i,0,i.length,r,t,n,i)),this.changed()},n.prototype.translate=function(t,n){var i=this.getCenter(),r=this.getStride();this.setCenter(Xr(i,0,i.length,r,t,n,i)),this.changed()},n}(Qr);VT.prototype.transform;var XT=VT,HT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),JT="Point",KT="LineString",YT="Polygon",ZT="Circle",$T="drawstart",QT="drawend",tE="drawabort",nE=function(t){function n(n,i){var r=t.call(this,n)||this;return r.feature=i,r}return HT(n,t),n}(f);var iE=function(t){function n(n){var i=this,r=n;r.stopDown||(r.stopDown=M),(i=t.call(this,r)||this).on,i.once,i.un,i.Rv=!1,i.Pv=null,i.Iv,i.Nv,i.zv,i.Fv=!1,i.Mv=n.source?n.source:null,i.Fe=n.features?n.features:null,i.Lv=n.snapTolerance?n.snapTolerance:12,i.tl=n.type,i.pe=function(t){switch(t){case Pt.POINT:case Pt.MULTI_POINT:return JT;case Pt.LINE_STRING:case Pt.MULTI_LINE_STRING:return KT;case Pt.POLYGON:case Pt.MULTI_POLYGON:return YT;case Pt.CIRCLE:return ZT;default:throw new Error("Invalid type: "+t)}}(i.tl),i.Gv=!!n.stopClick,i.Dv=n.minPoints?n.minPoints:i.pe===YT?3:2,i.Uv=i.pe===ZT?2:n.maxPoints?n.maxPoints:1/0,i.qv=n.finishCondition?n.finishCondition:k;var e,o=n.geometryFunction;if(!o){var s,a=i.pe;if(a===ZT)o=function(t,n,i){var r=n||new XT([NaN,NaN]),e=zr(t[0],i),o=ir(e,zr(t[t.length-1],i));r.setCenterAndRadius(e,Math.sqrt(o));var s=Ir();return s&&r.transform(i,s),r};else a===JT?s=Oe:a===KT?s=xj:a===YT&&(s=Ke),o=function(t,n,i){return n?a===YT?t[0].length?n.setCoordinates([t[0].concat([t[0][0]])]):n.setCoordinates([]):n.setCoordinates(t):n=new s(t),n}}return i.Wa=o,i.Bv=void 0!==n.dragVertexDelay?n.dragVertexDelay:500,i.Wv=null,i.Vv=null,i.Xv=null,i.Hv=null,i.Jv=null,i.Kv=null,i.Yv=n.clickTolerance?n.clickTolerance*n.clickTolerance:36,i.Zv=new Rj({source:new Id({useSpatialIndex:!1,wrapX:!!n.wrapX&&n.wrapX}),style:n.style?n.style:(e=Jv(),function(t,n){return e[t.getGeometry().getType()]}),updateWhileInteracting:!0}),i.H=n.geometryName,i.Jr=n.condition?n.condition:Lu,i.$v,n.freehand?i.$v=Iu:i.$v=n.freehandCondition?n.freehandCondition:Gu,i.addChangeListener(bu,i.Qv),i}return HT(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),this.Qv()},n.prototype.getOverlay=function(){return this.Zv},n.prototype.handleEvent=function(n){n.originalEvent.type===L&&n.originalEvent.preventDefault(),this.Fv=this.pe!==JT&&this.$v(n);var i=n.type===da.POINTERMOVE,r=!0;!this.Fv&&this.Nv&&n.type===da.POINTERDRAG&&(Date.now()-this.Nv>=this.Bv?(this.Pv=n.pixel,this.Rv=!this.Fv,i=!0):this.Nv=void 0,this.Rv&&void 0!==this.Iv&&(clearTimeout(this.Iv),this.Iv=void 0));return this.Fv&&n.type===da.POINTERDRAG&&null!==this.Vv?(this.td(n.coordinate),r=!1):this.Fv&&n.type===da.POINTERDOWN?r=!1:i&&this.getPointerCount()<2?(r=n.type===da.POINTERMOVE)&&this.Fv?(this.Jn(n),this.Rv&&n.originalEvent.preventDefault()):("mouse"===n.originalEvent.pointerType||n.type===da.POINTERDRAG&&void 0===this.Iv)&&this.Jn(n):n.type===da.DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,n)&&r},n.prototype.handleDownEvent=function(t){return this.Rv=!this.Fv,this.Fv?(this.Pv=t.pixel,this.Wv||this.rd(t.coordinate),!0):this.Jr(t)?(this.Nv=Date.now(),this.Iv=setTimeout(function(){this.Jn(new va(da.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.Bv),this.Pv=t.pixel,!0):(this.Nv=void 0,!1)},n.prototype.handleUpEvent=function(t){var n=!0;if(0===this.getPointerCount())if(this.Iv&&(clearTimeout(this.Iv),this.Iv=void 0),this.Jn(t),this.Rv){var i=!this.Wv;i&&this.rd(t.coordinate),!i&&this.Fv?this.finishDrawing():this.Fv||i&&this.pe!==JT||(this.ed(t.pixel)?this.qv(t)&&this.finishDrawing():this.td(t.coordinate)),n=!1}else this.Fv&&this.abortDrawing();return!n&&this.Gv&&t.preventDefault(),n},n.prototype.Jn=function(t){if(this.zv=t.originalEvent.pointerType,this.Pv&&(!this.Fv&&this.Rv||this.Fv&&!this.Rv)){var n=this.Pv,i=t.pixel,r=n[0]-i[0],e=n[1]-i[1],o=r*r+e*e;if(this.Rv=this.Fv?o>this.Yv:o<=this.Yv,!this.Rv)return}this.Wv?this.od(t.coordinate):this.sd(t.coordinate.slice())},n.prototype.ed=function(t){var n=!1;if(this.Vv){var i=!1,r=[this.Wv],e=this.pe;if(e===JT)n=!0;else if(e===ZT)n=2===this.Hv.length;else if(e===KT)i=this.Hv.length>this.Dv;else if(e===YT){var o=this.Hv;i=o[0].length>this.Dv,r=[o[0][0],o[0][o[0].length-2]]}if(i)for(var s=this.getMap(),a=0,u=r.length;a<u;a++){var c=r[a],h=s.getPixelFromCoordinate(c),f=t[0]-h[0],l=t[1]-h[1],v=this.Fv?1:this.Lv;if(n=Math.sqrt(f*f+l*l)<=v){this.Wv=c;break}}}return n},n.prototype.sd=function(t){this.Xv?this.Xv.getGeometry().setCoordinates(t):(this.Xv=new Tt(new Oe(t)),this.ad())},n.prototype.ud=function(t){this.Jv||(this.Jv=new Tt);var n=t.getLinearRing(0),i=this.Jv.getGeometry();i?(i.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),i.changed()):(i=new xj(n.getFlatCoordinates(),n.getLayout()),this.Jv.setGeometry(i))},n.prototype.rd=function(t){var n=this.getMap().getView().getProjection();this.Wv=t,this.pe===JT?this.Hv=t.slice():this.pe===YT?(this.Hv=[[t.slice(),t.slice()]],this.Kv=this.Hv[0]):this.Hv=[t.slice(),t.slice()],this.Kv&&(this.Jv=new Tt(new xj(this.Kv)));var i=this.Wa(this.Hv,void 0,n);this.Vv=new Tt,this.H&&this.Vv.setGeometryName(this.H),this.Vv.setGeometry(i),this.ad(),this.dispatchEvent(new nE($T,this.Vv))},n.prototype.od=function(t){var n,i,r=this.getMap(),e=this.Vv.getGeometry(),o=r.getView().getProjection();(this.pe===JT?i=this.Hv:this.pe===YT?(i=(n=this.Hv[0])[n.length-1],this.ed(r.getPixelFromCoordinate(t))&&(t=this.Wv.slice())):i=(n=this.Hv)[n.length-1],i[0]=t[0],i[1]=t[1],this.Wa(this.Hv,e,o),this.Xv)&&this.Xv.getGeometry().setCoordinates(t);if(e.getType()===Pt.POLYGON&&this.pe!==YT)this.ud(e);else if(this.Kv){this.Jv.getGeometry().setCoordinates(this.Kv)}this.ad()},n.prototype.td=function(t){var n,i,r=this.Vv.getGeometry(),e=this.getMap().getView().getProjection(),o=this.pe;o===KT||o===ZT?(this.Wv=t.slice(),(i=this.Hv).length>=this.Uv&&(this.Fv?i.pop():n=!0),i.push(t.slice()),this.Wa(i,r,e)):o===YT&&((i=this.Hv[0]).length>=this.Uv&&(this.Fv?i.pop():n=!0),i.push(t.slice()),n&&(this.Wv=i[0]),this.Wa(this.Hv,r,e)),this.sd(t.slice()),this.ad(),n&&this.finishDrawing()},n.prototype.removeLastPoint=function(){if(this.Vv){var t,n=this.Vv.getGeometry(),i=this.getMap().getView().getProjection(),r=this.pe;if(r===KT||r===ZT){if((t=this.Hv).splice(-2,1),t.length>=2){this.Wv=t[t.length-2].slice();var e=this.Wv.slice();t[t.length-1]=e,this.sd(e)}this.Wa(t,n,i),n.getType()===Pt.POLYGON&&this.Jv&&this.ud(n)}else if(r===YT){(t=this.Hv[0]).splice(-2,1);var o=this.Jv.getGeometry();if(t.length>=2){e=t[t.length-2].slice();t[t.length-1]=e,this.sd(e)}o.setCoordinates(t),this.Wa(this.Hv,n,i)}1===t.length&&this.abortDrawing(),this.ad()}},n.prototype.finishDrawing=function(){var t=this.hd();if(t){var n=this.Hv,i=t.getGeometry(),r=this.getMap().getView().getProjection();this.pe===KT?(n.pop(),this.Wa(n,i,r)):this.pe===YT&&(n[0].pop(),this.Wa(n,i,r),n=i.getCoordinates()),this.tl===Pt.MULTI_POINT?t.setGeometry(new yj([n])):this.tl===Pt.MULTI_LINE_STRING?t.setGeometry(new Sj([n])):this.tl===Pt.MULTI_POLYGON&&t.setGeometry(new _j([n])),this.dispatchEvent(new nE(QT,t)),this.Fe&&this.Fe.push(t),this.Mv&&this.Mv.addFeature(t)}},n.prototype.hd=function(){this.Wv=null;var t=this.Vv;return this.Vv=null,this.Xv=null,this.Jv=null,this.Zv.getSource().clear(!0),t},n.prototype.abortDrawing=function(){var t=this.hd();t&&this.dispatchEvent(new nE(tE,t))},n.prototype.appendCoordinates=function(t){var n,i=this.pe,r=!this.Vv;if(r&&this.rd(t[0]),i===KT||i===ZT)n=this.Hv;else{if(i!==YT)return;n=this.Hv&&this.Hv.length?this.Hv[0]:[]}r&&n.shift(),n.pop();for(var e=0;e<t.length;e++)this.td(t[e]);var o=t[t.length-1];this.td(o),this.od(o)},n.prototype.extend=function(t){var n=t.getGeometry();this.Vv=t,this.Hv=n.getCoordinates();var i=this.Hv[this.Hv.length-1];this.Wv=i.slice(),this.Hv.push(i.slice()),this.Xv=new Tt(new Oe(i)),this.ad(),this.dispatchEvent(new nE($T,this.Vv))},n.prototype.ad=function(){var t=[];this.Vv&&t.push(this.Vv),this.Jv&&t.push(this.Jv),this.Xv&&t.push(this.Xv);var n=this.Zv.getSource();n.clear(!0),n.addFeatures(t)},n.prototype.Qv=function(){var t=this.getMap(),n=this.getActive();t&&n||this.abortDrawing(),this.Zv.setMap(n?t:null)},n}(Tu),rE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),eE="extentchanged",oE=function(t){function n(n){var i=t.call(this,eE)||this;return i.extent=n,i}return rE(n,t),n}(f);function sE(){var t=Jv();return function(n,i){return t[Pt.POINT]}}function aE(t){return function(n){return xn([t,n])}}function uE(t,n){return t[0]==n[0]?function(i){return xn([t,[i[0],n[1]]])}:t[1]==n[1]?function(i){return xn([t,[n[0],i[1]]])}:null}var cE=function(t){function n(n){var i,r=this,e=n||{};return(r=t.call(this,e)||this).on,r.once,r.un,r.Jr=e.condition?e.condition:Iu,r.st=null,r.fd=null,r.ld=void 0!==e.pixelTolerance?e.pixelTolerance:10,r.vd=!1,r.dd=null,r.yd=null,n||(n={}),r.md=new Rj({source:new Id({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.boxStyle?n.boxStyle:(i=Jv(),function(t,n){return i[Pt.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.wd=new Rj({source:new Id({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.pointerStyle?n.pointerStyle:sE(),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.extent&&r.setExtent(n.extent),r}return rE(n,t),n.prototype.bd=function(t,n){var i=n.getCoordinateFromPixelInternal(t),r=this.getExtentInternal();if(r){var e=function(t){return[[[t[0],t[1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(r);e.sort((function(t,n){return er(i,t)-er(i,n)}));var o=e[0],s=Yi(i,o),a=n.getPixelFromCoordinateInternal(s);if(rr(t,a)<=this.ld){var u=n.getPixelFromCoordinateInternal(o[0]),c=n.getPixelFromCoordinateInternal(o[1]),h=ir(a,u),f=ir(a,c),l=Math.sqrt(Math.min(h,f));return this.vd=l<=this.ld,this.vd&&(s=h>f?o[1]:o[0]),s}}return null},n.prototype.Jn=function(t){var n=t.pixel,i=t.map,r=this.bd(n,i);r||(r=i.getCoordinateFromPixelInternal(n)),this.gd(r)},n.prototype.xd=function(t){var n=this.dd;return n?t?n.setGeometry(Ze(t)):n.setGeometry(void 0):(n=new Tt(t?Ze(t):{}),this.dd=n,this.md.getSource().addFeature(n)),n},n.prototype.gd=function(t){var n=this.yd;n?n.getGeometry().setCoordinates(t):(n=new Tt(new Oe(t)),this.yd=n,this.wd.getSource().addFeature(n));return n},n.prototype.handleEvent=function(n){return!n.originalEvent||!this.Jr(n)||(n.type!=da.POINTERMOVE||this.handlingDownUpSequence||this.Jn(n),t.prototype.handleEvent.call(this,n),!1)},n.prototype.handleDownEvent=function(t){var n=t.pixel,i=t.map,r=this.getExtentInternal(),e=this.bd(n,i),o=function(t){var n=null,i=null;return t[0]==r[0]?n=r[2]:t[0]==r[2]&&(n=r[0]),t[1]==r[1]?i=r[3]:t[1]==r[3]&&(i=r[1]),null!==n&&null!==i?[n,i]:null};if(e&&r){var s=e[0]==r[0]||e[0]==r[2]?e[0]:null,a=e[1]==r[1]||e[1]==r[3]?e[1]:null;null!==s&&null!==a?this.fd=aE(o(e)):null!==s?this.fd=uE(o([s,r[1]]),o([s,r[3]])):null!==a&&(this.fd=uE(o([r[0],a]),o([r[2],a])))}else e=i.getCoordinateFromPixelInternal(n),this.setExtent([e[0],e[1],e[0],e[1]]),this.fd=aE(e);return!0},n.prototype.handleDragEvent=function(t){if(this.fd){var n=t.coordinate;this.setExtent(this.fd(n)),this.gd(n)}},n.prototype.handleUpEvent=function(t){this.fd=null;var n=this.getExtentInternal();return n&&0!==Bn(n)||this.setExtent(null),!1},n.prototype.setMap=function(n){this.md.setMap(n),this.wd.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getExtent=function(){return Fr(this.getExtentInternal(),this.getMap().getView().getProjection())},n.prototype.getExtentInternal=function(){return this.st},n.prototype.setExtent=function(t){this.st=t||null,this.xd(t),this.dispatchEvent(new oE(this.st))},n}(Tu);function hE(t){return(hE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lE=[0,0,0,0],vE=[],dE="modifystart",pE="modifyend",yE=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.features=i,e.mapBrowserEvent=r,e}return fE(n,t),n}(f);function mE(t,n){return t.index-n.index}function wE(t,n,i){var r=n.geometry;if(r.getType()===Pt.CIRCLE){var e=r;if(1===n.index){var o=Ir();o&&(e=e.clone().transform(o,i));var s=ir(e.getCenter(),zr(t,i)),a=Math.sqrt(s)-e.getRadius();return a*a}}var u=zr(t,i);return vE[0]=zr(n.segment[0],i),vE[1]=zr(n.segment[1],i),er(u,vE)}function bE(t,n,i){var r=n.geometry;if(r.getType()===Pt.CIRCLE&&1===n.index){var e=r,o=Ir();return o&&(e=e.clone().transform(o,i)),Nr(e.getClosestPoint(zr(t,i)),i)}var s=zr(t,i);return vE[0]=zr(n.segment[0],i),vE[1]=zr(n.segment[1],i),Nr(Yi(s,vE),i)}var gE=function(t){function n(n){var i,r,e=t.call(this,n)||this;if(e.on,e.once,e.un,e.jd=e.Ju.bind(e),e.Jr=n.condition?n.condition:qu,e.Sd=function(t){return Au(t)&&Fu(t)},e.kd=n.deleteCondition?n.deleteCondition:e.Sd,e.Md=n.insertVertexCondition?n.insertVertexCondition:Iu,e.yd=null,e._d=null,e.Od=[0,0],e.Td=!1,e.Ed=null,e.Ad=new id,e.ld=void 0!==n.pixelTolerance?n.pixelTolerance:10,e.vd=!1,e.Cd=!1,e.Rd=[],e.Zv=new Rj({source:new Id({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.style?n.style:(i=Jv(),function(t,n){return i[Pt.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.Pd={Point:e.Id.bind(e),LineString:e.Nd.bind(e),LinearRing:e.Nd.bind(e),Polygon:e.zd.bind(e),MultiPoint:e.Fd.bind(e),MultiLineString:e.Ld.bind(e),MultiPolygon:e.Gd.bind(e),Circle:e.Dd.bind(e),GeometryCollection:e.Ud.bind(e)},e.Mv=null,e.qd=null,n.features?r=n.features:n.source&&(e.Mv=n.source,r=new ft(e.Mv.getFeatures()),e.Mv.addEventListener(Md,e.Bd.bind(e)),e.Mv.addEventListener(Td,e.Wd.bind(e))),!r)throw new Error("The modify interaction requires features, a source or a layer");return n.hitDetection&&(e.qd=n.hitDetection),e.Fe=r,e.Fe.forEach(e.Vd.bind(e)),e.Fe.addEventListener(st,e.Xd.bind(e)),e.Fe.addEventListener(at,e.Hd.bind(e)),e.Jd=null,e.qr=[0,0],e.Kd=void 0===n.snapToPointer?!e.qd:n.snapToPointer,e}return fE(n,t),n.prototype.Vd=function(t){var n=t.getGeometry();if(n){var i=this.Pd[n.getType()];i&&i(t,n)}var r=this.getMap();r&&r.isRendered()&&this.getActive()&&this.Yd(this.Od,r),t.addEventListener(N,this.jd)},n.prototype.Zd=function(t,n){if(!this.Ed){this.Ed=new ft;for(var i=this.Ed.getArray(),r=0,e=n.length;r<e;++r)for(var o=n[r],s=0,a=o.length;s<a;++s){var u=o[s].feature;u&&-1===i.indexOf(u)&&this.Ed.push(u)}0===this.Ed.getLength()?this.Ed=null:this.dispatchEvent(new yE(dE,this.Ed,t))}},n.prototype.$d=function(t){this.Qd(t),this.yd&&0===this.Fe.getLength()&&(this.Zv.getSource().removeFeature(this.yd),this.yd=null),t.removeEventListener(N,this.jd)},n.prototype.Qd=function(t){var n=this.Ad,i=[];n.forEach((function(n){t===n.feature&&i.push(n)}));for(var r=i.length-1;r>=0;--r){for(var e=i[r],o=this.Rd.length-1;o>=0;--o)this.Rd[o][0]===e&&this.Rd.splice(o,1);n.remove(e)}},n.prototype.setActive=function(n){this.yd&&!n&&(this.Zv.getSource().removeFeature(this.yd),this.yd=null),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Zv.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getOverlay=function(){return this.Zv},n.prototype.Bd=function(t){t.feature&&this.Fe.push(t.feature)},n.prototype.Wd=function(t){t.feature&&this.Fe.remove(t.feature)},n.prototype.Xd=function(t){this.Vd(t.element)},n.prototype.Ju=function(t){if(!this.Cd){var n=t.target;this.$d(n),this.Vd(n)}},n.prototype.Hd=function(t){var n=t.element;this.$d(n)},n.prototype.Id=function(t,n){var i=n.getCoordinates(),r={feature:t,geometry:n,segment:[i,i]};this.Ad.insert(n.getExtent(),r)},n.prototype.Fd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r){var o=i[r],s={feature:t,geometry:n,depth:[r],index:r,segment:[o,o]};this.Ad.insert(n.getExtent(),s)}},n.prototype.Nd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length-1;r<e;++r){var o=i.slice(r,r+2),s={feature:t,geometry:n,index:r,segment:o};this.Ad.insert(xn(o),s)}},n.prototype.Ld=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,a=o.length-1;s<a;++s){var u=o.slice(s,s+2),c={feature:t,geometry:n,depth:[r],index:s,segment:u};this.Ad.insert(xn(u),c)}},n.prototype.zd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,a=o.length-1;s<a;++s){var u=o.slice(s,s+2),c={feature:t,geometry:n,depth:[r],index:s,segment:u};this.Ad.insert(xn(u),c)}},n.prototype.Gd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,a=o.length;s<a;++s)for(var u=o[s],c=0,h=u.length-1;c<h;++c){var f=u.slice(c,c+2),l={feature:t,geometry:n,depth:[s,r],index:c,segment:f};this.Ad.insert(xn(f),l)}},n.prototype.Dd=function(t,n){var i=n.getCenter(),r={feature:t,geometry:n,index:0,segment:[i,i]},e={feature:t,geometry:n,index:1,segment:[i,i]},o=[r,e];r.featureSegments=o,e.featureSegments=o,this.Ad.insert(Rn(i),r);var s=n,a=Ir();if(a&&this.getMap()){var u=this.getMap().getView().getProjection();s=$e(s=s.clone().transform(a,u)).transform(u,a)}this.Ad.insert(s.getExtent(),e)},n.prototype.Ud=function(t,n){for(var i=n.getGeometriesArray(),r=0;r<i.length;++r){var e=i[r];(0,this.Pd[e.getType()])(t,e)}},n.prototype.tp=function(t,n,i){var r=this.yd;r?r.getGeometry().setCoordinates(t):(r=new Tt(new Oe(t)),this.yd=r,this.Zv.getSource().addFeature(r));return r.set("features",n),r.set("geometries",i),r},n.prototype.handleEvent=function(n){return!n.originalEvent||(this.Jd=n,n.map.getView().getInteracting()||n.type!=da.POINTERMOVE||this.handlingDownUpSequence||this.Jn(n),this.yd&&this.kd(n)&&(i=!(n.type!=da.SINGLECLICK||!this.Td)||this.removePoint()),n.type==da.SINGLECLICK&&(this.Td=!1),t.prototype.handleEvent.call(this,n)&&!i);var i},n.prototype.handleDragEvent=function(t){this.Td=!1,this.Zd(t,this.Rd);for(var n=[t.coordinate[0]+this.qr[0],t.coordinate[1]+this.qr[1]],i=[],r=[],e=0,o=this.Rd.length;e<o;++e){var s=this.Rd[e],a=s[0],u=a.feature;-1===i.indexOf(u)&&i.push(u);var c=a.geometry;-1===r.indexOf(c)&&r.push(c);for(var h=a.depth,f=void 0,l=a.segment,v=s[1];n.length<c.getStride();)n.push(l[v][n.length]);switch(c.getType()){case Pt.POINT:f=n,l[0]=n,l[1]=n;break;case Pt.MULTI_POINT:(f=c.getCoordinates())[a.index]=n,l[0]=n,l[1]=n;break;case Pt.LINE_STRING:(f=c.getCoordinates())[a.index+v]=n,l[v]=n;break;case Pt.MULTI_LINE_STRING:case Pt.POLYGON:(f=c.getCoordinates())[h[0]][a.index+v]=n,l[v]=n;break;case Pt.MULTI_POLYGON:(f=c.getCoordinates())[h[1]][h[0]][a.index+v]=n,l[v]=n;break;case Pt.CIRCLE:if(l[0]=n,l[1]=n,0===a.index)this.Cd=!0,c.setCenter(n),this.Cd=!1;else{this.Cd=!0;var d=t.map.getView().getProjection(),p=rr(zr(c.getCenter(),d),zr(n,d)),y=Ir();if(y){var m=c.clone().transform(y,d);m.setRadius(p),p=m.transform(d,y).getRadius()}c.setRadius(p),this.Cd=!1}}f&&this.np(c,f)}this.tp(n,i,r)},n.prototype.handleDownEvent=function(t){if(!this.Jr(t))return!1;var n=t.coordinate;this.Yd(t.pixel,t.map,n),this.Rd.length=0,this.Ed=null;var i=this.yd;if(i){var r=t.map.getView().getProjection(),e=[],s=i.getGeometry().getCoordinates(),a=xn([s]),u=this.Ad.getInExtent(a),c={};u.sort(mE);for(var h=0,f=u.length;h<f;++h){var l=u[h],v=l.segment,d=o(l.geometry),p=l.depth;if(p&&(d+="-"+p.join("-")),c[d]||(c[d]=new Array(2)),l.geometry.getType()!==Pt.CIRCLE||1!==l.index)if(!Qi(v[0],s)||c[d][0])if(!Qi(v[1],s)||c[d][1])o(v)in this._d&&!c[d][0]&&!c[d][1]&&this.Md(t)&&e.push(l);else{if((l.geometry.getType()===Pt.LINE_STRING||l.geometry.getType()===Pt.MULTI_LINE_STRING)&&c[d][0]&&0===c[d][0].index)continue;this.Rd.push([l,1]),c[d][1]=l}else this.Rd.push([l,0]),c[d][0]=l;else Qi(bE(n,l,r),s)&&!c[d][0]&&(this.Rd.push([l,0]),c[d][0]=l)}e.length&&this.Zd(t,[e]);for(var y=e.length-1;y>=0;--y)this.ip(e[y],s)}return!!this.yd},n.prototype.handleUpEvent=function(t){for(var n=this.Rd.length-1;n>=0;--n){var i=this.Rd[n][0],r=i.geometry;if(r.getType()===Pt.CIRCLE){var e=r.getCenter(),o=i.featureSegments[0],s=i.featureSegments[1];o.segment[0]=e,o.segment[1]=e,s.segment[0]=e,s.segment[1]=e,this.Ad.update(Rn(e),o);var a=r,u=Ir();if(u){var c=t.map.getView().getProjection();a=$e(a=a.clone().transform(u,c)).transform(c,u)}this.Ad.update(a.getExtent(),s)}else this.Ad.update(xn(i.segment),i)}return this.Ed&&(this.dispatchEvent(new yE(pE,this.Ed,t)),this.Ed=null),!1},n.prototype.Jn=function(t){this.Od=t.pixel,this.Yd(t.pixel,t.map,t.coordinate)},n.prototype.Yd=function(t,n,i){var r,e,s=this,a=i||n.getCoordinateFromPixel(t),u=n.getView().getProjection();if(this.qd){var c="object"===hE(this.qd)?function(t){return t===s.qd}:void 0;n.forEachFeatureAtPixel(t,(function(t,n,i){if((i=i||t.getGeometry()).getType()===Pt.POINT&&y(s.Fe.getArray(),t)){e=i;var o=i.getFlatCoordinates().slice(0,2);r=[{feature:t,geometry:i,segment:[o,o]}]}return!0}),{layerFilter:c})}if(!r){var h=Fr(jn(Lr(Rn(a,lE),u),n.getView().getResolution()*this.ld,lE),u);r=this.Ad.getInExtent(h)}if(r&&r.length>0){var f=r.sort((function(t,n){return wE(a,t,u)-wE(a,n,u)}))[0],l=f.segment,v=bE(a,f,u),d=n.getPixelFromCoordinate(v),p=rr(t,d);if(e||p<=this.ld){var m={};if(m[o(l)]=!0,this.Kd||(this.qr[0]=v[0]-a[0],this.qr[1]=v[1]-a[1]),f.geometry.getType()===Pt.CIRCLE&&1===f.index)this.vd=!0,this.tp(v,[f.feature],[f.geometry]);else{var w=n.getPixelFromCoordinate(l[0]),b=n.getPixelFromCoordinate(l[1]),g=ir(d,w),x=ir(d,b);p=Math.sqrt(Math.min(g,x)),this.vd=p<=this.ld,this.vd&&(v=g>x?l[1]:l[0]),this.tp(v,[f.feature],[f.geometry]);var j={};j[o(f.geometry)]=!0;for(var S=1,k=r.length;S<k;++S){var M=r[S].segment;if(!(Qi(l[0],M[0])&&Qi(l[1],M[1])||Qi(l[0],M[1])&&Qi(l[1],M[0])))break;var _=o(r[S].geometry);_ in j||(j[_]=!0,m[o(M)]=!0)}}return void(this._d=m)}}this.yd&&(this.Zv.getSource().removeFeature(this.yd),this.yd=null)},n.prototype.ip=function(t,n){for(var i,r=t.segment,e=t.feature,o=t.geometry,s=t.depth,a=t.index;n.length<o.getStride();)n.push(0);switch(o.getType()){case Pt.MULTI_LINE_STRING:case Pt.POLYGON:(i=o.getCoordinates())[s[0]].splice(a+1,0,n);break;case Pt.MULTI_POLYGON:(i=o.getCoordinates())[s[1]][s[0]].splice(a+1,0,n);break;case Pt.LINE_STRING:(i=o.getCoordinates()).splice(a+1,0,n);break;default:return}this.np(o,i);var u=this.Ad;u.remove(t),this.rp(o,a,s,1);var c={segment:[r[0],n],feature:e,geometry:o,depth:s,index:a};u.insert(xn(c.segment),c),this.Rd.push([c,1]);var h={segment:[n,r[1]],feature:e,geometry:o,depth:s,index:a+1};u.insert(xn(h.segment),h),this.Rd.push([h,0]),this.Td=!0},n.prototype.removePoint=function(){if(this.Jd&&this.Jd.type!=da.POINTERDRAG){var t=this.Jd;this.Zd(t,this.Rd);var n=this.ep();return this.Ed&&this.dispatchEvent(new yE(pE,this.Ed,t)),this.Ed=null,n}return!1},n.prototype.ep=function(){var t,n,i,r,e,s,a,u,c,h,f,l=this.Rd,v={},d=!1;for(e=l.length-1;e>=0;--e)f=o((h=(i=l[e])[0]).feature),h.depth&&(f+="-"+h.depth.join("-")),f in v||(v[f]={}),0===i[1]?(v[f].right=h,v[f].index=h.index):1==i[1]&&(v[f].left=h,v[f].index=h.index+1);for(f in v){switch(c=v[f].right,a=v[f].left,(u=(s=v[f].index)-1)<0&&(u=0),t=n=(r=(h=void 0!==a?a:c).geometry).getCoordinates(),d=!1,r.getType()){case Pt.MULTI_LINE_STRING:n[h.depth[0]].length>2&&(n[h.depth[0]].splice(s,1),d=!0);break;case Pt.LINE_STRING:n.length>2&&(n.splice(s,1),d=!0);break;case Pt.MULTI_POLYGON:t=t[h.depth[1]];case Pt.POLYGON:(t=t[h.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),d=!0,0===s&&(t.pop(),t.push(t[0]),u=t.length-1))}if(d){this.np(r,n);var p=[];if(void 0!==a&&(this.Ad.remove(a),p.push(a.segment[0])),void 0!==c&&(this.Ad.remove(c),p.push(c.segment[1])),void 0!==a&&void 0!==c){var y={depth:h.depth,feature:h.feature,geometry:h.geometry,index:u,segment:p};this.Ad.insert(xn(y.segment),y)}this.rp(r,s,h.depth,-1),this.yd&&(this.Zv.getSource().removeFeature(this.yd),this.yd=null),l.length=0}}return d},n.prototype.np=function(t,n){this.Cd=!0,t.setCoordinates(n),this.Cd=!1},n.prototype.rp=function(t,n,i,r){this.Ad.forEachInExtent(t.getExtent(),(function(e){e.geometry===t&&(void 0===i||void 0===e.depth||x(e.depth,i))&&e.index>n&&(e.index+=r)}))},n}(Tu),xE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jE="select",SE=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.selected=i,o.deselected=r,o.mapBrowserEvent=e,o}return xE(n,t),n}(f),kE={};var ME=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r,e,o=n||{};if(i.op=i.Vd.bind(i),i.sp=i.$d.bind(i),i.Jr=o.condition?o.condition:Fu,i.ap=o.addCondition?o.addCondition:zu,i.up=o.removeCondition?o.removeCondition:zu,i.cp=o.toggleCondition?o.toggleCondition:Gu,i.hp=!!o.multi&&o.multi,i.fp=o.filter?o.filter:k,i.lp=o.hitTolerance?o.hitTolerance:0,i.K=void 0!==o.style?o.style:(b((r=Jv())[Pt.POLYGON],r[Pt.LINE_STRING]),b(r[Pt.GEOMETRY_COLLECTION],r[Pt.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),i.Fe=o.features||new ft,o.layers)if("function"==typeof o.layers)e=o.layers;else{var s=o.layers;e=function(t){return y(s,t)}}else e=k;return i.vp=e,i.dp={},i}return xE(n,t),n.prototype.pp=function(t,n){this.dp[o(t)]=n},n.prototype.getFeatures=function(){return this.Fe},n.prototype.getHitTolerance=function(){return this.lp},n.prototype.getLayer=function(t){return this.dp[o(t)]},n.prototype.setHitTolerance=function(t){this.lp=t},n.prototype.setMap=function(n){this.getMap()&&this.K&&this.Fe.forEach(this.yp.bind(this)),t.prototype.setMap.call(this,n),n?(this.Fe.addEventListener(st,this.op),this.Fe.addEventListener(at,this.sp),this.K&&this.Fe.forEach(this.mp.bind(this))):(this.Fe.removeEventListener(st,this.op),this.Fe.removeEventListener(at,this.sp))},n.prototype.Vd=function(t){var n=t.element;if(this.K&&this.mp(n),!this.getLayer(n)){var i=this.getMap().getAllLayers().find((function(t){if(t instanceof Rj&&t.getSource()&&t.getSource().hasFeature(n))return t}));i&&this.pp(n,i)}},n.prototype.$d=function(t){var n=t.element;this.K&&this.yp(n)},n.prototype.getStyle=function(){return this.K},n.prototype.mp=function(t){var n=o(t);n in kE||(kE[n]=t.getStyle()),t.setStyle(this.K)},n.prototype.yp=function(t){for(var i=this.getMap().getInteractions().getArray(),r=i.length-1;r>=0;--r){var e=i[r];if(e!==this&&e instanceof n&&e.getStyle()&&-1!==e.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(e.getStyle())}var s=o(t);t.setStyle(kE[s]),delete kE[s]},n.prototype.wp=function(t){delete this.dp[o(t)]},n.prototype.handleEvent=function(t){if(!this.Jr(t))return!0;var n=this.ap(t),i=this.up(t),r=this.cp(t),e=!n&&!i&&!r,o=t.map,s=this.getFeatures(),a=[],u=[];if(e){A(this.dp),o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.fp(t,n))return this.pp(t,n),u.push(t),!this.hp}.bind(this),{layerFilter:this.vp,hitTolerance:this.lp});for(var c=s.getLength()-1;c>=0;--c){var h=s.item(c),f=u.indexOf(h);f>-1?u.splice(f,1):(s.remove(h),a.push(h))}0!==u.length&&s.extend(u)}else{o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.fp(t,e))return!n&&!r||y(s.getArray(),t)?(i||r)&&y(s.getArray(),t)&&(a.push(t),this.wp(t)):(this.pp(t,e),u.push(t)),!this.hp}.bind(this),{layerFilter:this.vp,hitTolerance:this.lp});for(var l=a.length-1;l>=0;--l)s.remove(a[l]);s.extend(u)}return(u.length>0||a.length>0)&&this.dispatchEvent(new SE(jE,u,a,t)),!0},n}(Su),_E=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function OE(t){return t.feature?t.feature:t.element?t.element:void 0}var TE=[],EE=function(t){function n(n){var i=this,r=n||{},e=r;return e.handleDownEvent||(e.handleDownEvent=k),e.stopDown||(e.stopDown=M),(i=t.call(this,e)||this).Mv=r.source?r.source:null,i.bp=void 0===r.vertex||r.vertex,i.gp=void 0===r.edge||r.edge,i.Fe=r.features?r.features:null,i.xp=[],i.jp={},i.Sp={},i.kp={},i.ld=void 0!==r.pixelTolerance?r.pixelTolerance:10,i.Ad=new id,i.Mp={Point:i._p.bind(i),LineString:i.Op.bind(i),LinearRing:i.Op.bind(i),Polygon:i.Tp.bind(i),MultiPoint:i.Ep.bind(i),MultiLineString:i.Ap.bind(i),MultiPolygon:i.Cp.bind(i),GeometryCollection:i.Rp.bind(i),Circle:i.Pp.bind(i)},i}return _E(n,t),n.prototype.addFeature=function(t,n){var i=void 0===n||n,r=o(t),e=t.getGeometry();if(e){var s=this.Mp[e.getType()];if(s){this.Sp[r]=e.getExtent([1/0,1/0,-1/0,-1/0]);var a=[];if(s(a,e),1===a.length)this.Ad.insert(xn(a[0]),{feature:t,segment:a[0]});else if(a.length>1){var u=a.map((function(t){return xn(t)})),c=a.map((function(n){return{feature:t,segment:n}}));this.Ad.load(u,c)}}}i&&(this.jp[r]=Y(t,N,this.Ju,this))},n.prototype.Ip=function(t){this.addFeature(t)},n.prototype.Np=function(t){this.removeFeature(t)},n.prototype.zp=function(){var t;return this.Fe?t=this.Fe:this.Mv&&(t=this.Mv.getFeatures()),t},n.prototype.handleEvent=function(n){var i=this.snapTo(n.pixel,n.coordinate,n.map);return i&&(n.coordinate=i.vertex.slice(0,2),n.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,n)},n.prototype.Xd=function(t){var n=OE(t);this.addFeature(n)},n.prototype.Hd=function(t){var n=OE(t);this.removeFeature(n)},n.prototype.Ju=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=o(n);i in this.kp||(this.kp[i]=n)}else this.Fp(n)},n.prototype.handleUpEvent=function(t){var n=C(this.kp);return n.length&&(n.forEach(this.Fp.bind(this)),this.kp={}),!1},n.prototype.removeFeature=function(t,n){var i=void 0===n||n,r=o(t),e=this.Sp[r];if(e){var s=this.Ad,a=[];s.forEachInExtent(e,(function(n){t===n.feature&&a.push(n)}));for(var u=a.length-1;u>=0;--u)s.remove(a[u])}i&&($(this.jp[r]),delete this.jp[r])},n.prototype.setMap=function(n){var i=this.getMap(),r=this.xp,e=this.zp();i&&(r.forEach($),r.length=0,e.forEach(this.Np.bind(this))),t.prototype.setMap.call(this,n),n&&(this.Fe?r.push(Y(this.Fe,st,this.Xd,this),Y(this.Fe,at,this.Hd,this)):this.Mv&&r.push(Y(this.Mv,Md,this.Xd,this),Y(this.Mv,Td,this.Hd,this)),e.forEach(this.Ip.bind(this)))},n.prototype.snapTo=function(t,n,i){var r=xn([i.getCoordinateFromPixel([t[0]-this.ld,t[1]+this.ld]),i.getCoordinateFromPixel([t[0]+this.ld,t[1]-this.ld])]),e=this.Ad.getInExtent(r),o=e.length;if(0===o)return null;var s,a=i.getView().getProjection(),u=zr(n,a),c=1/0,h=this.ld*this.ld,f=function(){if(s){var n=i.getPixelFromCoordinate(s);if(ir(t,n)<=h)return{vertex:s,vertexPixel:[Math.round(n[0]),Math.round(n[1])]}}return null};if(this.bp){for(var l=0;l<o;++l){(v=e[l]).feature.getGeometry().getType()!==Pt.CIRCLE&&v.segment.forEach((function(t){var n=zr(t,a),i=ir(u,n);i<c&&(s=t,c=i)}))}if(x=f())return x}if(this.gp){for(l=0;l<o;++l){var v,d=null;if((v=e[l]).feature.getGeometry().getType()===Pt.CIRCLE){var p=v.feature.getGeometry(),y=Ir();y&&(p=p.clone().transform(y,a)),d=Nr(Ki(u,p),a)}else{var m=v.segment,w=m[0],b=m[1];b&&(TE[0]=zr(w,a),TE[1]=zr(b,a),d=Yi(u,TE))}if(d){var g=ir(u,d);g<c&&(s=d,c=g)}}var x;if(x=f())return x}return null},n.prototype.Fp=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},n.prototype.Pp=function(t,n){var i=this.getMap().getView().getProjection(),r=n,e=Ir();e&&(r=r.clone().transform(e,i));var o=$e(r);e&&o.transform(i,e);for(var s=o.getCoordinates()[0],a=0,u=s.length-1;a<u;++a)t.push(s.slice(a,a+2))},n.prototype.Rp=function(t,n){for(var i=n.getGeometriesArray(),r=0;r<i.length;++r){var e=this.Mp[i[r].getType()];e&&e(t,i[r])}},n.prototype.Op=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length-1;r<e;++r)t.push(i.slice(r,r+2))},n.prototype.Ap=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,a=o.length-1;s<a;++s)t.push(o.slice(s,s+2))},n.prototype.Ep=function(t,n){n.getCoordinates().forEach((function(n){t.push([n])}))},n.prototype.Cp=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,a=o.length;s<a;++s)for(var u=o[s],c=0,h=u.length-1;c<h;++c)t.push(u.slice(c,c+2))},n.prototype._p=function(t,n){t.push([n.getCoordinates()])},n.prototype.Tp=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,a=o.length-1;s<a;++s)t.push(o.slice(s,s+2))},n}(Tu),AE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),CE="translatestart",RE="translating",PE="translateend",IE=function(t){function n(n,i,r,e,o){var s=t.call(this,n)||this;return s.features=i,s.coordinate=r,s.startCoordinate=e,s.mapBrowserEvent=o,s}return AE(n,t),n}(f),NE=function(t){function n(n){var i,r=this,e=n||{};if((r=t.call(this,e)||this).on,r.once,r.un,r.Lp=null,r.Gp=null,r.Fe=void 0!==e.features?e.features:null,e.layers&&!r.Fe)if("function"==typeof e.layers)i=e.layers;else{var o=e.layers;i=function(t){return y(o,t)}}else i=k;return r.vp=i,r.fp=e.filter&&!r.Fe?e.filter:k,r.lp=e.hitTolerance?e.hitTolerance:0,r.Jr=e.condition?e.condition:Iu,r.Dp=null,r.addChangeListener(bu,r.Up),r}return AE(n,t),n.prototype.handleDownEvent=function(t){if(!t.originalEvent||!this.Jr(t))return!1;if(this.Dp=this.qp(t.pixel,t.map),!this.Lp&&this.Dp){this.Gp=t.coordinate,this.Lp=t.coordinate,this.handleMoveEvent(t);var n=this.Fe||new ft([this.Dp]);return this.dispatchEvent(new IE(CE,n,t.coordinate,this.Gp,t)),!0}return!1},n.prototype.handleUpEvent=function(t){if(this.Lp){this.Lp=null,this.handleMoveEvent(t);var n=this.Fe||new ft([this.Dp]);return this.dispatchEvent(new IE(PE,n,t.coordinate,this.Gp,t)),this.Gp=null,!0}return!1},n.prototype.handleDragEvent=function(t){if(this.Lp){var n=t.coordinate,i=n[0]-this.Lp[0],r=n[1]-this.Lp[1],e=this.Fe||new ft([this.Dp]);e.forEach((function(t){var n=t.getGeometry();n.translate(i,r),t.setGeometry(n)})),this.Lp=n,this.dispatchEvent(new IE(RE,e,n,this.Gp,t))}},n.prototype.handleMoveEvent=function(t){var n=t.map.getViewport();this.qp(t.pixel,t.map)?(n.classList.remove(this.Lp?"ol-grab":"ol-grabbing"),n.classList.add(this.Lp?"ol-grabbing":"ol-grab")):n.classList.remove("ol-grab","ol-grabbing")},n.prototype.qp=function(t,n){return n.forEachFeatureAtPixel(t,function(t,n){if(this.fp(t,n)&&(!this.Fe||y(this.Fe.getArray(),t)))return t}.bind(this),{layerFilter:this.vp,hitTolerance:this.lp})},n.prototype.getHitTolerance=function(){return this.lp},n.prototype.setHitTolerance=function(t){this.lp=t},n.prototype.setMap=function(n){var i=this.getMap();t.prototype.setMap.call(this,n),this.Qv(i)},n.prototype.Up=function(){this.Qv(null)},n.prototype.Qv=function(t){var n=this.getMap(),i=this.getActive();n&&i||(n=n||t)&&n.getViewport().classList.remove("ol-grab","ol-grabbing")},n}(Tu);function zE(t,n,i,r,e,o){var s,a;void 0!==e?(s=e,a=void 0!==o?o:0):(s=[],a=0);for(var u=n;u<i;){var c=t[u++];s[a++]=t[u++],s[a++]=c;for(var h=2;h<r;++h)s[a++]=t[u++]}return s.length=a,s}var FE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),LE={};LE[Pt.POINT]=function(t){var n;n=void 0!==t.m&&void 0!==t.z?new Oe([t.x,t.y,t.z,t.m],Rt):void 0!==t.z?new Oe([t.x,t.y,t.z],At):void 0!==t.m?new Oe([t.x,t.y,t.m],Ct):new Oe([t.x,t.y]);return n},LE[Pt.LINE_STRING]=function(t){var n=UE(t);return new xj(t.paths[0],n)},LE[Pt.POLYGON]=function(t){var n=UE(t);return new Ke(t.rings,n)},LE[Pt.MULTI_POINT]=function(t){var n=UE(t);return new yj(t.points,n)},LE[Pt.MULTI_LINE_STRING]=function(t){var n=UE(t);return new Sj(t.paths,n)},LE[Pt.MULTI_POLYGON]=function(t){var n=UE(t);return new _j(t.rings,n)};var GE={};function DE(t,n){var i,r,e;if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)e=Pt.POINT;else if(t.points)e=Pt.MULTI_POINT;else if(t.paths){e=1===t.paths.length?Pt.LINE_STRING:Pt.MULTI_LINE_STRING}else if(t.rings){var o=t,s=UE(o),a=function(t,n){var i,r,e=[],o=[],s=[];for(i=0,r=t.length;i<r;++i){e.length=0,ue(e,0,t[i],n.length),Ue(e,0,e.length,n.length)?o.push([t[i]]):s.push(t[i])}for(;s.length;){var a=s.shift(),u=!1;for(i=o.length-1;i>=0;i--){var c=o[i][0];if(_n(new Me(c).getExtent(),new Me(a).getExtent())){o[i].push(a),u=!0;break}}u||o.push([a.reverse()])}return o}(o.rings,s);1===a.length?(e=Pt.POLYGON,t=E({},t,((i={}).rings=a[0],i))):(e=Pt.MULTI_POLYGON,t=E({},t,((r={}).rings=a,r)))}return Hj((0,LE[e])(t),!1,n)}function UE(t){var n=Et;return!0===t.hasZ&&!0===t.hasM?n=Rt:!0===t.hasZ?n=At:!0===t.hasM&&(n=Ct),n}function qE(t){var n=t.getLayout();return{hasZ:n===At||n===Rt,hasM:n===Ct||n===Rt}}function BE(t,n){return(0,GE[t.getType()])(Hj(t,!0,n),n)}GE[Pt.POINT]=function(t,n){var i,r=t.getCoordinates(),e=t.getLayout();e===At?i={x:r[0],y:r[1],z:r[2]}:e===Ct?i={x:r[0],y:r[1],m:r[2]}:e===Rt?i={x:r[0],y:r[1],z:r[2],m:r[3]}:e===Et?i={x:r[0],y:r[1]}:Mt(!1,34);return i},GE[Pt.LINE_STRING]=function(t,n){var i=qE(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:[t.getCoordinates()]}},GE[Pt.POLYGON]=function(t,n){var i=qE(t);return{hasZ:i.hasZ,hasM:i.hasM,rings:t.getCoordinates(!1)}},GE[Pt.MULTI_POINT]=function(t,n){var i=qE(t);return{hasZ:i.hasZ,hasM:i.hasM,points:t.getCoordinates()}},GE[Pt.MULTI_LINE_STRING]=function(t,n){var i=qE(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:t.getCoordinates()}},GE[Pt.MULTI_POLYGON]=function(t,n){for(var i=qE(t),r=t.getCoordinates(!1),e=[],o=0;o<r.length;o++)for(var s=r[o].length-1;s>=0;s--)e.push(r[o][s]);return{hasZ:i.hasZ,hasM:i.hasM,rings:e}};var WE=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this)||this).H=r.geometryName,i}return FE(n,t),n.prototype.readFeatureFromObject=function(t,n,i){var r=t,e=DE(r.geometry,n),o=new Tt;if(this.H&&o.setGeometryName(this.H),o.setGeometry(e),r.attributes){o.setProperties(r.attributes,!0);var s=r.attributes[i];void 0!==s&&o.setId(s)}return o},n.prototype.readFeaturesFromObject=function(t,n){var i=n||{};if(t.features){for(var r=[],e=t.features,o=0,s=e.length;o<s;++o)r.push(this.readFeatureFromObject(e[o],i,t.objectIdFieldName));return r}return[this.readFeatureFromObject(t,i)]},n.prototype.readGeometryFromObject=function(t,n){return DE(t,n)},n.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?br("EPSG:"+t.spatialReference.wkid):null},n.prototype.writeGeometryObject=function(t,n){return BE(t,this.adaptOptions(n))},n.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var i={};if(!t.hasProperties())return i.attributes={},i;var r=t.getProperties(),e=t.getGeometry();if(e){i.geometry=BE(e,n);var o=n&&(n.dataProjection||n.featureProjection);o&&(i.geometry.spatialReference={wkid:Number(br(o).getCode().split(":").pop())}),delete r[t.getGeometryName()]}return R(r)?i.attributes={}:i.attributes=r,i},n.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var i=[],r=0,e=t.length;r<e;++r)i.push(this.writeFeatureObject(t[r],n));return{features:i}},n}(cS),VE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),XE=function(t){function n(){var n=t.call(this)||this;return n.Bp=Ff(),n}return VE(n,t),n.prototype.getType=function(){return uh},n.prototype.readFeature=function(t,n){if(t){if("string"==typeof t){var i=gf(t);return this.readFeatureFromDocument(i,n)}return wf(t)?this.readFeatureFromDocument(t,n):this.readFeatureFromNode(t,n)}return null},n.prototype.readFeatureFromDocument=function(t,n){var i=this.readFeaturesFromDocument(t,n);return i.length>0?i[0]:null},n.prototype.readFeatureFromNode=function(t,n){return null},n.prototype.readFeatures=function(t,n){if(t){if("string"==typeof t){var i=gf(t);return this.readFeaturesFromDocument(i,n)}return wf(t)?this.readFeaturesFromDocument(t,n):this.readFeaturesFromNode(t,n)}return[]},n.prototype.readFeaturesFromDocument=function(t,n){for(var i=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&b(i,this.readFeaturesFromNode(r,n));return i},n.prototype.readFeaturesFromNode=function(t,n){return r()},n.prototype.readGeometry=function(t,n){if(t){if("string"==typeof t){var i=gf(t);return this.readGeometryFromDocument(i,n)}return wf(t)?this.readGeometryFromDocument(t,n):this.readGeometryFromNode(t,n)}return null},n.prototype.readGeometryFromDocument=function(t,n){return null},n.prototype.readGeometryFromNode=function(t,n){return null},n.prototype.readProjection=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readProjectionFromDocument(n)}return wf(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},n.prototype.readProjectionFromDocument=function(t){return this.dataProjection},n.prototype.readProjectionFromNode=function(t){return this.dataProjection},n.prototype.writeFeature=function(t,n){var i=this.writeFeatureNode(t,n);return this.Bp.serializeToString(i)},n.prototype.writeFeatureNode=function(t,n){return null},n.prototype.writeFeatures=function(t,n){var i=this.writeFeaturesNode(t,n);return this.Bp.serializeToString(i)},n.prototype.writeFeaturesNode=function(t,n){return null},n.prototype.writeGeometry=function(t,n){var i=this.writeGeometryNode(t,n);return this.Bp.serializeToString(i)},n.prototype.writeGeometryNode=function(t,n){return null},n}(Xj),HE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),JE="http://www.opengis.net/gml",KE=/^[\s\xa0]*$/,YE=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.featureType=r.featureType,i.featureNS=r.featureNS,i.srsName=r.srsName,i.schemaLocation="",i.FEATURE_COLLECTION_PARSERS={},i.FEATURE_COLLECTION_PARSERS[i.namespace]={featureMember:jf(i.readFeaturesInternal),featureMembers:Sf(i.readFeaturesInternal)},i.supportedMediaTypes=["application/gml+xml"],i}return HE(n,t),n.prototype.readFeaturesInternal=function(t,n){var i=t.localName,r=null;if("FeatureCollection"==i)r=Pf([],this.FEATURE_COLLECTION_PARSERS,t,n,this);else if("featureMembers"==i||"featureMember"==i||"member"==i){var e=n[0],o=e.featureType,s=e.featureNS;if(!o&&t.childNodes){o=[],s={};for(var a=0,u=t.childNodes.length;a<u;++a){var c=t.childNodes[a];if(1===c.nodeType){var h=c.nodeName.split(":").pop();if(-1===o.indexOf(h)){var f="",l=0,v=c.namespaceURI;for(var d in s){if(s[d]===v){f=d;break}++l}f||(s[f="p"+l]=v),o.push(f+":"+h)}}}"featureMember"!=i&&(e.featureType=o,e.featureNS=s)}if("string"==typeof s){var p=s;(s={}).p0=p}var y={},m=Array.isArray(o)?o:[o];for(var w in s){var b={};for(a=0,u=m.length;a<u;++a){(-1===m[a].indexOf(":")?"p0":m[a].split(":")[0])===w&&(b[m[a].split(":").pop()]="featureMembers"==i?jf(this.readFeatureElement,this):Sf(this.readFeatureElement,this))}y[s[w]]=b}r=Pf("featureMember"==i||"member"==i?void 0:[],y,t,n)}return null===r&&(r=[]),r},n.prototype.readGeometryElement=function(t,n){var i=n[0];i.srsName=t.firstElementChild.getAttribute("srsName"),i.srsDimension=t.firstElementChild.getAttribute("srsDimension");var r=Pf(null,this.GEOMETRY_PARSERS,t,n,this);return r?Array.isArray(r)?Jj(r,i):Hj(r,!1,i):void 0},n.prototype.readFeatureElementInternal=function(t,n,i){for(var r,e={},o=t.firstElementChild;o;o=o.nextElementSibling){var s=void 0,a=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(s=yf(o,!1),KE.test(s)&&(s=void 0)):(i&&(s=this.readGeometryElement(o,n)),s?"boundedBy"!==a&&(r=a):s=this.readFeatureElementInternal(o,n,!1)),e[a]?(e[a]instanceof Array||(e[a]=[e[a]]),e[a].push(s)):e[a]=s;var u=o.attributes.length;if(u>0){e[a]={Wp:e[a]};for(var c=0;c<u;c++){var h=o.attributes[c].name;e[a][h]=o.attributes[c].value}}}if(i){var f=new Tt(e);r&&f.setGeometryName(r);var l=t.getAttribute("fid")||bf(t,this.namespace,"id");return l&&f.setId(l),f}return e},n.prototype.readFeatureElement=function(t,n){return this.readFeatureElementInternal(t,n,!0)},n.prototype.readPoint=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new Oe(i,At)},n.prototype.readMultiPoint=function(t,n){var i=Pf([],this.MULTIPOINT_PARSERS,t,n,this);return i?new yj(i):void 0},n.prototype.readMultiLineString=function(t,n){var i=Pf([],this.MULTILINESTRING_PARSERS,t,n,this);if(i)return new Sj(i)},n.prototype.readMultiPolygon=function(t,n){var i=Pf([],this.MULTIPOLYGON_PARSERS,t,n,this);if(i)return new _j(i)},n.prototype.pointMemberParser=function(t,n){Rf(this.POINTMEMBER_PARSERS,t,n,this)},n.prototype.lineStringMemberParser=function(t,n){Rf(this.LINESTRINGMEMBER_PARSERS,t,n,this)},n.prototype.polygonMemberParser=function(t,n){Rf(this.POLYGONMEMBER_PARSERS,t,n,this)},n.prototype.readLineString=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);return i?new xj(i,At):void 0},n.prototype.readFlatLinearRing=function(t,n){var i=Pf(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this);return i||void 0},n.prototype.readLinearRing=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new Me(i,At)},n.prototype.readPolygon=function(t,n){var i=Pf([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this);if(i&&i[0]){var r,e=i[0],o=[e.length],s=void 0;for(s=1,r=i.length;s<r;++s)b(e,i[s]),o.push(e.length);return new Ke(e,At,o)}},n.prototype.readFlatCoordinatesFromNode=function(t,n){return Pf(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},n.prototype.readGeometryFromNode=function(t,n){var i=this.readGeometryElement(t,[this.getReadOptions(t,n||{})]);return i||null},n.prototype.readFeaturesFromNode=function(t,n){var i={featureType:this.featureType,featureNS:this.featureNS};return n&&E(i,this.getReadOptions(t,n)),this.readFeaturesInternal(t,[i])||[]},n.prototype.readProjectionFromNode=function(t){return br(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},n}(XE);YE.prototype.namespace=JE,YE.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},YE.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},YE.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},YE.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:jf(YE.prototype.pointMemberParser),pointMembers:jf(YE.prototype.pointMemberParser)}},YE.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:jf(YE.prototype.lineStringMemberParser),lineStringMembers:jf(YE.prototype.lineStringMemberParser)}},YE.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:jf(YE.prototype.polygonMemberParser),polygonMembers:jf(YE.prototype.polygonMemberParser)}},YE.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:jf(YE.prototype.readFlatCoordinatesFromNode)}},YE.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:jf(YE.prototype.readLineString)}},YE.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:jf(YE.prototype.readPolygon)}},YE.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Sf(YE.prototype.readFlatLinearRing)}};var ZE=YE;function $E(t){return QE(yf(t,!1))}function QE(t){var n=/^\s*(true|1)|(false|0)\s*$/.exec(t);return n?void 0!==n[1]||!1:void 0}function tA(t){var n=yf(t,!1),i=Date.parse(n);return isNaN(i)?void 0:i/1e3}function nA(t){return iA(yf(t,!1))}function iA(t){var n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return n?parseFloat(n[1]):void 0}function rA(t){return eA(yf(t,!1))}function eA(t){var n=/^\s*(\d+)\s*$/.exec(t);return n?parseInt(n[1],10):void 0}function oA(t){return yf(t,!1).trim()}function sA(t,n){fA(t,n?"1":"0")}function aA(t,n){t.appendChild(Gf().createCDATASection(n))}function uA(t,n){var i=new Date(1e3*n),r=i.getUTCFullYear()+"-"+Xi(i.getUTCMonth()+1,2)+"-"+Xi(i.getUTCDate(),2)+"T"+Xi(i.getUTCHours(),2)+":"+Xi(i.getUTCMinutes(),2)+":"+Xi(i.getUTCSeconds(),2)+"Z";t.appendChild(Gf().createTextNode(r))}function cA(t,n){var i=n.toPrecision();t.appendChild(Gf().createTextNode(i))}function hA(t,n){var i=n.toString();t.appendChild(Gf().createTextNode(i))}function fA(t,n){t.appendChild(Gf().createTextNode(n))}var lA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vA={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},dA=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,r)||this).FEATURE_COLLECTION_PARSERS[JE].featureMember=jf(i.readFeaturesInternal),i.schemaLocation=r.schemaLocation?r.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",i}return lA(n,t),n.prototype.readFlatCoordinates=function(t,n){var i=yf(t,!1).replace(/^\s*|\s*$/g,""),r=n[0].srsName,e="enu";if(r){var o=br(r);o&&(e=o.getAxisOrientation())}for(var s=i.trim().split(/\s+/),a=[],u=0,c=s.length;u<c;u++){var h=s[u].split(/,+/),f=parseFloat(h[0]),l=parseFloat(h[1]),v=3===h.length?parseFloat(h[2]):0;"en"===e.substr(0,2)?a.push(f,l,v):a.push(l,f,v)}return a},n.prototype.readBox=function(t,n){var i=Pf([null],this.Vp,t,n,this);return An(i[1][0],i[1][1],i[1][3],i[1][4])},n.prototype.innerBoundaryIsParser=function(t,n){var i=Pf(void 0,this.RING_PARSERS,t,n,this);i&&n[n.length-1].push(i)},n.prototype.outerBoundaryIsParser=function(t,n){var i=Pf(void 0,this.RING_PARSERS,t,n,this);i&&(n[n.length-1][0]=i)},n.prototype.Xp=function(t,n,i){var r,e=n[n.length-1],o=e.multiSurface,s=e.surface,a=e.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"MultiLineString"===r&&!0===a&&(r="MultiCurve"),pf("http://www.opengis.net/gml",r)},n.prototype.writeFeatureElement=function(t,n,i){var r=n.getId();r&&t.setAttribute("fid",r);var e=i[i.length-1],o=e.featureNS,s=n.getGeometryName();e.serializers||(e.serializers={},e.serializers[o]={});var a=[],u=[];if(n.hasProperties()){var c=n.getProperties();for(var h in c){var f=c[h];null!==f&&(a.push(h),u.push(f),h==s||"function"==typeof f.getSimplifiedGeometry?h in e.serializers[o]||(e.serializers[o][h]=_f(this.writeGeometryElement,this)):h in e.serializers[o]||(e.serializers[o][h]=_f(fA)))}}var l=E({},e);l.node=t,Nf(l,e.serializers,Tf(void 0,o),u,i,a)},n.prototype.writeCurveOrLineString=function(t,n,i){var r=i[i.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var e=this.Hp(t.namespaceURI);t.appendChild(e),this.Jp(e,n,i)}else if("Curve"===t.nodeName){var o=pf(t.namespaceURI,"segments");t.appendChild(o),this.Kp(o,n,i)}},n.prototype.writeLineStringOrCurveMember=function(t,n,i){var r=this.Xp(n,i);r&&(t.appendChild(r),this.writeCurveOrLineString(r,n,i))},n.prototype.writeMultiCurveOrLineString=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=r.curve;o&&t.setAttribute("srsName",o);var a=n.getLineStrings();Nf({node:t,hasZ:e,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.Yp,a,i,void 0,this)},n.prototype.writeGeometryElement=function(t,n,i){var r,e=i[i.length-1],o=E({},e);o.node=t,r=Array.isArray(n)?Jj(n,e):Hj(n,!0,e),Nf(o,this.GEOMETRY_SERIALIZERS,this.Xp,[r],i,void 0,this)},n.prototype.Hp=function(t){var n=pf(t,"coordinates");return n.setAttribute("decimal","."),n.setAttribute("cs",","),n.setAttribute("ts"," "),n},n.prototype.Jp=function(t,n,i){for(var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=n.getCoordinates(),a=s.length,u=new Array(a),c=0;c<a;++c){var h=s[c];u[c]=this.Zp(h,o,e)}fA(t,u.join(" "))},n.prototype.Kp=function(t,n,i){var r=pf(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString(r,n,i)},n.prototype.writeSurfaceOrPolygon=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=n.getLinearRings();Nf({node:t,hasZ:e,srsName:o},this.RING_SERIALIZERS,this.$p,s,i,void 0,this)}else if("Surface"===t.nodeName){var a=pf(t.namespaceURI,"patches");t.appendChild(a),this.Qp(a,n,i)}},n.prototype.$p=function(t,n,i){var r=n[n.length-1],e=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),pf(e.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},n.prototype.Qp=function(t,n,i){var r=pf(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon(r,n,i)},n.prototype.writeRing=function(t,n,i){var r=pf(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing(r,n,i)},n.prototype.Zp=function(t,n,i){var r="enu";n&&(r=br(n).getAxisOrientation());var e="en"===r.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];i&&(e+=","+(t[2]||0));return e},n.prototype.writePoint=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var s=this.Hp(t.namespaceURI);t.appendChild(s);var a=n.getCoordinates();fA(s,this.Zp(a,o,e))},n.prototype.writeMultiPoint=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var s=n.getPoints();Nf({node:t,hasZ:e,srsName:o},this.POINTMEMBER_SERIALIZERS,Tf("pointMember"),s,i,void 0,this)},n.prototype.writePointMember=function(t,n,i){var r=pf(t.namespaceURI,"Point");t.appendChild(r),this.writePoint(r,n,i)},n.prototype.writeLinearRing=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=this.Hp(t.namespaceURI);t.appendChild(e),this.Jp(e,n,i)},n.prototype.writeMultiSurfaceOrPolygon=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=r.surface;o&&t.setAttribute("srsName",o);var a=n.getPolygons();Nf({node:t,hasZ:e,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.Yp,a,i,void 0,this)},n.prototype.writeSurfaceOrPolygonMember=function(t,n,i){var r=this.Xp(n,i);r&&(t.appendChild(r),this.writeSurfaceOrPolygon(r,n,i))},n.prototype.writeEnvelope=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=[n[0]+" "+n[1],n[2]+" "+n[3]];Nf({node:t},this.ENVELOPE_SERIALIZERS,Ef,e,i,["lowerCorner","upperCorner"],this)},n.prototype.Yp=function(t,n,i){var r=n[n.length-1].node;return pf("http://www.opengis.net/gml",vA[r.nodeName])},n}(ZE);dA.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:Sf(dA.prototype.readFlatCoordinates)}},dA.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:dA.prototype.innerBoundaryIsParser,outerBoundaryIs:dA.prototype.outerBoundaryIsParser}},dA.prototype.Vp={"http://www.opengis.net/gml":{coordinates:jf(dA.prototype.readFlatCoordinates)}},dA.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Sf(ZE.prototype.readPoint),MultiPoint:Sf(ZE.prototype.readMultiPoint),LineString:Sf(ZE.prototype.readLineString),MultiLineString:Sf(ZE.prototype.readMultiLineString),LinearRing:Sf(ZE.prototype.readLinearRing),Polygon:Sf(ZE.prototype.readPolygon),MultiPolygon:Sf(ZE.prototype.readMultiPolygon),Box:Sf(dA.prototype.readBox)}},dA.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:_f(dA.prototype.writeCurveOrLineString),MultiCurve:_f(dA.prototype.writeMultiCurveOrLineString),Point:_f(dA.prototype.writePoint),MultiPoint:_f(dA.prototype.writeMultiPoint),LineString:_f(dA.prototype.writeCurveOrLineString),MultiLineString:_f(dA.prototype.writeMultiCurveOrLineString),LinearRing:_f(dA.prototype.writeLinearRing),Polygon:_f(dA.prototype.writeSurfaceOrPolygon),MultiPolygon:_f(dA.prototype.writeMultiSurfaceOrPolygon),Surface:_f(dA.prototype.writeSurfaceOrPolygon),MultiSurface:_f(dA.prototype.writeMultiSurfaceOrPolygon),Envelope:_f(dA.prototype.writeEnvelope)}},dA.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:_f(dA.prototype.writeLineStringOrCurveMember),curveMember:_f(dA.prototype.writeLineStringOrCurveMember)}},dA.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:_f(dA.prototype.writeRing),innerBoundaryIs:_f(dA.prototype.writeRing)}},dA.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:_f(dA.prototype.writePointMember)}},dA.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:_f(dA.prototype.writeSurfaceOrPolygonMember),polygonMember:_f(dA.prototype.writeSurfaceOrPolygonMember)}},dA.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:_f(fA),upperCorner:_f(fA)}};var pA=dA,yA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mA={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},wA=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,r)||this).ty=void 0!==r.surface&&r.surface,i.ny=void 0!==r.curve&&r.curve,i.iy=void 0===r.multiCurve||r.multiCurve,i.ey=void 0===r.multiSurface||r.multiSurface,i.schemaLocation=r.schemaLocation?r.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",i.hasZ=void 0!==r.hasZ&&r.hasZ,i}return yA(n,t),n.prototype.readMultiCurve=function(t,n){var i=Pf([],this.MULTICURVE_PARSERS,t,n,this);return i?new Sj(i):void 0},n.prototype.readMultiSurface=function(t,n){var i=Pf([],this.MULTISURFACE_PARSERS,t,n,this);if(i)return new _j(i)},n.prototype.curveMemberParser=function(t,n){Rf(this.CURVEMEMBER_PARSERS,t,n,this)},n.prototype.surfaceMemberParser=function(t,n){Rf(this.SURFACEMEMBER_PARSERS,t,n,this)},n.prototype.readPatch=function(t,n){return Pf([null],this.PATCHES_PARSERS,t,n,this)},n.prototype.readSegment=function(t,n){return Pf([null],this.SEGMENTS_PARSERS,t,n,this)},n.prototype.readPolygonPatch=function(t,n){return Pf([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this)},n.prototype.readLineStringSegment=function(t,n){return Pf([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},n.prototype.interiorParser=function(t,n){var i=Pf(void 0,this.RING_PARSERS,t,n,this);i&&n[n.length-1].push(i)},n.prototype.exteriorParser=function(t,n){var i=Pf(void 0,this.RING_PARSERS,t,n,this);i&&(n[n.length-1][0]=i)},n.prototype.readSurface=function(t,n){var i=Pf([null],this.SURFACE_PARSERS,t,n,this);if(i&&i[0]){var r,e=i[0],o=[e.length],s=void 0;for(s=1,r=i.length;s<r;++s)b(e,i[s]),o.push(e.length);return new Ke(e,At,o)}},n.prototype.readCurve=function(t,n){var i=Pf([null],this.CURVE_PARSERS,t,n,this);return i?new xj(i,At):void 0},n.prototype.readEnvelope=function(t,n){var i=Pf([null],this.ENVELOPE_PARSERS,t,n,this);return An(i[1][0],i[1][1],i[2][0],i[2][1])},n.prototype.readFlatPos=function(t,n){for(var i,r=yf(t,!1),e=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];i=e.exec(r);)o.push(parseFloat(i[1])),r=r.substr(i[0].length);if(""===r){var s=n[0].srsName,a="enu";if(s)a=br(s).getAxisOrientation();if("neu"===a){var u,c=void 0;for(c=0,u=o.length;c<u;c+=3){var h=o[c],f=o[c+1];o[c]=f,o[c+1]=h}}var l=o.length;if(2==l&&o.push(0),0!==l)return o}},n.prototype.readFlatPosList=function(t,n){var i=yf(t,!1).replace(/^\s*|\s*$/g,""),r=n[0],e=r.srsName,o=r.srsDimension,s="enu";e&&(s=br(e).getAxisOrientation());var a,u,c,h=i.split(/\s+/),f=2;t.getAttribute("srsDimension")?f=eA(t.getAttribute("srsDimension")):t.getAttribute("dimension")?f=eA(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?f=eA(t.parentNode.getAttribute("srsDimension")):o&&(f=eA(o));for(var l=[],v=0,d=h.length;v<d;v+=f)a=parseFloat(h[v]),u=parseFloat(h[v+1]),c=3===f?parseFloat(h[v+2]):0,"en"===s.substr(0,2)?l.push(a,u,c):l.push(u,a,c);return l},n.prototype.oy=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=e?"3":"2";t.setAttribute("srsDimension",o);var s=r.srsName,a="enu";s&&(a=br(s).getAxisOrientation());var u,c=n.getCoordinates();(u="en"===a.substr(0,2)?c[0]+" "+c[1]:c[1]+" "+c[0],e)&&(u+=" "+(c[2]||0));fA(t,u)},n.prototype.Zp=function(t,n,i){var r="enu";n&&(r=br(n).getAxisOrientation());var e="en"===r.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];i&&(e+=" "+(t[2]||0));return e},n.prototype.sy=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=e?"3":"2";t.setAttribute("srsDimension",o);for(var s,a=r.srsName,u=n.getCoordinates(),c=u.length,h=new Array(c),f=0;f<c;++f)s=u[f],h[f]=this.Zp(s,a,e);fA(t,h.join(" "))},n.prototype.writePoint=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=pf(t.namespaceURI,"pos");t.appendChild(e),this.oy(e,n,i)},n.prototype.writeEnvelope=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=[n[0]+" "+n[1],n[2]+" "+n[3]];Nf({node:t},this.ENVELOPE_SERIALIZERS,Ef,e,i,["lowerCorner","upperCorner"],this)},n.prototype.writeLinearRing=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=pf(t.namespaceURI,"posList");t.appendChild(e),this.sy(e,n,i)},n.prototype.$p=function(t,n,i){var r=n[n.length-1],e=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),pf(e.namespaceURI,void 0!==o?"interior":"exterior")},n.prototype.writeSurfaceOrPolygon=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=n.getLinearRings();Nf({node:t,hasZ:e,srsName:o},this.RING_SERIALIZERS,this.$p,s,i,void 0,this)}else if("Surface"===t.nodeName){var a=pf(t.namespaceURI,"patches");t.appendChild(a),this.Qp(a,n,i)}},n.prototype.writeCurveOrLineString=function(t,n,i){var r=i[i.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var e=pf(t.namespaceURI,"posList");t.appendChild(e),this.sy(e,n,i)}else if("Curve"===t.nodeName){var o=pf(t.namespaceURI,"segments");t.appendChild(o),this.Kp(o,n,i)}},n.prototype.writeMultiSurfaceOrPolygon=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=r.surface;o&&t.setAttribute("srsName",o);var a=n.getPolygons();Nf({node:t,hasZ:e,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.Yp,a,i,void 0,this)},n.prototype.writeMultiPoint=function(t,n,i){var r=i[i.length-1],e=r.srsName,o=r.hasZ;e&&t.setAttribute("srsName",e);var s=n.getPoints();Nf({node:t,hasZ:o,srsName:e},this.POINTMEMBER_SERIALIZERS,Tf("pointMember"),s,i,void 0,this)},n.prototype.writeMultiCurveOrLineString=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=r.curve;o&&t.setAttribute("srsName",o);var a=n.getLineStrings();Nf({node:t,hasZ:e,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.Yp,a,i,void 0,this)},n.prototype.writeRing=function(t,n,i){var r=pf(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing(r,n,i)},n.prototype.writeSurfaceOrPolygonMember=function(t,n,i){var r=this.Xp(n,i);r&&(t.appendChild(r),this.writeSurfaceOrPolygon(r,n,i))},n.prototype.writePointMember=function(t,n,i){var r=pf(t.namespaceURI,"Point");t.appendChild(r),this.writePoint(r,n,i)},n.prototype.writeLineStringOrCurveMember=function(t,n,i){var r=this.Xp(n,i);r&&(t.appendChild(r),this.writeCurveOrLineString(r,n,i))},n.prototype.Qp=function(t,n,i){var r=pf(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon(r,n,i)},n.prototype.Kp=function(t,n,i){var r=pf(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString(r,n,i)},n.prototype.writeGeometryElement=function(t,n,i){var r,e=i[i.length-1],o=E({},e);o.node=t,r=Array.isArray(n)?Jj(n,e):Hj(n,!0,e),Nf(o,this.GEOMETRY_SERIALIZERS,this.Xp,[r],i,void 0,this)},n.prototype.writeFeatureElement=function(t,n,i){var r=n.getId();r&&t.setAttribute("fid",r);var e=i[i.length-1],o=e.featureNS,s=n.getGeometryName();e.serializers||(e.serializers={},e.serializers[o]={});var a=[],u=[];if(n.hasProperties()){var c=n.getProperties();for(var h in c){var f=c[h];null!==f&&(a.push(h),u.push(f),h==s||"function"==typeof f.getSimplifiedGeometry?h in e.serializers[o]||(e.serializers[o][h]=_f(this.writeGeometryElement,this)):h in e.serializers[o]||(e.serializers[o][h]=_f(fA)))}}var l=E({},e);l.node=t,Nf(l,e.serializers,Tf(void 0,o),u,i,a)},n.prototype.uy=function(t,n,i){var r=i[i.length-1],e=r.featureType,o=r.featureNS,s={};s[o]={},s[o][e]=_f(this.writeFeatureElement,this);var a=E({},r);a.node=t,Nf(a,s,Tf(e,o),n,i)},n.prototype.Yp=function(t,n,i){var r=n[n.length-1].node;return pf(this.namespace,mA[r.nodeName])},n.prototype.Xp=function(t,n,i){var r,e=n[n.length-1],o=e.multiSurface,s=e.surface,a=e.curve,u=e.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"LineString"===r&&!0===a?r="Curve":"MultiLineString"===r&&!0===u&&(r="MultiCurve"),pf(this.namespace,r)},n.prototype.writeGeometryNode=function(t,n){n=this.adaptOptions(n);var i=pf(this.namespace,"geom"),r={node:i,hasZ:this.hasZ,srsName:this.srsName,curve:this.ny,surface:this.ty,multiSurface:this.ey,multiCurve:this.iy};return n&&E(r,n),this.writeGeometryElement(i,t,[r]),i},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=pf(this.namespace,"featureMembers");i.setAttributeNS(df,"xsi:schemaLocation",this.schemaLocation);var r={srsName:this.srsName,hasZ:this.hasZ,curve:this.ny,surface:this.ty,multiSurface:this.ey,multiCurve:this.iy,featureNS:this.featureNS,featureType:this.featureType};return n&&E(r,n),this.uy(i,t,[r]),i},n}(ZE);wA.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:Sf(wA.prototype.readFlatPos),posList:Sf(wA.prototype.readFlatPosList),coordinates:Sf(pA.prototype.readFlatCoordinates)}},wA.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:wA.prototype.interiorParser,exterior:wA.prototype.exteriorParser}},wA.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Sf(ZE.prototype.readPoint),MultiPoint:Sf(ZE.prototype.readMultiPoint),LineString:Sf(ZE.prototype.readLineString),MultiLineString:Sf(ZE.prototype.readMultiLineString),LinearRing:Sf(ZE.prototype.readLinearRing),Polygon:Sf(ZE.prototype.readPolygon),MultiPolygon:Sf(ZE.prototype.readMultiPolygon),Surface:Sf(wA.prototype.readSurface),MultiSurface:Sf(wA.prototype.readMultiSurface),Curve:Sf(wA.prototype.readCurve),MultiCurve:Sf(wA.prototype.readMultiCurve),Envelope:Sf(wA.prototype.readEnvelope)}},wA.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:jf(wA.prototype.curveMemberParser),curveMembers:jf(wA.prototype.curveMemberParser)}},wA.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:jf(wA.prototype.surfaceMemberParser),surfaceMembers:jf(wA.prototype.surfaceMemberParser)}},wA.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:jf(ZE.prototype.readLineString),Curve:jf(wA.prototype.readCurve)}},wA.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:jf(ZE.prototype.readPolygon),Surface:jf(wA.prototype.readSurface)}},wA.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:Sf(wA.prototype.readPatch)}},wA.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:Sf(wA.prototype.readSegment)}},wA.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:jf(wA.prototype.readFlatPosList),upperCorner:jf(wA.prototype.readFlatPosList)}},wA.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:Sf(wA.prototype.readPolygonPatch)}},wA.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:Sf(wA.prototype.readLineStringSegment)}},wA.prototype.writeFeatures,wA.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:_f(wA.prototype.writeRing),interior:_f(wA.prototype.writeRing)}},wA.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:_f(fA),upperCorner:_f(fA)}},wA.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:_f(wA.prototype.writeSurfaceOrPolygonMember),polygonMember:_f(wA.prototype.writeSurfaceOrPolygonMember)}},wA.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:_f(wA.prototype.writePointMember)}},wA.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:_f(wA.prototype.writeLineStringOrCurveMember),curveMember:_f(wA.prototype.writeLineStringOrCurveMember)}},wA.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:_f(wA.prototype.writeCurveOrLineString),MultiCurve:_f(wA.prototype.writeMultiCurveOrLineString),Point:_f(wA.prototype.writePoint),MultiPoint:_f(wA.prototype.writeMultiPoint),LineString:_f(wA.prototype.writeCurveOrLineString),MultiLineString:_f(wA.prototype.writeMultiCurveOrLineString),LinearRing:_f(wA.prototype.writeLinearRing),Polygon:_f(wA.prototype.writeSurfaceOrPolygon),MultiPolygon:_f(wA.prototype.writeMultiSurfaceOrPolygon),Surface:_f(wA.prototype.writeSurfaceOrPolygon),MultiSurface:_f(wA.prototype.writeMultiSurfaceOrPolygon),Envelope:_f(wA.prototype.writeEnvelope)}};var bA=wA,gA=bA;gA.prototype.writeFeatures,gA.prototype.writeFeaturesNode;var xA=gA,jA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),SA=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,r)||this).schemaLocation=r.schemaLocation?r.schemaLocation:i.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",i}return jA(n,t),n}(bA);SA.prototype.namespace="http://www.opengis.net/gml/3.2",SA.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:Sf(bA.prototype.readFlatPos),posList:Sf(bA.prototype.readFlatPosList),coordinates:Sf(pA.prototype.readFlatCoordinates)}},SA.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:bA.prototype.interiorParser,exterior:bA.prototype.exteriorParser}},SA.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Sf(ZE.prototype.readPoint),MultiPoint:Sf(ZE.prototype.readMultiPoint),LineString:Sf(ZE.prototype.readLineString),MultiLineString:Sf(ZE.prototype.readMultiLineString),LinearRing:Sf(ZE.prototype.readLinearRing),Polygon:Sf(ZE.prototype.readPolygon),MultiPolygon:Sf(ZE.prototype.readMultiPolygon),Surface:Sf(SA.prototype.readSurface),MultiSurface:Sf(bA.prototype.readMultiSurface),Curve:Sf(SA.prototype.readCurve),MultiCurve:Sf(bA.prototype.readMultiCurve),Envelope:Sf(SA.prototype.readEnvelope)}},SA.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:jf(bA.prototype.curveMemberParser),curveMembers:jf(bA.prototype.curveMemberParser)}},SA.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:jf(bA.prototype.surfaceMemberParser),surfaceMembers:jf(bA.prototype.surfaceMemberParser)}},SA.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:jf(ZE.prototype.readLineString),Curve:jf(bA.prototype.readCurve)}},SA.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:jf(ZE.prototype.readPolygon),Surface:jf(bA.prototype.readSurface)}},SA.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:Sf(bA.prototype.readPatch)}},SA.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:Sf(bA.prototype.readSegment)}},SA.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:jf(bA.prototype.readFlatPosList),upperCorner:jf(bA.prototype.readFlatPosList)}},SA.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:Sf(bA.prototype.readPolygonPatch)}},SA.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:Sf(bA.prototype.readLineStringSegment)}},SA.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:jf(ZE.prototype.pointMemberParser),pointMembers:jf(ZE.prototype.pointMemberParser)}},SA.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:jf(ZE.prototype.lineStringMemberParser),lineStringMembers:jf(ZE.prototype.lineStringMemberParser)}},SA.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:jf(ZE.prototype.polygonMemberParser),polygonMembers:jf(ZE.prototype.polygonMemberParser)}},SA.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:jf(ZE.prototype.readFlatCoordinatesFromNode)}},SA.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:jf(ZE.prototype.readLineString)}},SA.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:jf(ZE.prototype.readPolygon)}},SA.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:Sf(ZE.prototype.readFlatLinearRing)}},SA.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:_f(bA.prototype.writeRing),interior:_f(bA.prototype.writeRing)}},SA.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:_f(fA),upperCorner:_f(fA)}},SA.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:_f(bA.prototype.writeSurfaceOrPolygonMember),polygonMember:_f(bA.prototype.writeSurfaceOrPolygonMember)}},SA.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:_f(bA.prototype.writePointMember)}},SA.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:_f(bA.prototype.writeLineStringOrCurveMember),curveMember:_f(bA.prototype.writeLineStringOrCurveMember)}},SA.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:_f(bA.prototype.writeCurveOrLineString),MultiCurve:_f(bA.prototype.writeMultiCurveOrLineString),Point:_f(SA.prototype.writePoint),MultiPoint:_f(bA.prototype.writeMultiPoint),LineString:_f(bA.prototype.writeCurveOrLineString),MultiLineString:_f(bA.prototype.writeMultiCurveOrLineString),LinearRing:_f(bA.prototype.writeLinearRing),Polygon:_f(bA.prototype.writeSurfaceOrPolygon),MultiPolygon:_f(bA.prototype.writeMultiSurfaceOrPolygon),Surface:_f(bA.prototype.writeSurfaceOrPolygon),MultiSurface:_f(bA.prototype.writeMultiSurfaceOrPolygon),Envelope:_f(bA.prototype.writeEnvelope)}};var kA=SA,MA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_A=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],OA={rte:nC,trk:iC,wpt:rC},TA=Cf(_A,{rte:jf(nC),trk:jf(iC),wpt:jf(rC)}),EA=Cf(_A,{text:Mf(oA,"linkText"),type:Mf(oA,"linkType")}),AA=Cf(_A,{rte:_f((function(t,n,i){var r=i[0],e=n.getProperties(),o={node:t};o.properties=e;var s=n.getGeometry();if(s.getType()==Pt.LINE_STRING){var a=Hj(s,!0,r);o.geometryLayout=a.getLayout(),e.rtept=a.getCoordinates()}var u=i[i.length-1].node,c=DA[u.namespaceURI],h=Af(e,c);Nf(o,UA,Ef,h,i,c)})),trk:_f((function(t,n,i){var r=i[0],e=n.getProperties(),o={node:t};o.properties=e;var s=n.getGeometry();if(s.getType()==Pt.MULTI_LINE_STRING){var a=Hj(s,!0,r);e.trkseg=a.getLineStrings()}var u=i[i.length-1].node,c=BA[u.namespaceURI],h=Af(e,c);Nf(o,WA,Ef,h,i,c)})),wpt:_f((function(t,n,i){var r=i[0],e=i[i.length-1];e.properties=n.getProperties();var o=n.getGeometry();if(o.getType()==Pt.POINT){var s=Hj(o,!0,r);e.geometryLayout=s.getLayout(),oC(t,s.getCoordinates(),i)}}))}),CA=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=br("EPSG:4326"),i.hy=r.readExtensions,i}return MA(n,t),n.prototype.ly=function(t){t||(t=[]);for(var n=0,i=t.length;n<i;++n){var r=t[n];if(this.hy){var e=r.get("extensionsNode_")||null;this.hy(r,e)}r.set("extensionsNode_",void 0)}},n.prototype.readFeatureFromNode=function(t,n){if(!y(_A,t.namespaceURI))return null;var i=OA[t.localName];if(!i)return null;var r=i(t,[this.getReadOptions(t,n)]);return r?(this.ly([r]),r):null},n.prototype.readFeaturesFromNode=function(t,n){if(!y(_A,t.namespaceURI))return[];if("gpx"==t.localName){var i=Pf([],TA,t,[this.getReadOptions(t,n)]);return i?(this.ly(i),i):[]}return[]},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=pf("http://www.topografix.com/GPX/1/1","gpx");return i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",df),i.setAttributeNS(df,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),Nf({node:i},AA,YA,t,[n]),i},n}(XE),RA=Cf(_A,{name:Mf(oA),cmt:Mf(oA),desc:Mf(oA),src:Mf(oA),link:QA,number:Mf(rA),extensions:tC,type:Mf(oA),rtept:function(t,n){var i=Pf({},PA,t,n);if(i){var r=n[n.length-1],e=r.flatCoordinates,o=r.layoutOptions;ZA(e,o,t,i)}}}),PA=Cf(_A,{ele:Mf(nA),time:Mf(tA)}),IA=Cf(_A,{name:Mf(oA),cmt:Mf(oA),desc:Mf(oA),src:Mf(oA),link:QA,number:Mf(rA),type:Mf(oA),extensions:tC,trkseg:function(t,n){var i=n[n.length-1];Rf(NA,t,n);var r=i.flatCoordinates;i.ends.push(r.length)}}),NA=Cf(_A,{trkpt:function(t,n){var i=Pf({},zA,t,n);if(i){var r=n[n.length-1],e=r.flatCoordinates,o=r.layoutOptions;ZA(e,o,t,i)}}}),zA=Cf(_A,{ele:Mf(nA),time:Mf(tA)}),FA=Cf(_A,{ele:Mf(nA),time:Mf(tA),magvar:Mf(nA),geoidheight:Mf(nA),name:Mf(oA),cmt:Mf(oA),desc:Mf(oA),src:Mf(oA),link:QA,sym:Mf(oA),type:Mf(oA),fix:Mf(oA),sat:Mf(rA),hdop:Mf(nA),vdop:Mf(nA),pdop:Mf(nA),ageofdgpsdata:Mf(nA),dgpsid:Mf(rA),extensions:tC}),LA=["text","type"],GA=Cf(_A,{text:_f(fA),type:_f(fA)}),DA=Cf(_A,["name","cmt","desc","src","link","number","type","rtept"]),UA=Cf(_A,{name:_f(fA),cmt:_f(fA),desc:_f(fA),src:_f(fA),link:_f(eC),number:_f(hA),type:_f(fA),rtept:Of(_f(oC))}),qA=Cf(_A,["ele","time"]),BA=Cf(_A,["name","cmt","desc","src","link","number","type","trkseg"]),WA=Cf(_A,{name:_f(fA),cmt:_f(fA),desc:_f(fA),src:_f(fA),link:_f(eC),number:_f(hA),type:_f(fA),trkseg:Of(_f((function(t,n,i){var r={node:t};r.geometryLayout=n.getLayout(),r.properties={},Nf(r,XA,VA,n.getCoordinates(),i)})))}),VA=Tf("trkpt"),XA=Cf(_A,{trkpt:_f(oC)}),HA=Cf(_A,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),JA=Cf(_A,{ele:_f(cA),time:_f(uA),magvar:_f(cA),geoidheight:_f(cA),name:_f(fA),cmt:_f(fA),desc:_f(fA),src:_f(fA),link:_f(eC),sym:_f(fA),type:_f(fA),fix:_f(fA),sat:_f(hA),hdop:_f(cA),vdop:_f(cA),pdop:_f(cA),ageofdgpsdata:_f(cA),dgpsid:_f(hA)}),KA={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function YA(t,n,i){var r=t.getGeometry();if(r){var e=KA[r.getType()];if(e)return pf(n[n.length-1].node.namespaceURI,e)}}function ZA(t,n,i,r){return t.push(parseFloat(i.getAttribute("lon")),parseFloat(i.getAttribute("lat"))),"ele"in r?(t.push(r.ele),delete r.ele,n.hasZ=!0):t.push(0),"time"in r?(t.push(r.time),delete r.time,n.hasM=!0):t.push(0),t}function $A(t,n,i){var r=Et,e=2;if(t.hasZ&&t.hasM?(r=Rt,e=4):t.hasZ?(r=At,e=3):t.hasM&&(r=Ct,e=3),4!==e){for(var o=0,s=n.length/4;o<s;o++)n[o*e]=n[4*o],n[o*e+1]=n[4*o+1],t.hasZ&&(n[o*e+2]=n[4*o+2]),t.hasM&&(n[o*e+2]=n[4*o+3]);if(n.length=n.length/4*e,i)for(o=0,s=i.length;o<s;o++)i[o]=i[o]/4*e}return r}function QA(t,n){var i=n[n.length-1],r=t.getAttribute("href");null!==r&&(i.link=r),Rf(EA,t,n)}function tC(t,n){n[n.length-1].vy=t}function nC(t,n){var i=n[0],r=Pf({flatCoordinates:[],layoutOptions:{}},RA,t,n);if(r){var e=r.flatCoordinates;delete r.flatCoordinates;var o=r.layoutOptions;delete r.layoutOptions;var s=$A(o,e),a=new xj(e,s);Hj(a,!1,i);var u=new Tt(a);return u.setProperties(r,!0),u}}function iC(t,n){var i=n[0],r=Pf({flatCoordinates:[],ends:[],layoutOptions:{}},IA,t,n);if(r){var e=r.flatCoordinates;delete r.flatCoordinates;var o=r.ends;delete r.ends;var s=r.layoutOptions;delete r.layoutOptions;var a=$A(s,e,o),u=new Sj(e,a,o);Hj(u,!1,i);var c=new Tt(u);return c.setProperties(r,!0),c}}function rC(t,n){var i=n[0],r=Pf({},FA,t,n);if(r){var e={},o=ZA([],e,t,r),s=$A(e,o),a=new Oe(o,s);Hj(a,!1,i);var u=new Tt(a);return u.setProperties(r,!0),u}}function eC(t,n,i){t.setAttribute("href",n);var r=i[i.length-1].properties,e=[r.linkText,r.linkType];Nf({node:t},GA,Ef,e,i,LA)}function oC(t,n,i){var r=i[i.length-1],e=r.node.namespaceURI,o=r.properties;switch(t.setAttributeNS(null,"lat",String(n[1])),t.setAttributeNS(null,"lon",String(n[0])),r.geometryLayout){case Rt:0!==n[3]&&(o.time=n[3]);case At:0!==n[2]&&(o.ele=n[2]);break;case Ct:0!==n[2]&&(o.time=n[2])}var s="rtept"==t.nodeName?qA[e]:HA[e],a=Af(o,s);Nf({node:t,properties:o},JA,Ef,a,i,s)}var sC=CA,aC=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function uC(t){return"string"==typeof t?t:""}var cC=function(t){function n(){return t.call(this)||this}return aC(n,t),n.prototype.getType=function(){return ah},n.prototype.readFeature=function(t,n){return this.readFeatureFromText(uC(t),this.adaptOptions(n))},n.prototype.readFeatureFromText=function(t,n){return r()},n.prototype.readFeatures=function(t,n){return this.readFeaturesFromText(uC(t),this.adaptOptions(n))},n.prototype.readFeaturesFromText=function(t,n){return r()},n.prototype.readGeometry=function(t,n){return this.readGeometryFromText(uC(t),this.adaptOptions(n))},n.prototype.readGeometryFromText=function(t,n){return r()},n.prototype.readProjection=function(t){return this.readProjectionFromText(uC(t))},n.prototype.readProjectionFromText=function(t){return this.dataProjection},n.prototype.writeFeature=function(t,n){return this.writeFeatureText(t,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){return r()},n.prototype.writeFeatures=function(t,n){return this.writeFeaturesText(t,this.adaptOptions(n))},n.prototype.writeFeaturesText=function(t,n){return r()},n.prototype.writeGeometry=function(t,n){return this.writeGeometryText(t,this.adaptOptions(n))},n.prototype.writeGeometryText=function(t,n){return r()},n}(Xj),hC=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fC="barometric",lC="gps",vC="none",dC=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,pC=/^H.([A-Z]{3}).*?:(.*)/,yC=/^HFDTE(\d{2})(\d{2})(\d{2})/,mC=/\r\n|\r|\n/,wC=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=br("EPSG:4326"),i.py=r.altitudeMode?r.altitudeMode:vC,i}return hC(n,t),n.prototype.readFeatureFromText=function(t,n){var i,r,e=this.py,o=t.split(mC),s={},a=[],u=2e3,c=0,h=1,f=-1;for(i=0,r=o.length;i<r;++i){var l=o[i],v=void 0;if("B"==l.charAt(0)){if(v=dC.exec(l)){var d=parseInt(v[1],10),p=parseInt(v[2],10),y=parseInt(v[3],10),m=parseInt(v[4],10)+parseInt(v[5],10)/6e4;"S"==v[6]&&(m=-m);var w=parseInt(v[7],10)+parseInt(v[8],10)/6e4;if("W"==v[9]&&(w=-w),a.push(w,m),e!=vC){var b=void 0;b=e==lC?parseInt(v[11],10):e==fC?parseInt(v[12],10):0,a.push(b)}var g=Date.UTC(u,c,h,d,p,y);g<f&&(g=Date.UTC(u,c,h+1,d,p,y)),a.push(g/1e3),f=g}}else"H"==l.charAt(0)&&((v=yC.exec(l))?(h=parseInt(v[1],10),c=parseInt(v[2],10)-1,u=2e3+parseInt(v[3],10)):(v=pC.exec(l))&&(s[v[1]]=v[2].trim()))}if(0===a.length)return null;var x=new xj(a,e==vC?Ct:Rt),j=new Tt(Hj(x,!1,n));return j.setProperties(s,!0),j},n.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return i?[i]:[]},n}(cC);function bC(t){return(bC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var gC,xC,jC,SC,kC,MC,_C=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),OC=["http://www.google.com/kml/ext/2.2"],TC=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],EC={fraction:Ev,pixels:Av,insetPixels:Av},AC=Cf(TC,{ExtendedData:OR,Region:TR,MultiGeometry:Mf(wR,"geometry"),LineString:Mf(pR,"geometry"),LinearRing:Mf(yR,"geometry"),Point:Mf(bR,"geometry"),Polygon:Mf(xR,"geometry"),Style:Mf(SR),StyleMap:function(t,n){var i=nR.call(this,t,n);if(!i)return;var r=n[n.length-1];Array.isArray(i)?r.Style=i:"string"==typeof i?r.styleUrl=i:Mt(!1,38)},address:Mf(oA),description:Mf(oA),name:Mf(oA),open:Mf($E),phoneNumber:Mf(oA),styleUrl:Mf($C),visibility:Mf($E)},Cf(OC,{MultiTrack:Mf((function(t,n){var i=Pf([],uR,t,n);if(!i)return;return new Sj(i)}),"geometry"),Track:Mf(hR,"geometry")})),CC=Cf(TC,{ExtendedData:OR,Region:TR,Link:function(t,n){Rf(RC,t,n)},address:Mf(oA),description:Mf(oA),name:Mf(oA),open:Mf($E),phoneNumber:Mf(oA),visibility:Mf($E)}),RC=Cf(TC,{href:Mf(ZC)}),PC=Cf(TC,{LatLonAltBox:function(t,n){var i=Pf({},CR,t,n);if(!i)return;var r=n[n.length-1],e=[parseFloat(i.west),parseFloat(i.south),parseFloat(i.east),parseFloat(i.north)];r.extent=e,r.altitudeMode=i.altitudeMode,r.minAltitude=parseFloat(i.minAltitude),r.maxAltitude=parseFloat(i.maxAltitude)},Lod:function(t,n){var i=Pf({},RR,t,n);if(!i)return;var r=n[n.length-1];r.minLodPixels=parseFloat(i.minLodPixels),r.maxLodPixels=parseFloat(i.maxLodPixels),r.minFadeExtent=parseFloat(i.minFadeExtent),r.maxFadeExtent=parseFloat(i.maxFadeExtent)}}),IC=Cf(TC,["Document","Placemark"]),NC=Cf(TC,{Document:_f((function(t,n,i){Nf({node:t},FR,LR,n,i,void 0,this)})),Placemark:_f(uP)}),zC=null;var FC,LC=null;var GC,DC=null;var UC=null;var qC=null;var BC,WC=null;function VC(t){return 32/Math.min(t[0],t[1])}function XC(t){return t}var HC=function(t){function n(n){var i=t.call(this)||this,r=n||{};return WC||(zC=new Tv({color:gC=[255,255,255,1]}),MC="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",LC=new Uv({anchor:xC=[20,2],anchorOrigin:Cv,anchorXUnits:jC=Av,anchorYUnits:SC=Av,crossOrigin:"anonymous",rotation:0,scale:VC(kC=[64,64]),size:kC,src:MC}),FC="NO_IMAGE",DC=new qv({color:gC,width:1}),GC=new qv({color:[51,51,51,1],width:2}),UC=new Qv({font:"bold 16px Helvetica",fill:zC,stroke:GC,scale:.8}),qC=new Yv({fill:zC,image:LC,text:UC,stroke:DC,zIndex:0}),WC=[qC]),i.dataProjection=br("EPSG:4326"),i.my=r.defaultStyle?r.defaultStyle:WC,i.wy=void 0===r.extractStyles||r.extractStyles,i.gy=void 0===r.writeStyles||r.writeStyles,i.xy={},i.jy=void 0===r.showPointNames||r.showPointNames,i.Bt=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",i.Sy=r.iconUrlFunction?r.iconUrlFunction:XC,i.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],i}return _C(n,t),n.prototype.ky=function(t,n){var i=Pf([],Cf(TC,{Document:xf(this.ky,this),Folder:xf(this.ky,this),Placemark:jf(this.My,this),Style:this._y.bind(this),StyleMap:this.Oy.bind(this)}),t,n,this);return i||void 0},n.prototype.My=function(t,n){var i=Pf({geometry:null},AC,t,n,this);if(i){var r=new Tt,e=t.getAttribute("id");null!==e&&r.setId(e);var o=n[0],s=i.geometry;if(s&&Hj(s,!1,o),r.setGeometry(s),delete i.geometry,this.wy){var a=function(t,n,i,r,e){return function(o,s){var a=e,u="",c=[];if(a){var h=o.getGeometry();if(h)if(h instanceof sS)a=(c=h.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===Pt.POINT||n===Pt.MULTI_POINT}))).length>0;else{var f=h.getType();a=f===Pt.POINT||f===Pt.MULTI_POINT}}a&&(u=o.get("name"),(a=a&&!!u)&&u.search(/&[^&]+;/)>-1&&(BC||(BC=document.createElement("textarea")),BC.innerHTML=u,u=BC.value));var l=i;if(t?l=t:n&&(l=JC(n,i,r)),a){var v=function(t,n){var i=[0,0],r="start",e=t.getImage();if(e){var o=e.getSize();if(o&&2==o.length){var s=e.getScaleArray(),a=e.getAnchor();i[0]=s[0]*(o[0]-a[0]),i[1]=s[1]*(o[1]/2-a[1]),r="left"}}var u=t.getText();u?((u=u.clone()).setFont(u.getFont()||UC.getFont()),u.setScale(u.getScale()||UC.getScale()),u.setFill(u.getFill()||UC.getFill()),u.setStroke(u.getStroke()||GC)):u=UC.clone();return u.setText(n),u.setOffsetX(i[0]),u.setOffsetY(i[1]),u.setTextAlign(r),new Yv({image:e,text:u})}(l[0],u);return c.length>0?(v.setGeometry(new sS(c)),[v,new Yv({geometry:l[0].getGeometry(),image:null,fill:l[0].getFill(),stroke:l[0].getStroke(),text:null})].concat(l.slice(1))):v}return l}}(i.Style,i.styleUrl,this.my,this.xy,this.jy);r.setStyle(a)}return delete i.Style,r.setProperties(i,!0),r}},n.prototype._y=function(t,n){var i=t.getAttribute("id");if(null!==i){var r=SR.call(this,t,n);if(r){var e=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)e=new URL("#"+i,o).href;else e="#"+i;this.xy[e]=r}}},n.prototype.Oy=function(t,n){var i=t.getAttribute("id");if(null!==i){var r=nR.call(this,t,n);if(r){var e,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)e=new URL("#"+i,o).href;else e="#"+i;this.xy[e]=r}}},n.prototype.readFeatureFromNode=function(t,n){if(!y(TC,t.namespaceURI))return null;var i=this.My(t,[this.getReadOptions(t,n)]);return i||null},n.prototype.readFeaturesFromNode=function(t,n){if(!y(TC,t.namespaceURI))return[];var i,r=t.localName;if("Document"==r||"Folder"==r)return(i=this.ky(t,[this.getReadOptions(t,n)]))||[];if("Placemark"==r){var e=this.My(t,[this.getReadOptions(t,n)]);return e?[e]:[]}if("kml"==r){i=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,n);s&&b(i,s)}return i}return[]},n.prototype.readName=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readNameFromDocument(n)}return wf(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},n.prototype.readNameFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE){var i=this.readNameFromNode(n);if(i)return i}},n.prototype.readNameFromNode=function(t){for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(y(TC,n.namespaceURI)&&"name"==n.localName)return oA(n);for(n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(y(TC,n.namespaceURI)&&("Document"==i||"Folder"==i||"Placemark"==i||"kml"==i)){var r=this.readNameFromNode(n);if(r)return r}}},n.prototype.readNetworkLinks=function(t){var n=[];if("string"==typeof t){var i=gf(t);b(n,this.readNetworkLinksFromDocument(i))}else wf(t)?b(n,this.readNetworkLinksFromDocument(t)):b(n,this.readNetworkLinksFromNode(t));return n},n.prototype.readNetworkLinksFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&b(n,this.readNetworkLinksFromNode(i));return n},n.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(y(TC,i.namespaceURI)&&"NetworkLink"==i.localName){var r=Pf({},CC,i,[]);n.push(r)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var e=i.localName;!y(TC,i.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||b(n,this.readNetworkLinksFromNode(i))}return n},n.prototype.readRegion=function(t){var n=[];if("string"==typeof t){var i=gf(t);b(n,this.readRegionFromDocument(i))}else wf(t)?b(n,this.readRegionFromDocument(t)):b(n,this.readRegionFromNode(t));return n},n.prototype.readRegionFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&b(n,this.readRegionFromNode(i));return n},n.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(y(TC,i.namespaceURI)&&"Region"==i.localName){var r=Pf({},PC,i,[]);n.push(r)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var e=i.localName;!y(TC,i.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||b(n,this.readRegionFromNode(i))}return n},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=pf(TC[4],"kml"),r="http://www.w3.org/2000/xmlns/";i.setAttributeNS(r,"xmlns:gx",OC[0]),i.setAttributeNS(r,"xmlns:xsi",df),i.setAttributeNS(df,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var e={node:i},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=IC[i.namespaceURI],a=Af(o,s);return Nf(e,NC,Ef,a,[n],s,this),i},n}(XE);function JC(t,n,i){return Array.isArray(t)?t:"string"==typeof t?JC(i[t],n,i):n}function KC(t){var n=yf(t,!1),i=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(n);if(i){var r=i[1];return[parseInt(r.substr(6,2),16),parseInt(r.substr(4,2),16),parseInt(r.substr(2,2),16),parseInt(r.substr(0,2),16)/255]}}function YC(t){var n=yf(t,!1),i=[];n=n.replace(/\s*,\s*/g,",");for(var r,e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;r=e.exec(n);){var o=parseFloat(r[1]),s=parseFloat(r[2]),a=r[3]?parseFloat(r[3]):0;i.push(o,s,a),n=n.substr(r[0].length)}if(""===n)return i}function ZC(t){var n=yf(t,!1).trim(),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(n,i).href:n}function $C(t){var n=yf(t,!1).trim().replace(/^(?!.*#)/,"#"),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(n,i).href:n}function QC(t){return nA(t)}var tR=Cf(TC,{Pair:function(t,n){var i=Pf({},ER,t,n,this);if(!i)return;var r=i.key;if(r&&"normal"==r){var e=i.styleUrl;e&&(n[n.length-1]=e);var o=i.Style;o&&(n[n.length-1]=o)}}});function nR(t,n){return Pf(void 0,tR,t,n,this)}var iR=Cf(TC,{Icon:Mf((function(t,n){var i=Pf({},fR,t,n);return i||null})),color:Mf(KC),heading:Mf(nA),hotSpot:Mf((function(t){var n,i=t.getAttribute("xunits"),r=t.getAttribute("yunits");return n="insetPixels"!==i?"insetPixels"!==r?Cv:Pv:"insetPixels"!==r?Rv:Iv,{x:parseFloat(t.getAttribute("x")),xunits:EC[i],y:parseFloat(t.getAttribute("y")),yunits:EC[r],origin:n}})),scale:Mf(QC)});var rR=Cf(TC,{color:Mf(KC),scale:Mf(QC)});var eR=Cf(TC,{color:Mf(KC),width:Mf(nA)});var oR=Cf(TC,{color:Mf(KC),fill:Mf($E),outline:Mf($E)});var sR=Cf(TC,{coordinates:Sf(YC)});function aR(t,n){return Pf(null,sR,t,n)}var uR=Cf(OC,{Track:jf(hR)});var cR=Cf(TC,{when:function(t,n){var i=n[n.length-1].whens,r=yf(t,!1),e=Date.parse(r);i.push(isNaN(e)?0:e)}},Cf(OC,{coord:function(t,n){var i=n[n.length-1].coordinates,r=yf(t,!1),e=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(r);if(e){var o=parseFloat(e[1]),s=parseFloat(e[2]),a=parseFloat(e[3]);i.push([o,s,a])}else i.push([])}}));function hR(t,n){var i=Pf({coordinates:[],whens:[]},cR,t,n);if(i){for(var r=[],e=i.coordinates,o=i.whens,s=0,a=Math.min(e.length,o.length);s<a;++s)3==e[s].length&&r.push(e[s][0],e[s][1],e[s][2],o[s]);return new xj(r,Rt)}}var fR=Cf(TC,{href:Mf(ZC)},Cf(OC,{x:Mf(nA),y:Mf(nA),w:Mf(nA),h:Mf(nA)}));var lR=Cf(TC,{coordinates:Sf(YC)});function vR(t,n){return Pf(null,lR,t,n)}var dR=Cf(TC,{extrude:Mf($E),tessellate:Mf($E),altitudeMode:Mf(oA)});function pR(t,n){var i=Pf({},dR,t,n),r=vR(t,n);if(r){var e=new xj(r,At);return e.setProperties(i,!0),e}}function yR(t,n){var i=Pf({},dR,t,n),r=vR(t,n);if(r){var e=new Ke(r,At,[r.length]);return e.setProperties(i,!0),e}}var mR=Cf(TC,{LineString:jf(pR),LinearRing:jf(yR),MultiGeometry:jf(wR),Point:jf(bR),Polygon:jf(xR)});function wR(t,n){var i,r=Pf([],mR,t,n);if(!r)return null;if(0===r.length)return new sS(r);for(var e=!0,o=r[0].getType(),s=1,a=r.length;s<a;++s)if(r[s].getType()!=o){e=!1;break}if(e){var u=void 0,c=void 0;if(o==Pt.POINT){var h=r[0];u=h.getLayout(),c=h.getFlatCoordinates();for(s=1,a=r.length;s<a;++s)b(c,r[s].getFlatCoordinates());kR(i=new yj(c,u),r)}else o==Pt.LINE_STRING?kR(i=new Sj(r),r):o==Pt.POLYGON?kR(i=new _j(r),r):o==Pt.GEOMETRY_COLLECTION?i=new sS(r):Mt(!1,37)}else i=new sS(r);return i}function bR(t,n){var i=Pf({},dR,t,n),r=vR(t,n);if(r){var e=new Oe(r,At);return e.setProperties(i,!0),e}}var gR=Cf(TC,{innerBoundaryIs:function(t,n){var i=Pf([],PR,t,n);if(i.length>0){var r=n[n.length-1];r.push.apply(r,i)}},outerBoundaryIs:function(t,n){var i=Pf(void 0,IR,t,n);if(i){n[n.length-1][0]=i}}});function xR(t,n){var i=Pf({},dR,t,n),r=Pf([null],gR,t,n);if(r&&r[0]){for(var e=r[0],o=[e.length],s=1,a=r.length;s<a;++s)b(e,r[s]),o.push(e.length);var u=new Ke(e,At,o);return u.setProperties(i,!0),u}}var jR=Cf(TC,{IconStyle:function(t,n){var i=Pf({},iR,t,n);if(i){var r,e,o,s,a=n[n.length-1],u="Icon"in i?i.Icon:{},c=!("Icon"in i)||Object.keys(u).length>0,h=u.href;h?r=h:c&&(r=MC);var f,l=Cv,v=i.hotSpot;v?(e=[v.x,v.y],o=v.xunits,s=v.yunits,l=v.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(/pushpin/.test(r)?(e=xC,o=jC,s=SC):/arrow-reverse/.test(r)?(e=[54,42],o=jC,s=SC):/paddle/.test(r)&&(e=[32,1],o=jC,s=SC));var d,p=u.x,y=u.y;void 0!==p&&void 0!==y&&(f=[p,y]);var m,w=u.w,b=u.h;void 0!==w&&void 0!==b&&(d=[w,b]);var g=i.heading;void 0!==g&&(m=pi(g));var x=i.scale,j=i.color;if(c){r==MC&&(d=kC);var S=new Uv({anchor:e,anchorOrigin:l,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.Bt,offset:f,offsetOrigin:Cv,rotation:m,scale:x,size:d,src:this.Sy(r),color:j}),k=S.getScaleArray()[0],M=S.getSize();if(null===M){var _=S.getImageState();if(_===yo||_===mo){S.listenImageChange((function t(){var n=S.getImageState();if(n!==yo&&n!==mo){var i=S.getSize();if(i&&2==i.length){var r=VC(i);S.setScale(k*r)}S.unlistenImageChange(t)}})),_===yo&&S.load()}}else if(2==M.length){var O=VC(M);S.setScale(k*O)}a.imageStyle=S}else a.imageStyle=FC}},LabelStyle:function(t,n){var i=Pf({},rR,t,n);if(i){var r=n[n.length-1],e=new Qv({fill:new Tv({color:"color"in i?i.color:gC}),scale:i.scale});r.textStyle=e}},LineStyle:function(t,n){var i=Pf({},eR,t,n);if(i){var r=n[n.length-1],e=new qv({color:"color"in i?i.color:gC,width:"width"in i?i.width:1});r.strokeStyle=e}},PolyStyle:function(t,n){var i=Pf({},oR,t,n);if(i){var r=n[n.length-1],e=new Tv({color:"color"in i?i.color:gC});r.fillStyle=e;var o=i.fill;void 0!==o&&(r.fill=o);var s=i.outline;void 0!==s&&(r.outline=s)}}});function SR(t,n){var i=Pf({},jR,t,n,this);if(!i)return null;var r,e="fillStyle"in i?i.fillStyle:zC,o=i.fill;void 0===o||o||(e=null),"imageStyle"in i?i.imageStyle!=FC&&(r=i.imageStyle):r=LC;var s="textStyle"in i?i.textStyle:UC,a="strokeStyle"in i?i.strokeStyle:DC,u=i.outline;return void 0===u||u?[new Yv({fill:e,image:r,stroke:a,text:s,zIndex:void 0})]:[new Yv({geometry:function(t){var n=t.getGeometry(),i=n.getType();return i===Pt.GEOMETRY_COLLECTION?new sS(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n!==Pt.POLYGON&&n!==Pt.MULTI_POLYGON}))):i!==Pt.POLYGON&&i!==Pt.MULTI_POLYGON?n:void 0},fill:e,image:r,stroke:a,text:s,zIndex:void 0}),new Yv({geometry:function(t){var n=t.getGeometry(),i=n.getType();return i===Pt.GEOMETRY_COLLECTION?new sS(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===Pt.POLYGON||n===Pt.MULTI_POLYGON}))):i===Pt.POLYGON||i===Pt.MULTI_POLYGON?n:void 0},fill:e,stroke:null,zIndex:void 0})]}function kR(t,n){var i,r,e,o=n.length,s=new Array(n.length),a=new Array(n.length),u=new Array(n.length);i=!1,r=!1,e=!1;for(var c=0;c<o;++c){var h=n[c];s[c]=h.get("extrude"),a[c]=h.get("tessellate"),u[c]=h.get("altitudeMode"),i=i||void 0!==s[c],r=r||void 0!==a[c],e=e||u[c]}i&&t.set("extrude",s),r&&t.set("tessellate",a),e&&t.set("altitudeMode",u)}var MR=Cf(TC,{displayName:Mf(oA),value:Mf(oA)});var _R=Cf(TC,{Data:function(t,n){var i=t.getAttribute("name");Rf(MR,t,n);var r=n[n.length-1];i&&r.displayName?r[i]={value:r.value,displayName:r.displayName,toString:function(){return r.value}}:null!==i?r[i]=r.value:null!==r.displayName&&(r[r.displayName]=r.value),delete r.value},SchemaData:function(t,n){Rf(AR,t,n)}});function OR(t,n){Rf(_R,t,n)}function TR(t,n){Rf(PC,t,n)}var ER=Cf(TC,{Style:Mf(SR),key:Mf(oA),styleUrl:Mf($C)});var AR=Cf(TC,{SimpleData:function(t,n){var i=t.getAttribute("name");if(null!==i){var r=oA(t);n[n.length-1][i]=r}}});var CR=Cf(TC,{altitudeMode:Mf(oA),minAltitude:Mf(nA),maxAltitude:Mf(nA),north:Mf(nA),south:Mf(nA),east:Mf(nA),west:Mf(nA)});var RR=Cf(TC,{minLodPixels:Mf(nA),maxLodPixels:Mf(nA),minFadeExtent:Mf(nA),maxFadeExtent:Mf(nA)});var PR=Cf(TC,{LinearRing:jf(aR)});var IR=Cf(TC,{LinearRing:Sf(aR)});function NR(t,n){for(var i=Uo(n),r=[255*(4==i.length?i[3]:1),i[2],i[1],i[0]],e=0;e<4;++e){var o=Math.floor(r[e]).toString(16);r[e]=1==o.length?"0"+o:o}fA(t,r.join(""))}var zR=Cf(TC,{Data:_f((function(t,n,i){t.setAttribute("name",n.name);var r={node:t},e=n.value;"object"==bC(e)?(null!==e&&e.displayName&&Nf(r,zR,Ef,[e.displayName],i,["displayName"]),null!==e&&e.value&&Nf(r,zR,Ef,[e.value],i,["value"])):Nf(r,zR,Ef,[e],i,["value"])})),value:_f((function(t,n){fA(t,n)})),displayName:_f((function(t,n){aA(t,n)}))});var FR=Cf(TC,{Placemark:_f(uP)}),LR=function(t,n,i){return pf(n[n.length-1].node.namespaceURI,"Placemark")};var GR=Tf("Data");var DR=Cf(TC,["href"],Cf(OC,["x","y","w","h"])),UR=Cf(TC,{href:_f(fA)},Cf(OC,{x:_f(cA),y:_f(cA),w:_f(cA),h:_f(cA)})),qR=function(t,n,i){return pf(OC[0],"gx:"+i)};var BR=Cf(TC,["scale","heading","Icon","color","hotSpot"]),WR=Cf(TC,{Icon:_f((function(t,n,i){var r={node:t},e=i[i.length-1].node,o=DR[e.namespaceURI],s=Af(n,o);Nf(r,UR,Ef,s,i,o),s=Af(n,o=DR[OC[0]]),Nf(r,UR,qR,s,i,o)})),color:_f(NR),heading:_f(cA),hotSpot:_f((function(t,n){t.setAttribute("x",String(n.x)),t.setAttribute("y",String(n.y)),t.setAttribute("xunits",n.xunits),t.setAttribute("yunits",n.yunits)})),scale:_f(wP)});var VR=Cf(TC,["color","scale"]),XR=Cf(TC,{color:_f(NR),scale:_f(wP)});var HR=Cf(TC,["color","width"]),JR=Cf(TC,{color:_f(NR),width:_f(cA)});var KR={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},YR=function(t,n,i){if(t)return pf(n[n.length-1].node.namespaceURI,KR[t.getType()])},ZR=Tf("Point"),$R=Tf("LineString"),QR=Tf("LinearRing"),tP=Tf("Polygon"),nP=Cf(TC,{LineString:_f(fP),Point:_f(fP),Polygon:_f(yP),GeometryCollection:_f(iP)});function iP(t,n,i){var r,e={node:t},o=n.getType(),s=[];o===Pt.GEOMETRY_COLLECTION?(n.getGeometriesArrayRecursive().forEach((function(t){var n=t.getType();n===Pt.MULTI_POINT?s=s.concat(t.getPoints()):n===Pt.MULTI_LINE_STRING?s=s.concat(t.getLineStrings()):n===Pt.MULTI_POLYGON?s=s.concat(t.getPolygons()):n===Pt.POINT||n===Pt.LINE_STRING||n===Pt.POLYGON?s.push(t):Mt(!1,39)})),r=YR):o===Pt.MULTI_POINT?(s=n.getPoints(),r=ZR):o===Pt.MULTI_LINE_STRING?(s=n.getLineStrings(),r=$R):o===Pt.MULTI_POLYGON?(s=n.getPolygons(),r=tP):Mt(!1,39),Nf(e,nP,r,s,i)}var rP=Cf(TC,{LinearRing:_f(fP)});function eP(t,n,i){Nf({node:t},rP,QR,[n],i)}var oP=Cf(TC,{ExtendedData:_f((function(t,n,i){for(var r={node:t},e=n.names,o=n.values,s=e.length,a=0;a<s;a++)Nf(r,zR,GR,[{name:e[a],value:o[a]}],i)})),MultiGeometry:_f(iP),LineString:_f(fP),LinearRing:_f(fP),Point:_f(fP),Polygon:_f(yP),Style:_f((function(t,n,i){var r={node:t},e={};if(n.pointStyles.length){var o=n.pointStyles[0].getText();o&&(e.LabelStyle=o);var s=n.pointStyles[0].getImage();s&&"function"==typeof s.getSrc&&(e.IconStyle=s)}if(n.lineStyles.length){(a=n.lineStyles[0].getStroke())&&(e.LineStyle=a)}if(n.polyStyles.length){var a;(a=n.polyStyles[0].getStroke())&&!e.LineStyle&&(e.LineStyle=a),e.PolyStyle=n.polyStyles[0]}var u=i[i.length-1].node,c=bP[u.namespaceURI],h=Af(e,c);Nf(r,gP,Ef,h,i,c)})),address:_f(fA),description:_f(fA),name:_f(fA),open:_f(sA),phoneNumber:_f(fA),styleUrl:_f(fA),visibility:_f(sA)}),sP=Cf(TC,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),aP=Tf("ExtendedData");function uP(t,n,i){var r={node:t};n.getId()&&t.setAttribute("id",n.getId());var e=n.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[n.getGeometryName()]=1;var s=Object.keys(e||{}).sort().filter((function(t){return!o[t]})),a=n.getStyleFunction();if(a){var u=a(n,0);if(u){var c=Array.isArray(u)?u:[u],h=c;if(n.getGeometry()&&(h=c.filter((function(t){var i=t.getGeometryFunction()(n);if(i){var r=i.getType();return r===Pt.GEOMETRY_COLLECTION?i.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===Pt.POINT||n===Pt.MULTI_POINT})).length:r===Pt.POINT||r===Pt.MULTI_POINT}}))),this.gy){var f=c,l=c;n.getGeometry()&&(f=c.filter((function(t){var i=t.getGeometryFunction()(n);if(i){var r=i.getType();return r===Pt.GEOMETRY_COLLECTION?i.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===Pt.LINE_STRING||n===Pt.MULTI_LINE_STRING})).length:r===Pt.LINE_STRING||r===Pt.MULTI_LINE_STRING}})),l=c.filter((function(t){var i=t.getGeometryFunction()(n);if(i){var r=i.getType();return r===Pt.GEOMETRY_COLLECTION?i.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===Pt.POLYGON||n===Pt.MULTI_POLYGON})).length:r===Pt.POLYGON||r===Pt.MULTI_POLYGON}}))),e.Style={pointStyles:h,lineStyles:f,polyStyles:l}}if(h.length&&void 0===e.name){var v=h[0].getText();v&&(e.name=v.getText())}}}var d=i[i.length-1].node,p=sP[d.namespaceURI],y=Af(e,p);if(Nf(r,oP,Ef,y,i,p),s.length>0){var m=Af(e,s);Nf(r,oP,aP,[{names:s,values:m}],i)}var w=i[0],b=n.getGeometry();b&&(b=Hj(b,!0,w)),Nf(r,oP,YR,[b],i)}var cP=Cf(TC,["extrude","tessellate","altitudeMode","coordinates"]),hP=Cf(TC,{extrude:_f(sA),tessellate:_f(sA),altitudeMode:_f(fA),coordinates:_f((function(t,n,i){var r,e=i[i.length-1],o=e.layout,s=e.stride;o==Et||o==Ct?r=2:o==At||o==Rt?r=3:Mt(!1,34);var a=n.length,u="";if(a>0){u+=n[0];for(var c=1;c<r;++c)u+=","+n[c];for(var h=s;h<a;h+=s){u+=" "+n[h];for(c=1;c<r;++c)u+=","+n[h+c]}}fA(t,u)}))});function fP(t,n,i){var r=n.getFlatCoordinates(),e={node:t};e.layout=n.getLayout(),e.stride=n.getStride();var o=n.getProperties();o.coordinates=r;var s=i[i.length-1].node,a=cP[s.namespaceURI],u=Af(o,a);Nf(e,hP,Ef,u,i,a)}var lP=Cf(TC,["color","fill","outline"]),vP=Cf(TC,{outerBoundaryIs:_f(eP),innerBoundaryIs:_f(eP)}),dP=Tf("innerBoundaryIs"),pP=Tf("outerBoundaryIs");function yP(t,n,i){var r=n.getLinearRings(),e=r.shift(),o={node:t};Nf(o,vP,dP,r,i),Nf(o,vP,pP,[e],i)}var mP=Cf(TC,{color:_f(NR),fill:_f(sA),outline:_f(sA)});function wP(t,n){cA(t,Math.round(1e6*n)/1e6)}var bP=Cf(TC,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),gP=Cf(TC,{IconStyle:_f((function(t,n,i){var r={node:t},e={},o=n.getSrc(),s=n.getSize(),a=n.getImageSize(),u={href:o};if(s){u.w=s[0],u.h=s[1];var c=n.getAnchor(),h=n.getOrigin();if(h&&a&&0!==h[0]&&h[1]!==s[1]&&(u.x=h[0],u.y=a[1]-(h[1]+s[1])),c&&(c[0]!==s[0]/2||c[1]!==s[1]/2)){var f={x:c[0],xunits:Av,y:s[1]-c[1],yunits:Av};e.hotSpot=f}}e.Icon=u;var l=n.getScaleArray()[0],v=s;null===v&&(v=kC),2==v.length&&(l/=VC(v)),1!==l&&(e.scale=l);var d=n.getRotation();0!==d&&(e.heading=d);var p=n.getColor();p&&(e.color=p);var y=i[i.length-1].node,m=BR[y.namespaceURI],w=Af(e,m);Nf(r,WR,Ef,w,i,m)})),LabelStyle:_f((function(t,n,i){var r={node:t},e={},o=n.getFill();o&&(e.color=o.getColor());var s=n.getScale();s&&1!==s&&(e.scale=s);var a=i[i.length-1].node,u=VR[a.namespaceURI],c=Af(e,u);Nf(r,XR,Ef,c,i,u)})),LineStyle:_f((function(t,n,i){var r={node:t},e={color:n.getColor(),width:Number(n.getWidth())||1},o=i[i.length-1].node,s=HR[o.namespaceURI],a=Af(e,s);Nf(r,JR,Ef,a,i,s)})),PolyStyle:_f((function(t,n,i){var r={node:t},e=n.getFill(),o=n.getStroke(),s={color:e?e.getColor():void 0,fill:!!e&&void 0,outline:!!o&&void 0},a=i[i.length-1].node,u=lP[a.namespaceURI],c=Af(s,u);Nf(r,mP,Ef,c,i,u)}))});var xP=HC,jP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),SP=[null],kP=Cf(SP,{nd:function(t,n){n[n.length-1].ndrefs.push(t.getAttribute("ref"))},tag:TP}),MP=Cf(SP,{node:function(t,n){var i=n[0],r=n[n.length-1],e=t.getAttribute("id"),o=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];r.nodes[e]=o;var s=Pf({tags:{}},OP,t,n);if(!R(s.tags)){var a=new Oe(o);Hj(a,!1,i);var u=new Tt(a);void 0!==e&&u.setId(e),u.setProperties(s.tags,!0),r.features.push(u)}},way:function(t,n){var i=Pf({id:t.getAttribute("id"),ndrefs:[],tags:{}},kP,t,n);n[n.length-1].ways.push(i)}}),_P=function(t){function n(){var n=t.call(this)||this;return n.dataProjection=br("EPSG:4326"),n}return jP(n,t),n.prototype.readFeaturesFromNode=function(t,n){var i=this.getReadOptions(t,n);if("osm"==t.localName){for(var r=Pf({nodes:{},ways:[],features:[]},MP,t,[i]),e=0;e<r.ways.length;e++){for(var o=r.ways[e],s=[],a=0,u=o.ndrefs.length;a<u;a++){b(s,r.nodes[o.ndrefs[a]])}var c=void 0;Hj(c=o.ndrefs[0]==o.ndrefs[o.ndrefs.length-1]?new Ke(s,Et,[s.length]):new xj(s,Et),!1,i);var h=new Tt(c);void 0!==o.id&&h.setId(o.id),h.setProperties(o.tags,!0),r.features.push(h)}if(r.features)return r.features}return[]},n}(XE),OP=Cf(SP,{tag:TP});function TP(t,n){n[n.length-1].tags[t.getAttribute("k")]=t.getAttribute("v")}var EP=_P,AP=function(){function t(){}return t.prototype.read=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readFromDocument(n)}return wf(t)?this.readFromDocument(t):this.readFromNode(t)}return null},t.prototype.readFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFromNode(n);return null},t.prototype.readFromNode=function(t){},t}();function CP(t){return t.getAttributeNS("http://www.w3.org/1999/xlink","href")}var RP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),PP=[null,"http://www.opengis.net/ows/1.1"],IP=Cf(PP,{ServiceIdentification:Mf((function(t,n){return Pf({},HP,t,n)})),ServiceProvider:Mf((function(t,n){return Pf({},JP,t,n)})),OperationsMetadata:Mf((function(t,n){return Pf({},BP,t,n)}))}),NP=function(t){function n(){return t.call(this)||this}return RP(n,t),n.prototype.readFromNode=function(t){var n=Pf({},IP,t,[]);return n||null},n}(AP),zP=Cf(PP,{DeliveryPoint:Mf(oA),City:Mf(oA),AdministrativeArea:Mf(oA),PostalCode:Mf(oA),Country:Mf(oA),ElectronicMailAddress:Mf(oA)}),FP=Cf(PP,{Value:kf((function(t,n){return oA(t)}))}),LP=Cf(PP,{AllowedValues:Mf((function(t,n){return Pf({},FP,t,n)}))}),GP=Cf(PP,{Phone:Mf((function(t,n){return Pf({},WP,t,n)})),Address:Mf((function(t,n){return Pf({},zP,t,n)}))}),DP=Cf(PP,{HTTP:Mf((function(t,n){return Pf({},UP,t,n)}))}),UP=Cf(PP,{Get:kf((function(t,n){var i=CP(t);if(!i)return;return Pf({href:i},VP,t,n)})),Post:void 0}),qP=Cf(PP,{DCP:Mf((function(t,n){return Pf({},DP,t,n)}))}),BP=Cf(PP,{Operation:function(t,n){var i=t.getAttribute("name"),r=Pf({},qP,t,n);if(!r)return;n[n.length-1][i]=r}}),WP=Cf(PP,{Voice:Mf(oA),Facsimile:Mf(oA)}),VP=Cf(PP,{Constraint:kf((function(t,n){var i=t.getAttribute("name");if(!i)return;return Pf({name:i},LP,t,n)}))}),XP=Cf(PP,{IndividualName:Mf(oA),PositionName:Mf(oA),ContactInfo:Mf((function(t,n){return Pf({},GP,t,n)}))}),HP=Cf(PP,{Abstract:Mf(oA),AccessConstraints:Mf(oA),Fees:Mf(oA),Title:Mf(oA),ServiceTypeVersion:Mf(oA),ServiceType:Mf(oA)}),JP=Cf(PP,{ProviderName:Mf(oA),ProviderSite:Mf(CP),ServiceContact:Mf((function(t,n){return Pf({},XP,t,n)}))});var KP=NP,YP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function ZP(t,n,i){var r,e=i||1e5,o=new Array(n);for(r=0;r<n;++r)o[r]=0;for(var s=0,a=t.length;s<a;)for(r=0;r<n;++r,++s){var u=t[s],c=u-o[r];o[r]=u,t[s]=c}return QP(t,e)}function $P(t,n,i){var r,e=i||1e5,o=new Array(n);for(r=0;r<n;++r)o[r]=0;for(var s=tI(t,e),a=0,u=s.length;a<u;)for(r=0;r<n;++r,++a)o[r]+=s[a],s[a]=o[r];return s}function QP(t,n){for(var i=n||1e5,r=0,e=t.length;r<e;++r)t[r]=Math.round(t[r]*i);return nI(t)}function tI(t,n){for(var i=n||1e5,r=iI(t),e=0,o=r.length;e<o;++e)r[e]/=i;return r}function nI(t){for(var n=0,i=t.length;n<i;++n){var r=t[n];t[n]=r<0?~(r<<1):r<<1}return rI(t)}function iI(t){for(var n=eI(t),i=0,r=n.length;i<r;++i){var e=n[i];n[i]=1&e?~(e>>1):e>>1}return n}function rI(t){for(var n="",i=0,r=t.length;i<r;++i)n+=oI(t[i]);return n}function eI(t){for(var n=[],i=0,r=0,e=0,o=t.length;e<o;++e){var s=t.charCodeAt(e)-63;i|=(31&s)<<r,s<32?(n.push(i),i=0,r=0):r+=5}return n}function oI(t){for(var n,i="";t>=32;)n=63+(32|31&t),i+=String.fromCharCode(n),t>>=5;return n=t+63,i+=String.fromCharCode(n)}var sI=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=br("EPSG:4326"),i.Ty=r.factor?r.factor:1e5,i.Ey=r.geometryLayout?r.geometryLayout:Et,i}return YP(n,t),n.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n);return new Tt(i)},n.prototype.readFeaturesFromText=function(t,n){return[this.readFeatureFromText(t,n)]},n.prototype.readGeometryFromText=function(t,n){var i=Zr(this.Ey),r=$P(t,i,this.Ty);zE(r,0,r.length,i,r);var e=we(r,0,r.length,i);return Hj(new xj(e,this.Ey),!1,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):(Mt(!1,40),"")},n.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},n.prototype.writeGeometryText=function(t,n){var i=(t=Hj(t,!0,this.adaptOptions(n))).getFlatCoordinates(),r=t.getStride();return zE(i,0,i.length,r,i),ZP(i,r,this.Ty)},n}(cC),aI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uI=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Ql=r.layerName,i.Uc=r.layers?r.layers:null,i.dataProjection=br(r.dataProjection?r.dataProjection:"EPSG:4326"),i}return aI(n,t),n.prototype.readFeaturesFromObject=function(t,n){if("Topology"==t.type){var i=t,r=void 0,e=null,o=null;i.transform&&(e=(r=i.transform).scale,o=r.translate);var s=i.arcs;r&&function(t,n,i){for(var r=0,e=t.length;r<e;++r)vI(t[r],n,i)}(s,e,o);var a=[],u=i.objects,c=this.Ql,h=void 0;for(var f in u)this.Uc&&-1==this.Uc.indexOf(f)||("GeometryCollection"===u[f].type?(h=u[f],a.push.apply(a,fI(h,s,e,o,c,f,n))):(h=u[f],a.push(lI(h,s,e,o,c,f,n))));return a}return[]},n.prototype.readProjectionFromObject=function(t){return this.dataProjection},n}(cS),cI={Point:function(t,n,i){var r=t.coordinates;n&&i&&dI(r,n,i);return new Oe(r)},LineString:function(t,n){var i=hI(t.arcs,n);return new xj(i)},Polygon:function(t,n){for(var i=[],r=0,e=t.arcs.length;r<e;++r)i[r]=hI(t.arcs[r],n);return new Ke(i)},MultiPoint:function(t,n,i){var r=t.coordinates;if(n&&i)for(var e=0,o=r.length;e<o;++e)dI(r[e],n,i);return new yj(r)},MultiLineString:function(t,n){for(var i=[],r=0,e=t.arcs.length;r<e;++r)i[r]=hI(t.arcs[r],n);return new Sj(i)},MultiPolygon:function(t,n){for(var i=[],r=0,e=t.arcs.length;r<e;++r){for(var o=t.arcs[r],s=[],a=0,u=o.length;a<u;++a)s[a]=hI(o[a],n);i[r]=s}return new _j(i)}};function hI(t,n){for(var i,r=[],e=0,o=t.length;e<o;++e)if(i=t[e],e>0&&r.pop(),i>=0)for(var s=0,a=(u=n[i]).length;s<a;++s)r.push(u[s].slice(0));else{var u;for(s=(u=n[~i]).length-1;s>=0;--s)r.push(u[s].slice(0))}return r}function fI(t,n,i,r,e,o,s){for(var a=t.geometries,u=[],c=0,h=a.length;c<h;++c)u[c]=lI(a[c],n,i,r,e,o,s);return u}function lI(t,n,i,r,e,o,s){var a=null,u=t.type;if(u){var c=cI[u];a=Hj(a="Point"===u||"MultiPoint"===u?c(t,i,r):c(t,n),!1,s)}var h=new Tt({geometry:a});void 0!==t.id&&h.setId(t.id);var f=t.properties;return e&&(f||(f={}),f[e]=o),f&&h.setProperties(f,!0),h}function vI(t,n,i){for(var r=0,e=0,o=0,s=t.length;o<s;++o){var a=t[o];r+=a[0],e+=a[1],a[0]=r,a[1]=e,dI(a,n,i)}}function dI(t,n,i){t[0]=t[0]*n[0]+i[0],t[1]=t[1]*n[1]+i[1]}var pI=uI,yI=function(){function t(t){this.Ay=t}return t.prototype.getTagName=function(){return this.Ay},t}(),mI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wI=function(t){function n(n,i){var r=t.call(this,n)||this;return r.conditions=i,Mt(r.conditions.length>=2,57),r}return mI(n,t),n}(yI),bI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gI=function(t){function n(n){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return bI(n,t),n}(wI),xI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jI=function(t){function n(n,i,r){var e=t.call(this,"BBOX")||this;if(e.geometryName=n,e.extent=i,4!==i.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return e.srsName=r,e}return xI(n,t),n}(yI),SI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kI=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.geometryName=i||"the_geom",o.geometry=r,o.srsName=e,o}return SI(n,t),n}(yI),MI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_I=function(t){function n(n,i,r){return t.call(this,"Contains",n,i,r)||this}return MI(n,t),n}(kI),OI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),TI=function(t){function n(n,i,r,e,o){var s=t.call(this,"DWithin",n,i,o)||this;return s.distance=r,s.unit=e,s}return OI(n,t),n}(kI),EI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),AI=function(t){function n(n,i,r){return t.call(this,"Disjoint",n,i,r)||this}return EI(n,t),n}(kI),CI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),RI=function(t){function n(n,i){var r=t.call(this,n)||this;return r.propertyName=i,r}return CI(n,t),n}(yI),PI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),II=function(t){function n(n,i,r){var e=t.call(this,"During",n)||this;return e.begin=i,e.end=r,e}return PI(n,t),n}(RI),NI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zI=function(t){function n(n,i,r,e){var o=t.call(this,n,i)||this;return o.expression=r,o.matchCase=e,o}return NI(n,t),n}(RI),FI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),LI=function(t){function n(n,i,r){return t.call(this,"PropertyIsEqualTo",n,i,r)||this}return FI(n,t),n}(zI),GI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),DI=function(t){function n(n,i){return t.call(this,"PropertyIsGreaterThan",n,i)||this}return GI(n,t),n}(zI),UI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qI=function(t){function n(n,i){return t.call(this,"PropertyIsGreaterThanOrEqualTo",n,i)||this}return UI(n,t),n}(zI),BI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),WI=function(t){function n(n,i,r){return t.call(this,"Intersects",n,i,r)||this}return BI(n,t),n}(kI),VI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),XI=function(t){function n(n,i,r){var e=t.call(this,"PropertyIsBetween",n)||this;return e.lowerBoundary=i,e.upperBoundary=r,e}return VI(n,t),n}(RI),HI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),JI=function(t){function n(n,i,r,e,o,s){var a=t.call(this,"PropertyIsLike",n)||this;return a.pattern=i,a.wildCard=void 0!==r?r:"*",a.singleChar=void 0!==e?e:".",a.escapeChar=void 0!==o?o:"!",a.matchCase=s,a}return HI(n,t),n}(RI),KI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),YI=function(t){function n(n){return t.call(this,"PropertyIsNull",n)||this}return KI(n,t),n}(RI),ZI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$I=function(t){function n(n,i){return t.call(this,"PropertyIsLessThan",n,i)||this}return ZI(n,t),n}(zI),QI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),tN=function(t){function n(n,i){return t.call(this,"PropertyIsLessThanOrEqualTo",n,i)||this}return QI(n,t),n}(zI),nN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),iN=function(t){function n(n){var i=t.call(this,"Not")||this;return i.condition=n,i}return nN(n,t),n}(yI),rN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),eN=function(t){function n(n,i,r){return t.call(this,"PropertyIsNotEqualTo",n,i,r)||this}return rN(n,t),n}(zI),oN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sN=function(t){function n(n){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return oN(n,t),n}(wI),aN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uN=function(t){function n(n){var i=t.call(this,"ResourceId")||this;return i.rid=n,i}return aN(n,t),n}(yI),cN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hN=function(t){function n(n,i,r){return t.call(this,"Within",n,i,r)||this}return cN(n,t),n}(kI);function fN(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(gI,n))}function lN(t,n,i){return new jI(t,n,i)}var vN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dN={"http://www.opengis.net/gml":{boundedBy:Mf(ZE.prototype.readGeometryElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:jf(ZE.prototype.readFeaturesInternal)}},pN={"http://www.opengis.net/wfs":{totalInserted:Mf(rA),totalUpdated:Mf(rA),totalDeleted:Mf(rA)},"http://www.opengis.net/wfs/2.0":{totalInserted:Mf(rA),totalUpdated:Mf(rA),totalDeleted:Mf(rA)}},yN={"http://www.opengis.net/wfs":{TransactionSummary:Mf(TN,"transactionSummary"),InsertResults:Mf(RN,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:Mf(TN,"transactionSummary"),InsertResults:Mf(RN,"insertIds")}},mN={"http://www.opengis.net/wfs":{PropertyName:_f(fA)},"http://www.opengis.net/wfs/2.0":{PropertyName:_f(fA)}},wN={"http://www.opengis.net/wfs":{Insert:_f(PN),Update:_f(FN),Delete:_f(zN),Property:_f(LN),Native:_f(GN)},"http://www.opengis.net/wfs/2.0":{Insert:_f(PN),Update:_f(FN),Delete:_f(zN),Property:_f(LN),Native:_f(GN)}},bN="feature",gN="http://www.w3.org/2000/xmlns/",xN={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},jN={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},SN={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},kN={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},MN={"2.0.0":kA,"1.1.0":bA,"1.0.0":pA},_N=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.oh=r.version?r.version:"1.1.0",i.Cy=r.featureType,i.Ry=r.featureNS,i.Py=r.gmlFormat?r.gmlFormat:new MN[i.oh],i.Iy=r.schemaLocation?r.schemaLocation:kN[i.oh],i}return vN(n,t),n.prototype.getFeatureType=function(){return this.Cy},n.prototype.setFeatureType=function(t){this.Cy=t},n.prototype.readFeaturesFromNode=function(t,n){var i={node:t};E(i,{featureType:this.Cy,featureNS:this.Ry}),E(i,this.getReadOptions(t,n||{}));var r=[i],e=Pf([],"2.0.0"===this.oh?dN:this.Py.FEATURE_COLLECTION_PARSERS,t,r,this.Py);return e||(e=[]),e},n.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readTransactionResponseFromDocument(n)}return wf(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},n.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readFeatureCollectionMetadataFromDocument(n)}return wf(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},n.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(n)},n.prototype.readFeatureCollectionMetadataFromNode=function(t){var n={},i=eA(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,Pf(n,dN,t,[],this.Py)},n.prototype.readTransactionResponseFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(n)},n.prototype.readTransactionResponseFromNode=function(t){return Pf({},yN,t,[])},n.prototype.writeGetFeature=function(t){var n=this,i=pf(jN[this.oh],"GetFeature");i.setAttribute("service","WFS"),i.setAttribute("version",this.oh),t.handle&&i.setAttribute("handle",t.handle),t.outputFormat&&i.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&i.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&i.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&i.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&i.setAttribute("count",String(t.count)),void 0!==t.viewParams&&i.setAttribute("viewParams",t.viewParams),i.setAttributeNS(df,"xsi:schemaLocation",this.Iy);var r={node:i};if(E(r,{version:this.oh,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.Ry,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),Mt(Array.isArray(t.featureTypes),11),"string"==typeof t.featureTypes[0]){var e=t.filter;t.bbox&&(Mt(t.geometryName,12),e=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,e)),E(r,{geometryName:t.geometryName,filter:e}),rz(i,t.featureTypes,[r])}else t.featureTypes.forEach((function(e){var o=n.combineBboxAndFilter(e.geometryName,e.bbox,t.srsName,t.filter);E(r,{geometryName:e.geometryName,filter:o}),rz(i,[e.name],[r])}));return i},n.prototype.combineBboxAndFilter=function(t,n,i,r){var e=lN(t,n,i);return r?fN(r,e):e},n.prototype.writeTransaction=function(t,n,i,r){var e,o=[],s=r.version?r.version:this.oh,a=pf(jN[s],"Transaction");a.setAttribute("service","WFS"),a.setAttribute("version",s),r&&(e=r.gmlOptions?r.gmlOptions:{},r.handle&&a.setAttribute("handle",r.handle)),a.setAttributeNS(df,"xsi:schemaLocation",kN[s]);var u=function(t,n,i,r){var e,o=r.featurePrefix?r.featurePrefix:bN;"1.0.0"===i?e=2:"1.1.0"===i?e=3:"2.0.0"===i&&(e=3.2);return E({node:t},{version:i,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:o,gmlVersion:e,hasZ:r.hasZ,srsName:r.srsName},n)}(a,e,s,r);return t&&ON("Insert",t,o,u),n&&ON("Update",n,o,u),i&&ON("Delete",i,o,u),r.nativeElements&&ON("Native",r.nativeElements,o,u),a},n.prototype.readProjectionFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(n);return null},n.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var n=(t=t.firstElementChild.firstElementChild).firstElementChild;n;n=n.nextElementSibling)if(0!==n.childNodes.length&&(1!==n.childNodes.length||3!==n.firstChild.nodeType)){var i=[{}];return this.Py.readGeometryElement(n,i),br(i.pop().srsName)}return null},n}(XE);function ON(t,n,i,r){Nf(r,wN,Tf(t),n,i)}function TN(t,n){return Pf({},pN,t,n)}var EN={"http://www.opengis.net/ogc":{FeatureId:jf((function(t,n){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:jf((function(t,n){return t.getAttribute("fid")}))}};function AN(t,n){Rf(EN,t,n)}var CN={"http://www.opengis.net/wfs":{Feature:AN},"http://www.opengis.net/wfs/2.0":{Feature:AN}};function RN(t,n){return Pf([],CN,t,n)}function PN(t,n,i){var r=i[i.length-1],e=r.featureType,o=r.featureNS,s=r.gmlVersion,a=pf(o,e);t.appendChild(a),2===s?pA.prototype.writeFeatureElement(a,n,i):3===s?bA.prototype.writeFeatureElement(a,n,i):kA.prototype.writeFeatureElement(a,n,i)}function IN(t,n,i){var r=i[i.length-1].version,e=xN[r],o=pf(e,"Filter"),s=pf(e,"FeatureId");o.appendChild(s),s.setAttribute("fid",n),t.appendChild(o)}function NN(t,n){var i=(t=t||bN)+":";return 0===n.indexOf(i)?n:i+n}function zN(t,n,i){var r=i[i.length-1];Mt(void 0!==n.getId(),26);var e=r.featureType,o=r.featurePrefix,s=r.featureNS,a=NN(o,e);t.setAttribute("typeName",a),t.setAttributeNS(gN,"xmlns:"+o,s);var u=n.getId();void 0!==u&&IN(t,u,i)}function FN(t,n,i){var r=i[i.length-1];Mt(void 0!==n.getId(),27);var e=r.version,o=r.featureType,s=r.featurePrefix,a=r.featureNS,u=NN(s,o),c=n.getGeometryName();t.setAttribute("typeName",u),t.setAttributeNS(gN,"xmlns:"+s,a);var h=n.getId();if(void 0!==h){for(var f=n.getKeys(),l=[],v=0,d=f.length;v<d;v++){var p=n.get(f[v]);if(void 0!==p){var y=f[v];p&&"function"==typeof p.getSimplifiedGeometry&&(y=c),l.push({name:y,value:p})}}Nf({version:e,gmlVersion:r.gmlVersion,node:t,hasZ:r.hasZ,srsName:r.srsName},wN,Tf("Property"),l,i),IN(t,h,i)}}function LN(t,n,i){var r=i[i.length-1],e=r.version,o=jN[e],s=pf(o,"Name"),a=r.gmlVersion;if(t.appendChild(s),fA(s,n.name),void 0!==n.value&&null!==n.value){var u=pf(o,"Value");t.appendChild(u),n.value&&"function"==typeof n.value.getSimplifiedGeometry?2===a?pA.prototype.writeGeometryElement(u,n.value,i):3===a?bA.prototype.writeGeometryElement(u,n.value,i):kA.prototype.writeGeometryElement(u,n.value,i):fA(u,n.value)}}function GN(t,n,i){n.vendorId&&t.setAttribute("vendorId",n.vendorId),void 0!==n.safeToIgnore&&t.setAttribute("safeToIgnore",String(n.safeToIgnore)),void 0!==n.value&&fA(t,n.value)}var DN={"http://www.opengis.net/wfs":{Query:_f(UN)},"http://www.opengis.net/wfs/2.0":{Query:_f(UN)},"http://www.opengis.net/ogc":{During:_f(XN),And:_f(HN),Or:_f(HN),Not:_f(JN),BBOX:_f(BN),Contains:_f(WN),Intersects:_f(WN),Within:_f(WN),DWithin:_f(VN),PropertyIsEqualTo:_f(KN),PropertyIsNotEqualTo:_f(KN),PropertyIsLessThan:_f(KN),PropertyIsLessThanOrEqualTo:_f(KN),PropertyIsGreaterThan:_f(KN),PropertyIsGreaterThanOrEqualTo:_f(KN),PropertyIsNull:_f(YN),PropertyIsBetween:_f(ZN),PropertyIsLike:_f($N)},"http://www.opengis.net/fes/2.0":{During:_f(XN),And:_f(HN),Or:_f(HN),Not:_f(JN),BBOX:_f(BN),Contains:_f(WN),Disjoint:_f(WN),Intersects:_f(WN),ResourceId:_f((function(t,n,i){t.setAttribute("rid",n.rid)})),Within:_f(WN),DWithin:_f(VN),PropertyIsEqualTo:_f(KN),PropertyIsNotEqualTo:_f(KN),PropertyIsLessThan:_f(KN),PropertyIsLessThanOrEqualTo:_f(KN),PropertyIsGreaterThan:_f(KN),PropertyIsGreaterThanOrEqualTo:_f(KN),PropertyIsNull:_f(YN),PropertyIsBetween:_f(ZN),PropertyIsLike:_f($N)}};function UN(t,n,i){var r,e,o=i[i.length-1],s=o.version,a=o.featurePrefix,u=o.featureNS,c=o.propertyNames,h=o.srsName;r=a?NN(a,n):n,e="2.0.0"===s?"typeNames":"typeName",t.setAttribute(e,r),h&&t.setAttribute("srsName",h),u&&t.setAttributeNS(gN,"xmlns:"+a,u);var f=E({},o);f.node=t,Nf(f,mN,Tf("PropertyName"),c,i);var l=o.filter;if(l){var v=pf(ez(s),"Filter");t.appendChild(v),qN(v,l,i)}}function qN(t,n,i){var r=i[i.length-1],e={node:t};E(e,{context:r}),Nf(e,DN,Tf(n.getTagName()),[n],i)}function BN(t,n,i){var r=i[i.length-1],e=r.context.version;r.srsName=n.srsName;var o=MN[e];nz(e,t,n.geometryName),o.prototype.writeGeometryElement(t,n.extent,i)}function WN(t,n,i){var r=i[i.length-1],e=r.context.version;r.srsName=n.srsName;var o=MN[e];nz(e,t,n.geometryName),o.prototype.writeGeometryElement(t,n.geometry,i)}function VN(t,n,i){var r=i[i.length-1].context.version;WN(t,n,i);var e=pf(ez(r),"Distance");fA(e,n.distance.toString()),"2.0.0"===r?e.setAttribute("uom",n.unit):e.setAttribute("units",n.unit),t.appendChild(e)}function XN(t,n,i){var r=i[i.length-1].context.version;QN(SN[r],"ValueReference",t,n.propertyName);var e=pf(JE,"TimePeriod");t.appendChild(e);var o=pf(JE,"begin");e.appendChild(o),iz(o,n.begin);var s=pf(JE,"end");e.appendChild(s),iz(s,n.end)}function HN(t,n,i){var r=i[i.length-1].context,e={node:t};E(e,{context:r});for(var o=n.conditions,s=0,a=o.length;s<a;++s){var u=o[s];Nf(e,DN,Tf(u.getTagName()),[u],i)}}function JN(t,n,i){var r=i[i.length-1].context,e={node:t};E(e,{context:r});var o=n.condition;Nf(e,DN,Tf(o.getTagName()),[o],i)}function KN(t,n,i){var r=i[i.length-1].context.version;void 0!==n.matchCase&&t.setAttribute("matchCase",n.matchCase.toString()),nz(r,t,n.propertyName),tz(r,t,""+n.expression)}function YN(t,n,i){nz(i[i.length-1].context.version,t,n.propertyName)}function ZN(t,n,i){var r=i[i.length-1].context.version,e=ez(r);nz(r,t,n.propertyName);var o=pf(e,"LowerBoundary");t.appendChild(o),tz(r,o,""+n.lowerBoundary);var s=pf(e,"UpperBoundary");t.appendChild(s),tz(r,s,""+n.upperBoundary)}function $N(t,n,i){var r=i[i.length-1].context.version;t.setAttribute("wildCard",n.wildCard),t.setAttribute("singleChar",n.singleChar),t.setAttribute("escapeChar",n.escapeChar),void 0!==n.matchCase&&t.setAttribute("matchCase",n.matchCase.toString()),nz(r,t,n.propertyName),tz(r,t,""+n.pattern)}function QN(t,n,i,r){var e=pf(t,n);fA(e,r),i.appendChild(e)}function tz(t,n,i){QN(ez(t),"Literal",n,i)}function nz(t,n,i){"2.0.0"===t?QN(SN[t],"ValueReference",n,i):QN(xN[t],"PropertyName",n,i)}function iz(t,n){var i=pf(JE,"TimeInstant");t.appendChild(i);var r=pf(JE,"timePosition");i.appendChild(r),fA(r,n)}function rz(t,n,i){var r=i[i.length-1],e=E({},r);e.node=t,Nf(e,DN,Tf("Query"),n,i)}function ez(t){return"2.0.0"===t?SN[t]:xN[t]}var oz=_N,sz=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),az=1,uz=2,cz=3,hz=4,fz=5,lz=6,vz=7,dz=15,pz=16,yz=17,mz=function(){function t(t){this.Ny=t,this.zy=0,this.Fy=!1,this.Ly=!1,this.Gy=!1,this.Dy=!1,this.Uy=null,this.qy=Et}return t.prototype.readUint8=function(){return this.Ny.getUint8(this.zy++)},t.prototype.readUint32=function(t){return this.Ny.getUint32((this.zy+=4)-4,void 0!==t?t:this.Ly)},t.prototype.readDouble=function(t){return this.Ny.getFloat64((this.zy+=8)-8,void 0!==t?t:this.Ly)},t.prototype.readPoint=function(){var t=[];return t.push(this.readDouble()),t.push(this.readDouble()),this.Gy&&t.push(this.readDouble()),this.Dy&&t.push(this.readDouble()),t},t.prototype.readLineString=function(){for(var t=this.readUint32(),n=[],i=0;i<t;i++)n.push(this.readPoint());return n},t.prototype.readPolygon=function(){for(var t=this.readUint32(),n=[],i=0;i<t;i++)n.push(this.readLineString());return n},t.prototype.readWkbHeader=function(t){var n=this.readUint8()>0,i=this.readUint32(n),r=Math.floor((268435455&i)/1e3),e=Boolean(2147483648&i)||1===r||3===r,o=Boolean(1073741824&i)||2===r||3===r,s=Boolean(536870912&i),a=(268435455&i)%1e3,u=["XY",e?"Z":"",o?"M":""].join(""),c=s?this.readUint32(n):null;if(void 0!==t&&t!==a)throw new Error("Unexpected WKB geometry type "+a);if(this.Fy){if(this.Ly!==n)throw new Error("Inconsistent endian");if(this.qy!==u)throw new Error("Inconsistent geometry layout");if(c&&this.Uy!==c)throw new Error("Inconsistent coordinate system (SRID)")}else this.Ly=n,this.Gy=e,this.Dy=o,this.qy=u,this.Uy=c,this.Fy=!0;return a},t.prototype.readWkbPayload=function(t){switch(t){case az:return this.readPoint();case uz:return this.readLineString();case cz:case yz:return this.readPolygon();case hz:return this.readMultiPoint();case fz:return this.readMultiLineString();case lz:case dz:case pz:return this.readMultiPolygon();case vz:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}},t.prototype.readWkbBlock=function(t){return this.readWkbPayload(this.readWkbHeader(t))},t.prototype.readWkbCollection=function(t,n){for(var i=this.readUint32(),r=[],e=0;e<i;e++){var o=t.call(this,n);o&&r.push(o)}return r},t.prototype.readMultiPoint=function(){return this.readWkbCollection(this.readWkbBlock,az)},t.prototype.readMultiLineString=function(){return this.readWkbCollection(this.readWkbBlock,uz)},t.prototype.readMultiPolygon=function(){return this.readWkbCollection(this.readWkbBlock,cz)},t.prototype.readGeometryCollection=function(){return this.readWkbCollection(this.readGeometry)},t.prototype.readGeometry=function(){var t=this.readWkbHeader(),n=this.readWkbPayload(t);switch(t){case az:return new Oe(n,this.qy);case uz:return new xj(n,this.qy);case cz:case yz:return new Ke(n,this.qy);case hz:return new yj(n,this.qy);case fz:return new Sj(n,this.qy);case lz:case dz:case pz:return new _j(n,this.qy);case vz:return new sS(n);default:return null}},t.prototype.getSrid=function(){return this.Uy},t}(),wz=function(){function t(t){t=t||{},this.qy=t.layout,this.Ly=!1!==t.littleEndian,this.By=!1!==t.ewkb,this.Wy=[],this.Vy=E({X:0,Y:0,Z:0,M:0},t.nodata)}return t.prototype.writeUint8=function(t){this.Wy.push([1,t])},t.prototype.writeUint32=function(t){this.Wy.push([4,t])},t.prototype.writeDouble=function(t){this.Wy.push([8,t])},t.prototype.writePoint=function(t,n){for(var i=E.apply(null,n.split("").map((function(n,i){var r;return(r={})[n]=t[i],r}))),r=0,e=this.qy;r<e.length;r++){var o=e[r];this.writeDouble(o in i?i[o]:this.Vy[o])}},t.prototype.writeLineString=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writePoint(t[i],n)},t.prototype.writePolygon=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writeLineString(t[i],n)},t.prototype.writeWkbHeader=function(t,n){t%=1e3,this.qy.indexOf("Z")>=0&&(t+=this.By?2147483648:1e3),this.qy.indexOf("M")>=0&&(t+=this.By?1073741824:2e3),this.By&&Number.isInteger(n)&&(t|=536870912),this.writeUint8(this.Ly?1:0),this.writeUint32(t),this.By&&Number.isInteger(n)&&this.writeUint32(n)},t.prototype.writeMultiPoint=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writeWkbHeader(1),this.writePoint(t[i],n)},t.prototype.writeMultiLineString=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writeWkbHeader(2),this.writeLineString(t[i],n)},t.prototype.writeMultiPolygon=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writeWkbHeader(3),this.writePolygon(t[i],n)},t.prototype.writeGeometryCollection=function(t){this.writeUint32(t.length);for(var n=0;n<t.length;n++)this.writeGeometry(t[n])},t.prototype.findMinimumLayout=function(t,n){void 0===n&&(n=Rt);var i,r;if(t instanceof Qr)return(i=t.getLayout())===(r=n)?i:i===Rt?r:r===Rt?i:Et;if(t instanceof sS)for(var e=t.getGeometriesArray(),o=0;o<e.length&&n!==Et;o++)n=this.findMinimumLayout(e[o],n);return n},t.prototype.writeGeometry=function(t,n){var i,r,e=((i={})[Pt.POINT]=az,i[Pt.LINE_STRING]=uz,i[Pt.POLYGON]=cz,i[Pt.MULTI_POINT]=hz,i[Pt.MULTI_LINE_STRING]=fz,i[Pt.MULTI_POLYGON]=lz,i[Pt.GEOMETRY_COLLECTION]=vz,i),o=t.getType(),s=e[o];if(!s)throw new Error("GeometryType "+o+" is not supported");(this.qy||(this.qy=this.findMinimumLayout(t)),this.writeWkbHeader(s,n),t instanceof Qr)?((r={})[Pt.POINT]=this.writePoint,r[Pt.LINE_STRING]=this.writeLineString,r[Pt.POLYGON]=this.writePolygon,r[Pt.MULTI_POINT]=this.writeMultiPoint,r[Pt.MULTI_LINE_STRING]=this.writeMultiLineString,r[Pt.MULTI_POLYGON]=this.writeMultiPolygon,r)[o].call(this,t.getCoordinates(),t.getLayout()):t instanceof sS&&this.writeGeometryCollection(t.getGeometriesArray())},t.prototype.getBuffer=function(){var t=this,n=this.Wy.reduce((function(t,n){return t+n[0]}),0),i=new ArrayBuffer(n),r=new DataView(i),e=0;return this.Wy.forEach((function(n){switch(n[0]){case 1:r.setUint8(e,n[1]);break;case 4:r.setUint32(e,n[1],t.Ly);break;case 8:r.setFloat64(e,n[1],t.Ly)}e+=n[0]})),i},t}();function bz(t){return"string"==typeof t?function(t){for(var n=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)n[i]=parseInt(t.substr(2*i,2),16);return new DataView(n.buffer)}(t):ArrayBuffer.isView(t)?t instanceof DataView?t:new DataView(t.buffer,t.byteOffset,t.byteLength):t instanceof ArrayBuffer?new DataView(t):null}var gz=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.splitCollection=Boolean(r.splitCollection),i.Xy=null,i.Hy=!1!==r.hex,i.Jy=!1!==r.littleEndian,i.Ky=!1!==r.ewkb,i.qy=r.geometryLayout,i.Yy=r.nodataZ||0,i.Zy=r.nodataM||0,i.Uy=r.srid,i}return sz(n,t),n.prototype.getType=function(){return this.Hy?ah:oh},n.prototype.readFeature=function(t,n){return new Tt({geometry:this.readGeometry(t,n)})},n.prototype.readFeatures=function(t,n){var i=this.readGeometry(t,n);return(this.splitCollection&&i instanceof sS?i.getGeometriesArray():[i]).map((function(t){return new Tt({geometry:t})}))},n.prototype.readGeometry=function(t,n){var i=bz(t);if(!i)return null;var r=new mz(i).readGeometry();this.Xy=i;var e=this.getReadOptions(t,n);return this.Xy=null,Hj(r,!1,e)},n.prototype.readProjection=function(t){var n=this.Xy||bz(t);if(n){var i=new mz(n);return i.readWkbHeader(),i.getSrid()&&br("EPSG:"+i.getSrid())||void 0}},n.prototype.writeFeature=function(t,n){return this.writeGeometry(t.getGeometry(),n)},n.prototype.writeFeatures=function(t,n){return this.writeGeometry(new sS(t.map((function(t){return t.getGeometry()}))),n)},n.prototype.writeGeometry=function(t,n){var i=this.adaptOptions(n),r=new wz({layout:this.qy,littleEndian:this.Jy,ewkb:this.Ky,nodata:{Z:this.Yy,M:this.Zy}}),e=Number.isInteger(this.Uy)?Number(this.Uy):null;if(!1!==this.Uy&&!Number.isInteger(this.Uy)){var o=i.dataProjection&&br(i.dataProjection);if(o){var s=o.getCode();0===s.indexOf("EPSG:")&&(e=Number(s.substring(5)))}}r.writeGeometry(Hj(t,!0,i),e);var a=r.getBuffer();return this.Hy?function(t){var n=new Uint8Array(t);return Array.from(n.values()).map((function(t){return(t<16?"0":"")+Number(t).toString(16).toUpperCase()})).join("")}(a):a},n}(Xj),xz=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jz={POINT:Oe,LINESTRING:xj,POLYGON:Ke,MULTIPOINT:yj,MULTILINESTRING:Sj,MULTIPOLYGON:_j},Sz="EMPTY",kz=0,Mz=1,_z=2,Oz=3,Tz=4,Ez=5,Az=6,Cz={};for(var Rz in Pt)Cz[Rz]=Pt[Rz].toUpperCase();var Pz=function(){function t(t){this.wkt=t,this.$y=-1}return t.prototype.Qy=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.tm=function(t,n){return t>="0"&&t<="9"||"."==t&&!(void 0!==n&&n)},t.prototype.nm=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.im=function(){return this.wkt.charAt(++this.$y)},t.prototype.nextToken=function(){var t,n=this.im(),i=this.$y,r=n;if("("==n)t=_z;else if(","==n)t=Ez;else if(")"==n)t=Oz;else if(this.tm(n)||"-"==n)t=Tz,r=this.rm();else if(this.Qy(n))t=Mz,r=this.om();else{if(this.nm(n))return this.nextToken();if(""!==n)throw new Error("Unexpected character: "+n);t=Az}return{position:i,value:r,type:t}},t.prototype.rm=function(){var t,n=this.$y,i=!1,r=!1;do{"."==t?i=!0:"e"!=t&&"E"!=t||(r=!0),t=this.im()}while(this.tm(t,i)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(n,this.$y--))},t.prototype.om=function(){var t,n=this.$y;do{t=this.im()}while(this.Qy(t));return this.wkt.substring(n,this.$y--).toUpperCase()},t}(),Iz=function(){function t(t){this.sm=t,this.am={position:0,type:kz},this.qy=Et}return t.prototype.um=function(){this.am=this.sm.nextToken()},t.prototype.isTokenType=function(t){return this.am.type==t},t.prototype.match=function(t){var n=this.isTokenType(t);return n&&this.um(),n},t.prototype.parse=function(){return this.um(),this.hm()},t.prototype.fm=function(){var t=Et,n=this.am;if(this.isTokenType(Mz)){var i=n.value;"Z"===i?t=At:"M"===i?t=Ct:"ZM"===i&&(t=Rt),t!==Et&&this.um()}return t},t.prototype.lm=function(){if(this.match(_z)){var t=[];do{t.push(this.hm())}while(this.match(Ez));if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.dm=function(){if(this.match(_z)){var t=this.pm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.ym=function(){if(this.match(_z)){var t=this.wm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.bm=function(){if(this.match(_z)){var t=this.gm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.xm=function(){if(this.match(_z)){var t=void 0;if(t=this.am.type==_z?this.jm():this.wm(),this.match(Oz))return t}throw new Error(this.vm())},t.prototype.Sm=function(){if(this.match(_z)){var t=this.gm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.km=function(){if(this.match(_z)){var t=this.Mm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.pm=function(){for(var t=[],n=this.qy.length,i=0;i<n;++i){var r=this.am;if(!this.match(Tz))break;t.push(r.value)}if(t.length==n)return t;throw new Error(this.vm())},t.prototype.wm=function(){for(var t=[this.pm()];this.match(Ez);)t.push(this.pm());return t},t.prototype.jm=function(){for(var t=[this.dm()];this.match(Ez);)t.push(this.dm());return t},t.prototype.gm=function(){for(var t=[this.ym()];this.match(Ez);)t.push(this.ym());return t},t.prototype.Mm=function(){for(var t=[this.bm()];this.match(Ez);)t.push(this.bm());return t},t.prototype._m=function(){var t=this.isTokenType(Mz)&&this.am.value==Sz;return t&&this.um(),t},t.prototype.vm=function(){return"Unexpected `"+this.am.value+"` at position "+this.am.position+" in `"+this.sm.wkt+"`"},t.prototype.hm=function(){var t=this.am;if(this.match(Mz)){var n=t.value;this.qy=this.fm();var i=this._m();if("GEOMETRYCOLLECTION"==n){if(i)return new sS([]);var r=this.lm();return new sS(r)}var e=jz[n];if(!e)throw new Error("Invalid geometry type: "+n);var o=void 0;if(i)o="POINT"==n?[NaN,NaN]:[];else switch(n){case"POINT":o=this.dm();break;case"LINESTRING":o=this.ym();break;case"POLYGON":o=this.bm();break;case"MULTIPOINT":o=this.xm();break;case"MULTILINESTRING":o=this.Sm();break;case"MULTIPOLYGON":o=this.km()}return new e(o,this.qy)}throw new Error(this.vm())},t}(),Nz=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Om=void 0!==r.splitCollection&&r.splitCollection,i}return xz(n,t),n.prototype.Tm=function(t){var n=new Pz(t);return new Iz(n).parse()},n.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n),r=new Tt;return r.setGeometry(i),r},n.prototype.readFeaturesFromText=function(t,n){for(var i=[],r=this.readGeometryFromText(t,n),e=[],o=0,s=(i=this.Om&&r.getType()==Pt.GEOMETRY_COLLECTION?r.getGeometriesArray():[r]).length;o<s;++o){var a=new Tt;a.setGeometry(i[o]),e.push(a)}return e},n.prototype.readGeometryFromText=function(t,n){return Hj(this.Tm(t),!1,n)},n.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):""},n.prototype.writeFeaturesText=function(t,n){if(1==t.length)return this.writeFeatureText(t[0],n);for(var i=[],r=0,e=t.length;r<e;++r)i.push(t[r].getGeometry());var o=new sS(i);return this.writeGeometryText(o,n)},n.prototype.writeGeometryText=function(t,n){return Dz(Hj(t,!0,n))},n}(cC);function zz(t){var n=t.getCoordinates();return 0===n.length?"":n.join(" ")}function Fz(t){for(var n=t.getCoordinates(),i=[],r=0,e=n.length;r<e;++r)i.push(n[r].join(" "));return i.join(",")}function Lz(t){for(var n=[],i=t.getLinearRings(),r=0,e=i.length;r<e;++r)n.push("("+Fz(i[r])+")");return n.join(",")}var Gz={Point:zz,LineString:Fz,Polygon:Lz,MultiPoint:function(t){for(var n=[],i=t.getPoints(),r=0,e=i.length;r<e;++r)n.push("("+zz(i[r])+")");return n.join(",")},MultiLineString:function(t){for(var n=[],i=t.getLineStrings(),r=0,e=i.length;r<e;++r)n.push("("+Fz(i[r])+")");return n.join(",")},MultiPolygon:function(t){for(var n=[],i=t.getPolygons(),r=0,e=i.length;r<e;++r)n.push("("+Lz(i[r])+")");return n.join(",")},GeometryCollection:function(t){for(var n=[],i=t.getGeometries(),r=0,e=i.length;r<e;++r)n.push(Dz(i[r]));return n.join(",")}};function Dz(t){var n=t.getType(),i=(0,Gz[n])(t);if(n=n.toUpperCase(),"function"==typeof t.getFlatCoordinates){var r=function(t){var n=t.getLayout(),i="";return n!==At&&n!==Rt||(i+="Z"),n!==Ct&&n!==Rt||(i+="M"),i}(t);r.length>0&&(n+=" "+r)}return 0===i.length?n+" "+Sz:n+"("+i+")"}var Uz=Nz,qz=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bz=[null,"http://www.opengis.net/wms"],Wz=Cf(Bz,{Service:Mf((function(t,n){return Pf({},Hz,t,n)})),Capability:Mf((function(t,n){return Pf({},Vz,t,n)}))}),Vz=Cf(Bz,{Request:Mf((function(t,n){return Pf({},nF,t,n)})),Exception:Mf((function(t,n){return Pf([],Zz,t,n)})),Layer:Mf((function(t,n){var i=Pf({},$z,t,n);if(void 0===i.Layer)return Object.assign(i,uF(t,n));return i}))}),Xz=function(t){function n(){var n=t.call(this)||this;return n.version=void 0,n}return qz(n,t),n.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var n=Pf({version:this.version},Wz,t,[]);return n||null},n}(AP),Hz=Cf(Bz,{Name:Mf(oA),Title:Mf(oA),Abstract:Mf(oA),KeywordList:Mf(lF),OnlineResource:Mf(CP),ContactInformation:Mf((function(t,n){return Pf({},Jz,t,n)})),Fees:Mf(oA),AccessConstraints:Mf(oA),LayerLimit:Mf(rA),MaxWidth:Mf(rA),MaxHeight:Mf(rA)}),Jz=Cf(Bz,{ContactPersonPrimary:Mf((function(t,n){return Pf({},Kz,t,n)})),ContactPosition:Mf(oA),ContactAddress:Mf((function(t,n){return Pf({},Yz,t,n)})),ContactVoiceTelephone:Mf(oA),ContactFacsimileTelephone:Mf(oA),ContactElectronicMailAddress:Mf(oA)}),Kz=Cf(Bz,{ContactPerson:Mf(oA),ContactOrganization:Mf(oA)}),Yz=Cf(Bz,{AddressType:Mf(oA),Address:Mf(oA),City:Mf(oA),StateOrProvince:Mf(oA),PostCode:Mf(oA),Country:Mf(oA)}),Zz=Cf(Bz,{Format:jf(oA)}),$z=Cf(Bz,{Name:Mf(oA),Title:Mf(oA),Abstract:Mf(oA),KeywordList:Mf(lF),CRS:kf(oA),EX_GeographicBoundingBox:Mf((function(t,n){var i=Pf({},tF,t,n);if(!i)return;var r=i.westBoundLongitude,e=i.southBoundLatitude,o=i.eastBoundLongitude,s=i.northBoundLatitude;if(void 0===r||void 0===e||void 0===o||void 0===s)return;return[r,e,o,s]})),BoundingBox:kf((function(t,n){var i=[iA(t.getAttribute("minx")),iA(t.getAttribute("miny")),iA(t.getAttribute("maxx")),iA(t.getAttribute("maxy"))],r=[iA(t.getAttribute("resx")),iA(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:i,res:r}})),Dimension:kf((function(t,n){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:QE(t.getAttribute("multipleValues")),nearestValue:QE(t.getAttribute("nearestValue")),current:QE(t.getAttribute("current")),values:oA(t)}})),Attribution:Mf((function(t,n){return Pf({},Qz,t,n)})),AuthorityURL:kf((function(t,n){var i=cF(t,n);if(i)return i.name=t.getAttribute("name"),i;return})),Identifier:kf(oA),MetadataURL:kf((function(t,n){var i=cF(t,n);if(i)return i.type=t.getAttribute("type"),i;return})),DataURL:kf(cF),FeatureListURL:kf(cF),Style:kf((function(t,n){return Pf({},oF,t,n)})),MinScaleDenominator:Mf(nA),MaxScaleDenominator:Mf(nA),Layer:kf(uF)}),Qz=Cf(Bz,{Title:Mf(oA),OnlineResource:Mf(CP),LogoURL:Mf(fF)}),tF=Cf(Bz,{westBoundLongitude:Mf(nA),eastBoundLongitude:Mf(nA),southBoundLatitude:Mf(nA),northBoundLatitude:Mf(nA)}),nF=Cf(Bz,{GetCapabilities:Mf(hF),GetMap:Mf(hF),GetFeatureInfo:Mf(hF)}),iF=Cf(Bz,{Format:kf(oA),DCPType:kf((function(t,n){return Pf({},rF,t,n)}))}),rF=Cf(Bz,{HTTP:Mf((function(t,n){return Pf({},eF,t,n)}))}),eF=Cf(Bz,{Get:Mf(cF),Post:Mf(cF)}),oF=Cf(Bz,{Name:Mf(oA),Title:Mf(oA),Abstract:Mf(oA),LegendURL:kf(fF),StyleSheetURL:Mf(cF),StyleURL:Mf(cF)}),sF=Cf(Bz,{Format:Mf(oA),OnlineResource:Mf(CP)}),aF=Cf(Bz,{Keyword:jf(oA)});function uF(t,n){var i=n[n.length-1],r=Pf({},$z,t,n);if(r){var e=QE(t.getAttribute("queryable"));void 0===e&&(e=i.queryable),r.queryable=void 0!==e&&e;var o=eA(t.getAttribute("cascaded"));void 0===o&&(o=i.cascaded),r.cascaded=o;var s=QE(t.getAttribute("opaque"));void 0===s&&(s=i.opaque),r.opaque=void 0!==s&&s;var a=QE(t.getAttribute("noSubsets"));void 0===a&&(a=i.noSubsets),r.noSubsets=void 0!==a&&a;var u=iA(t.getAttribute("fixedWidth"));u||(u=i.fixedWidth),r.fixedWidth=u;var c=iA(t.getAttribute("fixedHeight"));c||(c=i.fixedHeight),r.fixedHeight=c;["Style","CRS","AuthorityURL"].forEach((function(t){if(t in i){var n=r[t]||[];r[t]=n.concat(i[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in r)){var n=i[t];r[t]=n}})),r}}function cF(t,n){return Pf({},sF,t,n)}function hF(t,n){return Pf({},iF,t,n)}function fF(t,n){var i=cF(t,n);if(i){var r=[eA(t.getAttribute("width")),eA(t.getAttribute("height"))];return i.size=r,i}}function lF(t,n){return Pf([],aF,t,n)}var vF=Xz,dF=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pF=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Ry="http://mapserver.gis.umn.edu/mapserver",i.Py=new pA,i.Uc=r.layers?r.layers:null,i}return dF(n,t),n.prototype.getLayers=function(){return this.Uc},n.prototype.setLayers=function(t){this.Uc=t},n.prototype.Em=function(t,n){t.setAttribute("namespaceURI",this.Ry);var i=t.localName,r=[];if(0===t.childNodes.length)return r;if("msGMLOutput"==i)for(var e=0,o=t.childNodes.length;e<o;e++){var s=t.childNodes[e];if(s.nodeType===Node.ELEMENT_NODE){var a=s,u=n[0],c=a.localName.replace("_layer","");if(!this.Uc||y(this.Uc,c)){var h=c+"_feature";u.featureType=h,u.featureNS=this.Ry;var f={};f[h]=jf(this.Py.readFeatureElement,this.Py);var l=Cf([u.featureNS,null],f);a.setAttribute("namespaceURI",this.Ry);var v=Pf([],l,a,n,this.Py);v&&b(r,v)}}}if("FeatureCollection"==i){var d=Pf([],this.Py.FEATURE_COLLECTION_PARSERS,t,[{}],this.Py);d&&(r=d)}return r},n.prototype.readFeaturesFromNode=function(t,n){var i={};return n&&E(i,this.getReadOptions(t,n)),this.Em(t,[i])},n}(XE),yF=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mF=[null,"http://www.opengis.net/wmts/1.0"],wF=[null,"http://www.opengis.net/ows/1.1"],bF=Cf(mF,{Contents:Mf((function(t,n){return Pf({},xF,t,n)}))}),gF=function(t){function n(){var n=t.call(this)||this;return n.Am=new KP,n}return yF(n,t),n.prototype.readFromNode=function(t){var n=t.getAttribute("version");n&&(n=n.trim());var i=this.Am.readFromNode(t);return i?(i.version=n,(i=Pf(i,bF,t,[]))||null):null},n}(AP),xF=Cf(mF,{Layer:kf((function(t,n){return Pf({},jF,t,n)})),TileMatrixSet:kf((function(t,n){return Pf({},EF,t,n)}))}),jF=Cf(mF,{Style:kf((function(t,n){var i=Pf({},SF,t,n);if(!i)return;var r="true"===t.getAttribute("isDefault");return i.isDefault=r,i})),Format:kf(oA),TileMatrixSetLink:kf((function(t,n){return Pf({},kF,t,n)})),Dimension:kf((function(t,n){return Pf({},OF,t,n)})),ResourceURL:kf((function(t,n){var i=t.getAttribute("format"),r=t.getAttribute("template"),e=t.getAttribute("resourceType"),o={};i&&(o.format=i);r&&(o.template=r);e&&(o.resourceType=e);return o}))},Cf(wF,{Title:Mf(oA),Abstract:Mf(oA),WGS84BoundingBox:Mf(CF),Identifier:Mf(oA)})),SF=Cf(mF,{LegendURL:kf((function(t,n){var i={};return i.format=t.getAttribute("format"),i.href=CP(t),i}))},Cf(wF,{Title:Mf(oA),Identifier:Mf(oA)})),kF=Cf(mF,{TileMatrixSet:Mf(oA),TileMatrixSetLimits:Mf((function(t,n){return Pf([],MF,t,n)}))}),MF=Cf(mF,{TileMatrixLimits:jf((function(t,n){return Pf({},_F,t,n)}))}),_F=Cf(mF,{TileMatrix:Mf(oA),MinTileRow:Mf(rA),MaxTileRow:Mf(rA),MinTileCol:Mf(rA),MaxTileCol:Mf(rA)}),OF=Cf(mF,{Default:Mf(oA),Value:kf(oA)},Cf(wF,{Identifier:Mf(oA)})),TF=Cf(wF,{LowerCorner:jf(RF),UpperCorner:jf(RF)}),EF=Cf(mF,{WellKnownScaleSet:Mf(oA),TileMatrix:kf((function(t,n){return Pf({},AF,t,n)}))},Cf(wF,{SupportedCRS:Mf(oA),Identifier:Mf(oA),BoundingBox:Mf(CF)})),AF=Cf(mF,{TopLeftCorner:Mf(RF),ScaleDenominator:Mf(nA),TileWidth:Mf(rA),TileHeight:Mf(rA),MatrixWidth:Mf(rA),MatrixHeight:Mf(rA)},Cf(wF,{Identifier:Mf(oA)}));function CF(t,n){var i=Pf([],TF,t,n);if(2==i.length)return xn(i)}function RF(t,n){var i=oA(t).split(/\s+/);if(i&&2==i.length){var r=+i[0],e=+i[1];if(!isNaN(r)&&!isNaN(e))return[r,e]}}var PF=gF,IF=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),NF=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],zF="enterfullscreen",FF="leavefullscreen";function LF(t){var n=t.body;return!!(n.webkitRequestFullscreen||n.msRequestFullscreen&&t.msFullscreenEnabled||n.requestFullscreen&&t.fullscreenEnabled)}function GF(t){return!!(t.webkitIsFullScreen||t.msFullscreenElement||t.fullscreenElement)}function DF(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}var UF=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),target:r.target})||this).on,i.once,i.un,i.th=void 0!==r.keys&&r.keys,i.Mv=r.source,i.Cm=!1,i.Rm=i.Pm.bind(i),i.Im=void 0!==r.className?r.className:"ol-full-screen",i.Nm=[],i.zm=void 0!==r.activeClassName?r.activeClassName.split(" "):[i.Im+"-true"],i.Fm=void 0!==r.inactiveClassName?r.inactiveClassName.split(" "):[i.Im+"-false"];var e=void 0!==r.label?r.label:"⤢";i.Lm="string"==typeof e?document.createTextNode(e):e;var o=void 0!==r.labelActive?r.labelActive:"×";i.Gm="string"==typeof o?document.createTextNode(o):o;var s=r.tipLabel?r.tipLabel:"Toggle full-screen";return i.Dm=document.createElement("button"),i.Dm.title=s,i.Dm.setAttribute("type","button"),i.Dm.appendChild(i.Lm),i.Dm.addEventListener(G,i.Cr.bind(i),!1),i.Um(i.Dm,i.Cm),i.element.className="".concat(i.Im," ").concat(Os," ").concat(Es),i.element.appendChild(i.Dm),i}return IF(n,t),n.prototype.Cr=function(t){t.preventDefault(),this.qm()},n.prototype.qm=function(){var t=this.getMap();if(t){var n=t.getOwnerDocument();if(LF(n))if(GF(n))!function(t){t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(n);else{var i=void 0;i=this.Mv?"string"==typeof this.Mv?n.getElementById(this.Mv):this.Mv:t.getTargetElement(),this.th?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():DF(t)}(i):DF(i)}}},n.prototype.Bm=function(){var t=this.getMap();if(t){var n=this.Cm;this.Cm=GF(t.getOwnerDocument()),n!==this.Cm&&(this.Um(this.Dm,this.Cm),this.Cm?(Eo(this.Gm,this.Lm),this.dispatchEvent(zF)):(Eo(this.Lm,this.Gm),this.dispatchEvent(FF)),t.updateSize())}},n.prototype.Um=function(t,n){var i,r,e,o;n?((i=t.classList).remove.apply(i,this.Fm),(r=t.classList).add.apply(r,this.zm)):((e=t.classList).remove.apply(e,this.zm),(o=t.classList).add.apply(o,this.Fm))},n.prototype.setMap=function(n){var i=this.getMap();i&&i.removeChangeListener(_a,this.Rm),t.prototype.setMap.call(this,n),this.Pm(),n&&n.addChangeListener(_a,this.Rm)},n.prototype.Pm=function(){for(var t=this.Nm,n=0,i=t.length;n<i;++n)$(t[n]);t.length=0;var r=this.getMap();if(r){var e=r.getOwnerDocument();LF(e)?this.element.classList.remove(Ts):this.element.classList.add(Ts);for(n=0,i=NF.length;n<i;++n)t.push(Y(e,NF[n],this.Bm,this));this.Bm()}},n}(fu),qF=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),BF="projection",WF="coordinateFormat",VF=function(t){function n(n){var i=this,r=n||{},e=document.createElement("div");e.className=void 0!==r.className?r.className:"ol-mouse-position",(i=t.call(this,{element:e,render:r.render,target:r.target})||this).on,i.once,i.un,i.addChangeListener(BF,i.Tt),r.coordinateFormat&&i.setCoordinateFormat(r.coordinateFormat),r.projection&&i.setProjection(r.projection);var o=!0,s="&#160;";return"undefinedHTML"in r?(void 0!==r.undefinedHTML&&(s=r.undefinedHTML),o=!!s):"placeholder"in r&&(!1===r.placeholder?o=!1:s=String(r.placeholder)),i.Wm=s,i.Vm=o,i.Xm=e.innerHTML,i.Hm=null,i._t=null,i}return qF(n,t),n.prototype.Tt=function(){this._t=null},n.prototype.getCoordinateFormat=function(){return this.get(WF)},n.prototype.getProjection=function(){return this.get(BF)},n.prototype.handleMouseMove=function(t){var n=this.getMap();this.Jm(n.getEventPixel(t))},n.prototype.handleMouseOut=function(t){this.Jm(null)},n.prototype.setMap=function(n){if(t.prototype.setMap.call(this,n),n){var i=n.getViewport();this.listenerKeys.push(Y(i,pa,this.handleMouseMove,this)),this.Vm&&this.listenerKeys.push(Y(i,wa,this.handleMouseOut,this)),this.Jm(null)}},n.prototype.setCoordinateFormat=function(t){this.set(WF,t)},n.prototype.setProjection=function(t){this.set(BF,br(t))},n.prototype.Jm=function(t){var n=this.Wm;if(t&&this.Hm){if(!this._t){var i=this.getProjection();this._t=i?Tr(this.Hm,i):yr}var r=this.getMap().getCoordinateFromPixelInternal(t);if(r){var e=Ir();e&&(this._t=Tr(this.Hm,e)),this._t(r,r);var o=this.getCoordinateFormat();n=o?o(r):r.toString()}}this.Xm&&n===this.Xm||(this.element.innerHTML=n,this.Xm=n)},n.prototype.render=function(t){var n=t.frameState;n?this.Hm!=n.viewState.projection&&(this.Hm=n.viewState.projection,this._t=null):this.Hm=null},n}(fu),XF=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),HF=.75,JF=.1,KF=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return XF(n,t),n.prototype.createRenderer=function(){return new oa(this)},n}(cu),YF=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).Km=i.Ym.bind(i),i.Sr=void 0===r.collapsed||r.collapsed,i._r=void 0===r.collapsible||r.collapsible,i._r||(i.Sr=!1),i.ua=void 0!==r.rotateWithView&&r.rotateWithView,i.Zm=void 0;var e=void 0!==r.className?r.className:"ol-overviewmap",o=void 0!==r.tipLabel?r.tipLabel:"Overview map",s=void 0!==r.collapseLabel?r.collapseLabel:"";"string"==typeof s?(i.Tr=document.createElement("span"),i.Tr.textContent=s):i.Tr=s;var a=void 0!==r.label?r.label:"";"string"==typeof a?(i.Er=document.createElement("span"),i.Er.textContent=a):i.Er=a;var u=i._r&&!i.Sr?i.Tr:i.Er,c=document.createElement("button");c.setAttribute("type","button"),c.title=o,c.appendChild(u),c.addEventListener(G,i.Cr.bind(i),!1),i.$m=document.createElement("div"),i.$m.className="ol-overviewmap-map",i.Ny=r.view,i.Qm=new KF({view:r.view});var h=i.Qm;r.layers&&r.layers.forEach((function(t){h.addLayer(t)}));var f=document.createElement("div");f.className="ol-overviewmap-box",f.style.boxSizing="border-box",i.tw=new Gc({position:[0,0],positioning:Oc,element:f}),i.Qm.addOverlay(i.tw);var l=e+" "+"ol-unselectable "+Es+(i.Sr&&i._r?" ol-collapsed":"")+(i._r?"":" ol-uncollapsible"),v=i.element;v.className=l,v.appendChild(i.$m),v.appendChild(c);var d=i,p=i.tw,y=i.tw.getElement(),m=function(t){var n,i={clientX:(n=t).clientX,clientY:n.clientY},r=h.getEventCoordinateInternal(i);p.setPosition(r)},w=function t(n){var i=h.getEventCoordinateInternal(n);d.getMap().getView().setCenterInternal(i),window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",t)};return y.addEventListener("mousedown",(function(){window.addEventListener("mousemove",m),window.addEventListener("mouseup",w)})),i}return XF(n,t),n.prototype.setMap=function(n){var i=this.getMap();if(n!==i){if(i){var r=i.getView();r&&this.nw(r),this.Qm.setTarget(null)}if(t.prototype.setMap.call(this,n),n){this.Qm.setTarget(this.$m),this.listenerKeys.push(Y(n,l,this.iw,this));var e=n.getView();e&&(this.rw(e),e.isDef()&&(this.Qm.updateSize(),this.ew())),this.Qm.isRendered()||this.ow()}}},n.prototype.iw=function(t){if(t.key===Oa){var n=t.oldValue;n&&this.nw(n);var i=this.getMap().getView();this.rw(i)}else this.Qm.isRendered()||t.key!==_a&&t.key!==Ma||this.Qm.updateSize()},n.prototype.rw=function(t){if(!this.Ny){var n=new nu({projection:t.getProjection()});this.Qm.setView(n)}t.addChangeListener(Na.ROTATION,this.Km),this.Ym()},n.prototype.nw=function(t){t.removeChangeListener(Na.ROTATION,this.Km)},n.prototype.Ym=function(){this.ua&&this.Qm.getView().setRotation(this.getMap().getView().getRotation())},n.prototype.sw=function(){var t=this.getMap(),n=this.Qm;if(t.isRendered()&&n.isRendered()){var i=t.getSize(),r=t.getView().calculateExtentInternal(i);if(!this.Zm||!In(r,this.Zm)){this.Zm=r;var e=n.getSize(),o=n.getView().calculateExtentInternal(e),s=n.getPixelFromCoordinateInternal(Zn(r)),a=n.getPixelFromCoordinateInternal(Vn(r)),u=Math.abs(s[0]-a[0]),c=Math.abs(s[1]-a[1]),h=e[0],f=e[1];u<h*JF||c<f*JF||u>h*HF||c>f*HF?this.ew():_n(o,r)||this.aw()}}},n.prototype.ew=function(){var t=this.getMap(),n=this.Qm,i=t.getSize(),r=t.getView().calculateExtentInternal(i),e=n.getView(),o=Math.log(7.5)/Math.LN2;ri(r,1/(Math.pow(2,o/2)*JF)),e.fitInternal(Ze(r))},n.prototype.aw=function(){var t=this.getMap(),n=this.Qm,i=t.getView();n.getView().setCenterInternal(i.getCenterInternal())},n.prototype.uw=function(){var t=this.getMap(),n=this.Qm;if(t.isRendered()&&n.isRendered()){var i=t.getSize(),r=t.getView(),e=n.getView(),o=this.ua?0:-r.getRotation(),s=this.tw,a=this.tw.getElement(),u=r.getCenterInternal(),c=r.getResolution(),h=e.getResolution(),f=i[0]*c/h,l=i[1]*c/h;if(s.setPosition(u),a){a.style.width=f+"px",a.style.height=l+"px";var v="rotate("+o+"rad)";a.style.transform=v}}},n.prototype.ow=function(){this.cw||(this.cw=Z(this.Qm,xa,(function(t){delete this.cw,this.uw()}),this))},n.prototype.Cr=function(t){t.preventDefault(),this.Nr()},n.prototype.Nr=function(){this.element.classList.toggle(As),this.Sr?Eo(this.Tr,this.Er):Eo(this.Er,this.Tr),this.Sr=!this.Sr;var t=this.Qm;if(!this.Sr){if(t.isRendered())return this.Zm=void 0,void t.render();t.updateSize(),this.ew(),this.ow()}},n.prototype.getCollapsible=function(){return this._r},n.prototype.setCollapsible=function(t){this._r!==t&&(this._r=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.Sr&&this.Nr())},n.prototype.setCollapsed=function(t){this._r&&this.Sr!==t&&this.Nr()},n.prototype.getCollapsed=function(){return this.Sr},n.prototype.getRotateWithView=function(){return this.ua},n.prototype.setRotateWithView=function(t){this.ua!==t&&(this.ua=t,0!==this.getMap().getView().getRotation()&&(this.ua?this.Ym():this.Qm.getView().setRotation(0),this.Zm=void 0,this.sw(),this.uw()))},n.prototype.getOverviewMap=function(){return this.Qm},n.prototype.render=function(t){this.sw(),this.uw()},n}(fu),ZF=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$F="units",QF="degrees",tL="imperial",nL="nautical",iL="metric",rL="us",eL=[1,2,5],oL=25.4/.28,sL=function(t){function n(n){var i=this,r=n||{},e=void 0!==r.className?r.className:r.bar?"ol-scale-bar":"ol-scale-line";return(i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).on,i.once,i.un,i.hw=document.createElement("div"),i.hw.className=e+"-inner",i.element.className=e+" "+Os,i.element.appendChild(i.hw),i.fw=null,i.lw=void 0!==r.minWidth?r.minWidth:64,i.mn=!1,i.dw=void 0,i.Xm="",i.addChangeListener($F,i.pw),i.setUnits(r.units||iL),i.yw=r.bar||!1,i.mw=r.steps||4,i.ww=r.text||!1,i.bw=r.dpi||void 0,i}return ZF(n,t),n.prototype.getUnits=function(){return this.get($F)},n.prototype.pw=function(){this.Ir()},n.prototype.setUnits=function(t){this.set($F,t)},n.prototype.setDpi=function(t){this.bw=t},n.prototype.Ir=function(){var t=this.fw;if(t){var n=t.center,i=t.projection,r=this.getUnits(),e=r==QF?Gt.DEGREES:Gt.METERS,o=gr(i,t.resolution,n,e),s=this.lw*(this.bw||oL)/oL,a=s*o,u="";if(r==QF){var c=Ft[Gt.DEGREES];(a*=c)<c/60?(u="″",o*=3600):a<c?(u="",o*=60):u="°"}else r==tL?a<.9144?(u="in",o/=.0254):a<1609.344?(u="ft",o/=.3048):(u="mi",o/=1609.344):r==nL?(o/=1852,u="nm"):r==iL?a<.001?(u="μm",o*=1e6):a<1?(u="mm",o*=1e3):a<1e3?u="m":(u="km",o/=1e3):r==rL?a<.9144?(u="in",o*=39.37):a<1609.344?(u="ft",o/=.30480061):(u="mi",o/=1609.3472):Mt(!1,33);for(var h,f,l,v,d=3*Math.floor(Math.log(s*o)/Math.log(10));;){l=Math.floor(d/3);var p=Math.pow(10,l);if(h=eL[(d%3+3)%3]*p,f=Math.round(h/o),isNaN(f))return this.element.style.display="none",void(this.mn=!1);if(f>=s)break;++d}v=this.yw?this.createScaleBar(f,h,u):h.toFixed(l<0?-l:0)+" "+u,this.Xm!=v&&(this.hw.innerHTML=v,this.Xm=v),this.dw!=f&&(this.hw.style.width=f+"px",this.dw=f),this.mn||(this.element.style.display="",this.mn=!0)}else this.mn&&(this.element.style.display="none",this.mn=!1)},n.prototype.createScaleBar=function(t,n,i){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),e=[],o=t/this.mw,s="#ffffff",a=0;a<this.mw;a++)0===a&&e.push(this.createMarker("absolute",a)),e.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+s+';"></div>'+this.createMarker("relative",a)+(a%2==0||2===this.mw?this.createStepText(a,t,!1,n,i):"")+"</div>"),a===this.mw-1&&e.push(this.createStepText(a+1,t,!0,n,i)),s="#ffffff"===s?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.ww?'<div class="ol-scale-text" style="width: '+t+'px;">'+r+"</div>":"")+e.join("")+"</div>"},n.prototype.createMarker=function(t,n){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},n.prototype.createStepText=function(t,n,i,r,e){var o=(0===t?0:Math.round(r/this.mw*t*100)/100)+(0===t?"":" "+e);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:n/this.mw*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:n/this.mw*2)+"px;left: "+(i?n+"px":"unset")+';">'+o+"</div>"},n.prototype.getScaleForResolution=function(){var t=gr(this.fw.projection,this.fw.resolution,this.fw.center,Gt.METERS),n=this.bw||oL;return parseFloat(t.toString())*(1e3/25.4)*n},n.prototype.render=function(t){var n=t.frameState;this.fw=n?n.viewState:null,this.Ir()},n}(fu),aL=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uL=0,cL=1,hL=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),render:r.render})||this).Rn=[],i.gw=void 0,i.xw=uL,i.Cn,i.jw=0,i.Sw=0,i.kw,i.Mw,i._w=null,i.Ow=!1,i.Fr=void 0!==r.duration?r.duration:200;var e=void 0!==r.className?r.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=e+"-thumb "+Os;var s=i.element;return s.className=e+" "+"ol-unselectable "+Es,s.appendChild(o),s.addEventListener(ya,i.Tw.bind(i),!1),s.addEventListener(pa,i.Ew.bind(i),!1),s.addEventListener(ma,i.Aw.bind(i),!1),s.addEventListener(G,i.Cw.bind(i),!1),o.addEventListener(G,h,!1),i}return aL(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),n&&n.render()},n.prototype.Rw=function(){var t=this.element,n=t.offsetWidth,i=t.offsetHeight;if(0===n&&0===i)return this.Ow=!1;var r=getComputedStyle(t);n-=parseFloat(r.paddingRight)+parseFloat(r.paddingLeft),i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);var e=t.firstElementChild,o=getComputedStyle(e),s=e.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),a=e.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this._w=[s,a],n>i?(this.xw=cL,this.Sw=n-s):(this.xw=uL,this.jw=i-a),this.Ow=!0},n.prototype.Cw=function(t){var n=this.getMap().getView(),i=this.Pw(t.offsetX-this._w[0]/2,t.offsetY-this._w[1]/2),r=this.Iw(i),e=n.getConstrainedZoom(n.getZoomForResolution(r));n.animateInternal({zoom:e,duration:this.Fr,easing:wt})},n.prototype.Tw=function(t){if(!this.Cn&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.kw=t.clientX-parseFloat(n.style.left),this.Mw=t.clientY-parseFloat(n.style.top),this.Cn=!0,0===this.Rn.length){var i=this.Ew,r=this.Aw,e=this.getMap().getOwnerDocument();this.Rn.push(Y(e,pa,i,this),Y(e,ma,r,this))}}},n.prototype.Ew=function(t){if(this.Cn){var n=t.clientX-this.kw,i=t.clientY-this.Mw,r=this.Pw(n,i);this.gw=this.Iw(r),this.getMap().getView().setResolution(this.gw)}},n.prototype.Aw=function(t){this.Cn&&(this.getMap().getView().endInteraction(),this.Cn=!1,this.kw=void 0,this.Mw=void 0,this.Rn.forEach($),this.Rn.length=0)},n.prototype.Nw=function(t){var n=this.zw(t),i=this.element.firstElementChild;this.xw==cL?i.style.left=this.Sw*n+"px":i.style.top=this.jw*n+"px"},n.prototype.Pw=function(t,n){return ui(this.xw===cL?t/this.Sw:n/this.jw,0,1)},n.prototype.Iw=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},n.prototype.zw=function(t){return ui(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},n.prototype.render=function(t){if(t.frameState&&(this.Ow||this.Rw())){var n=t.frameState.viewState.resolution;this.gw=n,this.Nw(n)}},n}(fu),fL=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lL=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),target:r.target})||this).extent=r.extent?r.extent:null;var e=void 0!==r.className?r.className:"ol-zoom-extent",o=void 0!==r.label?r.label:"E",s=void 0!==r.tipLabel?r.tipLabel:"Fit to extent",a=document.createElement("button");a.setAttribute("type","button"),a.title=s,a.appendChild("string"==typeof o?document.createTextNode(o):o),a.addEventListener(G,i.Cr.bind(i),!1);var u=e+" "+"ol-unselectable "+Es,c=i.element;return c.className=u,c.appendChild(a),i}return fL(n,t),n.prototype.Cr=function(t){t.preventDefault(),this.handleZoomToExtent()},n.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),n=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Ze(n))},n}(fu),vL={};vL.AssertionError=c,vL.Collection=ft,vL.Collection.CollectionEvent=ht,vL.DataTile=kt,vL.Disposable=v,vL.Feature=Tt,vL.Feature.createStyleFunction=Ot,vL.Geolocation=lo,vL.Image=So,vL.Image.listenImage=jo,vL.ImageBase=po,vL.ImageCanvas=Mo,vL.ImageTile=Io,vL.Kinetic=No,vL.Map=jc,vL.MapBrowserEvent=va,vL.MapBrowserEventHandler=ga,vL.MapEvent=fa,vL.Object=ot,vL.Object.ObjectEvent=et,vL.Observable=it,vL.Observable.unByKey=nt,vL.Overlay=Gc,vL.PluggableMap=cu,vL.Tile=jt,vL.TileCache=Kc,vL.TileQueue=Ca,vL.TileQueue.getTilePriority=Ra,vL.TileRange=$c,vL.TileRange.createOrUpdate=Zc,vL.VectorRenderTile=nh,vL.VectorTile=rh,vL.View=nu,vL.View.createCenterConstraint=Ya,vL.View.createResolutionConstraint=Za,vL.View.createRotationConstraint=$a,vL.View.isNoopAnimation=Qa,vL.array={},vL.array.binarySearch=d,vL.array.equals=x,vL.array.extend=b,vL.array.find=g,vL.array.findIndex=j,vL.array.includes=y,vL.array.isSorted=S,vL.array.linearFindNearest=m,vL.array.numberSafeCompareFunction=p,vL.array.remove=function(t,n){var i=t.indexOf(n),r=i>-1;return r&&t.splice(i,1),r},vL.array.reverseSubArray=w,vL.array.stableSort=function(t,n){var i,r=t.length,e=Array(t.length);for(i=0;i<r;i++)e[i]={index:i,value:t[i]};for(e.sort((function(t,i){return n(t.value,i.value)||t.index-i.index})),i=0;i<t.length;i++)t[i]=e[i].value},vL.asserts={},vL.asserts.assert=Mt,vL.centerconstraint={},vL.centerconstraint.createExtent=Fa,vL.centerconstraint.none=La,vL.color={},vL.color.asArray=Uo,vL.color.asString=Lo,vL.color.fromString=Do,vL.color.isStringColor=Wo,vL.color.normalize=qo,vL.color.toString=Bo,vL.colorlike={},vL.colorlike.asColorLike=eh,vL.control={},vL.control.Attribution=vu,vL.control.Control=fu,vL.control.FullScreen=UF,vL.control.MousePosition=VF,vL.control.OverviewMap=YF,vL.control.Rotate=pu,vL.control.ScaleLine=sL,vL.control.Zoom=mu,vL.control.ZoomSlider=hL,vL.control.ZoomToExtent=lL,vL.control.defaults=wu,vL.coordinate={},vL.coordinate.add=Ji,vL.coordinate.closestOnCircle=Ki,vL.coordinate.closestOnSegment=Yi,vL.coordinate.createStringXY=function(t){return function(n){return or(n,t)}},vL.coordinate.degreesToStringHDMS=Zi,vL.coordinate.distance=rr,vL.coordinate.equals=Qi,vL.coordinate.format=$i,vL.coordinate.getWorldsAway=ar,vL.coordinate.rotate=tr,vL.coordinate.scale=nr,vL.coordinate.squaredDistance=ir,vL.coordinate.squaredDistanceToSegment=er,vL.coordinate.toStringHDMS=function(t,n){return t?Zi("NS",t[1],n)+" "+Zi("EW",t[0],n):""},vL.coordinate.toStringXY=or,vL.coordinate.wrapX=sr,vL.css={},vL.css.CLASS_COLLAPSED=As,vL.css.CLASS_CONTROL=Es,vL.css.CLASS_HIDDEN=Ms,vL.css.CLASS_SELECTABLE=_s,vL.css.CLASS_UNSELECTABLE=Os,vL.css.CLASS_UNSUPPORTED=Ts,vL.css.cssOpacity=Is,vL.css.getFontParameters=Ps,vL.dom={},vL.dom.createCanvasContext2D=_o,vL.dom.outerHeight=To,vL.dom.outerWidth=Oo,vL.dom.removeChildren=Co,vL.dom.removeNode=Ao,vL.dom.replaceChildren=Ro,vL.dom.replaceNode=Eo,vL.easing={},vL.easing.easeIn=mt,vL.easing.easeOut=wt,vL.easing.inAndOut=bt,vL.easing.linear=gt,vL.easing.upAndDown=function(t){return t<.5?bt(2*t):1-bt(2*(t-.5))},vL.events={},vL.events.Event=f,vL.events.Event.preventDefault=function(t){t.preventDefault()},vL.events.Event.stopPropagation=h,vL.events.Target=I,vL.events.condition={},vL.events.condition.all=Eu,vL.events.condition.altKeyOnly=Au,vL.events.condition.altShiftKeysOnly=Cu,vL.events.condition.always=Iu,vL.events.condition.click=function(t){return t.type==da.CLICK},vL.events.condition.doubleClick=function(t){return t.type==da.DBLCLICK},vL.events.condition.focus=Ru,vL.events.condition.focusWithTabindex=Pu,vL.events.condition.mouseActionButton=Nu,vL.events.condition.mouseOnly=Uu,vL.events.condition.never=zu,vL.events.condition.noModifierKeys=Lu,vL.events.condition.penOnly=function(t){var n=t.originalEvent;return Mt(void 0!==n,56),"pen"===n.pointerType},vL.events.condition.platformModifierKeyOnly=function(t){var n=t.originalEvent;return!n.altKey&&(Wt?n.metaKey:n.ctrlKey)&&!n.shiftKey},vL.events.condition.pointerMove=function(t){return"pointermove"==t.type},vL.events.condition.primaryAction=qu,vL.events.condition.shiftKeyOnly=Gu,vL.events.condition.singleClick=Fu,vL.events.condition.targetNotEditable=Du,vL.events.condition.touchOnly=function(t){var n=t.originalEvent;return Mt(void 0!==n,56),"touch"===n.pointerType},vL.events.listen=Y,vL.events.listenOnce=Z,vL.events.unlistenByKey=$,vL.extent={},vL.extent.applyTransform=oi,vL.extent.approximatelyEquals=Nn,vL.extent.boundingExtent=xn,vL.extent.buffer=jn,vL.extent.clone=Sn,vL.extent.closestSquaredDistanceXY=kn,vL.extent.containsCoordinate=Mn,vL.extent.containsExtent=_n,vL.extent.containsXY=On,vL.extent.coordinateRelationship=Tn,vL.extent.createEmpty=En,vL.extent.createOrUpdate=An,vL.extent.createOrUpdateEmpty=Cn,vL.extent.createOrUpdateFromCoordinate=Rn,vL.extent.createOrUpdateFromCoordinates=function(t,n){return Ln(Cn(n),t)},vL.extent.createOrUpdateFromFlatCoordinates=Pn,vL.extent.createOrUpdateFromRings=function(t,n){return Dn(Cn(n),t)},vL.extent.equals=In,vL.extent.extend=zn,vL.extent.extendCoordinate=Fn,vL.extent.extendCoordinates=Ln,vL.extent.extendFlatCoordinates=Gn,vL.extent.extendRings=Dn,vL.extent.extendXY=Un,vL.extent.forEachCorner=qn,vL.extent.getArea=Bn,vL.extent.getBottomLeft=Wn,vL.extent.getBottomRight=Vn,vL.extent.getCenter=Xn,vL.extent.getCorner=Hn,vL.extent.getEnlargedArea=function(t,n){var i=Math.min(t[0],n[0]),r=Math.min(t[1],n[1]);return(Math.max(t[2],n[2])-i)*(Math.max(t[3],n[3])-r)},vL.extent.getForViewAndSize=Jn,vL.extent.getHeight=Kn,vL.extent.getIntersection=Yn,vL.extent.getIntersectionArea=function(t,n){return Bn(Yn(t,n))},vL.extent.getMargin=function(t){return Qn(t)+Kn(t)},vL.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},vL.extent.getTopLeft=Zn,vL.extent.getTopRight=$n,vL.extent.getWidth=Qn,vL.extent.intersects=ti,vL.extent.intersectsSegment=ei,vL.extent.isEmpty=ni,vL.extent.returnOrUpdate=ii,vL.extent.scaleFromCenter=ri,vL.extent.wrapX=si,vL.featureloader={},vL.featureloader.loadFeaturesXhr=hh,vL.featureloader.setWithCredentials=function(t){ch=t},vL.featureloader.xhr=fh,vL.format={},vL.format.EsriJSON=WE,vL.format.Feature=Xj,vL.format.Feature.transformExtentWithOptions=Jj,vL.format.Feature.transformGeometryWithOptions=Hj,vL.format.GML=xA,vL.format.GML2=pA,vL.format.GML3=bA,vL.format.GML32=kA,vL.format.GMLBase=ZE,vL.format.GMLBase.GMLNS=JE,vL.format.GPX=sC,vL.format.GeoJSON=vS,vL.format.IGC=wC,vL.format.IIIFInfo=jb,vL.format.JSONFeature=cS,vL.format.KML=xP,vL.format.KML.getDefaultFillStyle=function(){return zC},vL.format.KML.getDefaultImageStyle=function(){return LC},vL.format.KML.getDefaultStrokeStyle=function(){return DC},vL.format.KML.getDefaultStyle=function(){return qC},vL.format.KML.getDefaultStyleArray=function(){return WC},vL.format.KML.getDefaultTextStyle=function(){return UC},vL.format.KML.readFlatCoordinates=YC,vL.format.MVT=nS,vL.format.OSMXML=EP,vL.format.OWS=KP,vL.format.Polyline=sI,vL.format.Polyline.decodeDeltas=$P,vL.format.Polyline.decodeFloats=tI,vL.format.Polyline.decodeSignedIntegers=iI,vL.format.Polyline.decodeUnsignedIntegers=eI,vL.format.Polyline.encodeDeltas=ZP,vL.format.Polyline.encodeFloats=QP,vL.format.Polyline.encodeSignedIntegers=nI,vL.format.Polyline.encodeUnsignedInteger=oI,vL.format.Polyline.encodeUnsignedIntegers=rI,vL.format.TextFeature=cC,vL.format.TopoJSON=pI,vL.format.WFS=oz,vL.format.WFS.writeFilter=function(t,n){var i=n||"1.1.0",r=pf(ez(i),"Filter"),e={node:r};return E(e,{version:i,filter:t}),qN(r,t,[e]),r},vL.format.WKB=gz,vL.format.WKT=Uz,vL.format.WMSCapabilities=vF,vL.format.WMSGetFeatureInfo=pF,vL.format.WMTSCapabilities=PF,vL.format.XML=AP,vL.format.XMLFeature=XE,vL.format.filter={},vL.format.filter.And=gI,vL.format.filter.Bbox=jI,vL.format.filter.Comparison=RI,vL.format.filter.ComparisonBinary=zI,vL.format.filter.Contains=_I,vL.format.filter.DWithin=TI,vL.format.filter.Disjoint=AI,vL.format.filter.During=II,vL.format.filter.EqualTo=LI,vL.format.filter.Filter=yI,vL.format.filter.GreaterThan=DI,vL.format.filter.GreaterThanOrEqualTo=qI,vL.format.filter.Intersects=WI,vL.format.filter.IsBetween=XI,vL.format.filter.IsLike=JI,vL.format.filter.IsNull=YI,vL.format.filter.LessThan=$I,vL.format.filter.LessThanOrEqualTo=tN,vL.format.filter.LogicalNary=wI,vL.format.filter.Not=iN,vL.format.filter.NotEqualTo=eN,vL.format.filter.Or=sN,vL.format.filter.ResourceId=uN,vL.format.filter.Spatial=kI,vL.format.filter.Within=hN,vL.format.filter.and=fN,vL.format.filter.bbox=lN,vL.format.filter.between=function(t,n,i){return new XI(t,n,i)},vL.format.filter.contains=function(t,n,i){return new _I(t,n,i)},vL.format.filter.disjoint=function(t,n,i){return new AI(t,n,i)},vL.format.filter.during=function(t,n,i){return new II(t,n,i)},vL.format.filter.dwithin=function(t,n,i,r,e){return new TI(t,n,i,r,e)},vL.format.filter.equalTo=function(t,n,i){return new LI(t,n,i)},vL.format.filter.greaterThan=function(t,n){return new DI(t,n)},vL.format.filter.greaterThanOrEqualTo=function(t,n){return new qI(t,n)},vL.format.filter.intersects=function(t,n,i){return new WI(t,n,i)},vL.format.filter.isNull=function(t){return new YI(t)},vL.format.filter.lessThan=function(t,n){return new $I(t,n)},vL.format.filter.lessThanOrEqualTo=function(t,n){return new tN(t,n)},vL.format.filter.like=function(t,n,i,r,e,o){return new JI(t,n,i,r,e,o)},vL.format.filter.not=function(t){return new iN(t)},vL.format.filter.notEqualTo=function(t,n,i){return new eN(t,n,i)},vL.format.filter.or=function(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(sN,n))},vL.format.filter.resourceId=function(t){return new uN(t)},vL.format.filter.within=function(t,n,i){return new hN(t,n,i)},vL.format.xlink={},vL.format.xlink.readHref=CP,vL.format.xsd={},vL.format.xsd.readBoolean=$E,vL.format.xsd.readBooleanString=QE,vL.format.xsd.readDateTime=tA,vL.format.xsd.readDecimal=nA,vL.format.xsd.readDecimalString=iA,vL.format.xsd.readNonNegativeIntegerString=eA,vL.format.xsd.readPositiveInteger=rA,vL.format.xsd.readString=oA,vL.format.xsd.writeBooleanTextNode=sA,vL.format.xsd.writeCDATASection=aA,vL.format.xsd.writeDateTimeTextNode=uA,vL.format.xsd.writeDecimalTextNode=cA,vL.format.xsd.writeNonNegativeIntegerTextNode=hA,vL.format.xsd.writeStringTextNode=fA,vL.functions={},vL.functions.FALSE=M,vL.functions.TRUE=k,vL.functions.VOID=_,vL.functions.memoizeOne=O,vL.functions.toPromise=T,vL.geom={},vL.geom.Circle=XT,vL.geom.Geometry=Kr,vL.geom.GeometryCollection=sS,vL.geom.LineString=xj,vL.geom.LinearRing=Me,vL.geom.MultiLineString=Sj,vL.geom.MultiPoint=yj,vL.geom.MultiPolygon=_j,vL.geom.Point=Oe,vL.geom.Polygon=Ke,vL.geom.Polygon.circular=Ye,vL.geom.Polygon.fromCircle=$e,vL.geom.Polygon.fromExtent=Ze,vL.geom.Polygon.makeRegular=Qe,vL.geom.SimpleGeometry=Qr,vL.geom.SimpleGeometry.getStrideForLayout=Zr,vL.geom.SimpleGeometry.transformGeom2D=$r,vL.geom.flat={},vL.geom.flat.area={},vL.geom.flat.area.linearRing=xe,vL.geom.flat.area.linearRings=je,vL.geom.flat.area.linearRingss=Se,vL.geom.flat.center={},vL.geom.flat.center.linearRingss=kj,vL.geom.flat.closest={},vL.geom.flat.closest.arrayMaxSquaredDelta=ie,vL.geom.flat.closest.assignClosestArrayPoint=oe,vL.geom.flat.closest.assignClosestMultiArrayPoint=se,vL.geom.flat.closest.assignClosestPoint=ee,vL.geom.flat.closest.maxSquaredDelta=ne,vL.geom.flat.closest.multiArrayMaxSquaredDelta=re,vL.geom.flat.contains={},vL.geom.flat.contains.linearRingContainsExtent=Te,vL.geom.flat.contains.linearRingContainsXY=Ee,vL.geom.flat.contains.linearRingsContainsXY=Ae,vL.geom.flat.contains.linearRingssContainsXY=Ce,vL.geom.flat.deflate={},vL.geom.flat.deflate.deflateCoordinate=ae,vL.geom.flat.deflate.deflateCoordinates=ue,vL.geom.flat.deflate.deflateCoordinatesArray=ce,vL.geom.flat.deflate.deflateMultiCoordinatesArray=he,vL.geom.flat.flip={},vL.geom.flat.flip.flipXY=zE,vL.geom.flat.geodesic={},vL.geom.flat.geodesic.greatCircleArc=function(t,n,i,r,e,o){var s=br("EPSG:4326"),a=Math.cos(pi(n)),u=Math.sin(pi(n)),c=Math.cos(pi(r)),h=Math.sin(pi(r)),f=Math.cos(pi(i-t)),l=Math.sin(pi(i-t)),v=u*h+a*c*f;return Pj((function(n){if(1<=v)return[i,r];var e=n*Math.acos(v),o=Math.cos(e),s=Math.sin(e),d=l*c,p=a*h-u*c*f,y=Math.atan2(d,p),m=Math.asin(u*o+a*s*Math.cos(y));return[di(pi(t)+Math.atan2(Math.sin(y)*s*a,o-u*Math.sin(m))),di(m)]}),Er(s,e),o)},vL.geom.flat.geodesic.meridian=Ij,vL.geom.flat.geodesic.parallel=Nj,vL.geom.flat.inflate={},vL.geom.flat.inflate.inflateCoordinates=we,vL.geom.flat.inflate.inflateCoordinatesArray=be,vL.geom.flat.inflate.inflateMultiCoordinatesArray=ge,vL.geom.flat.interiorpoint={},vL.geom.flat.interiorpoint.getInteriorPointOfArray=Re,vL.geom.flat.interiorpoint.getInteriorPointsOfMultiArray=Pe,vL.geom.flat.interpolate={},vL.geom.flat.interpolate.interpolatePoint=mj,vL.geom.flat.interpolate.lineStringCoordinateAtM=wj,vL.geom.flat.interpolate.lineStringsCoordinateAtM=bj,vL.geom.flat.intersectsextent={},vL.geom.flat.intersectsextent.intersectsLineString=Ne,vL.geom.flat.intersectsextent.intersectsLineStringArray=ze,vL.geom.flat.intersectsextent.intersectsLinearRing=Fe,vL.geom.flat.intersectsextent.intersectsLinearRingArray=Le,vL.geom.flat.intersectsextent.intersectsLinearRingMultiArray=Ge,vL.geom.flat.length={},vL.geom.flat.length.lineStringLength=Gx,vL.geom.flat.length.linearRingLength=function(t,n,i,r){var e=Gx(t,n,i,r),o=t[i-r]-t[n],s=t[i-r+1]-t[n+1];return e+=Math.sqrt(o*o+s*s)},vL.geom.flat.orient={},vL.geom.flat.orient.inflateEnds=Xe,vL.geom.flat.orient.linearRingIsClockwise=Ue,vL.geom.flat.orient.linearRingsAreOriented=qe,vL.geom.flat.orient.linearRingssAreOriented=Be,vL.geom.flat.orient.orientLinearRings=We,vL.geom.flat.orient.orientLinearRingsArray=Ve,vL.geom.flat.reverse={},vL.geom.flat.reverse.coordinates=De,vL.geom.flat.segments={},vL.geom.flat.segments.forEach=Ie,vL.geom.flat.simplify={},vL.geom.flat.simplify.douglasPeucker=fe,vL.geom.flat.simplify.douglasPeuckerArray=le,vL.geom.flat.simplify.douglasPeuckerMultiArray=function(t,n,i,r,e,o,s,a){for(var u=0,c=i.length;u<c;++u){var h=i[u],f=[];s=le(t,n,h,r,e,o,s,f),a.push(f),n=h[h.length-1]}return s},vL.geom.flat.simplify.quantize=pe,vL.geom.flat.simplify.quantizeArray=ye,vL.geom.flat.simplify.quantizeMultiArray=me,vL.geom.flat.simplify.radialDistance=ve,vL.geom.flat.simplify.simplifyLineString=function(t,n,i,r,e,o,s){var a=void 0!==s?s:[];return o||(i=ve(t,n,i,r,e,a,0),t=a,n=0,r=2),a.length=fe(t,n,i,r,e,a,0),a},vL.geom.flat.simplify.snap=de,vL.geom.flat.straightchunk={},vL.geom.flat.straightchunk.matchingChunk=Rx,vL.geom.flat.textpath={},vL.geom.flat.textpath.drawTextOnPath=Lx,vL.geom.flat.topology={},vL.geom.flat.topology.lineStringIsClosed=function(t,n,i,r){var e=i-r;return t[n]===t[e]&&t[n+1]===t[e+1]&&(i-n)/r>3&&!!xe(t,n,i,r)},vL.geom.flat.transform={},vL.geom.flat.transform.rotate=Wr,vL.geom.flat.transform.scale=Vr,vL.geom.flat.transform.transform2D=Br,vL.geom.flat.transform.translate=Xr,vL.has={},vL.has.DEVICE_PIXEL_RATIO=Vt,vL.has.FIREFOX=Ut,vL.has.IMAGE_DECODE=Ht,vL.has.MAC=Wt,vL.has.PASSIVE_EVENT_LISTENERS=Jt,vL.has.SAFARI=qt,vL.has.WEBKIT=Bt,vL.has.WORKER_OFFSCREEN_CANVAS=Xt,vL.interaction={},vL.interaction.DoubleClickZoom=Mu,vL.interaction.DragAndDrop=UT,vL.interaction.DragAndDrop.DragAndDropEvent=DT,vL.interaction.DragBox=nc,vL.interaction.DragBox.DragBoxEvent=tc,vL.interaction.DragPan=Wu,vL.interaction.DragRotate=Xu,vL.interaction.DragRotateAndZoom=BT,vL.interaction.DragZoom=rc,vL.interaction.Draw=iE,vL.interaction.Draw.DrawEvent=nE,vL.interaction.Draw.createBox=function(){return function(t,n,i){var r=xn([t[0],t[t.length-1]].map((function(t){return zr(t,i)}))),e=[[Wn(r),Vn(r),$n(r),Zn(r),Wn(r)]],o=n;o?o.setCoordinates(e):o=new Ke(e);var s=Ir();return s&&o.transform(i,s),o}},vL.interaction.Draw.createRegularPolygon=function(t,n){return function(i,r,e){var o=zr(i[0],e),s=zr(i[i.length-1],e),a=Math.sqrt(ir(o,s)),u=r||$e(new XT(o),t),c=n;if(!n&&0!==n){var h=s[0]-o[0],f=s[1]-o[1];c=Math.atan2(f,h)}Qe(u,o,a,c);var l=Ir();return l&&u.transform(e,l),u}},vL.interaction.Extent=cE,vL.interaction.Extent.ExtentEvent=oE,vL.interaction.Interaction=Su,vL.interaction.Interaction.pan=xu,vL.interaction.Interaction.zoomByDelta=ju,vL.interaction.KeyboardPan=cc,vL.interaction.KeyboardZoom=fc,vL.interaction.Modify=gE,vL.interaction.Modify.ModifyEvent=yE,vL.interaction.MouseWheelZoom=pc,vL.interaction.PinchRotate=mc,vL.interaction.PinchZoom=bc,vL.interaction.Pointer=Tu,vL.interaction.Pointer.centroid=Ou,vL.interaction.Select=ME,vL.interaction.Select.SelectEvent=SE,vL.interaction.Snap=EE,vL.interaction.Translate=NE,vL.interaction.Translate.TranslateEvent=IE,vL.interaction.defaults=gc,vL.layer={},vL.layer.Base=as,vL.layer.BaseImage=dg,vL.layer.BaseTile=_g,vL.layer.BaseVector=px,vL.layer.Graticule=Gj,vL.layer.Group=ca,vL.layer.Group.GroupEvent=aa,vL.layer.Heatmap=Vj,vL.layer.Image=jg,vL.layer.Layer=bs,vL.layer.Layer.inView=ws,vL.layer.MapboxVector=ET,vL.layer.MapboxVector.getMapboxPath=jT,vL.layer.MapboxVector.normalizeGlyphsUrl=kT,vL.layer.MapboxVector.normalizeSourceUrl=_T,vL.layer.MapboxVector.normalizeSpriteUrl=ST,vL.layer.MapboxVector.normalizeStyleUrl=MT,vL.layer.Tile=Ag,vL.layer.Vector=Rj,vL.layer.VectorImage=CT,vL.layer.VectorTile=rS,vL.layer.WebGLPoints=PT,vL.layer.WebGLTile=FT,vL.loadingstrategy={},vL.loadingstrategy.all=lh,vL.loadingstrategy.bbox=function(t,n){return[t]},vL.loadingstrategy.tile=function(t){return function(n,i,r){var e=t.getZForResolution(Dr(i,r)),o=t.getTileRangeForExtentAndZ(Lr(n,r),e),s=[],a=[e,0,0];for(a[1]=o.minX;a[1]<=o.maxX;++a[1])for(a[2]=o.minY;a[2]<=o.maxY;++a[2])s.push(Fr(t.getTileCoordExtent(a),r));return s}},vL.math={},vL.math.ceil=xi,vL.math.clamp=ui,vL.math.cosh=ci,vL.math.floor=gi,vL.math.lerp=mi,vL.math.log2=hi,vL.math.modulo=yi,vL.math.round=bi,vL.math.solveLinearSystem=vi,vL.math.squaredDistance=li,vL.math.squaredSegmentDistance=fi,vL.math.toDegrees=di,vL.math.toFixed=wi,vL.math.toRadians=pi,vL.net={},vL.net.ClientError=mh,vL.net.ResponseError=yh,vL.net.getJSON=wh,vL.net.jsonp=dh,vL.net.overrideXHR=function(t){"undefined"!=typeof XMLHttpRequest&&(ph=XMLHttpRequest),global.XMLHttpRequest=t},vL.net.resolveUrl=bh,vL.net.restoreXHR=function(){global.XMLHttpRequest=ph},vL.obj={},vL.obj.assign=E,vL.obj.clear=A,vL.obj.getValues=C,vL.obj.isEmpty=R,vL.proj={},vL.proj.Projection=ai,vL.proj.Units={},vL.proj.Units.METERS_PER_UNIT=Ft,vL.proj.Units.fromCode=zt,vL.proj.addCommon=qr,vL.proj.addCoordinateTransforms=Mr,vL.proj.addEquivalentProjections=xr,vL.proj.addEquivalentTransforms=jr,vL.proj.addProjection=mr,vL.proj.addProjections=wr,vL.proj.clearAllProjections=function(){Gi(),Bi()},vL.proj.clearUserProjection=function(){Rr=null},vL.proj.cloneTransform=pr,vL.proj.createProjection=Sr,vL.proj.createSafeCoordinateTransform=Ur,vL.proj.createTransformFromCoordinateTransform=kr,vL.proj.disableCoordinateWarning=dr,vL.proj.epsg3857={},vL.proj.epsg3857.EXTENT=Mi,vL.proj.epsg3857.HALF_SIZE=ki,vL.proj.epsg3857.MAX_SAFE_Y=Oi,vL.proj.epsg3857.PROJECTIONS=Ei,vL.proj.epsg3857.RADIUS=Si,vL.proj.epsg3857.WORLD_EXTENT=_i,vL.proj.epsg3857.fromEPSG4326=Ai,vL.proj.epsg3857.toEPSG4326=Ci,vL.proj.epsg4326={},vL.proj.epsg4326.EXTENT=Ii,vL.proj.epsg4326.METERS_PER_UNIT=Ni,vL.proj.epsg4326.PROJECTIONS=Fi,vL.proj.epsg4326.RADIUS=Pi,vL.proj.equivalent=Or,vL.proj.fromLonLat=_r,vL.proj.fromUserCoordinate=zr,vL.proj.fromUserExtent=Lr,vL.proj.fromUserResolution=Dr,vL.proj.get=br,vL.proj.getPointResolution=gr,vL.proj.getTransform=Er,vL.proj.getTransformFromProjections=Tr,vL.proj.getUserProjection=Ir,vL.proj.identityTransform=yr,vL.proj.proj4={},vL.proj.proj4.register=function(t){var n,i,r=Object.keys(t.defs),e=r.length;for(n=0;n<e;++n){var o=r[n];if(!br(o)){var s=t.defs(o),a=s.units;a||"longlat"!==s.projName||(a=Gt.DEGREES),mr(new ai({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<e;++n){var u=r[n],c=br(u);for(i=0;i<e;++i){var h=r[i],f=br(h);if(!Vi(u,h))if(t.defs[u]===t.defs[h])xr([c,f]);else{var l=t(u,h);Mr(c,f,Ur(c,f,l.forward),Ur(f,c,l.inverse))}}}},vL.proj.projections={},vL.proj.projections.add=Ui,vL.proj.projections.clear=Gi,vL.proj.projections.get=Di,vL.proj.setUserProjection=Pr,vL.proj.toLonLat=function(t,n){var i=Ar(t,void 0!==n?n:"EPSG:3857","EPSG:4326"),r=i[0];return(r<-180||r>180)&&(i[0]=yi(r+180,360)-180),i},vL.proj.toUserCoordinate=Nr,vL.proj.toUserExtent=Fr,vL.proj.toUserResolution=Gr,vL.proj.transform=Ar,vL.proj.transformExtent=Cr,vL.proj.transformWithProjections=function(t,n,i){return Tr(n,i)(t)},vL.proj.transforms={},vL.proj.transforms.add=Wi,vL.proj.transforms.clear=Bi,vL.proj.transforms.get=Vi,vL.proj.transforms.remove=function(t,n){var i=t.getCode(),r=n.getCode(),e=qi[i][r];return delete qi[i][r],R(qi[i])&&delete qi[i],e},vL.proj.useGeographic=function(){Pr("EPSG:4326")},vL.render={},vL.render.Box=Ju,vL.render.Event=ks,vL.render.Feature=Aj,vL.render.Feature.toFeature=function(t,n){var i=t.getId(),r=Ej(t),e=t.getProperties(),o=new Tt;return void 0!==n&&o.setGeometryName(n),o.setGeometry(r),void 0!==i&&o.setId(i),o.setProperties(e,!0),o},vL.render.Feature.toGeometry=Ej,vL.render.VectorContext=gh,vL.render.canvas={},vL.render.canvas.Builder=Mx,vL.render.canvas.BuilderGroup=Fx,vL.render.canvas.Executor=Kx,vL.render.canvas.ExecutorGroup=tj,vL.render.canvas.ExecutorGroup.getPixelIndexArray=Qx,vL.render.canvas.ImageBuilder=Ox,vL.render.canvas.Immediate=jh,vL.render.canvas.Instruction={},vL.render.canvas.Instruction.beginPathInstruction=xx,vL.render.canvas.Instruction.closePathInstruction=jx,vL.render.canvas.Instruction.fillInstruction=bx,vL.render.canvas.Instruction.strokeInstruction=gx,vL.render.canvas.LineStringBuilder=Ex,vL.render.canvas.PolygonBuilder=Cx,vL.render.canvas.TextBuilder=Nx,vL.render.canvas.checkedFonts=Vs,vL.render.canvas.defaultFillStyle=zs,vL.render.canvas.defaultFont=Ns,vL.render.canvas.defaultLineCap=Fs,vL.render.canvas.defaultLineDash=Ls,vL.render.canvas.defaultLineDashOffset=0,vL.render.canvas.defaultLineJoin=Gs,vL.render.canvas.defaultLineWidth=1,vL.render.canvas.defaultMiterLimit=Ds,vL.render.canvas.defaultPadding=Ws,vL.render.canvas.defaultStrokeStyle=Us,vL.render.canvas.defaultTextAlign=qs,vL.render.canvas.defaultTextBaseline=Bs,vL.render.canvas.drawImageOrLabel=ra,vL.render.canvas.getTextDimensions=ia,vL.render.canvas.hitdetect={},vL.render.canvas.hitdetect.HIT_DETECT_RESOLUTION=nj,vL.render.canvas.hitdetect.createHitDetectionImageData=ij,vL.render.canvas.hitdetect.hitDetect=rj,vL.render.canvas.labelCache=Xs,vL.render.canvas.measureAndCacheTextWidth=na,vL.render.canvas.measureTextHeight=$s,vL.render.canvas.measureTextWidth=ta,vL.render.canvas.registerFont=Zs,vL.render.canvas.rotateAtOffset=function(t,n,i,r){0!==n&&(t.translate(i,r),t.rotate(n),t.translate(-i,-r))},vL.render.canvas.textHeights=Ys,vL.render.getRenderPixel=function(t,n){return nn(t.inversePixelTransform,n.slice(0))},vL.render.getVectorContext=Nh,vL.render.toContext=function(t,n){var i=t.canvas,r=n||{},e=r.pixelRatio||Vt,o=r.size;o&&(i.width=o[0]*e,i.height=o[1]*e,i.style.width=o[0]+"px",i.style.height=o[1]+"px");var s=[0,0,i.width,i.height],a=en([1,0,0,1,0,0],e,e);return new jh(t,e,s,a,0)},vL.renderer={},vL.renderer.Composite=oa,vL.renderer.Layer=xl,vL.renderer.Map=js,vL.renderer.canvas={},vL.renderer.canvas.ImageLayer=gg,vL.renderer.canvas.Layer=wg,vL.renderer.canvas.TileLayer=Tg,vL.renderer.canvas.VectorImageLayer=aj,vL.renderer.canvas.VectorLayer=oj,vL.renderer.canvas.VectorTileLayer=dj,vL.renderer.canvas.common={},vL.renderer.canvas.common.IMAGE_SMOOTHING_DISABLED=Fh,vL.renderer.canvas.common.IMAGE_SMOOTHING_ENABLED=Lh,vL.renderer.vector={},vL.renderer.vector.defaultOrder=Ah,vL.renderer.vector.getSquaredTolerance=Ch,vL.renderer.vector.getTolerance=Rh,vL.renderer.vector.renderFeature=Ph,vL.renderer.webgl={},vL.renderer.webgl.Layer=Al,vL.renderer.webgl.Layer.colorDecodeId=El,vL.renderer.webgl.Layer.colorEncodeId=Tl,vL.renderer.webgl.Layer.getBlankImageData=function(){var t=document.createElement("canvas").getContext("2d").createImageData(1,1);return t.data[0]=255,t.data[1]=255,t.data[2]=255,t.data[3]=255,t},vL.renderer.webgl.Layer.writePointFeatureToBuffers=function(t,n,i,r,e,o){var s=3+e,a=t[n+0],u=t[n+1],c=Ml;c.length=e;for(var h=0;h<c.length;h++)c[h]=t[n+2+h];var f=o?o.vertexPosition:0,l=o?o.indexPosition:0,v=f/s;return Ol(i,f,a,u,0),c.length&&i.set(c,f+3),Ol(i,f+=s,a,u,1),c.length&&i.set(c,f+3),Ol(i,f+=s,a,u,2),c.length&&i.set(c,f+3),Ol(i,f+=s,a,u,3),c.length&&i.set(c,f+3),f+=s,r[l++]=v,r[l++]=v+1,r[l++]=v+3,r[l++]=v+1,r[l++]=v+2,r[l++]=v+3,_l.vertexPosition=f,_l.indexPosition=l,_l},vL.renderer.webgl.PointsLayer=mx,vL.renderer.webgl.TileLayer=Dl,vL.renderer.webgl.TileLayer.Attributes=Pl,vL.renderer.webgl.TileLayer.Uniforms=Rl,vL.reproj={},vL.reproj.Image=Ob,vL.reproj.Tile=dl,vL.reproj.Triangulation=ll,vL.reproj.calculateSourceExtentResolution=qh,vL.reproj.calculateSourceResolution=Uh,vL.reproj.common={},vL.reproj.common.ENABLE_RASTER_REPROJECTION=fl,vL.reproj.common.ERROR_THRESHOLD=.5,vL.reproj.render=Bh,vL.resolutionconstraint={},vL.resolutionconstraint.createMinMaxResolution=Ba,vL.resolutionconstraint.createSnapToPower=qa,vL.resolutionconstraint.createSnapToResolutions=Ua,vL.rotationconstraint={},vL.rotationconstraint.createSnapToN=Xa,vL.rotationconstraint.createSnapToZero=Ha,vL.rotationconstraint.disable=Wa,vL.rotationconstraint.none=Va,vL.size={},vL.size.buffer=iu,vL.size.hasArea=ru,vL.size.scale=eu,vL.size.toSize=ou,vL.source={},vL.source.BingMaps=gd,vL.source.BingMaps.quadKey=bd,vL.source.CartoDB=kd,vL.source.Cluster=zd,vL.source.DataTile=Ld,vL.source.GeoTIFF=ab,vL.source.IIIF=Mb,vL.source.Image=Ib,vL.source.Image.ImageSourceEvent=Rb,vL.source.Image.defaultImageLoadFunction=Pb,vL.source.ImageArcGISRest=zb,vL.source.ImageCanvas=Lb,vL.source.ImageMapGuide=Db,vL.source.ImageStatic=qb,vL.source.ImageWMS=Yb,vL.source.OGCMapTile=eg,vL.source.OGCVectorTile=cg,vL.source.OSM=lg,vL.source.OSM.ATTRIBUTION=fg,vL.source.Raster=Xg,vL.source.Raster.Processor=zg,vL.source.Raster.RasterSourceEvent=Ug,vL.source.Raster.newImageData=Pg,vL.source.Source=ud,vL.source.Stamen=Zg,vL.source.Tile=ld,vL.source.Tile.TileSourceEvent=fd,vL.source.TileArcGISRest=Qg,vL.source.TileDebug=nx,vL.source.TileImage=md,vL.source.TileJSON=rx,vL.source.TileWMS=ox,vL.source.UTFGrid=ux,vL.source.UTFGrid.CustomTile=ax,vL.source.UrlTile=dd,vL.source.Vector=Id,vL.source.Vector.VectorSourceEvent=Pd,vL.source.VectorTile=sg,vL.source.VectorTile.defaultLoadFunction=ag,vL.source.WMTS=lx,vL.source.WMTS.optionsFromCapabilities=function(t,n){var i=g(t.Contents.Layer,(function(t,i,r){return t.Identifier==n.layer}));if(null===i)return null;var r,e=t.Contents.TileMatrixSet;(r=i.TileMatrixSetLink.length>1?j(i.TileMatrixSetLink,"projection"in n?function(t,i,r){var o=g(e,(function(n){return n.Identifier==t.TileMatrixSet})).SupportedCRS,s=br(o),a=br(n.projection);return s&&a?Or(s,a):o==n.projection}:function(t,i,r){return t.TileMatrixSet==n.matrixSet}):0)<0&&(r=0);var o=i.TileMatrixSetLink[r].TileMatrixSet,s=i.TileMatrixSetLink[r].TileMatrixSetLimits,a=i.Format[0];"format"in n&&(a=n.format),(r=j(i.Style,(function(t,i,r){return"style"in n?t.Title==n.style:t.isDefault})))<0&&(r=0);var u=i.Style[r].Identifier,c={};"Dimension"in i&&i.Dimension.forEach((function(t,n,i){var r=t.Identifier,e=t.Default;void 0===e&&(e=t.Value[0]),c[r]=e}));var h,f=g(t.Contents.TileMatrixSet,(function(t,n,i){return t.Identifier==o})),l=f.SupportedCRS;if(l&&(h=br(l)),"projection"in n){var v=br(n.projection);v&&(h&&!Or(v,h)||(h=v))}var d=!1,p="ne"==h.getAxisOrientation().substr(0,2),m=f.TileMatrix[0],w={MinTileCol:0,MinTileRow:0,MaxTileCol:m.MatrixWidth-1,MaxTileRow:m.MatrixHeight-1};if(s){w=s[s.length-1];var b=g(f.TileMatrix,(function(t){return t.Identifier===w.TileMatrix||f.Identifier+":"+t.Identifier===w.TileMatrix}));b&&(m=b)}var x=28e-5*m.ScaleDenominator/h.getMetersPerUnit(),S=p?[m.TopLeftCorner[1],m.TopLeftCorner[0]]:m.TopLeftCorner,k=m.TileWidth*x,M=m.TileHeight*x,_=f.BoundingBox,O=[S[0]+k*w.MinTileCol,S[1]-M*(1+w.MaxTileRow),S[0]+k*(1+w.MaxTileCol),S[1]-M*w.MinTileRow];if(void 0!==_&&!_n(_,O)){var T=i.WGS84BoundingBox,E=br("EPSG:4326").getExtent();if(O=_,T)d=T[0]===E[0]&&T[2]===E[2];else{var A=Cr(_,f.SupportedCRS,"EPSG:4326");d=A[0]-1e-10<=E[0]&&A[2]+1e-10>=E[2]}}var C=jv(f,O,s),R=[],P=n.requestEncoding;if(P=void 0!==P?P:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var I=t.OperationsMetadata.GetTile.DCP.HTTP.Get,N=0,z=I.length;N<z;++N)if(I[N].Constraint){var F=g(I[N].Constraint,(function(t){return"GetEncoding"==t.name})).AllowedValues.Value;if(""===P&&(P=F[0]),P!==cx)break;y(F,cx)&&R.push(I[N].href)}else I[N].href&&(P=cx,R.push(I[N].href));return 0===R.length&&(P=hx,i.ResourceURL.forEach((function(t){"tile"===t.resourceType&&(a=t.format,R.push(t.template))}))),{urls:R,layer:n.layer,matrixSet:o,format:a,projection:h,requestEncoding:P,tileGrid:C,style:u,dimensions:c,wrapX:d,crossOrigin:n.crossOrigin}},vL.source.XYZ=jd,vL.source.Zoomify=lb,vL.source.Zoomify.CustomTile=fb,vL.source.common={},vL.source.common.DEFAULT_WMS_VERSION=Bb,vL.source.ogcTileUtil={},vL.source.ogcTileUtil.getMapTileUrlTemplate=Qb,vL.source.ogcTileUtil.getTileSetInfo=ig,vL.source.ogcTileUtil.getVectorTileUrlTemplate=tg,vL.source.sourcesFromTileGrid=function(t,n){var i=new Dc(32),r=t.getExtent();return function(e,o){i.expireCache(),r&&(e=Yn(r,e));var s=t.getZForResolution(o),a=[];return t.forEachTileCoord(e,s,(function(t){var r=t.toString();if(!i.containsKey(r)){var e=n(t);i.set(r,e)}a.push(i.get(r))})),a}},vL.sphere={},vL.sphere.DEFAULT_RADIUS=ur,vL.sphere.getArea=function t(n,i){var r=i||{},e=r.radius||ur,o=r.projection||"EPSG:3857",s=n.getType();s!==Pt.GEOMETRY_COLLECTION&&(n=n.clone().transform(o,"EPSG:4326"));var a,u,c,h,f,l,v=0;switch(s){case Pt.POINT:case Pt.MULTI_POINT:case Pt.LINE_STRING:case Pt.MULTI_LINE_STRING:case Pt.LINEAR_RING:break;case Pt.POLYGON:for(a=n.getCoordinates(),v=Math.abs(fr(a[0],e)),c=1,h=a.length;c<h;++c)v-=Math.abs(fr(a[c],e));break;case Pt.MULTI_POLYGON:for(c=0,h=(a=n.getCoordinates()).length;c<h;++c)for(u=a[c],v+=Math.abs(fr(u[0],e)),f=1,l=u.length;f<l;++f)v-=Math.abs(fr(u[f],e));break;case Pt.GEOMETRY_COLLECTION:var d=n.getGeometries();for(c=0,h=d.length;c<h;++c)v+=t(d[c],i);break;default:throw new Error("Unsupported geometry type: "+s)}return v},vL.sphere.getDistance=cr,vL.sphere.getLength=function t(n,i){var r=i||{},e=r.radius||ur,o=r.projection||"EPSG:3857",s=n.getType();s!==Pt.GEOMETRY_COLLECTION&&(n=n.clone().transform(o,"EPSG:4326"));var a,u,c,h,f,l,v=0;switch(s){case Pt.POINT:case Pt.MULTI_POINT:break;case Pt.LINE_STRING:case Pt.LINEAR_RING:v=hr(a=n.getCoordinates(),e);break;case Pt.MULTI_LINE_STRING:case Pt.POLYGON:for(c=0,h=(a=n.getCoordinates()).length;c<h;++c)v+=hr(a[c],e);break;case Pt.MULTI_POLYGON:for(c=0,h=(a=n.getCoordinates()).length;c<h;++c)for(f=0,l=(u=a[c]).length;f<l;++f)v+=hr(u[f],e);break;case Pt.GEOMETRY_COLLECTION:var d=n.getGeometries();for(c=0,h=d.length;c<h;++c)v+=t(d[c],i);break;default:throw new Error("Unsupported geometry type: "+s)}return v},vL.sphere.offset=lr,vL.string={},vL.string.compareVersions=Hi,vL.string.padNumber=Xi,vL.structs={},vL.structs.LRUCache=Dc,vL.structs.LinkedList=td,vL.structs.PriorityQueue=Ea,vL.structs.PriorityQueue.DROP=Ta,vL.structs.RBush=id,vL.style={},vL.style.Circle=Ov,vL.style.Fill=Tv,vL.style.Icon=Uv,vL.style.IconImage=Gv,vL.style.IconImage.get=Lv,vL.style.IconImageCache=Ho,vL.style.IconImageCache.shared=Jo,vL.style.Image=Sv,vL.style.RegularShape=Mv,vL.style.Stroke=qv,vL.style.Style=Yv,vL.style.Style.createDefaultStyle=Hv,vL.style.Style.createEditingStyle=Jv,vL.style.Style.toFunction=Vv,vL.style.Text=Qv,vL.style.expressions={},vL.style.expressions.Operators=Jl,vL.style.expressions.PALETTE_TEXTURE_ARRAY=vv,vL.style.expressions.arrayToGlsl=$l,vL.style.expressions.colorToGlsl=Ql,vL.style.expressions.expressionToGlsl=iv,vL.style.expressions.getStringNumberEquivalent=tv,vL.style.expressions.getValueType=Kl,vL.style.expressions.isTypeUnique=Yl,vL.style.expressions.numberToGlsl=Zl,vL.style.expressions.stringToGlsl=nv,vL.style.expressions.uniformNameForVariable=lv,vL.tilecoord={},vL.tilecoord.createOrUpdate=Uc,vL.tilecoord.fromKey=Vc,vL.tilecoord.getCacheKeyForTileKey=Wc,vL.tilecoord.getKey=Bc,vL.tilecoord.getKeyZXY=qc,vL.tilecoord.hash=Xc,vL.tilecoord.withinExtentAndZ=Hc,vL.tilegrid={},vL.tilegrid.TileGrid=Vh,vL.tilegrid.WMTS=xv,vL.tilegrid.WMTS.createFromCapabilitiesMatrixSet=jv,vL.tilegrid.common={},vL.tilegrid.common.DEFAULT_MAX_ZOOM=42,vL.tilegrid.common.DEFAULT_TILE_SIZE=za,vL.tilegrid.createForExtent=Jh,vL.tilegrid.createForProjection=Zh,vL.tilegrid.createXYZ=Kh,vL.tilegrid.extentFromProjection=$h,vL.tilegrid.getForProjection=Xh,vL.tilegrid.wrapX=Hh,vL.tileurlfunction={},vL.tileurlfunction.createFromTemplate=Qh,vL.tileurlfunction.createFromTemplates=tf,vL.tileurlfunction.createFromTileUrlFunctions=nf;vL.tileurlfunction.expandUrl=ef,vL.tileurlfunction.nullTileUrlFunction=rf,vL.transform={},vL.transform.apply=nn,vL.transform.compose=an,vL.transform.composeCssTransform=function(t,n,i,r,e,o,s){return hn(an([1,0,0,1,0,0],t,n,i,r,e,o,s))},vL.transform.create=Yt,vL.transform.determinant=cn,vL.transform.invert=function(t){return un(t,t)},vL.transform.makeInverse=un,vL.transform.makeScale=on,vL.transform.multiply=$t,vL.transform.reset=Zt,vL.transform.rotate=rn,vL.transform.scale=en,vL.transform.set=Qt,vL.transform.setFromArray=tn,vL.transform.toString=hn,vL.transform.translate=sn,vL.uri={},vL.uri.appendParams=of,vL.util={},vL.util.VERSION=a,vL.util.abstract=r,vL.util.getUid=o,vL.vec={},vL.vec.mat4={},vL.vec.mat4.create=Xf,vL.vec.mat4.fromTransform=Hf,vL.webgl={},vL.webgl.ARRAY_BUFFER=af,vL.webgl.Buffer=qf,vL.webgl.Buffer.getArrayClassForType=Uf,vL.webgl.DYNAMIC_DRAW=hf,vL.webgl.ELEMENT_ARRAY_BUFFER=uf,vL.webgl.FLOAT=ff,vL.webgl.Helper=al,vL.webgl.Helper.computeAttributesStride=ol,vL.webgl.PaletteTexture=ul,vL.webgl.PostProcessingPass=Vf,vL.webgl.RenderTarget=hl,vL.webgl.STATIC_DRAW=cf,vL.webgl.STREAM_DRAW=35040,vL.webgl.ShaderBuilder={},vL.webgl.ShaderBuilder.ShaderBuilder=mv,vL.webgl.ShaderBuilder.parseLiteralStyle=wv,vL.webgl.TileTexture=bl,vL.webgl.UNSIGNED_BYTE=5121,vL.webgl.UNSIGNED_INT=5125,vL.webgl.UNSIGNED_SHORT=5123,vL.webgl.getContext=vf,vL.webgl.getSupportedExtensions=function(){if(!sf){var t=vf(document.createElement("canvas"));t&&(sf=t.getSupportedExtensions())}return sf},vL.xml={},vL.xml.OBJECT_PROPERTY_NODE_FACTORY=Ef,vL.xml.XML_SCHEMA_INSTANCE_URI=df,vL.xml.createElementNS=pf,vL.xml.getAllTextContent=yf,vL.xml.Fw=mf,vL.xml.getAttributeNS=bf,vL.xml.getDocument=Gf,vL.xml.getXMLSerializer=Ff,vL.xml.isDocument=wf,vL.xml.makeArrayExtender=xf,vL.xml.makeArrayPusher=jf,vL.xml.makeArraySerializer=Of,vL.xml.makeChildAppender=_f,vL.xml.makeObjectPropertyPusher=kf,vL.xml.makeObjectPropertySetter=Mf,vL.xml.makeReplacer=Sf,vL.xml.makeSequence=Af,vL.xml.makeSimpleNodeFactory=Tf,vL.xml.makeStructureNS=Cf,vL.xml.parse=gf,vL.xml.parseNode=Rf,vL.xml.pushParseAndPop=Pf,vL.xml.pushSerializeAndPop=Nf,vL.xml.registerDocument=function(t){Lf=t},vL.xml.registerXMLSerializer=function(t){zf=t},vL.xml.serialize=If;var dL=vL},150:function(t,n,i){"use strict";i.d(n,{Ie:function(){return h},It:function(){return s},L:function(){return r},L5:function(){return l},P1:function(){return d},Qb:function(){return v},pd:function(){return f},sf:function(){return u}});var r={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},e={};for(var o in r)r.hasOwnProperty(o)&&(e[r[o]]=parseInt(o,10));var s=[e.BitsPerSample,e.ExtraSamples,e.SampleFormat,e.StripByteCounts,e.StripOffsets,e.StripRowCounts,e.TileByteCounts,e.TileOffsets,e.SubIFDs],a={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},u={};for(var c in a)a.hasOwnProperty(c)&&(u[a[c]]=parseInt(c,10));var h={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},f={Unspecified:0,Assocalpha:1,Unassalpha:2},l={Version:0,AddCompression:1},v={None:0,Deflate:1},d={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},p={};for(var y in d)d.hasOwnProperty(y)&&(p[d[y]]=parseInt(y,10))}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=n,r.d=function(t,n){for(var i in n)r.o(n,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},r.f={},r.e=function(t){return Promise.all(Object.keys(r.f).reduce((function(n,i){return r.f[i](t,n),n}),[]))},r.u=function(t){return t+".ol.js"},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},t={},r.l=function(n,i,e,o){if(t[n])t[n].push(i);else{var s,a;if(void 0!==e)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var h=u[c];if(h.getAttribute("src")==n||h.getAttribute("data-webpack")=="ol:"+e){s=h;break}}s||(a=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,r.nc&&s.setAttribute("nonce",r.nc),s.setAttribute("data-webpack","ol:"+e),s.src=n),t[n]=[i];var f=function(i,r){s.onerror=s.onload=null,clearTimeout(l);var e=t[n];if(delete t[n],s.parentNode&&s.parentNode.removeChild(s),e&&e.forEach((function(t){return t(r)})),i)return i(r)},l=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),a&&document.head.appendChild(s)}},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.p="",function(){var t={179:0};r.f.j=function(n,i){var e=r.o(t,n)?t[n]:void 0;if(0!==e)if(e)i.push(e[2]);else{var o=new Promise((function(i,r){e=t[n]=[i,r]}));i.push(e[2]=o);var s=r.p+r.u(n),a=new Error;r.l(s,(function(i){if(r.o(t,n)&&(0!==(e=t[n])&&(t[n]=void 0),e)){var o=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+n+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,e[1](a)}}),"chunk-"+n,n)}};var n=function(n,i){var e,o,s=i[0],a=i[1],u=i[2],c=0;if(s.some((function(n){return 0!==t[n]}))){for(e in a)r.o(a,e)&&(r.m[e]=a[e]);if(u)u(r)}for(n&&n(i);c<s.length;c++)o=s[c],r.o(t,o)&&t[o]&&t[o][0](),t[o]=0},i=self.webpackChunkol=self.webpackChunkol||[];i.forEach(n.bind(null,0)),i.push=n.bind(null,i.push.bind(i))}(),r(760);var e=r(920);return e=e.default}()}));
//# sourceMappingURL=ol.js.map